1 /* glibconfig.h.win32.in. Originally merged from two versions of
2 * glibconfig.h, generated by the GLib configure script, for gcc and
8 * This is a generated file. Please modify 'glibconfig.h.win32.in'
11 #ifndef __G_LIBCONFIG_H__
12 #define __G_LIBCONFIG_H__
14 #include <glib/gmacros.h>
18 /* #undef GLIB_HAVE_ALLOCA_H */
20 /* Specifies that GLib's g_print*() functions wrap the
21 * system printf functions. This is useful to know, for example,
22 * when using glibc's register_printf_function().
24 #define GLIB_USING_SYSTEM_PRINTF
28 #define G_MINFLOAT FLT_MIN
29 #define G_MAXFLOAT FLT_MAX
30 #define G_MINDOUBLE DBL_MIN
31 #define G_MAXDOUBLE DBL_MAX
32 #define G_MINSHORT SHRT_MIN
33 #define G_MAXSHORT SHRT_MAX
34 #define G_MAXUSHORT USHRT_MAX
35 #define G_MININT INT_MIN
36 #define G_MAXINT INT_MAX
37 #define G_MAXUINT UINT_MAX
38 #define G_MINLONG LONG_MIN
39 #define G_MAXLONG LONG_MAX
40 #define G_MAXULONG ULONG_MAX
42 typedef signed char gint8;
43 typedef unsigned char guint8;
44 typedef signed short gint16;
45 typedef unsigned short guint16;
46 #define G_GINT16_MODIFIER "h"
47 #define G_GINT16_FORMAT "hi"
48 #define G_GUINT16_FORMAT "hu"
49 typedef signed int gint32;
50 typedef unsigned int guint32;
51 #define G_GINT32_MODIFIER ""
52 #define G_GINT32_FORMAT "i"
53 #define G_GUINT32_FORMAT "u"
54 #define G_HAVE_GINT64 1 /* deprecated, always true */
56 G_GNUC_EXTENSION typedef signed long long gint64;
57 G_GNUC_EXTENSION typedef unsigned long long guint64;
59 #define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
60 #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
61 #define G_GINT64_MODIFIER "I64"
62 #define G_GINT64_FORMAT "I64i"
63 #define G_GUINT64_FORMAT "I64u"
65 #if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64)
67 #define GLIB_SIZEOF_VOID_P 8
68 #define GLIB_SIZEOF_LONG 4
69 #define GLIB_SIZEOF_SIZE_T 8
71 typedef signed long long gssize;
72 typedef unsigned long long gsize;
73 #define G_GSIZE_MODIFIER "I64"
74 #define G_GSSIZE_MODIFIER "I64"
75 #define G_GSIZE_FORMAT "I64u"
76 #define G_GSSIZE_FORMAT "I64i"
78 #define G_MAXSIZE G_MAXUINT64
79 #define G_MINSSIZE G_MININT64
80 #define G_MAXSSIZE G_MAXINT64
84 #define GLIB_SIZEOF_VOID_P 4
85 #define GLIB_SIZEOF_LONG 4
86 #define GLIB_SIZEOF_SIZE_T 4
88 typedef signed int gssize;
89 typedef unsigned int gsize;
90 #define G_GSIZE_MODIFIER ""
91 #define G_GSSIZE_MODIFIER ""
92 #define G_GSIZE_FORMAT "u"
93 #define G_GSSIZE_FORMAT "i"
95 #define G_MAXSIZE G_MAXUINT
96 #define G_MINSSIZE G_MININT
97 #define G_MAXSSIZE G_MAXINT
101 typedef gint64 goffset;
102 #define G_MINOFFSET G_MININT64
103 #define G_MAXOFFSET G_MAXINT64
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)
111 # define G_POLLFD_FORMAT "%#I64x"
112 # define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
113 # define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
115 # define GINT_TO_POINTER(i) ((gpointer) (gint64) (i))
116 # define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u))
118 typedef signed long long gintptr;
119 typedef unsigned long long guintptr;
121 # define G_GINTPTR_MODIFIER "I64"
122 # define G_GINTPTR_FORMAT "I64i"
123 # define G_GUINTPTR_FORMAT "I64u"
125 # define G_POLLFD_FORMAT "%#x"
127 # define GPOINTER_TO_INT(p) ((gint) (gint) (p))
128 # define GPOINTER_TO_UINT(p) ((guint) (guint) (p))
130 # define GINT_TO_POINTER(i) ((gpointer) (gint) (i))
131 # define GUINT_TO_POINTER(u) ((gpointer) (guint) (u))
133 typedef signed int gintptr;
134 typedef unsigned int guintptr;
136 # define G_GINTPTR_MODIFIER ""
137 # define G_GINTPTR_FORMAT "i"
138 # define G_GUINTPTR_FORMAT "u"
141 #ifndef G_DISABLE_DEPRECATED
142 #define g_ATEXIT(proc) (atexit (proc))
144 #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
147 #define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
148 #define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
149 #define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@
152 #define G_PLATFORM_WIN32
153 @GLIB_WIN32_STATIC_COMPILATION_DEFINE@
155 #if !defined (_MSC_VER) || (_MSC_VER >= 1800)
156 #define G_VA_COPY va_copy
157 #endif /* not _MSC_VER or 2013 or later */
160 # define G_HAVE_ISO_VARARGS 1
161 # define G_HAVE_GNUC_VARARGS 1
162 # define G_HAVE_GNUC_VISIBILITY 1
164 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
165 * is passed ISO vararg support is turned off, and there is no work
166 * around to turn it on, so we unconditionally turn it off.
168 #if __GNUC__ == 2 && __GNUC_MINOR__ == 95
169 # undef G_HAVE_ISO_VARARGS
172 #define G_HAVE_GROWING_STACK 0
175 # define G_HAVE_ISO_VARARGS 1
176 #endif /* not _MSC_VER */
178 #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
179 # define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
180 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
181 # define G_GNUC_INTERNAL __hidden
182 #elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
183 # define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
185 # define G_GNUC_INTERNAL
188 #define G_THREADS_ENABLED
189 #define G_THREADS_IMPL_WIN32
191 #define G_ATOMIC_LOCK_FREE
193 #define GINT16_TO_LE(val) ((gint16) (val))
194 #define GUINT16_TO_LE(val) ((guint16) (val))
195 #define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
196 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
197 #define GINT32_TO_LE(val) ((gint32) (val))
198 #define GUINT32_TO_LE(val) ((guint32) (val))
199 #define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
200 #define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
201 #define GINT64_TO_LE(val) ((gint64) (val))
202 #define GUINT64_TO_LE(val) ((guint64) (val))
203 #define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
204 #define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
205 #define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val))
206 #define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val))
207 #define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val))
208 #define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val))
209 #define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
210 #define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
211 #define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
212 #define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
215 # define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
216 # define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
217 # define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
218 # define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
220 # define GSIZE_TO_LE(val) ((gsize) GUINT32_TO_LE (val))
221 # define GSSIZE_TO_LE(val) ((gssize) GINT32_TO_LE (val))
222 # define GSIZE_TO_BE(val) ((gsize) GUINT32_TO_BE (val))
223 # define GSSIZE_TO_BE(val) ((gssize) GINT32_TO_BE (val))
226 #define G_BYTE_ORDER G_LITTLE_ENDIAN
228 #define GLIB_SYSDEF_POLLIN =768
229 #define GLIB_SYSDEF_POLLOUT =16
230 #define GLIB_SYSDEF_POLLPRI =1024
231 #define GLIB_SYSDEF_POLLHUP =2
232 #define GLIB_SYSDEF_POLLERR =1
233 #define GLIB_SYSDEF_POLLNVAL =4
235 #define G_MODULE_SUFFIX "dll"
237 /* A GPid is an abstraction for a process "handle". It is *not* an
238 * abstraction for a process identifier in general. GPid is used in
239 * GLib only for descendant processes spawned with the g_spawn*
240 * functions. On POSIX there is no "process handle" concept as such,
241 * but on Windows a GPid is a handle to a process, a kind of pointer,
242 * not a process identifier.
245 #define G_PID_FORMAT "p"
247 #define GLIB_SYSDEF_AF_UNIX 1
248 #define GLIB_SYSDEF_AF_INET 2
249 #define GLIB_SYSDEF_AF_INET6 23
251 #define GLIB_SYSDEF_MSG_OOB 1
252 #define GLIB_SYSDEF_MSG_PEEK 2
253 #define GLIB_SYSDEF_MSG_DONTROUTE 4
255 #define G_DIR_SEPARATOR '\\'
256 #define G_DIR_SEPARATOR_S "\\"
257 #define G_SEARCHPATH_SEPARATOR ';'
258 #define G_SEARCHPATH_SEPARATOR_S ";"
262 #endif /* GLIBCONFIG_H */