diff options
Diffstat (limited to 'meson/test cases/common/79 same basename/lib.c')
-rw-r--r-- | meson/test cases/common/79 same basename/lib.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meson/test cases/common/79 same basename/lib.c b/meson/test cases/common/79 same basename/lib.c new file mode 100644 index 000000000..b3798e99e --- /dev/null +++ b/meson/test cases/common/79 same basename/lib.c @@ -0,0 +1,23 @@ +#if defined _WIN32 || defined __CYGWIN__ +#define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +#if defined SHAR +int DLL_PUBLIC func(void) { + return 1; +} +#elif defined STAT +int func(void) { + return 0; +} +#else +#error "Missing type definition." +#endif + |