Go to the documentation of this file.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 #if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
00037 && !defined(__STDDEF_H__)) \
00038 || defined(__need_wchar_t) || defined(__need_size_t) \
00039 || defined(__need_ptrdiff_t) || defined(__need_NULL) \
00040 || defined(__need_wint_t)
00041
00042
00043
00044
00045 #if (!defined(__need_wchar_t) && !defined(__need_size_t) \
00046 && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
00047 && !defined(__need_wint_t))
00048 #define _STDDEF_H
00049 #define _STDDEF_H_
00050
00051 #define _ANSI_STDDEF_H
00052
00053 #define __STDDEF_H__
00054 #endif
00055
00056 #ifndef __sys_stdtypes_h
00057
00058
00059
00060
00061
00062 #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
00063 #include <machine/ansi.h>
00064 #endif
00065
00066
00067
00068
00069 #if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
00070 #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
00071 #define _SIZE_T
00072 #endif
00073 #if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
00074 #define _PTRDIFF_T
00075 #endif
00076
00077
00078 #if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
00079 #ifndef _BSD_WCHAR_T_
00080 #define _WCHAR_T
00081 #endif
00082 #endif
00083
00084 #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
00085 #undef _PTRDIFF_T_
00086 #undef _BSD_PTRDIFF_T_
00087 #endif
00088 #if defined (__need_size_t) || defined (_STDDEF_H_)
00089 #undef _SIZE_T_
00090 #undef _BSD_SIZE_T_
00091 #endif
00092 #if defined (__need_wchar_t) || defined (_STDDEF_H_)
00093 #undef _WCHAR_T_
00094 #undef _BSD_WCHAR_T_
00095 #endif
00096 #endif
00097
00098
00099
00100 #if defined (__sequent__) && defined (_PTRDIFF_T_)
00101 #undef _PTRDIFF_T_
00102 #endif
00103
00104
00105
00106
00107
00108
00109
00110 #if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
00111 _TYPE_ptrdiff_t;
00112 #undef _TYPE_ptrdiff_t
00113 #endif
00114 #if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
00115 _TYPE_size_t;
00116 #undef _TYPE_size_t
00117 #endif
00118 #if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
00119 _TYPE_wchar_t;
00120 #undef _TYPE_wchar_t
00121 #endif
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
00134 #ifndef _PTRDIFF_T
00135 #ifndef _T_PTRDIFF_
00136 #ifndef _T_PTRDIFF
00137 #ifndef __PTRDIFF_T
00138 #ifndef _PTRDIFF_T_
00139 #ifndef _BSD_PTRDIFF_T_
00140 #ifndef ___int_ptrdiff_t_h
00141 #ifndef _GCC_PTRDIFF_T
00142 #define _PTRDIFF_T
00143 #define _T_PTRDIFF_
00144 #define _T_PTRDIFF
00145 #define __PTRDIFF_T
00146 #define _PTRDIFF_T_
00147 #define _BSD_PTRDIFF_T_
00148 #define ___int_ptrdiff_t_h
00149 #define _GCC_PTRDIFF_T
00150 #ifndef __PTRDIFF_TYPE__
00151 #define __PTRDIFF_TYPE__ long int
00152 #endif
00153 typedef __PTRDIFF_TYPE__ ptrdiff_t;
00154 #endif
00155 #endif
00156 #endif
00157 #endif
00158 #endif
00159 #endif
00160 #endif
00161 #endif
00162
00163
00164 #undef __need_ptrdiff_t
00165
00166 #endif
00167
00168
00169
00170
00171
00172 #if defined (_STDDEF_H) || defined (__need_size_t)
00173 #ifndef __size_t__
00174 #ifndef _SIZE_T
00175 #ifndef _SYS_SIZE_T_H
00176 #ifndef _T_SIZE_
00177 #ifndef _T_SIZE
00178 #ifndef __SIZE_T
00179 #ifndef _SIZE_T_
00180 #ifndef _BSD_SIZE_T_
00181 #ifndef _SIZE_T_DEFINED_
00182 #ifndef _SIZE_T_DEFINED
00183 #ifndef ___int_size_t_h
00184 #ifndef _GCC_SIZE_T
00185 #ifndef _SIZET_
00186 #ifndef __size_t
00187 #define __size_t__
00188 #define _SIZE_T
00189 #define _SYS_SIZE_T_H
00190 #define _T_SIZE_
00191 #define _T_SIZE
00192 #define __SIZE_T
00193 #define _SIZE_T_
00194 #define _BSD_SIZE_T_
00195 #define _SIZE_T_DEFINED_
00196 #define _SIZE_T_DEFINED
00197 #define ___int_size_t_h
00198 #define _GCC_SIZE_T
00199 #define _SIZET_
00200 #define __size_t
00201 #ifndef __SIZE_TYPE__
00202 #define __SIZE_TYPE__ long unsigned int
00203 #endif
00204 #if !(defined (__GNUG__) && defined (size_t))
00205 typedef __SIZE_TYPE__ size_t;
00206 #ifdef __BEOS__
00207 typedef long ssize_t;
00208 #endif
00209 #endif
00210 #endif
00211 #endif
00212 #endif
00213 #endif
00214 #endif
00215 #endif
00216 #endif
00217 #endif
00218 #endif
00219 #endif
00220 #endif
00221 #endif
00222 #endif
00223 #endif
00224 #undef __need_size_t
00225 #endif
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235 #if defined (_STDDEF_H) || defined (__need_wchar_t)
00236 #ifndef __wchar_t__
00237 #ifndef _WCHAR_T
00238 #ifndef _T_WCHAR_
00239 #ifndef _T_WCHAR
00240 #ifndef __WCHAR_T
00241 #ifndef _WCHAR_T_
00242 #ifndef _BSD_WCHAR_T_
00243 #ifndef _WCHAR_T_DEFINED_
00244 #ifndef _WCHAR_T_DEFINED
00245 #ifndef _WCHAR_T_H
00246 #ifndef ___int_wchar_t_h
00247 #ifndef __INT_WCHAR_T_H
00248 #ifndef _GCC_WCHAR_T
00249 #define __wchar_t__
00250 #define _WCHAR_T
00251 #define _T_WCHAR_
00252 #define _T_WCHAR
00253 #define __WCHAR_T
00254 #define _WCHAR_T_
00255 #define _BSD_WCHAR_T_
00256 #define _WCHAR_T_DEFINED_
00257 #define _WCHAR_T_DEFINED
00258 #define _WCHAR_T_H
00259 #define ___int_wchar_t_h
00260 #define __INT_WCHAR_T_H
00261 #define _GCC_WCHAR_T
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273 #ifdef _BSD_WCHAR_T_
00274 #undef _BSD_WCHAR_T_
00275 #ifdef _BSD_RUNE_T_
00276 #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
00277 typedef _BSD_RUNE_T_ rune_t;
00278 #endif
00279 #endif
00280 #endif
00281
00282 #ifndef __WCHAR_TYPE__
00283 #ifdef __BEOS__
00284 #define __WCHAR_TYPE__ unsigned char
00285 #else
00286 #define __WCHAR_TYPE__ int
00287 #endif
00288 #endif
00289 #ifndef __cplusplus
00290 typedef __WCHAR_TYPE__ wchar_t;
00291 #endif
00292 #endif
00293 #endif
00294 #endif
00295 #endif
00296 #endif
00297 #endif
00298 #endif
00299 #endif
00300 #endif
00301 #endif
00302 #endif
00303 #endif
00304 #endif
00305 #undef __need_wchar_t
00306 #endif
00307
00308 #if defined (_STDDEF_H) || defined (__need_wint_t)
00309 #ifndef _WINT_T
00310 #define _WINT_T
00311
00312 #ifndef __WINT_TYPE__
00313 #define __WINT_TYPE__ unsigned int
00314 #endif
00315 typedef __WINT_TYPE__ wint_t;
00316 #endif
00317 #undef __need_wint_t
00318 #endif
00319
00320
00321
00322
00323
00324 #if defined(_ANSI_H_) || (defined(__bsdi__) && defined(_MACHINE_ANSI_H_))
00325
00326
00327 #ifdef _GCC_PTRDIFF_T_
00328 #undef _PTRDIFF_T_
00329 #undef _BSD_PTRDIFF_T_
00330 #endif
00331 #ifdef _GCC_SIZE_T_
00332 #undef _SIZE_T_
00333 #undef _BSD_SIZE_T_
00334 #endif
00335 #ifdef _GCC_WCHAR_T_
00336 #undef _WCHAR_T_
00337 #undef _BSD_WCHAR_T_
00338 #endif
00339
00340 #ifdef _GCC_PTRDIFF_T
00341 #undef _PTRDIFF_T_
00342 #undef _BSD_PTRDIFF_T_
00343 #endif
00344 #ifdef _GCC_SIZE_T
00345 #undef _SIZE_T_
00346 #undef _BSD_SIZE_T_
00347 #endif
00348 #ifdef _GCC_WCHAR_T
00349 #undef _WCHAR_T_
00350 #undef _BSD_WCHAR_T_
00351 #endif
00352 #endif
00353
00354 #endif
00355
00356
00357
00358 #if defined (_STDDEF_H) || defined (__need_NULL)
00359 #undef NULL
00360 #ifdef __GNUG__
00361 #define NULL __null
00362 #else
00363 #define NULL ((void *)0)
00364 #endif
00365 #endif
00366 #undef __need_NULL
00367
00368 #ifdef _STDDEF_H
00369
00370
00371 #ifdef offsetof
00372 #undef offsetof
00373 #endif
00374 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
00375
00376 #endif
00377
00378 #endif
00379