epoc32/include/stdapis/glib-2.0/glibconfig.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 glibconfig.h
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     3 
       
     4 * Redistribution and use in source and binary forms, with or without 
       
     5 * modification, are permitted provided that the following conditions are met:
       
     6 
       
     7 * Redistributions of source code must retain the above copyright notice, this 
       
     8 * list of conditions and the following disclaimer.
       
     9 * Redistributions in binary form must reproduce the above copyright notice, 
       
    10 * this list of conditions and the following disclaimer in the documentation 
       
    11 * and/or other materials provided with the distribution.
       
    12 * Neither the name of Nokia Corporation nor the names of its contributors 
       
    13 * may be used to endorse or promote products derived from this software 
       
    14 * without specific prior written permission.
       
    15 
       
    16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
       
    17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
       
    18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
       
    19 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
       
    20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
       
    21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
       
    22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
       
    23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
       
    24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
       
    25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    26 *
       
    27 * Description:
       
    28 *
       
    29 */
       
    30 
       
    31 
       
    32 
       
    33 /* glibconfig.h
       
    34  *
       
    35  * This is a generated file.  Please modify 'configure.in'
       
    36  */
       
    37 
       
    38 #ifndef __G_LIBCONFIG_H__
       
    39 #define __G_LIBCONFIG_H__
       
    40 
       
    41 #include <glib/gmacros.h> 
       
    42 
       
    43 #include <limits.h>
       
    44 #include <float.h> 
       
    45 #ifdef __SYMBIAN32__
       
    46 #include <pthread.h>
       
    47 #endif //__SYMBIAN32__
       
    48 
       
    49 #ifndef __SYMBIAN32__
       
    50 #define GLIB_HAVE_ALLOCA_H 
       
    51 #define GLIB_HAVE_SYS_POLL_H 
       
    52 #endif /* __SYMBIAN32__ */
       
    53 
       
    54 G_BEGIN_DECLS
       
    55 
       
    56 #define G_MINFLOAT	FLT_MIN
       
    57 #define G_MAXFLOAT	FLT_MAX
       
    58 #define G_MINDOUBLE	DBL_MIN
       
    59 #define G_MAXDOUBLE	DBL_MAX
       
    60 #define G_MINSHORT	SHRT_MIN
       
    61 #define G_MAXSHORT	SHRT_MAX
       
    62 #define G_MAXUSHORT	USHRT_MAX
       
    63 #define G_MININT	INT_MIN
       
    64 #define G_MAXINT	INT_MAX
       
    65 #define G_MAXUINT	UINT_MAX
       
    66 #define G_MINLONG	LONG_MIN
       
    67 #define G_MAXLONG	LONG_MAX
       
    68 #define G_MAXULONG	ULONG_MAX
       
    69 
       
    70 typedef signed char gint8;
       
    71 typedef unsigned char guint8;
       
    72 typedef signed short gint16;
       
    73 typedef unsigned short guint16;
       
    74 #define G_GINT16_MODIFIER "h"
       
    75 #define G_GINT16_FORMAT "hi"
       
    76 #define G_GUINT16_FORMAT "hu"
       
    77 typedef signed int gint32;
       
    78 typedef unsigned int guint32;
       
    79 #define G_GINT32_MODIFIER ""
       
    80 #define G_GINT32_FORMAT "i"
       
    81 #define G_GUINT32_FORMAT "u"
       
    82 #define G_HAVE_GINT64 1          /* deprecated, always true */
       
    83 
       
    84 G_GNUC_EXTENSION typedef signed long long gint64;
       
    85 G_GNUC_EXTENSION typedef unsigned long long guint64;
       
    86 
       
    87 #define G_GINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##LL))
       
    88 #define G_GUINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##ULL))
       
    89 #define G_GINT64_MODIFIER "ll"
       
    90 #define G_GINT64_FORMAT "lli"
       
    91 #define G_GUINT64_FORMAT "llu"
       
    92 
       
    93 #define GLIB_SIZEOF_VOID_P 4
       
    94 #define GLIB_SIZEOF_LONG   4
       
    95 #define GLIB_SIZEOF_SIZE_T 4
       
    96 
       
    97 typedef signed int gssize;
       
    98 typedef unsigned int gsize;
       
    99 #define G_GSIZE_MODIFIER ""
       
   100 #define G_GSSIZE_FORMAT "i"
       
   101 #define G_GSIZE_FORMAT "u"
       
   102 
       
   103 #define G_MAXSIZE	G_MAXUINT
       
   104 
       
   105 #define GPOINTER_TO_INT(p)	((gint)   (p))
       
   106 #define GPOINTER_TO_UINT(p)	((guint)  (p))
       
   107 
       
   108 #define GINT_TO_POINTER(i)	((gpointer)  (i))
       
   109 #define GUINT_TO_POINTER(u)	((gpointer)  (u))
       
   110 
       
   111 #ifdef NeXT /* @#%@! NeXTStep */
       
   112 # define g_ATEXIT(proc)	(!atexit (proc))
       
   113 #else
       
   114 # define g_ATEXIT(proc)	(atexit (proc))
       
   115 #endif
       
   116 
       
   117 #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
       
   118 
       
   119 #define GLIB_MAJOR_VERSION 2
       
   120 #define GLIB_MINOR_VERSION 10
       
   121 #define GLIB_MICRO_VERSION 3
       
   122 
       
   123 #define G_OS_UNIX
       
   124 
       
   125 #define G_VA_COPY	va_copy
       
   126 
       
   127 #ifdef	__cplusplus
       
   128 #define	G_HAVE_INLINE	1
       
   129 #else	/* !__cplusplus */
       
   130 #define G_HAVE_INLINE 1
       
   131 #define G_HAVE___INLINE 1
       
   132 #define G_HAVE___INLINE__ 1
       
   133 #endif	/* !__cplusplus */
       
   134 
       
   135 #ifdef	__cplusplus
       
   136 #define G_CAN_INLINE	1
       
   137 #else	/* !__cplusplus */
       
   138 #define G_CAN_INLINE	1
       
   139 #endif
       
   140 
       
   141 #ifndef __SYMBIAN32__
       
   142 #ifndef __cplusplus
       
   143 # define G_HAVE_ISO_VARARGS 1
       
   144 #endif
       
   145 #ifdef __cplusplus
       
   146 # define G_HAVE_ISO_VARARGS 1
       
   147 #endif
       
   148 
       
   149 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
       
   150  * is passed ISO vararg support is turned off, and there is no work
       
   151  * around to turn it on, so we unconditionally turn it off.
       
   152  */
       
   153 #if __GNUC__ == 2 && __GNUC_MINOR__ == 95
       
   154 #  undef G_HAVE_ISO_VARARGS
       
   155 #endif
       
   156 
       
   157 #define G_HAVE_GNUC_VARARGS 1
       
   158 #endif /* __SYMBIAN32__ */
       
   159 
       
   160 #define G_HAVE_GROWING_STACK 0
       
   161 
       
   162 #define G_GNUC_INTERNAL
       
   163 
       
   164 #define G_THREADS_ENABLED
       
   165 #define G_THREADS_IMPL_POSIX
       
   166 typedef struct _GStaticMutex GStaticMutex;
       
   167 struct _GStaticMutex
       
   168 {
       
   169   struct _GMutex *runtime_mutex;
       
   170   #ifndef __SYMBIAN32__
       
   171   union {
       
   172     char   pad[24];
       
   173     double dummy_double;
       
   174     void  *dummy_pointer;
       
   175     long   dummy_long;
       
   176   } static_mutex;
       
   177   #else //__SYMBIAN32__
       
   178    pthread_mutex_t static_mutex;
       
   179   #endif //__SYMBIAN32__
       
   180 }; 
       
   181 
       
   182 #ifndef __SYMBIAN32__ 
       
   183 #define	G_STATIC_MUTEX_INIT	{ NULL, { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
       
   184 #else
       
   185 #define	G_STATIC_MUTEX_INIT	{ NULL, PTHREAD_MUTEX_INITIALIZER}
       
   186 #endif	//__SYMBIAN32__
       
   187 
       
   188 #ifndef __SYMBIAN32__
       
   189 #define	g_static_mutex_get_mutex(mutex) \
       
   190   (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \
       
   191    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
       
   192 #else /* !__SYMBIAN32__ */
       
   193 #define	g_static_mutex_get_mutex(mutex) \
       
   194   (g_thread_use_default_impl ? ((GMutex*) &((mutex)->static_mutex)) : \
       
   195    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
       
   196 #endif /* __SYMBIAN32__ */
       
   197 
       
   198 /* This represents a system thread as used by the implementation. An
       
   199  * alien implementaion, as loaded by g_thread_init can only count on
       
   200  * "sizeof (gpointer)" bytes to store their info. We however need more
       
   201  * for some of our native implementations. */
       
   202 typedef union _GSystemThread GSystemThread;
       
   203 union _GSystemThread
       
   204 {
       
   205   char   data[4];
       
   206   double dummy_double;
       
   207   void  *dummy_pointer;
       
   208   long   dummy_long;
       
   209 };
       
   210 
       
   211 #define GINT16_TO_LE(val)	((gint16) (val))
       
   212 #define GUINT16_TO_LE(val)	((guint16) (val))
       
   213 #define GINT16_TO_BE(val)	((gint16) GUINT16_SWAP_LE_BE (val))
       
   214 #define GUINT16_TO_BE(val)	(GUINT16_SWAP_LE_BE (val))
       
   215 #define GINT32_TO_LE(val)	((gint32) (val))
       
   216 #define GUINT32_TO_LE(val)	((guint32) (val))
       
   217 #define GINT32_TO_BE(val)	((gint32) GUINT32_SWAP_LE_BE (val))
       
   218 #define GUINT32_TO_BE(val)	(GUINT32_SWAP_LE_BE (val))
       
   219 #define GINT64_TO_LE(val)	((gint64) (val))
       
   220 #define GUINT64_TO_LE(val)	((guint64) (val))
       
   221 #define GINT64_TO_BE(val)	((gint64) GUINT64_SWAP_LE_BE (val))
       
   222 #define GUINT64_TO_BE(val)	(GUINT64_SWAP_LE_BE (val))
       
   223 #define GLONG_TO_LE(val)	((glong) GINT32_TO_LE (val))
       
   224 #define GULONG_TO_LE(val)	((gulong) GUINT32_TO_LE (val))
       
   225 #define GLONG_TO_BE(val)	((glong) GINT32_TO_BE (val))
       
   226 #define GULONG_TO_BE(val)	((gulong) GUINT32_TO_BE (val))
       
   227 #define GINT_TO_LE(val)		((gint) GINT32_TO_LE (val))
       
   228 #define GUINT_TO_LE(val)	((guint) GUINT32_TO_LE (val))
       
   229 #define GINT_TO_BE(val)		((gint) GINT32_TO_BE (val))
       
   230 #define GUINT_TO_BE(val)	((guint) GUINT32_TO_BE (val))
       
   231 #define G_BYTE_ORDER G_LITTLE_ENDIAN
       
   232 
       
   233 #define GLIB_SYSDEF_POLLIN =1
       
   234 #define GLIB_SYSDEF_POLLOUT =4
       
   235 #define GLIB_SYSDEF_POLLPRI =2
       
   236 #define GLIB_SYSDEF_POLLHUP =16
       
   237 #define GLIB_SYSDEF_POLLERR =8
       
   238 #define GLIB_SYSDEF_POLLNVAL =32
       
   239 
       
   240 #ifdef __SYMBIAN32__
       
   241 #define G_MODULE_SUFFIX "dll"
       
   242 #else
       
   243 #define G_MODULE_SUFFIX "so"
       
   244 #endif /* __SYMBIAN32__ */
       
   245 
       
   246 typedef int GPid;
       
   247 
       
   248 G_END_DECLS
       
   249 
       
   250 #endif /* GLIBCONFIG_H */