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