| 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 |
#ifndef WORK |
| 13 |
# error "Did not get shared only arguments" |
| 14 |
#endif |
| 15 |
|
| 16 |
#ifdef BREAK |
| 17 |
# error "got static only C args, but shouldn't have" |
| 18 |
#endif |
| 19 |
|
| 20 |
int DLL_PUBLIC libfunc(void) { |
| 21 |
return 3; |
| 22 |
} |