Main Page | Alphabetical List | Class List | File List | Class Members | File Members

stddef.h

Go to the documentation of this file.
00001 /*--------------------------------------------------------
00002  * /
00003  * / apeNEXT stddef for nlcc
00004  * /
00005  * / $Id: stddef.h,v 1.12 2005/06/08 14:06:53 pleiter Exp $
00006  * /
00007  * /
00008  * / ISO/IEC 9899:1999 (E) Standard
00009  * / Common definitions  <stddef.h>
00010  * /
00011  * /
00012  * / IMPLEMENTATION for APEnext: possible                   (stddef.h) 
00013  * /----------------------------------------------------------------*/
00014 
00015 #ifndef _STDDEF_H
00016 #define _STDDEF_H
00017 
00018 #include <nlibc.h>
00019 
00020 /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MACROS ^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
00021 /* Redeclaration is to check if some of work has already been done. */
00022 
00023 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00024  NULL macro yields a null pointer constant that is usable as an 
00025  address constant expression.
00026 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00027 #ifndef NULL
00028 #define NULL           ((void *)0)
00029 #endif
00030 
00031 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00032  Pre-defined at least once in stdbool.h
00033 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00034 #ifndef TRUE
00035 #define TRUE           1
00036 #endif
00037 
00038 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00039  Pre-defined at least once in stdbool.h
00040 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00041 #ifndef FALSE
00042 #define FALSE          0
00043 #endif
00044 
00045 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00046    Following macro yields the offset in bytes, of type size_t 
00047 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00048 #ifndef offsetof
00049 #define offsetof(type, field)  ((size_t) &(((type *) 0)->field) * 16)
00050 #endif
00051 
00052 
00053 
00054 /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TYPES  ^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
00055 
00056 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00057   PTRDIFF_T type is the signed integer type si-type of an object needed 
00058   to store the result of subtracting two pointers
00059 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00060 #ifndef _PTRDIFF_T
00061 #define _PTRDIFF_T
00062 typedef long            ptrdiff_t;
00063 #endif
00064 
00065 /*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
00066   SIZE_T type is the unsigned integer type of an object needed 
00067   to store the result of the sizeof operator.
00068 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00069 
00070 #ifndef _SIZE_T
00071 #define _SIZE_T
00072 typedef unsigned long   size_t;
00073 #endif
00074 
00075 
00076 /*''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
00077   WCHAR_T type is the unsigned integer type of an object needed 
00078   to store a wide character
00079 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/
00080 #ifndef WCHAR_T
00081 typedef int wchar_t;
00082 #endif
00083 
00084 #endif /* ifndef _STDDEF_H  */
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 

Generated on Fri Jul 14 10:51:32 2006 for nlibc by doxygen 1.3.5