comparison src/define.h @ 122:bdb38b434c0a

more changes from Fridrich Strba to avoid installing our config.h
author Carl Byington <carl@five-ten-sg.com>
date Mon, 02 Feb 2009 21:55:48 -0800
parents 6395ced2b8b2
children ab2a11e72250
comparison
equal deleted inserted replaced
121:8399ef94c11b 122:bdb38b434c0a
7 7
8 #ifndef DEFINEH_H 8 #ifndef DEFINEH_H
9 #define DEFINEH_H 9 #define DEFINEH_H
10 10
11 #ifdef HAVE_CONFIG_H 11 #ifdef HAVE_CONFIG_H
12 #include <libpst/config.h> 12 #include "config.h"
13 #endif 13 #endif
14 14
15 #ifdef _WIN32 15 #ifdef _WIN32
16 #undef HAVE_UNISTD_H 16 #undef HAVE_UNISTD_H
17 #define HAVE_DIRECT_H 17 #define HAVE_DIRECT_H
43 #define DEBUG_DECRYPT_NO 8 43 #define DEBUG_DECRYPT_NO 8
44 #define DEBUG_FUNCENT_NO 9 44 #define DEBUG_FUNCENT_NO 9
45 #define DEBUG_FUNCRET_NO 10 45 #define DEBUG_FUNCRET_NO 10
46 #define DEBUG_HEXDUMP_NO 11 46 #define DEBUG_HEXDUMP_NO 11
47 47
48 #ifdef HAVE_STDIO_H
49 #include <stdio.h>
50 #endif
51
52 #ifdef HAVE_STDLIB_H
53 #include <stdlib.h>
54 #endif
55
56 #ifdef HAVE_STDARG_H
57 #include <stdarg.h>
58 #endif
59
60 #ifdef HAVE_TIME_H 48 #ifdef HAVE_TIME_H
61 #include <time.h> 49 #include <time.h>
62 #endif 50 #endif
63 51
64 #ifdef HAVE_STRING_H 52 #ifdef HAVE_STRING_H
91 #ifdef _WIN32 79 #ifdef _WIN32
92 #include <direct.h> // win32 80 #include <direct.h> // win32
93 81
94 #define D_MKDIR(x) mkdir(x) 82 #define D_MKDIR(x) mkdir(x)
95 #define chdir _chdir 83 #define chdir _chdir
96 84 #define strcasecmp _stricmp
97 #define vsnprintf _vsnprintf 85 #define vsnprintf _vsnprintf
98 #define snprintf _snprintf 86 #define snprintf _snprintf
99 #ifdef _MSC_VER 87 #ifdef _MSC_VER
100 #define ftello _ftelli64 88 #define ftello _ftelli64
101 #define fseeko _fseeki64 89 #define fseeko _fseeki64
103 #define ftello ftello64 91 #define ftello ftello64
104 #define fseeko fseeko64 92 #define fseeko fseeko64
105 #else 93 #else
106 #error Only MSC and mingw supported for Windows 94 #error Only MSC and mingw supported for Windows
107 #endif 95 #endif
108 #define strcasecmp _stricmp
109 #ifndef __MINGW32__ 96 #ifndef __MINGW32__
110 #define off_t __int64 97 #define off_t __int64
111 #define size_t __int64 98 #define size_t __int64
112 #endif 99 #endif
113 #define int64_t __int64
114 #define uint64_t unsigned __int64
115 #define int32_t __int32
116 #define uint32_t unsigned int
117 #define int16_t short int
118 #define uint16_t unsigned short int
119 #define int8_t signed char
120 #define uint8_t unsigned char
121 #ifndef UINT64_MAX 100 #ifndef UINT64_MAX
122 #define UINT64_MAX ((uint64_t)0xffffffffffffffff) 101 #define UINT64_MAX ((uint64_t)0xffffffffffffffff)
123 #endif 102 #endif
124 #define PRIx64 "I64x" 103 #define PRIx64 "I64x"
125 int __cdecl _fseeki64(FILE *, __int64, int); 104 int __cdecl _fseeki64(FILE *, __int64, int);
131 #include "XGetopt.h" 110 #include "XGetopt.h"
132 #endif 111 #endif
133 112
134 #include <windows.h> 113 #include <windows.h>
135 #else 114 #else
136 #ifdef HAVE_STDINT_H
137 #include <stdint.h>
138 #endif
139 #ifdef HAVE_INTTYPES_H
140 #include <inttypes.h>
141 #endif
142 #ifdef HAVE_UNISTD_H 115 #ifdef HAVE_UNISTD_H
143 #include <unistd.h> 116 #include <unistd.h>
144 #define D_MKDIR(x) mkdir(x, PERM_DIRS) 117 #define D_MKDIR(x) mkdir(x, PERM_DIRS)
145 #else 118 #else
146 #include "XGetopt.h" 119 #include "XGetopt.h"