00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _SYS_CDEFS_H_
00038 #define _SYS_CDEFS_H_
00039
00040 #if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
00041 #define SYMBIAN
00042 #endif
00043
00044 #ifdef __SYMBIAN32__
00045 #include <_ansi.h>
00046 #endif
00047
00048 #if defined(__cplusplus)
00049 #define __BEGIN_DECLS extern "C" {
00050 #define __END_DECLS }
00051 #else
00052 #define __BEGIN_DECLS
00053 #define __END_DECLS
00054 #endif
00055
00056
00057
00058
00059
00060
00061
00062 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
00063
00064 #if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
00065 #define __GNUCLIKE_ASM 3
00066 #define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
00067 #else
00068 #define __GNUCLIKE_ASM 2
00069 #endif
00070 #define __GNUCLIKE___TYPEOF 1
00071 #define __GNUCLIKE___OFFSETOF 1
00072 #define __GNUCLIKE___SECTION 1
00073
00074 #define __GNUCLIKE_ATTRIBUTE_MODE_DI 1
00075
00076 #ifndef __INTEL_COMPILER
00077 # define __GNUCLIKE_CTOR_SECTION_HANDLING 1
00078 #endif
00079
00080 #define __GNUCLIKE_BUILTIN_CONSTANT_P 1
00081 # if defined(__INTEL_COMPILER) && defined(__cplusplus) \
00082 && __INTEL_COMPILER < 800
00083 # undef __GNUCLIKE_BUILTIN_CONSTANT_P
00084 # endif
00085
00086 #if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)
00087 # define __GNUCLIKE_BUILTIN_VARARGS 1
00088 # define __GNUCLIKE_BUILTIN_STDARG 1
00089 # define __GNUCLIKE_BUILTIN_VAALIST 1
00090 #endif
00091
00092 #if defined(__GNUC__)
00093 # define __GNUC_VA_LIST_COMPATIBILITY 1
00094 #endif
00095
00096 #ifndef __INTEL_COMPILER
00097 # define __GNUCLIKE_BUILTIN_NEXT_ARG 1
00098 # define __GNUCLIKE_MATH_BUILTIN_RELOPS
00099 #endif
00100
00101 #define __GNUCLIKE_BUILTIN_MEMCPY 1
00102
00103
00104 #define __CC_SUPPORTS_INLINE 1
00105 #define __CC_SUPPORTS___INLINE 1
00106 #define __CC_SUPPORTS___INLINE__ 1
00107
00108 #define __CC_SUPPORTS___FUNC__ 1
00109 #define __CC_SUPPORTS_WARNING 1
00110
00111 #define __CC_SUPPORTS_VARADIC_XXX 1
00112
00113 #define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
00114
00115
00116 #define __CC_INT_IS_32BIT 1
00117
00118 #endif
00119
00120
00121
00122
00123 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
00124 #define __GNUC_PREREQ__(ma, mi) \
00125 (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
00126 #else
00127 #define __GNUC_PREREQ__(ma, mi) 0
00128 #endif
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 #if defined(__STDC__) || defined(__cplusplus)
00143 #define __P(protos) protos
00144 #define __CONCAT1(x,y) x ## y
00145 #define __CONCAT(x,y) __CONCAT1(x,y)
00146 #define __STRING(x) #x
00147 #define __XSTRING(x) __STRING(x)
00148
00149 #define __const const
00150 #define __signed signed
00151 #define __volatile volatile
00152 #if defined(__cplusplus)
00153 #define __inline inline
00154 #else
00155 #if !(defined(__CC_SUPPORTS___INLINE))
00156 #define __inline
00157 #endif
00158 #endif
00159
00160 #else
00161 #define __P(protos) ()
00162 #define __CONCAT(x,y) xy
00163 #define __STRING(x) "x"
00164
00165 #if !defined(__CC_SUPPORTS___INLINE)
00166 #define __const
00167 #define __inline
00168 #define __signed
00169 #define __volatile
00170
00171
00172
00173
00174
00175
00176
00177
00178 #ifndef NO_ANSI_KEYWORDS
00179 #define const
00180 #define inline
00181 #define signed
00182 #define volatile
00183 #endif
00184 #endif
00185 #endif
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196 #ifdef lint
00197 #define __dead2
00198 #define __pure2
00199 #define __unused
00200 #define __packed
00201 #define __aligned(x)
00202 #define __section(x)
00203 #else
00204 #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
00205 #define __dead2
00206 #define __pure2
00207 #define __unused
00208 #endif
00209 #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER)
00210 #define __dead2 __attribute__((__noreturn__))
00211 #define __pure2 __attribute__((__const__))
00212 #define __unused
00213
00214 #endif
00215 #if __GNUC_PREREQ__(2, 7)
00216 #define __dead2 __attribute__((__noreturn__))
00217 #define __pure2 __attribute__((__const__))
00218 #define __unused __attribute__((__unused__))
00219 #define __used __attribute__((__used__))
00220 #define __packed __attribute__((__packed__))
00221 #define __aligned(x) __attribute__((__aligned__(x)))
00222 #define __section(x) __attribute__((__section__(x)))
00223 #endif
00224 #if defined(__INTEL_COMPILER)
00225 #define __dead2 __attribute__((__noreturn__))
00226 #define __pure2 __attribute__((__const__))
00227 #define __unused __attribute__((__unused__))
00228 #define __used __attribute__((__used__))
00229 #define __packed __attribute__((__packed__))
00230 #define __aligned(x) __attribute__((__aligned__(x)))
00231 #define __section(x) __attribute__((__section__(x)))
00232 #endif
00233 #endif
00234
00235 #if __GNUC_PREREQ__(2, 96)
00236 #define __pure __attribute__((__pure__))
00237 #else
00238 #define __pure
00239 #endif
00240
00241 #if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
00242 #define __always_inline __attribute__((__always_inline__))
00243 #else
00244 #define __always_inline
00245 #endif
00246
00247 #if __GNUC_PREREQ__(3, 3)
00248 #define __nonnull(x) __attribute__((__nonnull__(x)))
00249 #else
00250 #define __nonnull(x)
00251 #endif
00252
00253
00254 #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
00255 #define __func__ NULL
00256 #endif
00257
00258 #if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
00259 #ifdef __SYMBIAN32__
00260 #ifndef __LONG_LONG_SUPPORTED
00261 #define __LONG_LONG_SUPPORTED
00262 #endif
00263 #else
00264 #define __LONG_LONG_SUPPORTED
00265 #endif
00266 #endif
00267
00268 #ifdef __SYMBIAN32__
00269 #if (defined(__ARMCC__) && (__ARMCC_VERSION > 220000) )
00270 #ifndef __LONG_LONG_SUPPORTED
00271 #define __LONG_LONG_SUPPORTED
00272 #endif
00273 #endif
00274 #endif
00275
00276
00277
00278
00279
00280
00281
00282 #if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
00283 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
00284 #define __restrict
00285 #else
00286 #define __restrict restrict
00287 #endif
00288 #endif
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318 #if __GNUC_PREREQ__(2, 96)
00319 #define __predict_true(exp) __builtin_expect((exp), 1)
00320 #define __predict_false(exp) __builtin_expect((exp), 0)
00321 #else
00322 #define __predict_true(exp) (exp)
00323 #define __predict_false(exp) (exp)
00324 #endif
00325
00326
00327
00328
00329
00330 #ifndef __cplusplus
00331 #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
00332 #else
00333 #define __offsetof(type, field) \
00334 (__offsetof__ (reinterpret_cast <size_t> \
00335 (&reinterpret_cast <const volatile char &> \
00336 (static_cast<type *> (0)->field))))
00337 #endif
00338 #define __rangeof(type, start, end) \
00339 (__offsetof(type, end) - __offsetof(type, start))
00340
00341
00342
00343
00344
00345
00346
00347 #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
00348 #define __printflike(fmtarg, firstvararg)
00349 #define __scanflike(fmtarg, firstvararg)
00350 #else
00351 #define __printflike(fmtarg, firstvararg) \
00352 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
00353 #define __scanflike(fmtarg, firstvararg) \
00354 __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
00355 #endif
00356
00357
00358 #if __FreeBSD_cc_version >= 300001 && defined(__GNUC__) && !defined(__INTEL_COMPILER)
00359 #define __printf0like(fmtarg, firstvararg) \
00360 __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
00361 #else
00362 #define __printf0like(fmtarg, firstvararg)
00363 #endif
00364
00365 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
00366 #ifndef __INTEL_COMPILER
00367 #define __strong_reference(sym,aliassym) \
00368 extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
00369 #endif
00370 #ifdef __STDC__
00371 #define __weak_reference(sym,alias) \
00372 __asm__(".weak " #alias); \
00373 __asm__(".equ " #alias ", " #sym)
00374 #define __warn_references(sym,msg) \
00375 __asm__(".section .gnu.warning." #sym); \
00376 __asm__(".asciz \"" msg "\""); \
00377 __asm__(".previous")
00378 #else
00379 #define __weak_reference(sym,alias) \
00380 __asm__(".weak alias"); \
00381 __asm__(".equ alias, sym")
00382 #define __warn_references(sym,msg) \
00383 __asm__(".section .gnu.warning.sym"); \
00384 __asm__(".asciz \"msg\""); \
00385 __asm__(".previous")
00386 #endif
00387 #endif
00388
00389 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
00390 #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
00391 #else
00392
00393
00394
00395
00396
00397
00398 #define __IDSTRING(name,string) static const char name[] __unused = string
00399 #endif
00400
00401
00402
00403
00404
00405
00406
00407 #ifndef __FBSDID
00408 #if !defined(lint) && !defined(STRIP_FBSDID)
00409 #define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
00410 #else
00411 #define __FBSDID(s) struct __hack
00412 #endif
00413 #endif
00414
00415 #ifndef __RCSID
00416 #ifndef NO__RCSID
00417 #define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
00418 #else
00419 #define __RCSID(s) struct __hack
00420 #endif
00421 #endif
00422
00423 #ifndef __RCSID_SOURCE
00424 #ifndef NO__RCSID_SOURCE
00425 #define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s)
00426 #else
00427 #define __RCSID_SOURCE(s) struct __hack
00428 #endif
00429 #endif
00430
00431 #ifndef __SCCSID
00432 #ifndef NO__SCCSID
00433 #define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
00434 #else
00435 #define __SCCSID(s) struct __hack
00436 #endif
00437 #endif
00438
00439 #ifndef __COPYRIGHT
00440 #ifndef NO__COPYRIGHT
00441 #define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
00442 #else
00443 #define __COPYRIGHT(s) struct __hack
00444 #endif
00445 #endif
00446
00447 #ifndef __DECONST
00448 #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
00449 #endif
00450
00451 #ifndef __DEVOLATILE
00452 #define __DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var))
00453 #endif
00454
00455 #ifndef __DEQUALIFY
00456 #define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var))
00457 #endif
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482 #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
00483 #undef _POSIX_C_SOURCE
00484 #define _POSIX_C_SOURCE 199009
00485 #endif
00486
00487
00488 #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
00489 #undef _POSIX_C_SOURCE
00490 #define _POSIX_C_SOURCE 199209
00491 #endif
00492
00493
00494 #ifdef _XOPEN_SOURCE
00495 #if _XOPEN_SOURCE - 0 >= 600
00496 #define __XSI_VISIBLE 600
00497 #undef _POSIX_C_SOURCE
00498 #define _POSIX_C_SOURCE 200112
00499 #elif _XOPEN_SOURCE - 0 >= 500
00500 #define __XSI_VISIBLE 500
00501 #undef _POSIX_C_SOURCE
00502 #define _POSIX_C_SOURCE 199506
00503 #endif
00504 #endif
00505
00506
00507
00508
00509
00510 #if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
00511 #define _POSIX_C_SOURCE 198808
00512 #endif
00513 #ifdef _POSIX_C_SOURCE
00514 #if _POSIX_C_SOURCE >= 200112
00515 #ifdef __SYMBIAN32__
00516 #define __XSI_VISIBLE 600
00517 #define __BSD_VISIBLE 1
00518
00519 #endif
00520 #define __POSIX_VISIBLE 200112
00521 #define __ISO_C_VISIBLE 1999
00522 #elif _POSIX_C_SOURCE >= 199506
00523 #define __POSIX_VISIBLE 199506
00524 #define __ISO_C_VISIBLE 1990
00525 #elif _POSIX_C_SOURCE >= 199309
00526 #define __POSIX_VISIBLE 199309
00527 #define __ISO_C_VISIBLE 1990
00528 #elif _POSIX_C_SOURCE >= 199209
00529 #define __POSIX_VISIBLE 199209
00530 #define __ISO_C_VISIBLE 1990
00531 #elif _POSIX_C_SOURCE >= 199009
00532 #define __POSIX_VISIBLE 199009
00533 #define __ISO_C_VISIBLE 1990
00534 #else
00535 #define __POSIX_VISIBLE 198808
00536 #define __ISO_C_VISIBLE 0
00537 #endif
00538 #else
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551 #if defined(_ANSI_SOURCE)
00552 #define __POSIX_VISIBLE 0
00553 #define __XSI_VISIBLE 0
00554 #define __BSD_VISIBLE 0
00555 #define __ISO_C_VISIBLE 1990
00556 #elif defined(_C99_SOURCE)
00557 #define __POSIX_VISIBLE 0
00558 #define __XSI_VISIBLE 0
00559 #define __BSD_VISIBLE 0
00560 #define __ISO_C_VISIBLE 1999
00561 #else
00562 #define __POSIX_VISIBLE 200112
00563 #define __XSI_VISIBLE 600
00564 #define __BSD_VISIBLE 1
00565 #define __ISO_C_VISIBLE 1999
00566 #endif
00567 #endif
00568
00569 #endif