hplatform.h 542 B

123456789101112131415161718192021222324252627
  1. #ifndef H_PLATFORM_H
  2. #define H_PLATFORM_H
  3. #ifdef _MSC_VER
  4. #ifndef WIN32_LEAN_AND_MEAN
  5. #define WIN32_LEAN_AND_MEAN
  6. #endif
  7. #include <winsock2.h>
  8. #include <windows.h>
  9. #undef WIN32_LEAN_AND_MEAN
  10. #else
  11. #include <unistd.h>
  12. #include <pthread.h>
  13. #include <sys/time.h>
  14. #include <strings.h>
  15. #define stricmp strcasecmp
  16. #define strnicmp strncasecmp
  17. #endif
  18. #ifdef __GNUC__
  19. #define GNUC_ALIGN(n) __attribute__((aligned(n)))
  20. #else
  21. #define GNUC_ALIGN(n)
  22. #endif
  23. #endif // H_PLATFORM_H