test cases/common/79 same basename/lib.c
raw| 1 | #if defined _WIN32 || defined __CYGWIN__ |
| 2 | #define DLL_PUBLIC __declspec(dllexport) |
| 3 | #else |
| 4 | #if defined __GNUC__ |
| 5 | #define DLL_PUBLIC __attribute__ ((visibility("default"))) |
| 6 | #else |
| 7 | #pragma message ("Compiler does not support symbol visibility.") |
| 8 | #define DLL_PUBLIC |
| 9 | #endif |
| 10 | #endif |
| 11 | |
| 12 | #if defined SHAR |
| 13 | int DLL_PUBLIC func(void) { |
| 14 | return 1; |
| 15 | } |
| 16 | #elif defined STAT |
| 17 | int func(void) { |
| 18 | return 0; |
| 19 | } |
| 20 | #else |
| 21 | #error "Missing type definition." |
| 22 | #endif |