00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file os_stddef.h 00006 * 00007 * standard type definitions 00008 * 00009 * $Id: os_stddef.h 78902 2007-07-15 13:11:08Z sowayaa $ 00010 * 00011 * @author Don Hinton <dhinton@dresystems.com> 00012 * @author This code was originally in various places including ace/OS.h. 00013 */ 00014 //============================================================================= 00015 00016 // From http://www.UNIX-systems.org/single_unix_specification/ 00017 00018 #ifndef ACE_OS_INCLUDE_OS_STDDEF_H 00019 #define ACE_OS_INCLUDE_OS_STDDEF_H 00020 00021 #include /**/ "ace/pre.h" 00022 00023 #include "ace/config-lite.h" 00024 00025 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00026 # pragma once 00027 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00028 00029 #if !defined (ACE_LACKS_STDDEF_H) 00030 # include /**/ <stddef.h> 00031 #endif /* !ACE_LACKS_STDDEF_H */ 00032 00033 // Place all additions (especially function declarations) within extern "C" {} 00034 #ifdef __cplusplus 00035 extern "C" 00036 { 00037 #endif /* __cplusplus */ 00038 00039 //FUZZ: disable check_for_NULL 00040 // NULL pointer constant 00041 #if defined (ACE_LACKS_NULL) 00042 # undef NULL 00043 # if defined(__cplusplus) 00044 # define NULL 0 00045 # else 00046 # define NULL ((void *)0) 00047 # endif 00048 #endif /* ACE_LACKS_NULL */ 00049 //FUZZ: enable check_for_NULL 00050 00051 /* 00052 Integer constant expression of type size_t, the value of which is the offset 00053 in bytes to the structure member (member-designator), from the beginning of 00054 its structure (type). 00055 */ 00056 #if defined (ACE_LACKS_OFFSETOF) 00057 # undef offsetof 00058 # define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 00059 #endif /* ACE_LACKS_OFFSETOF */ 00060 00061 // Signed integer type of the result of subtracting two pointers. 00062 #if defined (ACE_LACKS_PTRDIFF_T) 00063 # if !defined (ACE_PTRDIFF_T_TYPE) 00064 # define ACE_PTRDIFF_T_TYPE unsigned long 00065 # endif /* !ACE_PTRDIFF_T_TYPE */ 00066 typedef ACE_PTRDIFF_T_TYPE ptrdiff_t; 00067 #endif /* ACE_LACKS_PTRDIFF_T */ 00068 00069 /* 00070 Integer type whose range of values can represent distinct wide-character 00071 codes for all members of the largest character set specified among the 00072 locales supported by the compilation environment: the null character has 00073 the code value 0 and each member of the portable character set has a code 00074 value equal to its value when used as the lone character in an integer 00075 character constant. 00076 */ 00077 #if defined (ACE_LACKS_WCHAR_T) 00078 # if !defined (ACE_WCHAR_T_TYPE) 00079 # define ACE_WCHAR_T_TYPE long; 00080 # endif /* !ACE_WCHAR_T_TYPE */ 00081 typedef ACE_WCHAR_T_TYPE wchar_t; 00082 #endif /* ACE_LACKS_WCHAR_T */ 00083 00084 // Unsigned integer type of the result of the sizeof operator. 00085 #if defined (ACE_LACKS_SIZE_T) 00086 # if !defined (ACE_SIZE_T_TYPE) 00087 # define ACE_SIZE_T_TYPE unsigned int; 00088 # endif /* !ACE_SIZE_T_TYPE */ 00089 typedef ACE_SIZE_T_TYPE size_t; 00090 #endif /* ACE_LACKS_SIZE_T */ 00091 00092 #ifdef __cplusplus 00093 } 00094 #endif /* __cplusplus */ 00095 00096 #include /**/ "ace/post.h" 00097 #endif /* ACE_OS_INCLUDE_OS_STDDEF_H */