libetpan - fdik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
1.8 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. #ifndef LIBETPAN_CONFIG_H
  2. #define LIBETPAN_CONFIG_H
  3. #ifdef _MSC_VER
  4. #ifndef WIN32
  5. #define WIN32 1
  6. #endif
  7. #endif
  8. #ifdef WIN32
  9. # define PATH_MAX 512
  10. // Windows API security level
  11. # define SECURITY_WIN32
  12. # ifdef __cplusplus
  13. # define PropVariantInit __inline PropVariantInit
  14. # pragma warning( push )
  15. # pragma warning( disable : 4005 4141 )
  16. # endif
  17. # include <tchar.h>
  18. # include <stdio.h>
  19. # include <string.h>
  20. # include <io.h>
  21. # include <Winsock2.h>
  22. # ifdef __cplusplus
  23. # pragma warning( pop )
  24. # undef PropVariantInit
  25. # endif
  26. # if !defined(snprintf)
  27. # define snprintf _snprintf
  28. # endif
  29. # if !defined(strncasecmp)
  30. # define strncasecmp _strnicmp
  31. # endif
  32. # if !defined(strcasecmp)
  33. # define strcasecmp _stricmp
  34. # endif
  35. /* use Windows Types */
  36. # if !defined(uint8_t)
  37. typedef UINT8 uint8_t;
  38. # endif
  39. # if !defined(ssize_t)
  40. typedef SSIZE_T ssize_t;
  41. # endif
  42. # if !defined(uint16_t)
  43. typedef UINT16 uint16_t;
  44. # endif
  45. # if !defined(int16_t)
  46. typedef INT16 int16_t;
  47. # endif
  48. # if !defined(uint32_t)
  49. typedef UINT32 uint32_t;
  50. # endif
  51. # if !defined(int32_t)
  52. typedef INT32 int32_t;
  53. # endif
  54. # if !defined(uint64_t)
  55. typedef UINT64 uint64_t;
  56. # endif
  57. # if !defined(int64_t)
  58. typedef INT64 int64_t;
  59. # endif
  60. # if !defined(pid_t)
  61. typedef int pid_t;
  62. # endif
  63. # if !defined(caddr_t)
  64. typedef void * caddr_t;
  65. # endif
  66. /* avoid config.h*/
  67. # define CONFIG_H
  68. #endif // WIN32
  69. #include <limits.h>
  70. #ifdef _MSC_VER
  71. # define MMAP_UNAVAILABLE
  72. # define inline __inline
  73. #else
  74. # include <sys/param.h>
  75. #endif
  76. #define MAIL_DIR_SEPARATOR '/'
  77. #define MAIL_DIR_SEPARATOR_S "/"
  78. #ifdef _MSC_VER
  79. # ifdef LIBETPAN_DLL
  80. # define LIBETPAN_EXPORT __declspec(dllexport)
  81. # else
  82. # define LIBETPAN_EXPORT __declspec(dllimport)
  83. # endif
  84. #else
  85. # define LIBETPAN_EXPORT
  86. #endif
  87. /* REENTRANT under WINDOWS */
  88. #ifndef LIBETPAN_REENTRANT
  89. # define LIBETPAN_REENTRANT 1
  90. #endif
  91. #endif