os_types.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_types.h
00006  *
00007  *  data types
00008  *
00009  *  os_types.h,v 1.17 2006/06/20 12:40:38 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 #ifndef ACE_OS_INCLUDE_SYS_OS_TYPES_H
00017 #define ACE_OS_INCLUDE_SYS_OS_TYPES_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/os_stddef.h"
00028 
00029 #if !defined (ACE_LACKS_SYS_TYPES_H)
00030 #  include /**/ <sys/types.h>
00031 #endif /* !ACE_LACKS_SYS_TYPES_H */
00032 
00033 #if defined (ACE_HAS_WINCE)
00034 #  include /**/ <types.h>
00035 #endif /* ACE_HAS_WINCE */
00036 
00037 # if defined (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB) && \
00038              (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB != 0)
00039 using std::time_t;
00040 # endif /* ACE_USES_STD_NAMESPACE_FOR_STDC_LIB */
00041 
00042 // Place all additions (especially function declarations) within extern "C" {}
00043 #ifdef __cplusplus
00044 extern "C"
00045 {
00046 #endif /* __cplusplus */
00047 
00048 typedef double ACE_timer_t;
00049 
00050 // todo: don't forget to clean this up!  ;-)
00051 #if !defined (ACE_HAS_CLOCK_GETTIME) && !(defined (_CLOCKID_T_) || defined (_CLOCKID_T))
00052    typedef int clockid_t;
00053 #  if !defined (CLOCK_REALTIME)
00054 #    define CLOCK_REALTIME 0
00055 #  endif /* CLOCK_REALTIME */
00056 #endif /* ! ACE_HAS_CLOCK_GETTIME && ! _CLOCKID_T_ */
00057 
00058 #if defined (ACE_HAS_WINCE)
00059 
00060 // CE's add-on for c-style fstat/stat functionalities.  This struct is
00061 // by no mean complete compared to what you usually find in UNIX
00062 // platforms.  Only members that have direct conversion using Win32's
00063 // BY_HANDLE_FILE_INFORMATION are defined so that users can discover
00064 // non-supported members at compile time.  Time values are of type
00065 // ACE_Time_Value for easy comparison.
00066 
00067 // Since CE does not have _stat by default as NT/2000 does, the 'stat'
00068 // struct defined here will be used.  Also note that CE file system
00069 // struct is only for the CE 3.0 or later.
00070 // Refer to the WCHAR.H from Visual C++ and WIBASE.H from eVC 3.0.
00071 
00072    typedef unsigned int dev_t;
00073 #endif /* ACE_HAS_WINCE */
00074 
00075 #if defined (ACE_SIZEOF_LONG) && ACE_SIZEOF_LONG == 8
00076    typedef off_t ACE_LOFF_T;
00077 #elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__APPLE__) || \
00078   (defined (ACE_OPENVMS) && defined (_LARGEFILE))
00079    typedef off_t ACE_LOFF_T;
00080 #elif defined (__sgi) || defined (AIX) || defined (HPUX) || defined (__QNX__)
00081    typedef off64_t ACE_LOFF_T;
00082 #elif defined (__sun)
00083    typedef offset_t ACE_LOFF_T;
00084 #elif defined (WIN32)
00085    typedef __int64  ACE_LOFF_T;
00086 #elif (defined (ACE_VXWORKS) && (ACE_VXWORKS == 0x620 || ACE_VXWORKS == 0x551)) || \
00087   defined (ACE_LYNXOS_MAJOR) || \
00088   (defined (ACE_OPENVMS) && !defined (_LARGEFILE))
00089    typedef long long ACE_LOFF_T;
00090 #else
00091    typedef loff_t ACE_LOFF_T;
00092 #endif
00093 
00094 #if defined (ACE_WIN32)
00095 #  if !defined (__BORLANDC__)
00096      typedef DWORD nlink_t;
00097 #    if !defined(__MINGW32__)
00098         typedef u_short mode_t;
00099 #    endif /* !__MINGW32__ */
00100      typedef long uid_t;
00101      typedef long gid_t;
00102 #  endif /* __BORLANDC__ */
00103    typedef char *caddr_t;
00104 #endif /* ACE_WIN32 */
00105 
00106 #if defined (ACE_LACKS_KEY_T)
00107 #  if defined (ACE_WIN32)
00108    // Win32 doesn't use numeric values to name its semaphores, it uses
00109    // strings!
00110      typedef char *key_t;
00111 #  else
00112      typedef int key_t;
00113 #  endif /* ACE_WIN32 */
00114 #endif /* ACE_LACKS_KEY_T */
00115 
00116 #if !defined (ACE_HAS_SSIZE_T)
00117 #  if defined (ACE_WIN64)
00118   typedef SSIZE_T ssize_t;
00119 #  else
00120   typedef int ssize_t;
00121 #  endif /* ACE_WIN64 */
00122 #endif /* ACE_HAS_SSIZE_T */
00123 
00124 #if defined (ACE_WIN32)
00125    typedef DWORD ACE_exitcode;
00126 #else
00127    typedef int ACE_exitcode;
00128 #endif /* ACE_WIN32 */
00129 
00130 #if defined (ACE_LACKS_SUSECONDS_T)
00131   typedef long suseconds_t;
00132 #endif
00133 
00134 #if defined (ACE_LACKS_USECONDS_T)
00135   typedef unsigned long useconds_t;
00136 #endif
00137 
00138 #if defined (ACE_WIN32) && !defined(__MINGW32__)
00139    typedef long pid_t;
00140 #endif /* ACE_WIN32 */
00141 
00142 # if !defined (ACE_INVALID_PID)
00143 # define ACE_INVALID_PID ((pid_t) -1)
00144 # endif /* ACE_INVALID_PID */
00145 
00146 #ifdef __cplusplus
00147 }
00148 #endif /* __cplusplus */
00149 
00150 #include /**/ "ace/post.h"
00151 #endif /* ACE_OS_INCLUDE_SYS_OS_TYPES_H */

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