os_stddef.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_stddef.h
00006  *
00007  *  standard type definitions
00008  *
00009  *  os_stddef.h,v 1.5 2006/05/05 13:11:39 jwillemsen Exp
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 // NULL pointer constant
00040 #if defined (ACE_LACKS_NULL)
00041 #  undef NULL
00042 #  if defined(__cplusplus)
00043 #    define NULL 0
00044 #  else
00045 #    define NULL ((void *)0)
00046 #  endif
00047 #endif /* ACE_LACKS_NULL */
00048 
00049 /*
00050   Integer constant expression of type size_t, the value of which is the offset
00051   in bytes to the structure member (member-designator), from the beginning of
00052   its structure (type).
00053 */
00054 #if defined (ACE_LACKS_OFFSETOF)
00055 #  undef offsetof
00056 #  define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
00057 #endif /* ACE_LACKS_OFFSETOF */
00058 
00059 //  Signed integer type of the result of subtracting two pointers.
00060 #if defined (ACE_LACKS_PTRDIFF_T)
00061 #  if !defined (ACE_PTRDIFF_T_TYPE)
00062 #    define ACE_PTRDIFF_T_TYPE unsigned long
00063 #  endif /* !ACE_PTRDIFF_T_TYPE */
00064    typedef ACE_PTRDIFF_T_TYPE ptrdiff_t;
00065 #endif /* ACE_LACKS_PTRDIFF_T */
00066 
00067 /*
00068   Integer type whose range of values can represent distinct wide-character
00069   codes for all members of the largest character set specified among the
00070   locales supported by the compilation environment: the null character has
00071   the code value 0 and each member of the portable character set has a code
00072   value equal to its value when used as the lone character in an integer
00073   character constant.
00074 */
00075 #if defined (ACE_LACKS_WCHAR_T)
00076 #  if !defined (ACE_WCHAR_T_TYPE)
00077 #    define ACE_WCHAR_T_TYPE long;
00078 #  endif /* !ACE_WCHAR_T_TYPE */
00079    typedef ACE_WCHAR_T_TYPE wchar_t;
00080 #endif /* ACE_LACKS_WCHAR_T */
00081 
00082 //  Unsigned integer type of the result of the sizeof operator.
00083 #if defined (ACE_LACKS_SIZE_T)
00084 #  if !defined (ACE_SIZE_T_TYPE)
00085 #    define ACE_SIZE_T_TYPE unsigned int;
00086 #  endif /* !ACE_SIZE_T_TYPE */
00087    typedef ACE_SIZE_T_TYPE size_t;
00088 #endif /* ACE_LACKS_SIZE_T */
00089 
00090 #ifdef __cplusplus
00091 }
00092 #endif /* __cplusplus */
00093 
00094 #include /**/ "ace/post.h"
00095 #endif /* ACE_OS_INCLUDE_OS_STDDEF_H */

Generated on Thu Nov 9 09:41:58 2006 for ACE by doxygen 1.3.6