OS.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file  OS.h
00006  *
00007  *  $Id: OS.h 80826 2008-03-04 14:51:23Z wotte $
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 # if !defined (ACE_HAS_WINCE)
00134 #   include "ace/os_include/os_assert.h"
00135 #   include "ace/os_include/os_stdio.h"
00136 
00137 #   if !defined (ACE_LACKS_NEW_H)
00138 #     if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
00139 #       include /**/ <new>
00140 #     else
00141 #       include /**/ <new.h>
00142 #     endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
00143 #   endif /* ! ACE_LACKS_NEW_H */
00144 
00145 #   if !defined (ACE_VXWORKS)
00146 #   define ACE_DONT_INCLUDE_ACE_SIGNAL_H
00147 #     include "ace/os_include/os_signal.h"
00148 #   undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
00149 #   endif /* ! VXWORKS */
00150 
00151 #   include "ace/os_include/os_fcntl.h"
00152 # endif /* ACE_HAS_WINCE */
00153 
00154 # include "ace/os_include/os_limits.h"
00155 # include "ace/os_include/os_ctype.h"
00156 # include "ace/os_include/os_string.h"
00157 # include "ace/os_include/os_stdlib.h"
00158 # include "ace/os_include/os_float.h"
00159 
00160 # if defined (ACE_NEEDS_SCHED_H)
00161 #   include "ace/os_include/os_sched.h"
00162 # endif /* ACE_NEEDS_SCHED_H */
00163 
00164 #   include "ace/iosfwd.h"
00165 
00166 # if !defined (ACE_HAS_WINCE)
00167 #   include "ace/os_include/os_fcntl.h"
00168 # endif /* ACE_HAS_WINCE */
00169 
00170 # if defined ACE_HAS_BYTESEX_H
00171 #   include /**/ <bytesex.h>
00172 # endif /* ACE_HAS_BYTESEX_H */
00173 # include "ace/Basic_Types.h"
00174 
00175 # if defined (ACE_HAS_UTIME)
00176 #   include "ace/os_include/os_utime.h"
00177 # endif /* ACE_HAS_UTIME */
00178 
00179 # if defined (ACE_WIN32)
00180 
00181 #   if !defined (ACE_HAS_WINCE)
00182 #     include "ace/os_include/sys/os_timeb.h"
00183 #   endif /* ACE_HAS_WINCE */
00184 
00185 #   if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00186 #     include "ace/os_include/netinet/os_in.h"  // <ws2tcpip.h>
00187 #   endif /* ACE_HAS_WINSOCK2 */
00188 
00189 #   if !defined (ACE_HAS_WINCE)
00190 #     include "ace/os_include/os_time.h"
00191 #     include "ace/os_include/sys/os_stat.h"  // <direct.h>
00192 #     include "ace/os_include/os_unistd.h"  // <process.h>
00193 #   endif /* ACE_HAS_WINCE */
00194 
00195 #     include "ace/os_include/os_fcntl.h"
00196 
00197 # else /* !defined (ACE_WIN32) */
00198 
00199 #   if defined (CYGWIN32)
00200 #     include "ace/os_include/sys/os_uio.h"
00201 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00202 #     include "ace/os_include/sys/os_time.h"
00203 #     include "ace/os_include/sys/os_resource.h"
00204 #     include "ace/os_include/sys/os_wait.h"
00205 #     include "ace/os_include/os_pwd.h"
00206 #   elif defined (__QNX__)
00207 #     include "ace/os_include/sys/os_uio.h"
00208 #     include "ace/os_include/sys/os_ipc.h"
00209 #     include "ace/os_include/sys/os_time.h"
00210 #     include "ace/os_include/sys/os_wait.h"
00211 #     include "ace/os_include/sys/os_resource.h"
00212 #     include "ace/os_include/os_pwd.h"
00213       // sets O_NDELAY
00214 #     include /**/ <unix.h>
00215 #     include "ace/os_include/os_limits.h"  // <sys/param.h> /* for NBBY */
00216 #   elif defined(ACE_HAS_RTEMS)
00217 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00218 #     include "ace/os_include/sys/os_resource.h"
00219 #     include "ace/os_include/sys/os_time.h"
00220 #     include "ace/os_include/sys/os_utsname.h"
00221 #     include "ace/os_include/sys/os_wait.h"
00222 #     include "ace/os_include/os_pwd.h"
00223 
00224 #   elif ! defined (ACE_VXWORKS) && ! defined (INTEGRITY)
00225 #     include "ace/os_include/sys/os_uio.h"
00226 #     include "ace/os_include/sys/os_ipc.h"
00227 #     if !defined(ACE_LACKS_SYSV_SHMEM)
00228 // No reason to #include this if the platform lacks support for SHMEM
00229 #       include "ace/os_include/sys/os_shm.h"
00230 #     endif /* ACE_LACKS_SYSV_SHMEM */
00231 #     include "ace/os_include/os_fcntl.h"  // <sys/file.h>
00232 #     include "ace/os_include/sys/os_time.h"
00233 #     include "ace/os_include/sys/os_resource.h"
00234 #     include "ace/os_include/sys/os_wait.h"
00235 #     include "ace/os_include/os_pwd.h"
00236 #   endif /* ! VXWORKS */
00237 #   include "ace/os_include/os_stropts.h" // <sys/ioctl.h>
00238 
00239 // IRIX5 defines bzero() in this odd file...
00240 #   if defined (ACE_HAS_BSTRING)
00241 #     include /**/ <bstring.h>
00242 #   endif /* ACE_HAS_BSTRING */
00243 
00244 // AIX defines bzero() in this odd file...
00245 #   if defined (ACE_HAS_STRINGS)
00246 #     include "ace/os_include/os_strings.h"
00247 #   endif /* ACE_HAS_STRINGS */
00248 
00249 #   if defined (ACE_HAS_TERMIOS)
00250 #     include "ace/os_include/os_termios.h"
00251 #   endif /* ACE_HAS_TERMIOS */
00252 
00253 #   if defined (ACE_HAS_AIO_CALLS)
00254 #     include "ace/os_include/os_aio.h"
00255 #   endif /* ACE_HAS_AIO_CALLS */
00256 
00257 #     include "ace/os_include/os_limits.h"  // <sys/param.h>
00258 
00259 #   if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00260 #     include "ace/os_include/sys/os_un.h"
00261 #   endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
00262 
00263 #   if defined (ACE_HAS_POLL)
00264 #     include "ace/os_include/os_poll.h"
00265 #   endif /* ACE_HAS_POLL */
00266 
00267 #   if defined (ACE_HAS_SELECT_H)
00268 #     include "ace/os_include/sys/os_select.h"
00269 #   endif /* ACE_HAS_SELECT_H */
00270 
00271 #     include "ace/os_include/sys/os_msg.h"
00272 
00273 #   if defined (ACE_HAS_PRIOCNTL)
00274 #     include /**/ <sys/priocntl.h>
00275 #   endif /* ACE_HAS_PRIOCNTL */
00276 
00277 # endif /* !defined (ACE_WIN32) */
00278 
00279 # if !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG)
00280 # include "ace/os_include/os_syslog.h"
00281 # endif /* !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG) */
00282 
00283 
00284 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00285 
00286 /**
00287  * @namespace ACE_OS
00288  *
00289  * @brief This namespace defines an OS independent programming API that
00290  *     shields developers from nonportable aspects of writing
00291  *     efficient system programs on Win32, POSIX and other versions
00292  *     of UNIX, and various real-time operating systems.
00293  *
00294  * This namespace encapsulates the differences between various OS
00295  * platforms.  When porting ACE to a new platform, this class is
00296  * the place to focus on.  Once this file is ported to a new
00297  * platform, pretty much everything else comes for "free."  See
00298  * <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html>
00299  * for instructions on porting ACE.  Please see the README file
00300  * in this directory for complete information on the meaning of
00301  * the various macros.
00302  */
00303 namespace ACE_OS
00304 {
00305   // = A set of wrappers for miscellaneous operations.
00306 }  /* namespace ACE_OS */
00307 
00308 ACE_END_VERSIONED_NAMESPACE_DECL
00309 
00310 # if defined (ACE_HAS_INLINED_OSCALLS)
00311 #   if defined (ACE_INLINE)
00312 #     undef ACE_INLINE
00313 #   endif /* ACE_INLINE */
00314 #   define ACE_INLINE inline
00315 #   include "ace/OS.inl"
00316 # endif /* ACE_HAS_INLINED_OSCALLS */
00317 
00318 #if defined (ACE_LEGACY_MODE)
00319 # include "ace/Log_Msg.h"
00320 # include "ace/Thread_Hook.h"
00321 # include "ace/Thread_Adapter.h"
00322 # include "ace/Thread_Exit.h"
00323 # include "ace/Thread_Control.h"
00324 #endif  /* ACE_LEGACY_MODE */
00325 
00326 #endif /* 0 */
00327 
00328 #include /**/ "ace/post.h"
00329 #endif  /* ACE_OS_H */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7