initial load of upstream version 1.06.32
[xmlrpc-c] / Windows / xmlrpc_win32_config.h
1 #pragma once
2
3 /* From xmlrpc_amconfig.h */
4   
5 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
6 /* #undef size_t */
7
8 /* Define if you have the setgroups function.  */
9 /* #undef HAVE_SETGROUPS */
10
11 /* #undef HAVE_ASPRINTF */
12
13 /* Define if you have the wcsncmp function.  */
14 #define HAVE_WCSNCMP 1
15
16 /* Define if you have the <stdarg.h> header file.  */
17 #define HAVE_STDARG_H 1
18
19 #define HAVE_SYS_FILIO_H 0
20
21 #define HAVE_SYS_IOCTL_H 0
22
23 /* Define if you have the <wchar.h> header file.  */
24 #define HAVE_WCHAR_H 1
25
26 /* Define if you have the socket library (-lsocket).  */
27 /* #undef HAVE_LIBSOCKET */
28
29 /* Name of package */
30 #define PACKAGE "xmlrpc-c"
31
32
33 /* Win32 version of xmlrpc_config.h
34
35    Logical macros are 0 or 1 instead of the more traditional defined and
36    undefined.  That's so we can distinguish when compiling code between
37    "false" and some problem with the code.
38 */
39
40 #define _CRT_SECURE_NO_DEPRECATE
41
42 /* Define if va_list is actually an array. */
43 #define VA_LIST_IS_ARRAY 0
44   
45 /* Define if we're using a copy of libwww with built-in SSL support. */
46 #define HAVE_LIBWWW_SSL 0
47
48 /* Used to mark unused variables under GCC... */
49 #define ATTR_UNUSED
50
51 #define HAVE_UNICODE_WCHAR
52   
53 #define DIRECTORY_SEPARATOR "\\"
54
55   
56 /* Windows-specific includes. */
57  
58 #include <stdio.h>
59 #include <stdlib.h>
60 #include <string.h>
61 #if !defined (vsnprintf)
62   #define vsnprintf _vsnprintf
63 #endif
64 #if !defined (snprintf)
65   #define snprintf _snprintf
66 #endif
67 #if !defined (popen) 
68   #define popen _popen
69 #endif
70
71
72 #include <time.h>
73 #include <WINSOCK.h>
74 #include <direct.h>  /* for _chdir() */
75
76 /* We are linking against the multithreaded versions
77    of the Microsoft runtimes - this makes gmtime 
78    equiv to gmtime_r in that Windows gmtime is threadsafe
79 */
80 #if !defined (gmtime_r)
81 static struct tm* gmtime_r(const time_t *timep, struct tm* result)
82 {
83         struct tm *local;
84
85         local = gmtime(timep);
86         memcpy(result,local,sizeof(struct tm));
87         return result;
88 }
89
90 #endif
91
92 #ifndef socklen_t
93 typedef unsigned int socklen_t;
94 #endif
95
96 /* inttypes.h */
97 #ifndef int8_t
98 typedef signed char       int8_t;
99 #endif
100 #ifndef uint8_t
101 typedef unsigned char     uint8_t;
102 #endif
103 #ifndef int16_t
104 typedef signed short      int16_t;
105 #endif
106 #ifndef uint16_t
107 typedef unsigned short    uint16_t;
108 #endif
109 #ifndef int32_t
110 typedef signed int        int32_t;
111 #endif
112 #ifndef uint32_t
113 typedef unsigned int      uint32_t;
114 #endif
115 #ifndef int64_t
116 typedef __int64           int64_t;
117 #endif
118 #ifndef uint64_t
119 typedef unsigned __int64  uint64_t;
120 #endif
121
122 #define __inline__ __inline
123
124 #define HAVE_SETENV 1
125 __inline BOOL setenv(const char* name, const char* value, int i) 
126 {
127         return (SetEnvironmentVariable(name, value) != 0) ? TRUE : FALSE;
128 }
129
130 #define strcasecmp(a,b) stricmp((a),(b))