precompile.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //comment: libtoolkit refer it.
  2. #ifdef _WIN32
  3. #include "targetver.h"
  4. #include <WinSock2.h>
  5. #ifndef WIN32_LEAN_AND_MEAN
  6. #define WIN32_LEAN_AND_MEAN
  7. #endif //WIN32_LEAN_AND_MEAN
  8. #include <Mmsystem.h>
  9. #include <process.h>
  10. #include <crtdbg.h>
  11. #include <locale.h>
  12. #include <time.h>
  13. #endif // _WIN32
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <assert.h>
  17. #include <errno.h>
  18. #include <time.h>
  19. #include <string.h>
  20. #ifdef SPABASE_LINKED_AS_STATIC_LIBRARY
  21. #define SPBASE_API
  22. #else //SPABASE_LINKED_AS_STATIC_LIBRARY
  23. #ifdef _WIN32
  24. #ifdef SPBASE_EXPORTS
  25. #ifndef SPBASE_API
  26. #define SPBASE_API __declspec(dllexport)
  27. #endif
  28. #else
  29. #ifndef SPBASE_API
  30. #define SPBASE_API __declspec(dllimport)
  31. //#pragma comment(lib, "SpBase.lib")
  32. #endif
  33. #endif
  34. # elif ( defined(__GNUC__) && __GNUC__ >= 4 )
  35. #define SPBASE_API __attribute__((visibility("default")))
  36. #else // _WIN32
  37. #define SPBASE_API
  38. #endif // _WIN32
  39. #endif //SPABASE_LINKED_AS_STATIC_LIBRARY
  40. #ifdef _WIN32
  41. #ifndef u__int64_t
  42. #define u__int64_t unsigned __int64
  43. #endif //u__int64_t
  44. #endif