if !defined (G_LOG_DOMAIN) define G_LOG_DOMAIN as ((gchar*) 0) instead of
[platform/upstream/glib.git] / glibconfig.h.win32
1 /* glibconfig.h.win32 */
2 /* Handcrafted for Microsoft C. */
3
4 #ifndef GLIBCONFIG_H
5 #define GLIBCONFIG_H
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif /* __cplusplus */
10
11 #ifdef _MSC_VER
12 /* Make MSVC more pedantic, this is a recommended pragma list
13  * from _Win32_Programming_ by Rector and Newcomer.
14  */
15 #pragma warning(error:4002)
16 #pragma warning(error:4003)
17 #pragma warning(1:4010)
18 #pragma warning(error:4013)
19 #pragma warning(1:4016)
20 #pragma warning(error:4020)
21 #pragma warning(error:4021)
22 #pragma warning(error:4027)
23 #pragma warning(error:4029)
24 #pragma warning(error:4033)
25 #pragma warning(error:4035)
26 #pragma warning(error:4045)
27 #pragma warning(error:4047)
28 #pragma warning(error:4049)
29 #pragma warning(error:4053)
30 #pragma warning(error:4071)
31 #pragma warning(disable:4101)
32 #pragma warning(error:4150)
33
34 #pragma warning(disable:4244)   /* No possible loss of data warnings */
35 #pragma warning(disable:4305)   /* No truncation from int to char warnings */
36 #endif /* _MSC_VER */
37
38 #include <limits.h>
39 #include <float.h>
40
41 #define G_MINFLOAT      FLT_MIN
42 #define G_MAXFLOAT      FLT_MAX
43 #define G_MINDOUBLE     DBL_MIN
44 #define G_MAXDOUBLE     DBL_MAX
45 #define G_MINSHORT      SHRT_MIN
46 #define G_MAXSHORT      SHRT_MAX
47 #define G_MININT        INT_MIN
48 #define G_MAXINT        INT_MAX
49 #define G_MINLONG       LONG_MIN
50 #define G_MAXLONG       LONG_MAX
51
52 typedef signed char gint8;
53 typedef unsigned char guint8;
54 typedef signed short gint16;
55 typedef unsigned short guint16;
56 typedef signed int gint32;
57 typedef unsigned int guint32;
58
59 #define G_HAVE_GINT64 1
60
61 typedef __int64 gint64;
62 typedef unsigned __int64 guint64;
63
64 #define G_GINT64_CONSTANT(val)  (val##i64)
65
66 #define GPOINTER_TO_INT(p)      ((gint)(p))
67 #define GPOINTER_TO_UINT(p)     ((guint)(p))
68
69 #define GINT_TO_POINTER(i)      ((gpointer)(i))
70 #define GUINT_TO_POINTER(u)     ((gpointer)(u))
71
72 #define g_ATEXIT(proc)  (atexit (proc))
73
74 #define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END
75
76 #define G_HAVE_ALLOCA 1
77 #define alloca _alloca
78
79 #define GLIB_MAJOR_VERSION 1
80 #define GLIB_MINOR_VERSION 1
81 #define GLIB_MICRO_VERSION 13
82
83 #ifdef  __cplusplus
84 #define G_HAVE_INLINE   1
85 #else   /* !__cplusplus */
86 #define G_HAVE___INLINE 1
87 #endif
88
89 #define G_THREADS_ENABLED
90 typedef struct _GStaticMutex GStaticMutex;
91 struct _GStaticMutex
92 {
93   struct _GMutex *runtime_mutex;
94   union {
95     char   pad[24];
96     double dummy_double;
97     void  *dummy_pointer;
98     long   dummy_long;
99   } aligned_pad_u;
100 };
101 #define G_STATIC_MUTEX_INIT     { NULL, { { 0, 0, 0, 0, 0 } } }
102 #define g_static_mutex_get_mutex(mutex) \
103   (g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \
104    g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex))
105
106 #define G_BYTE_ORDER G_LITTLE_ENDIAN
107
108 #define GINT16_TO_LE(val)       ((gint16) (val))
109 #define GUINT16_TO_LE(val)      ((guint16) (val))
110 #define GINT16_TO_BE(val)       ((gint16) GUINT16_SWAP_LE_BE (val))
111 #define GUINT16_TO_BE(val)      (GUINT16_SWAP_LE_BE (val))
112
113 #define GINT32_TO_LE(val)       ((gint32) (val))
114 #define GUINT32_TO_LE(val)      ((guint32) (val))
115 #define GINT32_TO_BE(val)       ((gint32) GUINT32_SWAP_LE_BE (val))
116 #define GUINT32_TO_BE(val)      (GUINT32_SWAP_LE_BE (val))
117
118 #define GINT64_TO_LE(val)       ((gint64) (val))
119 #define GUINT64_TO_LE(val)      ((guint64) (val))
120 #define GINT64_TO_BE(val)       ((gint64) GUINT64_SWAP_LE_BE (val))
121 #define GUINT64_TO_BE(val)      (GUINT64_SWAP_LE_BE (val))
122
123 #define GLONG_TO_LE(val)        ((glong) GINT32_TO_LE (val))
124 #define GULONG_TO_LE(val)       ((gulong) GUINT32_TO_LE (val))
125 #define GLONG_TO_BE(val)        ((glong) GINT32_TO_BE (val))
126 #define GULONG_TO_BE(val)       ((gulong) GUINT32_TO_BE (val))
127
128 #define GINT_TO_LE(val)         ((gint) GINT32_TO_LE (val))
129 #define GUINT_TO_LE(val)        ((guint) GUINT32_TO_LE (val))
130 #define GINT_TO_BE(val)         ((gint) GINT32_TO_BE (val))
131 #define GUINT_TO_BE(val)        ((guint) GUINT32_TO_BE (val))
132
133 #define GLIB_SYSDEF_POLLIN      = 1
134 #define GLIB_SYSDEF_POLLOUT     = 4
135 #define GLIB_SYSDEF_POLLPRI     = 2
136 #define GLIB_SYSDEF_POLLERR     = 8
137 #define GLIB_SYSDEF_POLLHUP     = 16
138 #define GLIB_SYSDEF_POLLNVAL    = 32
139
140 #define G_HAVE_WCHAR_H 1
141 #define G_HAVE_WCTYPE_H 1
142
143 /* Define if this is Win32, possibly using the Cygwin emulation layer. */
144 #define WIN32 1
145
146 /* Define if this is Win32 without Cygwin.  */
147 #define NATIVE_WIN32 1
148
149 #ifdef __cplusplus
150 }
151 #endif /* __cplusplus */
152
153 #endif /* GLIBCONFIG_H */