fix some problems in patch from brezenbak
[reactos.git] / posix / include / stddef.h
1 /* $Id: stddef.h,v 1.5 2003/01/05 18:27:19 robd Exp $
2 */
3 /*
4 * stddef.h
5 *
6 * standard type definitions. Conforming to the Single UNIX(r) Specification
7 * Version 2, System Interface & Headers Issue 5
8 *
9 * This file is part of the ReactOS Operating System.
10 *
11 * Contributors:
12 * Created by KJK::Hyperion <noog@libero.it>
13 *
14 * THIS SOFTWARE IS NOT COPYRIGHTED
15 *
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
18 *
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 *
24 */
25 #ifndef __STDDEF_H_INCLUDED__
26 #define __STDDEF_H_INCLUDED__
27
28 /* INCLUDES */
29 #include <sys/types.h>
30
31 /* OBJECTS */
32
33 /* TYPES */
34 typedef signed long int ptrdiff_t;
35
36 #ifndef _WCHAR_T_
37 #define _WCHAR_T_
38 #define _WCHAR_T
39 #define _WCHAR_T_DEFINED
40 #ifndef __WCHAR_TYPE__
41 #define __WCHAR_TYPE__ short unsigned int
42 #endif
43 #ifndef __cplusplus
44 typedef __WCHAR_TYPE__ wchar_t;
45 #endif /* C++ */
46 #endif /* _WCHAR_T_ */
47
48 //typedef unsigned short int wchar_t;
49
50 /* CONSTANTS */
51 #ifndef NULL
52 #define NULL ((void *)(0)) /* Null pointer constant. */
53 #endif
54
55 /* PROTOTYPES */
56
57 /* MACROS */
58 #define offsetof(t,m) ((size_t) &((t *)0)->m)
59
60 #endif /* __STDDEF_H_INCLUDED__ */
61
62 /* EOF */
63