declspec.h 456 B

123456789101112131415161718192021
  1. #ifndef DECLSPEC_H_INCLUDED
  2. #define DECLSPEC_H_INCLUDED
  3. #if defined(WIN32) && !defined(STATICLIB)
  4. /* for windows dll */
  5. #ifdef NATPMP_EXPORTS
  6. #define LIBSPEC __declspec(dllexport)
  7. #else
  8. #define LIBSPEC __declspec(dllimport)
  9. #endif
  10. #else
  11. #if defined(__GNUC__) && __GNUC__ >= 4
  12. /* fix dynlib for OS X 10.9.2 and Apple LLVM version 5.0 */
  13. #define LIBSPEC __attribute__ ((visibility ("default")))
  14. #else
  15. #define LIBSPEC
  16. #endif
  17. #endif
  18. #endif