OS.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file  OS.h
00006  *
00007  *  OS.h,v 4.1253 2006/05/30 13:15:24 schmidt Exp
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  *  @author Jesper S. M|ller<stophph@diku.dk>
00011  *  @author and a cast of thousands...
00012  */
00013 //=============================================================================
00014 
00015 #ifndef ACE_OS_H
00016 #define ACE_OS_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "ace/config-all.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #if !defined (DO_NOT_INCLUDE_OS_H)
00027 #include "ace/Cleanup.h"
00028 #include "ace/Object_Manager_Base.h"
00029 #include "ace/OS_main.h"
00030 #include "ace/OS_NS_arpa_inet.h"
00031 #include "ace/OS_NS_ctype.h"
00032 #include "ace/OS_NS_dirent.h"
00033 #include "ace/OS_NS_dlfcn.h"
00034 #include "ace/OS_NS_errno.h"
00035 #include "ace/OS_NS_fcntl.h"
00036 #include "ace/OS_NS_math.h"
00037 #include "ace/OS_NS_netdb.h"
00038 #include "ace/OS_NS_poll.h"
00039 #include "ace/OS_NS_pwd.h"
00040 #include "ace/OS_NS_regex.h"
00041 #include "ace/OS_NS_signal.h"
00042 #include "ace/OS_NS_stdio.h"
00043 #include "ace/OS_NS_stdlib.h"
00044 #include "ace/OS_NS_string.h"
00045 #include "ace/OS_NS_strings.h"
00046 #include "ace/OS_NS_stropts.h"
00047 #include "ace/OS_NS_sys_mman.h"
00048 #include "ace/OS_NS_sys_msg.h"
00049 #include "ace/OS_NS_sys_resource.h"
00050 #include "ace/OS_NS_sys_select.h"
00051 #include "ace/OS_NS_sys_shm.h"
00052 #include "ace/OS_NS_sys_socket.h"
00053 #include "ace/OS_NS_sys_stat.h"
00054 #include "ace/OS_NS_sys_time.h"
00055 #include "ace/OS_NS_sys_uio.h"
00056 #include "ace/OS_NS_sys_utsname.h"
00057 #include "ace/OS_NS_sys_wait.h"
00058 #include "ace/OS_NS_Thread.h"
00059 #include "ace/OS_NS_time.h"
00060 #include "ace/OS_NS_unistd.h"
00061 #include "ace/OS_NS_wchar.h"
00062 
00063 // Include the split up ACE_OS classes
00064 #include "ace/OS_Dirent.h"
00065 #include "ace/OS_String.h"
00066 #include "ace/OS_Memory.h"
00067 #include "ace/OS_TLI.h"
00068 #include "ace/OS_Errno.h"
00069 
00070 #include "ace/os_include/os_dlfcn.h"
00071 #include "ace/os_include/sys/os_mman.h"
00072 #include "ace/os_include/os_netdb.h"
00073 #include "ace/os_include/sys/os_socket.h"
00074 #include "ace/os_include/net/os_if.h"
00075 #include "ace/os_include/sys/os_sem.h"
00076 
00077 #include "ace/Time_Value.h"
00078 
00079 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00080 
00081 class ACE_Timeout_Manager;
00082 
00083 ACE_END_VERSIONED_NAMESPACE_DECL
00084 
00085 // Here are all ACE-specific default constants, needed throughout ACE
00086 // and its applications.  The values can be over written by user
00087 // specific values in config.h files.
00088 #include "ace/Default_Constants.h"
00089 
00090 // Here are all ACE-specific global declarations needed throughout
00091 // ACE.
00092 #include "ace/Global_Macros.h"
00093 
00094 // include the ACE min()/max() functions.
00095 # include "ace/Min_Max.h"
00096 
00097 ///////////////////////////////////////////
00098 //                                       //
00099 // NOTE: Please do not add any #includes //
00100 //       before this point.  On VxWorks, //
00101 //       vxWorks.h must be #included     //
00102 //       first!                          //
00103 //                                       //
00104 ///////////////////////////////////////////
00105 
00106 #include "ace/os_include/netinet/os_tcp.h"
00107 #include "ace/os_include/sys/os_stat.h"
00108 #include "ace/os_include/os_stropts.h"
00109 #include "ace/os_include/os_unistd.h"
00110 #include "ace/os_include/sys/os_wait.h"
00111 
00112 
00113 // This needs to go here *first* to avoid problems with AIX.
00114 # if defined (ACE_HAS_PTHREADS)
00115 #   include "ace/os_include/os_pthread.h"
00116 # endif /* ACE_HAS_PTHREADS */
00117 
00118 # if defined (ACE_HAS_PROC_FS)
00119 #   include /**/ <sys/procfs.h>
00120 # endif /* ACE_HAS_PROC_FS */
00121 
00122 # if defined (ACE_HAS_POSIX_SEM)
00123 #   include "ace/os_include/os_semaphore.h"
00124 # endif /* ACE_HAS_POSIX_SEM */
00125 
00126 #include "ace/os_include/sys/os_types.h"
00127 #include "ace/os_include/os_stddef.h"
00128 #if !defined (ACE_LACKS_UNISTD_H)
00129 #  include "ace/os_include/os_unistd.h"
00130 #endif /* ACE_LACKS_UNISTD_H */
00131 
00132 // Standard C Library includes
00133 // NOTE: stdarg.h must be #included before stdio.h on LynxOS.
00134 # include "ace/os_include/os_stdarg.h"
00135 # if !defined (ACE_HAS_WINCE)
00136 #   include "ace/os_include/os_assert.h"
00137 #   include "ace/os_include/os_stdio.h"
00138 
00139 #   if !defined (ACE_LACKS_NEW_H)
00140 #     if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
00141 #       include /**/ <new>
00142 #     else
00143 #       include /**/ <new.h>
00144 #     endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
00145 #   endif /* ! ACE_LACKS_NEW_H */
00146 
00147 #   if !defined (ACE_VXWORKS)
00148 #   define ACE_DONT_INCLUDE_ACE_SIGNAL_H
00149 #     include "ace/os_include/os_signal.h"
00150 #   undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
00151 #   endif /* ! VXWORKS */
00152 
00153 #   include "ace/os_include/os_fcntl.h"
00154 # endif /* ACE_HAS_WINCE */
00155 
00156 # include "ace/os_include/os_limits.h"
00157 # include "ace/os_include/os_ctype.h"
00158 # include "ace/os_include/os_string.h"
00159 # include "ace/os_include/os_stdlib.h"
00160 # include "ace/os_include/os_float.h"
00161 
00162 # if defined (ACE_NEEDS_SCHED_H)
00163 #   include "ace/os_include/os_sched.h"
00164 # endif /* ACE_NEEDS_SCHED_H */
00165 
00166 #   include "ace/iosfwd.h"
00167 
00168 # if !defined (ACE_HAS_WINCE)
00169 #   include "ace/os_include/os_fcntl.h"
00170 # endif /* ACE_HAS_WINCE */
00171 
00172 # if defined ACE_HAS_BYTESEX_H
00173 #   include /**/ <bytesex.h>
00174 # endif /* ACE_HAS_BYTESEX_H */
00175 # include "ace/Basic_Types.h"
00176 
00177 # if defined (ACE_HAS_UTIME)
00178 #   include "ace/os_include/os_utime.h"
00179 # endif /* ACE_HAS_UTIME */
00180 
00181 # if defined (ACE_WIN32)
00182 
00183 #   if !defined (ACE_HAS_WINCE)
00184 #     include "ace/os_include/sys/os_timeb.h"
00185 #   endif /* ACE_HAS_WINCE */
00186 
00187 #   if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00188 #     include "ace/os_include/netinet/os_in.h"  // <ws2tcpip.h>
00189 #   endif /* ACE_HAS_WINSOCK2 */
00190 
00191 #   if !defined (ACE_HAS_WINCE)
00192 #     include "ace/os_include/os_time.h"
00193 #     include "ace/os_include/sys/os_stat.h"  // <direct.h>
00194 #     include "ace/os_include/os_unistd.h"  // <process.h>
00195 #   endif /* ACE_HAS_WINCE */
00196 
00197 #     include "ace/os_include/os_fcntl.h"
00198 
00199 # else /* !defined (ACE_WIN32) */
00200 
00201 #   if defined (CYGWIN32)
00202 #     include "ace/os_include/sys/os_uio.h"
00203 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00204 #     include "ace/os_include/sys/os_time.h"
00205 #     include "ace/os_include/sys/os_resource.h"
00206 #     include "ace/os_include/sys/os_wait.h"
00207 #     include "ace/os_include/os_pwd.h"
00208 #   elif defined (__QNX__)
00209 #     include "ace/os_include/sys/os_uio.h"
00210 #     include "ace/os_include/sys/os_ipc.h"
00211 #     include "ace/os_include/sys/os_time.h"
00212 #     include "ace/os_include/sys/os_wait.h"
00213 #     include "ace/os_include/sys/os_resource.h"
00214 #     include "ace/os_include/os_pwd.h"
00215       // sets O_NDELAY
00216 #     include /**/ <unix.h>
00217 #     include "ace/os_include/os_limits.h"  // <sys/param.h> /* for NBBY */
00218 #   elif defined(__rtems__)
00219 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00220 #     include "ace/os_include/sys/os_resource.h"
00221 #     include "ace/os_include/sys/os_time.h"
00222 #     include "ace/os_include/sys/os_utsname.h"
00223 #     include "ace/os_include/sys/os_wait.h"
00224 #     include "ace/os_include/os_pwd.h"
00225 
00226 #   elif ! defined (ACE_VXWORKS) && ! defined (INTEGRITY)
00227 #     include "ace/os_include/sys/os_uio.h"
00228 #     include "ace/os_include/sys/os_ipc.h"
00229 #     if !defined(ACE_LACKS_SYSV_SHMEM)
00230 // No reason to #include this if the platform lacks support for SHMEM
00231 #       include "ace/os_include/sys/os_shm.h"
00232 #     endif /* ACE_LACKS_SYSV_SHMEM */
00233 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00234 #     include "ace/os_include/sys/os_time.h"
00235 #     include "ace/os_include/sys/os_resource.h"
00236 #     include "ace/os_include/sys/os_wait.h"
00237 #     include "ace/os_include/os_pwd.h"
00238 #   endif /* ! VXWORKS */
00239 #   include "ace/os_include/os_stropts.h" // <sys/ioctl.h>
00240 
00241 // IRIX5 defines bzero() in this odd file...
00242 #   if defined (ACE_HAS_BSTRING)
00243 #     include /**/ <bstring.h>
00244 #   endif /* ACE_HAS_BSTRING */
00245 
00246 // AIX defines bzero() in this odd file...
00247 #   if defined (ACE_HAS_STRINGS)
00248 #     include "ace/os_include/os_strings.h"
00249 #   endif /* ACE_HAS_STRINGS */
00250 
00251 #   if defined (ACE_HAS_TERMIOS)
00252 #     include "ace/os_include/os_termios.h"
00253 #   endif /* ACE_HAS_TERMIOS */
00254 
00255 #   if defined (ACE_HAS_AIO_CALLS)
00256 #     include "ace/os_include/os_aio.h"
00257 #   endif /* ACE_HAS_AIO_CALLS */
00258 
00259 #     include "ace/os_include/os_limits.h"  // <sys/param.h>
00260 
00261 #   if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00262 #     include "ace/os_include/sys/os_un.h"
00263 #   endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00264 
00265 #   if defined (ACE_HAS_POLL)
00266 #     include "ace/os_include/os_poll.h"
00267 #   endif /* ACE_HAS_POLL */
00268 
00269 #   if defined (ACE_HAS_SELECT_H)
00270 #     include "ace/os_include/sys/os_select.h"
00271 #   endif /* ACE_HAS_SELECT_H */
00272 
00273 #     include "ace/os_include/sys/os_msg.h"
00274 
00275 #   if defined (ACE_HAS_PRIOCNTL)
00276 #     include /**/ <sys/priocntl.h>
00277 #   endif /* ACE_HAS_PRIOCNTL */
00278 
00279 # endif /* !defined (ACE_WIN32) */
00280 
00281 # if !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG)
00282 # include "ace/os_include/os_syslog.h"
00283 # endif /* !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG) */
00284 
00285 
00286 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00287 
00288 /**
00289  * @namespace ACE_OS
00290  *
00291  * @brief This namespace defines an OS independent programming API that
00292  *     shields developers from nonportable aspects of writing
00293  *     efficient system programs on Win32, POSIX and other versions
00294  *     of UNIX, and various real-time operating systems.
00295  *
00296  * This namespace encapsulates the differences between various OS
00297  * platforms.  When porting ACE to a new platform, this class is
00298  * the place to focus on.  Once this file is ported to a new
00299  * platform, pretty much everything else comes for "free."  See
00300  * <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html>
00301  * for instructions on porting ACE.  Please see the README file
00302  * in this directory for complete information on the meaning of
00303  * the various macros.
00304  */
00305 namespace ACE_OS
00306 {
00307   // = A set of wrappers for miscellaneous operations.
00308 }  /* namespace ACE_OS */
00309 
00310 ACE_END_VERSIONED_NAMESPACE_DECL
00311 
00312 # if defined (ACE_HAS_INLINED_OSCALLS)
00313 #   if defined (ACE_INLINE)
00314 #     undef ACE_INLINE
00315 #   endif /* ACE_INLINE */
00316 #   define ACE_INLINE inline
00317 #   include "ace/OS.inl"
00318 # endif /* ACE_HAS_INLINED_OSCALLS */
00319 
00320 #if defined (ACE_LEGACY_MODE)
00321 # include "ace/Log_Msg.h"
00322 # include "ace/Thread_Hook.h"
00323 # include "ace/Thread_Adapter.h"
00324 # include "ace/Thread_Exit.h"
00325 # include "ace/Thread_Control.h"
00326 #endif  /* ACE_LEGACY_MODE */
00327 
00328 #endif /* 0 */
00329 
00330 #include /**/ "ace/post.h"
00331 #endif  /* ACE_OS_H */

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