Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / pcc / dist / pcc-libs / libpcc / include / libpcc_stddef.h
blobc65625cb2f296ff82055c0b996f8368ad01e59c4
1 #ifndef _LIBPCC_STDDEF_H_
3 #if !defined(__need_wchar_t) && !defined(__need_size_t) \
4 && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
5 && !defined(__need_wint_t)
6 #define _LIBPCC_STDDEF_H_
7 #endif
9 #if defined(_LIBPCC_STDDEF_H_) || defined(__need_ptrdiff_t)
10 #if !defined(_PTRDIFF_T) && !defined(__ptrdiff_t_defined)
11 #define _PTRDIFF_T
12 #define __ptrdiff_t_defined
13 #ifdef __PTRDIFF_TYPE__
14 typedef __PTRDIFF_TYPE__ ptrdiff_t;
15 #else
16 typedef int ptrdiff_t;
17 #endif
18 #endif
19 #endif
21 #if defined(_LIBPCC_STDDEF_H_) || defined(__need_size_t)
22 #if !defined(_SIZE_T) && !defined(__size_t_defined) && !defined(_SIZE_T_)
23 #define _SIZE_T
24 #define _SIZE_T_
25 #define __size_t_defined
26 #ifdef __SIZE_TYPE__
27 typedef __SIZE_TYPE__ size_t;
28 #else
29 typedef unsigned long size_t;
30 #endif
31 #endif
32 #if !defined(_OFF_T) && !defined(__off_t_defined) && !defined(_OFF_T_)
33 #define _OFF_T
34 #define _OFF_T_
35 #define __off_t_defined
36 #ifdef __OFF_TYPE__
37 typedef __OFF_TYPE__ off_t;
38 #else
39 typedef long off_t;
40 #endif
41 #endif
42 #endif
44 #if defined(_LIBPCC_STDDEF_H_) || defined(__need_wchar_t)
45 #ifndef __cplusplus
46 #if !defined(_WCHAR_T) && !defined(__wchar_t_defined)
47 #define _WCHAR_T
48 #define __wchar_t_defined
49 #ifdef __WCHAR_TYPE__
50 typedef __WCHAR_TYPE__ wchar_t;
51 #else
52 typedef unsigned short wchar_t;
53 #endif
54 #endif
55 #endif
56 #endif
58 #if defined(_LIBPCC_STDDEF_H_) || defined(__need_wint_t)
59 #if !defined(_WINT_T) && !defined(__wint_t_defined)
60 #define _WINT_T
61 #define __wint_t_defined
62 #ifdef __WINT_TYPE__
63 typedef __WINT_TYPE__ wint_t;
64 #else
65 typedef unsigned int wint_t;
66 #endif
67 #endif
68 #endif
70 #if defined(_LIBPCC_STDDEF_H_) || defined(__need_NULL)
71 #undef NULL
72 #define NULL (0)
73 #endif
75 #if defined(_LIBPCC_STDDEF_H_)
76 #define offsetof(type, member) ((size_t)&(((type *) 0)->member))
77 #endif
79 #undef __need_ptrdiff_t
80 #undef __need_size_t
81 #undef __need_wchar_t
82 #undef __need_wint_t
83 #undef __need_NULL
85 #endif