59f24c8ab6aaaf2e0d2e7ddfae535e61e949b881
[dana/cg-glib.git] / glibconfig.h.win32.in
1 /* glibconfig.h.win32.in Merged from two versions generated by configure for gcc and MSVC.  */
2 /* glibconfig.h
3  *
4  * This is a generated file.  Please modify 'configure.in'
5  */
6
7 #ifndef __G_LIBCONFIG_H__
8 #define __G_LIBCONFIG_H__
9
10 #include <glib/gmacros.h>
11
12 #include <limits.h>
13 #include <float.h>
14
15 G_BEGIN_DECLS
16
17 #define G_MINFLOAT      FLT_MIN
18 #define G_MAXFLOAT      FLT_MAX
19 #define G_MINDOUBLE     DBL_MIN
20 #define G_MAXDOUBLE     DBL_MAX
21 #define G_MINSHORT      SHRT_MIN
22 #define G_MAXSHORT      SHRT_MAX
23 #define G_MAXUSHORT     USHRT_MAX
24 #define G_MININT        INT_MIN
25 #define G_MAXINT        INT_MAX
26 #define G_MAXUINT       UINT_MAX
27 #define G_MINLONG       LONG_MIN
28 #define G_MAXLONG       LONG_MAX
29 #define G_MAXULONG      ULONG_MAX
30
31 typedef signed char gint8;
32 typedef unsigned char guint8;
33 typedef signed short gint16;
34 typedef unsigned short guint16;
35 #define G_GINT16_MODIFIER "h"
36 #define G_GINT16_FORMAT "hi"
37 #define G_GUINT16_FORMAT "hu"
38 typedef signed int gint32;
39 typedef unsigned int guint32;
40 #define G_GINT32_MODIFIER ""
41 #define G_GINT32_FORMAT "i"
42 #define G_GUINT32_FORMAT "u"
43 #define G_HAVE_GINT64 1          /* deprecated, always true */
44
45 #ifndef _MSC_VER
46 G_GNUC_EXTENSION typedef signed long long gint64;
47 G_GNUC_EXTENSION typedef unsigned long long guint64;
48 #else /* _MSC_VER */
49 typedef signed __int64 gint64;
50 typedef unsigned __int64 guint64;
51 #endif /* _MSC_VER */
52
53 #ifndef _MSC_VER
54 #define G_GINT64_CONSTANT(val)  (G_GNUC_EXTENSION (val##LL))
55 #else /* _MSC_VER */
56 #define G_GINT64_CONSTANT(val)  (val##i64)
57 #endif /* _MSC_VER */
58 #ifndef _MSC_VER
59 #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
60 #else /* _MSC_VER */
61 #define G_GUINT64_CONSTANT(val) (val##Ui64)
62 #endif /* _MSC_VER */
63 #define G_GINT64_MODIFIER "I64"
64 #define G_GINT64_FORMAT "I64i"
65 #define G_GUINT64_FORMAT "I64u"
66
67 #if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64)
68
69 #define GLIB_SIZEOF_VOID_P 8
70 #define GLIB_SIZEOF_LONG   4
71 #define GLIB_SIZEOF_SIZE_T 8
72
73 typedef signed long long gssize;
74 typedef unsigned long long gsize;
75 #define G_GSIZE_MODIFIER "I64"
76 #define G_GSSIZE_FORMAT "I64d"
77 #define G_GSIZE_FORMAT "I64u"
78
79 #define G_MAXSIZE       G_MAXUINT64
80 #define G_MINSSIZE      G_MININT64
81 #define G_MAXSSIZE      G_MAXINT64
82
83 #else
84
85 #define GLIB_SIZEOF_VOID_P 4
86 #define GLIB_SIZEOF_LONG   4
87 #define GLIB_SIZEOF_SIZE_T 4
88
89 typedef signed int gssize;
90 typedef unsigned int gsize;
91 #define G_GSIZE_MODIFIER ""
92 #define G_GSSIZE_FORMAT "i"
93 #define G_GSIZE_FORMAT "u"
94
95 #define G_MAXSIZE       G_MAXUINT
96 #define G_MINSSIZE      G_MININT
97 #define G_MAXSSIZE      G_MAXINT
98
99 #endif
100
101 typedef gint64 goffset;
102 #define G_MINOFFSET     G_MININT64
103 #define G_MAXOFFSET     G_MAXINT64
104
105 #define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER
106 #define G_GOFFSET_FORMAT        G_GINT64_FORMAT
107 #define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
108
109
110 #ifndef _WIN64
111
112 #define GPOINTER_TO_INT(p)      ((gint)   (p))
113 #define GPOINTER_TO_UINT(p)     ((guint)  (p))
114
115 #define GINT_TO_POINTER(i)      ((gpointer)  (i))
116 #define GUINT_TO_POINTER(u)     ((gpointer)  (u))
117
118 typedef signed int gintptr;
119 typedef unsigned int guintptr;
120
121 #else
122
123 #define GPOINTER_TO_INT(p)      ((gint)  (gint64) (p))
124 #define GPOINTER_TO_UINT(p)     ((guint) (guint64) (p))
125
126 #define GINT_TO_POINTER(i)      ((gpointer) (gint64) (i))
127 #define GUINT_TO_POINTER(u)     ((gpointer) (guint64) (u))
128
129 #ifndef _MSC_VER
130 typedef signed long long gintptr;
131 typedef unsigned long long guintptr;
132 #else
133 typedef signed __int64 gintptr;
134 typedef unsigned __int64 guintptr;
135 #endif
136
137 #endif
138
139 #ifdef NeXT /* @#%@! NeXTStep */
140 # define g_ATEXIT(proc) (!atexit (proc))
141 #else
142 # define g_ATEXIT(proc) (atexit (proc))
143 #endif
144
145 #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
146
147 #define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
148 #define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
149 #define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@
150
151 #define G_OS_WIN32
152 #define G_PLATFORM_WIN32
153 @GLIB_WIN32_STATIC_COMPILATION_DEFINE@
154
155 #ifndef _MSC_VER
156 #define G_VA_COPY       va_copy
157 #endif /* not _MSC_VER */
158
159 #ifdef  __cplusplus
160 #define G_HAVE_INLINE   1
161 #else   /* !__cplusplus */
162 #ifndef _MSC_VER
163 #define G_HAVE_INLINE 1
164 #endif /* _MSC_VER */
165 #define G_HAVE___INLINE 1
166 #if !defined(_MSC_VER) && !defined(__DMC__)
167 #define G_HAVE___INLINE__ 1
168 #endif /* !_MSC_VER and !__DMC__ */
169 #endif  /* !__cplusplus */
170
171 #define G_CAN_INLINE    1
172
173 #ifndef _MSC_VER
174 #define G_HAVE_ISO_VARARGS 1
175
176 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
177  * is passed ISO vararg support is turned off, and there is no work
178  * around to turn it on, so we unconditionally turn it off.
179  */
180 #if __GNUC__ == 2 && __GNUC_MINOR__ == 95
181 #  undef G_HAVE_ISO_VARARGS
182 #endif
183
184 #define G_HAVE_GNUC_VARARGS 1
185 #else /* _MSC_VER */
186 /* varargs macros available since msvc8 (vs2005) */
187 #  if _MSC_VER >= 1400
188 #    define G_HAVE_ISO_VARARGS 1
189 #   endif
190 #endif /* not _MSC_VER */
191 #define G_HAVE_GROWING_STACK 0
192
193 #define G_GNUC_INTERNAL
194
195 #define G_THREADS_ENABLED
196 #define G_THREADS_IMPL_WIN32
197 typedef struct _GMutex* GStaticMutex;
198 #define G_STATIC_MUTEX_INIT NULL
199 #define g_static_mutex_get_mutex(mutex) \
200   (g_static_mutex_get_mutex_impl_shortcut (mutex))
201 /* This represents a system thread as used by the implementation. An
202  * alien implementaion, as loaded by g_thread_init can only count on
203  * "sizeof (gpointer)" bytes to store their info. We however need more
204  * for some of our native implementations. */
205 typedef union _GSystemThread GSystemThread;
206 union _GSystemThread
207 {
208 #ifndef _WIN64
209   char   data[4];
210 #else
211   char   data[8];
212 #endif
213   double dummy_double;
214   void  *dummy_pointer;
215   long   dummy_long;
216 };
217
218 #define GINT16_TO_LE(val)       ((gint16) (val))
219 #define GUINT16_TO_LE(val)      ((guint16) (val))
220 #define GINT16_TO_BE(val)       ((gint16) GUINT16_SWAP_LE_BE (val))
221 #define GUINT16_TO_BE(val)      (GUINT16_SWAP_LE_BE (val))
222 #define GINT32_TO_LE(val)       ((gint32) (val))
223 #define GUINT32_TO_LE(val)      ((guint32) (val))
224 #define GINT32_TO_BE(val)       ((gint32) GUINT32_SWAP_LE_BE (val))
225 #define GUINT32_TO_BE(val)      (GUINT32_SWAP_LE_BE (val))
226 #define GINT64_TO_LE(val)       ((gint64) (val))
227 #define GUINT64_TO_LE(val)      ((guint64) (val))
228 #define GINT64_TO_BE(val)       ((gint64) GUINT64_SWAP_LE_BE (val))
229 #define GUINT64_TO_BE(val)      (GUINT64_SWAP_LE_BE (val))
230 #define GLONG_TO_LE(val)        ((glong) GINT32_TO_LE (val))
231 #define GULONG_TO_LE(val)       ((gulong) GUINT32_TO_LE (val))
232 #define GLONG_TO_BE(val)        ((glong) GINT32_TO_BE (val))
233 #define GULONG_TO_BE(val)       ((gulong) GUINT32_TO_BE (val))
234 #define GINT_TO_LE(val)         ((gint) GINT32_TO_LE (val))
235 #define GUINT_TO_LE(val)        ((guint) GUINT32_TO_LE (val))
236 #define GINT_TO_BE(val)         ((gint) GINT32_TO_BE (val))
237 #define GUINT_TO_BE(val)        ((guint) GUINT32_TO_BE (val))
238 #define G_BYTE_ORDER G_LITTLE_ENDIAN
239
240 #define GLIB_SYSDEF_POLLIN =1
241 #define GLIB_SYSDEF_POLLOUT =4
242 #define GLIB_SYSDEF_POLLPRI =2
243 #define GLIB_SYSDEF_POLLHUP =16
244 #define GLIB_SYSDEF_POLLERR =8
245 #define GLIB_SYSDEF_POLLNVAL =32
246
247 #define G_MODULE_SUFFIX "dll"
248
249 /* A GPid is an abstraction for a process "handle". It is *not* an
250  * abstraction for a process identifier in general. GPid is used in
251  * GLib only for descendant processes spawned with the g_spawn*
252  * functions. On POSIX there is no "process handle" concept as such,
253  * but on Windows a GPid is a handle to a process, a kind of pointer,
254  * not a process identifier.
255  */
256 typedef void * GPid;
257
258 #define GLIB_SYSDEF_AF_UNIX 1
259 #define GLIB_SYSDEF_AF_INET 2
260 #define GLIB_SYSDEF_AF_INET6 23
261
262 #define GLIB_SYSDEF_MSG_OOB       1
263 #define GLIB_SYSDEF_MSG_PEEK      2
264 #define GLIB_SYSDEF_MSG_DONTROUTE 4
265
266 G_END_DECLS
267
268 #endif /* GLIBCONFIG_H */