epoc32/include/stdapis/glib-2.0/glibconfig.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 /* glibconfig.h
    22  *
    23  * This is a generated file.  Please modify 'configure.in'
    24  */
    25 
    26 #ifndef __G_LIBCONFIG_H__
    27 #define __G_LIBCONFIG_H__
    28 
    29 #include <glib/gmacros.h> 
    30 
    31 #include <limits.h>
    32 #include <float.h> 
    33 #ifdef __SYMBIAN32__
    34 #include <pthread.h>
    35 #endif //__SYMBIAN32__
    36 
    37 #ifndef __SYMBIAN32__
    38 #define GLIB_HAVE_ALLOCA_H 
    39 #define GLIB_HAVE_SYS_POLL_H 
    40 #endif /* __SYMBIAN32__ */
    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 typedef signed char gint8;
    59 typedef unsigned char guint8;
    60 typedef signed short gint16;
    61 typedef unsigned short guint16;
    62 #define G_GINT16_MODIFIER "h"
    63 #define G_GINT16_FORMAT "hi"
    64 #define G_GUINT16_FORMAT "hu"
    65 typedef signed int gint32;
    66 typedef unsigned int guint32;
    67 #define G_GINT32_MODIFIER ""
    68 #define G_GINT32_FORMAT "i"
    69 #define G_GUINT32_FORMAT "u"
    70 #define G_HAVE_GINT64 1          /* deprecated, always true */
    71 
    72 G_GNUC_EXTENSION typedef signed long long gint64;
    73 G_GNUC_EXTENSION typedef unsigned long long guint64;
    74 
    75 #define G_GINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##LL))
    76 #define G_GUINT64_CONSTANT(val)	(G_GNUC_EXTENSION (val##ULL))
    77 #define G_GINT64_MODIFIER "ll"
    78 #define G_GINT64_FORMAT "lli"
    79 #define G_GUINT64_FORMAT "llu"
    80 
    81 #define GLIB_SIZEOF_VOID_P 4
    82 #define GLIB_SIZEOF_LONG   4
    83 #define GLIB_SIZEOF_SIZE_T 4
    84 
    85 typedef signed int gssize;
    86 typedef unsigned int gsize;
    87 #define G_GSIZE_MODIFIER ""
    88 #define G_GSSIZE_FORMAT "i"
    89 #define G_GSIZE_FORMAT "u"
    90 
    91 #define G_MAXSIZE	G_MAXUINT
    92 
    93 #define GPOINTER_TO_INT(p)	((gint)   (p))
    94 #define GPOINTER_TO_UINT(p)	((guint)  (p))
    95 
    96 #define GINT_TO_POINTER(i)	((gpointer)  (i))
    97 #define GUINT_TO_POINTER(u)	((gpointer)  (u))
    98 
    99 #ifdef NeXT /* @#%@! NeXTStep */
   100 # define g_ATEXIT(proc)	(!atexit (proc))
   101 #else
   102 # define g_ATEXIT(proc)	(atexit (proc))
   103 #endif
   104 
   105 #define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
   106 
   107 #define GLIB_MAJOR_VERSION 2
   108 #define GLIB_MINOR_VERSION 10
   109 #define GLIB_MICRO_VERSION 3
   110 
   111 #define G_OS_UNIX
   112 
   113 #define G_VA_COPY	va_copy
   114 
   115 #ifdef	__cplusplus
   116 #define	G_HAVE_INLINE	1
   117 #else	/* !__cplusplus */
   118 #define G_HAVE_INLINE 1
   119 #define G_HAVE___INLINE 1
   120 #define G_HAVE___INLINE__ 1
   121 #endif	/* !__cplusplus */
   122 
   123 #ifdef	__cplusplus
   124 #define G_CAN_INLINE	1
   125 #else	/* !__cplusplus */
   126 #define G_CAN_INLINE	1
   127 #endif
   128 
   129 #ifndef __SYMBIAN32__
   130 #ifndef __cplusplus
   131 # define G_HAVE_ISO_VARARGS 1
   132 #endif
   133 #ifdef __cplusplus
   134 # define G_HAVE_ISO_VARARGS 1
   135 #endif
   136 
   137 /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
   138  * is passed ISO vararg support is turned off, and there is no work
   139  * around to turn it on, so we unconditionally turn it off.
   140  */
   141 #if __GNUC__ == 2 && __GNUC_MINOR__ == 95
   142 #  undef G_HAVE_ISO_VARARGS
   143 #endif
   144 
   145 #define G_HAVE_GNUC_VARARGS 1
   146 #endif /* __SYMBIAN32__ */
   147 
   148 #define G_HAVE_GROWING_STACK 0
   149 
   150 #define G_GNUC_INTERNAL
   151 
   152 #define G_THREADS_ENABLED
   153 #define G_THREADS_IMPL_POSIX
   154 typedef struct _GStaticMutex GStaticMutex;
   155 struct _GStaticMutex
   156 {
   157   struct _GMutex *runtime_mutex;
   158   #ifndef __SYMBIAN32__
   159   union {
   160     char   pad[24];
   161     double dummy_double;
   162     void  *dummy_pointer;
   163     long   dummy_long;
   164   } static_mutex;
   165   #else //__SYMBIAN32__
   166    pthread_mutex_t static_mutex;
   167   #endif //__SYMBIAN32__
   168 }; 
   169 
   170 #ifndef __SYMBIAN32__ 
   171 #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} } }
   172 #else
   173 #define	G_STATIC_MUTEX_INIT	{ NULL, PTHREAD_MUTEX_INITIALIZER}
   174 #endif	//__SYMBIAN32__
   175 
   176 #ifndef __SYMBIAN32__
   177 #define	g_static_mutex_get_mutex(mutex) \
   178   (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \
   179    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
   180 #else /* !__SYMBIAN32__ */
   181 #define	g_static_mutex_get_mutex(mutex) \
   182   (g_thread_use_default_impl ? ((GMutex*) &((mutex)->static_mutex)) : \
   183    g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
   184 #endif /* __SYMBIAN32__ */
   185 
   186 /* This represents a system thread as used by the implementation. An
   187  * alien implementaion, as loaded by g_thread_init can only count on
   188  * "sizeof (gpointer)" bytes to store their info. We however need more
   189  * for some of our native implementations. */
   190 typedef union _GSystemThread GSystemThread;
   191 union _GSystemThread
   192 {
   193   char   data[4];
   194   double dummy_double;
   195   void  *dummy_pointer;
   196   long   dummy_long;
   197 };
   198 
   199 #define GINT16_TO_LE(val)	((gint16) (val))
   200 #define GUINT16_TO_LE(val)	((guint16) (val))
   201 #define GINT16_TO_BE(val)	((gint16) GUINT16_SWAP_LE_BE (val))
   202 #define GUINT16_TO_BE(val)	(GUINT16_SWAP_LE_BE (val))
   203 #define GINT32_TO_LE(val)	((gint32) (val))
   204 #define GUINT32_TO_LE(val)	((guint32) (val))
   205 #define GINT32_TO_BE(val)	((gint32) GUINT32_SWAP_LE_BE (val))
   206 #define GUINT32_TO_BE(val)	(GUINT32_SWAP_LE_BE (val))
   207 #define GINT64_TO_LE(val)	((gint64) (val))
   208 #define GUINT64_TO_LE(val)	((guint64) (val))
   209 #define GINT64_TO_BE(val)	((gint64) GUINT64_SWAP_LE_BE (val))
   210 #define GUINT64_TO_BE(val)	(GUINT64_SWAP_LE_BE (val))
   211 #define GLONG_TO_LE(val)	((glong) GINT32_TO_LE (val))
   212 #define GULONG_TO_LE(val)	((gulong) GUINT32_TO_LE (val))
   213 #define GLONG_TO_BE(val)	((glong) GINT32_TO_BE (val))
   214 #define GULONG_TO_BE(val)	((gulong) GUINT32_TO_BE (val))
   215 #define GINT_TO_LE(val)		((gint) GINT32_TO_LE (val))
   216 #define GUINT_TO_LE(val)	((guint) GUINT32_TO_LE (val))
   217 #define GINT_TO_BE(val)		((gint) GINT32_TO_BE (val))
   218 #define GUINT_TO_BE(val)	((guint) GUINT32_TO_BE (val))
   219 #define G_BYTE_ORDER G_LITTLE_ENDIAN
   220 
   221 #define GLIB_SYSDEF_POLLIN =1
   222 #define GLIB_SYSDEF_POLLOUT =4
   223 #define GLIB_SYSDEF_POLLPRI =2
   224 #define GLIB_SYSDEF_POLLHUP =16
   225 #define GLIB_SYSDEF_POLLERR =8
   226 #define GLIB_SYSDEF_POLLNVAL =32
   227 
   228 #ifdef __SYMBIAN32__
   229 #define G_MODULE_SUFFIX "dll"
   230 #else
   231 #define G_MODULE_SUFFIX "so"
   232 #endif /* __SYMBIAN32__ */
   233 
   234 typedef int GPid;
   235 
   236 G_END_DECLS
   237 
   238 #endif /* GLIBCONFIG_H */