*/.cvsignore: Add various Win32 related file types.
[platform/upstream/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 #ifdef _MSC_VER
13 /* Make MSVC more pedantic, this is a recommended pragma list
14  * from _Win32_Programming_ by Rector and Newcomer.
15  */
16 #pragma warning(error:4002)
17 #pragma warning(error:4003)
18 #pragma warning(1:4010)
19 #pragma warning(error:4013)
20 #pragma warning(1:4016)
21 #pragma warning(error:4020)
22 #pragma warning(error:4021)
23 #pragma warning(error:4027)
24 #pragma warning(error:4029)
25 #pragma warning(error:4033)
26 #pragma warning(error:4035)
27 #pragma warning(error:4045)
28 #pragma warning(error:4047)
29 #pragma warning(error:4049)
30 #pragma warning(error:4053)
31 #pragma warning(error:4071)
32 #pragma warning(disable:4101)
33 #pragma warning(error:4150)
34
35 #pragma warning(disable:4244)   /* No possible loss of data warnings */
36 #pragma warning(disable:4305)   /* No truncation from int to char warnings */
37 #endif /* _MSC_VER */
38
39 #include <limits.h>
40 #include <float.h>
41
42 G_BEGIN_DECLS
43
44 #define G_MINFLOAT      FLT_MIN
45 #define G_MAXFLOAT      FLT_MAX
46 #define G_MINDOUBLE     DBL_MIN
47 #define G_MAXDOUBLE     DBL_MAX
48 #define G_MINSHORT      SHRT_MIN
49 #define G_MAXSHORT      SHRT_MAX
50 #define G_MAXUSHORT     USHRT_MAX
51 #define G_MININT        INT_MIN
52 #define G_MAXINT        INT_MAX
53 #define G_MAXUINT       UINT_MAX
54 #define G_MINLONG       LONG_MIN
55 #define G_MAXLONG       LONG_MAX
56 #define G_MAXULONG      ULONG_MAX
57
58 #define G_MININT64      ((gint64)  0x8000000000000000)
59 #define G_MAXINT64      ((gint64)  0x7fffffffffffffff)
60 #define G_MAXUINT64     ((guint64) 0xffffffffffffffff)
61
62 typedef signed char gint8;
63 typedef unsigned char guint8;
64 typedef signed short gint16;
65 typedef unsigned short guint16;
66 #define G_GINT16_FORMAT "hi"
67 #define G_GUINT16_FORMAT "hu"
68 typedef signed int gint32;
69 typedef unsigned int guint32;
70 #define G_GINT32_FORMAT "i"
71 #define G_GUINT32_FORMAT "u"
72 #define G_HAVE_GINT64 1          /* deprecated, always true */
73
74 #ifndef _MSC_VER
75 G_GNUC_EXTENSION typedef signed long long gint64;
76 G_GNUC_EXTENSION typedef unsigned long long guint64;
77 #else /* _MSC_VER */
78 typedef signed __int64 gint64;
79 typedef unsigned __int64 guint64;
80 #endif /* _MSC_VER */
81
82 #ifndef _MSC_VER
83 #define G_GINT64_CONSTANT(val)  (G_GNUC_EXTENSION (val##LL))
84 #else /* _MSC_VER */
85 #define G_GINT64_CONSTANT(val)  (val##i64)
86 #endif /* _MSC_VER */
87 #define G_GINT64_FORMAT "I64i"
88 #define G_GUINT64_FORMAT "I64u"
89
90 #define GLIB_SIZEOF_VOID_P 4
91 #define GLIB_SIZEOF_LONG   4
92
93 typedef gint32  gssize;
94 typedef guint32 gsize;
95
96 #define GPOINTER_TO_INT(p)      ((gint)   (p))
97 #define GPOINTER_TO_UINT(p)     ((guint)  (p))
98
99 #define GINT_TO_POINTER(i)      ((gpointer)  (i))
100 #define GUINT_TO_POINTER(u)     ((gpointer)  (u))
101
102 #ifdef NeXT /* @#%@! NeXTStep */
103 # define g_ATEXIT(proc) (!atexit (proc))
104 #else
105 # define g_ATEXIT(proc) (atexit (proc))
106 #endif
107
108 #define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END
109
110 #define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
111 #define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
112 #define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@
113
114 #define G_OS_WIN32
115 #define G_PLATFORM_WIN32
116
117
118
119 #ifdef  __cplusplus
120 #define G_HAVE_INLINE   1
121 #else   /* !__cplusplus */
122 #ifndef _MSC_VER
123 #define G_HAVE_INLINE 1
124 #else /* _MSC_VER */
125
126 #endif /* _MSC_VER */
127 #define G_HAVE___INLINE 1
128 #ifndef _MSC_VER
129 #define G_HAVE___INLINE__ 1
130 #endif /* not _MSC_VER */
131 #endif  /* !__cplusplus */
132
133 #ifndef _MSC_VER
134 #ifndef __cplusplus
135 # define G_HAVE_ISO_VARARGS 1
136 #endif
137
138 #define G_HAVE_GNUC_VARARGS 1
139 #endif /* not _MSC_VER */
140
141
142 #define G_THREADS_ENABLED
143 #define G_THREADS_IMPL_WIN32
144 typedef struct _GMutex* GStaticMutex;
145 #define G_STATIC_MUTEX_INIT NULL
146 #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
147 /* This represents a system thread as used by the implementation. An
148  * alien implementaion, as loaded by g_thread_init can only count on
149  * "sizeof (gpointer)" bytes to store their info. We however need more
150  * for some of our native implementations. */
151 typedef union _GSystemThread GSystemThread;
152 union _GSystemThread
153 {
154   char   data[4];
155   double dummy_double;
156   void  *dummy_pointer;
157   long   dummy_long;
158 };
159
160 #define GINT16_TO_LE(val)       ((gint16) (val))
161 #define GUINT16_TO_LE(val)      ((guint16) (val))
162 #define GINT16_TO_BE(val)       ((gint16) GUINT16_SWAP_LE_BE (val))
163 #define GUINT16_TO_BE(val)      (GUINT16_SWAP_LE_BE (val))
164 #define GINT32_TO_LE(val)       ((gint32) (val))
165 #define GUINT32_TO_LE(val)      ((guint32) (val))
166 #define GINT32_TO_BE(val)       ((gint32) GUINT32_SWAP_LE_BE (val))
167 #define GUINT32_TO_BE(val)      (GUINT32_SWAP_LE_BE (val))
168 #define GINT64_TO_LE(val)       ((gint64) (val))
169 #define GUINT64_TO_LE(val)      ((guint64) (val))
170 #define GINT64_TO_BE(val)       ((gint64) GUINT64_SWAP_LE_BE (val))
171 #define GUINT64_TO_BE(val)      (GUINT64_SWAP_LE_BE (val))
172 #define GLONG_TO_LE(val)        ((glong) GINT32_TO_LE (val))
173 #define GULONG_TO_LE(val)       ((gulong) GUINT32_TO_LE (val))
174 #define GLONG_TO_BE(val)        ((glong) GINT32_TO_BE (val))
175 #define GULONG_TO_BE(val)       ((gulong) GUINT32_TO_BE (val))
176 #define GINT_TO_LE(val)         ((gint) GINT32_TO_LE (val))
177 #define GUINT_TO_LE(val)        ((guint) GUINT32_TO_LE (val))
178 #define GINT_TO_BE(val)         ((gint) GINT32_TO_BE (val))
179 #define GUINT_TO_BE(val)        ((guint) GUINT32_TO_BE (val))
180 #define G_BYTE_ORDER G_LITTLE_ENDIAN
181
182 #define GLIB_SYSDEF_POLLIN =1
183 #define GLIB_SYSDEF_POLLOUT =4
184 #define GLIB_SYSDEF_POLLPRI =2
185 #define GLIB_SYSDEF_POLLERR =8
186 #define GLIB_SYSDEF_POLLHUP =16
187 #define GLIB_SYSDEF_POLLNVAL =32
188
189 #define G_MODULE_SUFFIX "dll"
190
191 G_END_DECLS
192
193 #endif /* GLIBCONFIG_H */