From d147d40ad556425b8102eade91ef8a5591f6acf7 Mon Sep 17 00:00:00 2001 From: dhinton Date: Sat, 27 Apr 2002 05:16:43 +0000 Subject: ChangeLogTag:Fri Apr 26 16:23:32 UTC 2002 Don Hinton --- ace/Main_Macros.h | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++ ace/ace_aio.h | 32 +++++++ ace/ace_ctype.h | 28 ++++++ ace/ace_dlfcn.h | 81 +++++++++++++++++ ace/ace_fcntl.h | 106 ++++++++++++++++++++++ ace/ace_netinet_in.h | 66 ++++++++++++++ ace/ace_new.h | 32 +++++++ ace/ace_poll.h | 29 ++++++ ace/ace_pwd.h | 29 ++++++ ace/ace_sched.h | 29 ++++++ ace/ace_stddef.h | 29 ++++++ ace/ace_stdlib.h | 46 ++++++++++ ace/ace_string.h | 57 ++++++++++++ ace/ace_sys_ioctl.h | 29 ++++++ ace/ace_sys_ipc.h | 53 +++++++++++ ace/ace_sys_select.h | 41 +++++++++ ace/ace_sys_shm.h | 29 ++++++ ace/ace_sys_times.h | 28 ++++++ ace/ace_sys_utsname.h | 49 ++++++++++ ace/ace_sys_wait.h | 121 +++++++++++++++++++++++++ ace/ace_termios.h | 50 ++++++++++ ace/ace_unistd.h | 106 ++++++++++++++++++++++ ace/ace_utime.h | 29 ++++++ 23 files changed, 1345 insertions(+) create mode 100644 ace/Main_Macros.h create mode 100644 ace/ace_aio.h create mode 100644 ace/ace_ctype.h create mode 100644 ace/ace_dlfcn.h create mode 100644 ace/ace_fcntl.h create mode 100644 ace/ace_netinet_in.h create mode 100644 ace/ace_new.h create mode 100644 ace/ace_poll.h create mode 100644 ace/ace_pwd.h create mode 100644 ace/ace_sched.h create mode 100644 ace/ace_stddef.h create mode 100644 ace/ace_stdlib.h create mode 100644 ace/ace_string.h create mode 100644 ace/ace_sys_ioctl.h create mode 100644 ace/ace_sys_ipc.h create mode 100644 ace/ace_sys_select.h create mode 100644 ace/ace_sys_shm.h create mode 100644 ace/ace_sys_times.h create mode 100644 ace/ace_sys_utsname.h create mode 100644 ace/ace_sys_wait.h create mode 100644 ace/ace_termios.h create mode 100644 ace/ace_unistd.h create mode 100644 ace/ace_utime.h diff --git a/ace/Main_Macros.h b/ace/Main_Macros.h new file mode 100644 index 00000000000..0d035901fd1 --- /dev/null +++ b/ace/Main_Macros.h @@ -0,0 +1,246 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Main_Macros.h + * + * $Id$ + * + * @author Douglas C. Schmidt + * @author Jesper S. M|ller + * @author and a cast of thousands... + */ +//============================================================================= + + +// These are separate since they may include Object_Mananager.h (thus OS.h) depending +// on whether or not ACE_HAS_NONSTATIC_OBJECT_MANAGER is defined. + +#if !defined (ACE_MAIN_MACROS_H) +#define ACE_MAIN_MACROS_H + +#include "ace/pre.h" + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_MAIN) +# define ACE_MAIN main +# endif /* ! ACE_MAIN */ + +# if !defined (ACE_WMAIN) +# define ACE_WMAIN wmain +# endif /* ! ACE_WMAIN */ + +# if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) +# define ACE_TMAIN wmain +# else +# define ACE_TMAIN main +# endif + +# if defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER) +# if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) +# define ACE_HAS_NONSTATIC_OBJECT_MANAGER +# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */ +# endif /* ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ + +# if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER) + +# if !defined (ACE_HAS_MINIMAL_ACE_OS) +# include "ace/Object_Manager.h" +# endif /* ! ACE_HAS_MINIMAL_ACE_OS */ + +// Rename "main ()" on platforms that don't allow it to be called "main ()". + +// Also, create ACE_Object_Manager static instance(s) in "main ()". +// ACE_MAIN_OBJECT_MANAGER defines the ACE_Object_Manager(s) that will +// be instantiated on the stack of main (). Note that it is only used +// when compiling main (): its value does not affect the contents of +// ace/OS.o. +# if !defined (ACE_MAIN_OBJECT_MANAGER) +# define ACE_MAIN_OBJECT_MANAGER \ + ACE_OS_Object_Manager ace_os_object_manager; \ + ACE_Object_Manager ace_object_manager; +# endif /* ! ACE_MAIN_OBJECT_MANAGER */ + +# if defined (ACE_PSOSIM) +// PSOSIM root lacks the standard argc, argv command line parameters, +// create dummy argc and argv in the "real" main and pass to "user" main. +// NOTE: ACE_MAIN must be defined to give the return type as well as the +// name of the entry point. +# define main \ +ace_main_i (int, char *[]); /* forward declaration */ \ +ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ \ +{ \ + int argc = 1; /* dummy arg count */ \ + char *argv[] = {"psosim"}; /* dummy arg list */ \ + ACE_MAIN_OBJECT_MANAGER \ + int ret_val = -1; /* assume the worst */ \ + if (ACE_PSOS_Time_t::init_simulator_time ()) /* init simulator time */ \ + { \ + ACE_ERROR((LM_ERROR, "init_simulator_time failed\n")); /* report */ \ + } \ + else \ + { \ + ret_val = ace_main_i (argc, argv); /* call user main, save result */ \ + } \ + ACE_OS::exit (ret_val); /* pass code to simulator exit */ \ +} \ +int \ +ace_main_i +# elif defined (ACE_PSOS) && defined (ACE_PSOS_LACKS_ARGC_ARGV) +// PSOS root lacks the standard argc, argv command line parameters, +// create dummy argc and argv in the "real" main and pass to "user" main. +// Ignore return value from user main as well. NOTE: ACE_MAIN must be +// defined to give the return type as well as the name of the entry point +# define main \ +ace_main_i (int, char *[]); /* forward declaration */ \ +ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ \ +{ \ + int argc = 1; /* dummy arg count */ \ + char *argv[] = {"root"}; /* dummy arg list */ \ + ACE_MAIN_OBJECT_MANAGER \ + ace_main_i (argc, argv); /* call user main, ignore result */ \ +} \ +int \ +ace_main_i +# elif defined (ACE_HAS_WINCE) +/** + * @class ACE_CE_ARGV + * + * @brief This class is to hash input parameters, argc and argv, for WinCE platform. + * + * Since WinCE only supports wchar_t as an input from OS, some implementation detail, + * especially for CORBA spec, will not support ACE_TCHAR (wchar_t) type parameter. + * Moreover, WinCE's input parameter type is totally different than any other OS; + * all command line parameters will be stored in a single wide-character string with + * each unit parameter divided by blank space, and it does not provide the name of + * executable (generally known as argv[0]). + * This class is to convert CE's command line parameters and simulate as in the same + * manner as other general platforms, adding 'root' as a first argc, which is for the + * name of executable in other OS. + */ +class ACE_OS_Export ACE_CE_ARGV +{ +public: + /** + * Ctor accepts CE command line as a paramter. + */ + ACE_CE_ARGV(ACE_TCHAR* cmdLine); + + /** + * Default Dtor that deletes any memory allocated for the converted string. + */ + ~ACE_CE_ARGV(void); + + /** + * Returns the number of command line paramters, same as argc on Unix. + */ + int argc(void); + + /** + * Returns the 'char**' that contains the converted command line parameters. + */ + ACE_TCHAR** const argv(void); + +private: + /** + * Copy Ctor is not allowed. + */ + ACE_CE_ARGV(void); + + /** + * Copy Ctor is not allowed. + */ + ACE_CE_ARGV(ACE_CE_ARGV&); + + /** + * Pointer of converted command line paramters. + */ + ACE_TCHAR** ce_argv_; + + /** + * Integer that is same as argc on other OS's. + */ + int ce_argc_; +}; +# if defined (ACE_TMAIN) // Use WinMain on CE; others give warning/error. +# undef ACE_TMAIN +# endif // ACE_TMAIN + +// Support for ACE_TMAIN, which is a recommended way. +# define ACE_TMAIN \ +ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \ +int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ +{ \ + ACE_CE_ARGV ce_argv(lpCmdLine); \ + ACE::init(); \ + ACE_MAIN_OBJECT_MANAGER \ + int i = ace_main_i (ce_argv.argc(), ce_argv.argv()); \ + ACE::fini(); \ + return i; \ +} \ +int ace_main_i + +// Support for wchar_t but still can't fit to CE because of the command line parameters. +# define wmain \ +ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \ +int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ +{ \ + ACE_CE_ARGV ce_argv(lpCmdLine); \ + ACE::init(); \ + ACE_MAIN_OBJECT_MANAGER \ + int i = ace_main_i (ce_argv.argc(), ce_argv.argv()); \ + ACE::fini(); \ + return i; \ +} \ +int ace_main_i + +// Supporting legacy 'main' is A LOT easier for users than changing existing code on WinCE. +# define main \ +ace_main_i (int, char *[]); /* forward declaration */ \ +#include \ +int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) \ +{ \ + ACE_CE_ARGV ce_argv(lpCmdLine); \ + ACE::init(); \ + ACE_MAIN_OBJECT_MANAGER \ + ACE_Argv_Type_Converter command_line(ce_argv.argc(), ce_argv.argv()); \ + int i = ace_main_i (command_line.get_argc(), command_line.get_ASCII_argv()); \ + ACE::fini(); \ + return i; \ +} \ +int ace_main_i + +# else +# define main \ +ace_main_i (int, char *[]); /* forward declaration */ \ +int \ +ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., main */ \ +{ \ + ACE_MAIN_OBJECT_MANAGER \ + return ace_main_i (argc, argv); /* what the user calls "main" */ \ +} \ +int \ +ace_main_i +# if defined (ACE_WIN32) +# define wmain \ +ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \ +int \ +ACE_WMAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \ +{ \ + ACE_MAIN_OBJECT_MANAGER \ + return ace_main_i (argc, argv); /* what the user calls "main" */ \ +} \ +int \ +ace_main_i +# endif /* ACE_WIN32 && UNICODE */ +# endif /* ACE_PSOSIM */ +# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ + + +#endif /* ACE_MAIN_MACROS_H */ + diff --git a/ace/ace_aio.h b/ace/ace_aio.h new file mode 100644 index 00000000000..d2ce0958c3c --- /dev/null +++ b/ace/ace_aio.h @@ -0,0 +1,32 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_assert.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_AIO_H +# define ACE_ACE_AIO_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_AIO_H) +# include /**/ +# endif /* ACE_LACKS_AIO_H */ + +# if !defined (_SC_AIO_MAX) +# define _SC_AIO_MAX 1 +# endif /* _SC_AIO_MAX */ + +# endif /* ACE_ACE_AIO_H */ diff --git a/ace/ace_ctype.h b/ace/ace_ctype.h new file mode 100644 index 00000000000..0b3291050ac --- /dev/null +++ b/ace/ace_ctype.h @@ -0,0 +1,28 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_ctype.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_CTYPE_H +# define ACE_ACE_CTYPE_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_CTYPE_H) +# include /**/ +# endif /* !ACE_LACKS_CTYPE_H */ + +#endif /* ACE_ACE_CTYPE_H */ diff --git a/ace/ace_dlfcn.h b/ace/ace_dlfcn.h new file mode 100644 index 00000000000..c710b9f352d --- /dev/null +++ b/ace/ace_dlfcn.h @@ -0,0 +1,81 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_dlfcn.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_DLFCN_H +# define ACE_ACE_DLFCN_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +/* Set the proper handle type for dynamically-loaded libraries. */ +/* Also define a default 'mode' for loading a library - the names and values */ +/* differ between OSes, so if you write code that uses the mode, be careful */ +/* of the platform differences. */ +# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING) + +# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C) +extern "C" { +# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */ +# include /**/ +# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C) +} +# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */ + typedef void *ACE_SHLIB_HANDLE; +# define ACE_SHLIB_INVALID_HANDLE 0 +# if defined (__KCC) && defined(RTLD_GROUP) && defined(RTLD_NODELETE) +# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GROUP | RTLD_NODELETE +# else +# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY +# endif /* KCC */ + +# elif defined (__hpux) +# if defined(__GNUC__) || __cplusplus >= 199707L +# include /**/ +# else +# include /**/ +# endif /* (g++ || HP aC++) vs. HP C++ */ + typedef shl_t ACE_SHLIB_HANDLE; +# define ACE_SHLIB_INVALID_HANDLE 0 +# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED + +# elif defined (ACE_WIN32) + // Dynamic loading-related types - used for dlopen and family. + typedef HINSTANCE ACE_SHLIB_HANDLE; +# define ACE_SHLIB_INVALID_HANDLE 0 +# define ACE_DEFAULT_SHLIB_MODE 0 + +# else + typedef void *ACE_SHLIB_HANDLE; +# define ACE_SHLIB_INVALID_HANDLE 0 +# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY + +# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */ + + +# if !defined (RTLD_LAZY) +# define RTLD_LAZY 1 +# endif /* !RTLD_LAZY */ + +# if !defined (RTLD_NOW) +# define RTLD_NOW 2 +# endif /* !RTLD_NOW */ + +# if !defined (RTLD_GLOBAL) +# define RTLD_GLOBAL 3 +# endif /* !RTLD_GLOBAL */ + +#endif /* ACE_ACE_DLFCN_H */ diff --git a/ace/ace_fcntl.h b/ace/ace_fcntl.h new file mode 100644 index 00000000000..bf6b5456432 --- /dev/null +++ b/ace/ace_fcntl.h @@ -0,0 +1,106 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_fctnl.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_FCNTL_H +# define ACE_ACE_FCNTL_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# include "ace/ace_sys_types.h" + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_FCNTL_H) +# include /**/ +# endif /* !ACE_LACKS_FCNTL_H */ + +// Include additional/alternate headers for certain platfor/compiler combinations. +# if defined (ACE_NEEDS_SYS_FCNTL_H) +# include /**/ +# endif /* ACE_NEEDS_SYS_FCNTL_H) */ + +// defined Win32 specific macros for UNIX platforms +# if !defined (O_BINARY) +# define O_BINARY 0 +# endif /* O_BINARY */ +# if !defined (_O_BINARY) +# define _O_BINARY O_BINARY +# endif /* _O_BINARY */ +# if !defined (O_TEXT) +# define O_TEXT 0 +# endif /* O_TEXT */ +# if !defined (_O_TEXT) +# define _O_TEXT O_TEXT +# endif /* _O_TEXT */ +# if !defined (O_RAW) +# define O_RAW 0 +# endif /* O_RAW */ +# if !defined (_O_RAW) +# define _O_RAW O_RAW +# endif /* _O_RAW */ + +# if !defined (O_NONBLOCK) +# define O_NONBLOCK 1 +# endif /* O_NONBLOCK */ + +# if defined (ACE_HAS_POSIX_NONBLOCK) +# define ACE_NONBLOCK O_NONBLOCK +# else +# define ACE_NONBLOCK O_NDELAY +# endif /* ACE_HAS_POSIX_NONBLOCK */ + +# if defined (ACE_LACKS_FILELOCKS) +# if ! defined (VXWORKS) && ! defined (ACE_PSOS) && ! defined (__rtems__) +// VxWorks defines struct flock in sys/fcntlcom.h. But it doesn't +// appear to support flock (). RTEMS defines struct flock but +// currently does not support locking. +struct flock +{ + short l_type; + short l_whence; + off_t l_start; + off_t l_len; /* len == 0 means until end of file */ + long l_sysid; + pid_t l_pid; + long l_pad[4]; /* reserve area */ +}; +# endif /* ! VXWORKS */ +# endif /* ACE_LACKS_FILELOCKS */ + + +struct ace_flock_t +{ +# if defined (ACE_WIN32) + ACE_OVERLAPPED overlapped_; +# else + struct flock lock_; +# endif /* ACE_WIN32 */ + + /// Name of this filelock. + const ACE_TCHAR *lockname_; + + /// Handle to the underlying file. + ACE_HANDLE handle_; + +# if defined (CHORUS) + /// This is the mutex that's stored in shared memory. It can only + /// be destroyed by the actor that initialized it. + ACE_mutex_t *process_lock_; +# endif /* CHORUS */ +}; + +#endif /* ACE_ACE_FCNTL_H */ diff --git a/ace/ace_netinet_in.h b/ace/ace_netinet_in.h new file mode 100644 index 00000000000..001b2de43df --- /dev/null +++ b/ace/ace_netinet_in.h @@ -0,0 +1,66 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_netinet_in.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_NETINET_IN_H +# define ACE_ACE_NETINET_IN_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_NETINET_IN_H) +# include /**/ +# endif /* !ACE_LACKS_NETINET_IN_H */ + +# if !defined (IP_DROP_MEMBERSHIP) +# define IP_DROP_MEMBERSHIP 0 +# endif /* IP_DROP_MEMBERSHIP */ + +# if !defined (IP_ADD_MEMBERSHIP) +# define IP_ADD_MEMBERSHIP 0 +# define ACE_LACKS_IP_ADD_MEMBERSHIP +# endif /* IP_ADD_MEMBERSHIP */ + +# if !defined (IP_DEFAULT_MULTICAST_TTL) +# define IP_DEFAULT_MULTICAST_TTL 0 +# endif /* IP_DEFAULT_MULTICAST_TTL */ + +# if !defined (IP_DEFAULT_MULTICAST_LOOP) +# define IP_DEFAULT_MULTICAST_LOOP 0 +# endif /* IP_DEFAULT_MULTICAST_LOOP */ + +# if !defined (IP_MULTICAST_IF) +# define IP_MULTICAST_IF 0 +# endif /* IP_MULTICAST_IF */ + +# if !defined (IP_MULTICAST_TTL) +# define IP_MULTICAST_TTL 1 +# endif /* IP_MULTICAST_TTL */ + +# if !defined (IP_MAX_MEMBERSHIPS) +# define IP_MAX_MEMBERSHIPS 0 +# endif /* IP_MAX_MEMBERSHIP */ + +# if !defined (SIOCGIFBRDADDR) +# define SIOCGIFBRDADDR 0 +# endif /* SIOCGIFBRDADDR */ + +# if !defined (SIOCGIFADDR) +# define SIOCGIFADDR 0 +# endif /* SIOCGIFADDR */ + +#endif /* ACE_ACE_NETINET_IN_H */ diff --git a/ace/ace_new.h b/ace/ace_new.h new file mode 100644 index 00000000000..a301d70b7a9 --- /dev/null +++ b/ace/ace_new.h @@ -0,0 +1,32 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_new.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_NEW_H +# define ACE_ACE_NEW_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_NEW_H) +# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) +# include /**/ +# else +# include /**/ +# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ +# endif /* ! ACE_LACKS_NEW_H */ + +#endif /* ACE_ACE_NEW_H */ diff --git a/ace/ace_poll.h b/ace/ace_poll.h new file mode 100644 index 00000000000..423e15b5c39 --- /dev/null +++ b/ace/ace_poll.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_poll.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_POLL_H +# define ACE_ACE_POLL_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_POLL_H) +# include /**/ +# endif /* !ACE_LACKS_POLL_H */ + +#endif /* ACE_ACE_POLL_H */ diff --git a/ace/ace_pwd.h b/ace/ace_pwd.h new file mode 100644 index 00000000000..12d021d09d5 --- /dev/null +++ b/ace/ace_pwd.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_pwd.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_PWD_H +# define ACE_ACE_PWD_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_PWD_H) +# include /**/ +# endif /* !ACE_LACKS_PWD_H */ + +#endif /* ACE_ACE_PWD_H */ diff --git a/ace/ace_sched.h b/ace/ace_sched.h new file mode 100644 index 00000000000..659eedc63f0 --- /dev/null +++ b/ace/ace_sched.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sched.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SCHED_H +# define ACE_ACE_SCHED_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SCHED_H) +# include /**/ +# endif /* !ACE_LACKS_SCHED_H */ + +#endif /* ACE_ACE_SCHED_H */ diff --git a/ace/ace_stddef.h b/ace/ace_stddef.h new file mode 100644 index 00000000000..11dc8a7b654 --- /dev/null +++ b/ace/ace_stddef.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_stddef.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_STDDEF_H +# define ACE_ACE_STDDEF_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_STDDEF_H) +# include /**/ +# endif /* !ACE_LACKS_STDDEF_H */ + +#endif /* ACE_ACE_STDDEF_H */ diff --git a/ace/ace_stdlib.h b/ace/ace_stdlib.h new file mode 100644 index 00000000000..f25e4be4bb0 --- /dev/null +++ b/ace/ace_stdlib.h @@ -0,0 +1,46 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_stdlib.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_STDLIB_H +# define ACE_ACE_STDLIB_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_STDLIB_H) +# include /**/ +# endif /* ACE_LACKS_STDLIB_H */ + +# if defined (ACE_HAS_BROKEN_RANDR) +// The SunOS 5.4.X version of rand_r is inconsistent with the header +// files... +typedef u_int ACE_RANDR_TYPE; +extern "C" int rand_r (ACE_RANDR_TYPE seed); +# else +# if defined (HPUX_10) +// HP-UX 10.x's stdlib.h (long *) doesn't match that man page (u_int *) +typedef long ACE_RANDR_TYPE; +# else +typedef u_int ACE_RANDR_TYPE; +# endif /* HPUX_10 */ +# endif /* ACE_HAS_BROKEN_RANDR */ + +# if defined (ACE_LACKS_MKTEMP) +extern "C" char *mktemp (char *); +# endif /* ACE_LACKS_MKTEMP */ + +#endif /* ACE_ACE_STDLIB_H */ diff --git a/ace/ace_string.h b/ace/ace_string.h new file mode 100644 index 00000000000..267b48b5a69 --- /dev/null +++ b/ace/ace_string.h @@ -0,0 +1,57 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_string.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_STRING_H +# define ACE_ACE_STRING_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Matthew Stevens 7-10-95 Fix GNU GCC 2.7 for memchr() problem. +# if defined (ACE_HAS_GNU_CSTRING_H) +// Define this file to keep /usr/include/memory.h from being included. +# include /**/ +# else +# if !defined (ACE_LACKS_MEMORY_H) +# include /**/ +# endif /* !ACE_LACKS_MEMORY_H */ +# endif /* ACE_HAS_GNU_CSTRING_H */ + +// why was this included here? +//# include "ace/ace_stdlib.h" + +# if !defined (ACE_LACKS_STRING_H) +# include /**/ +# endif /* !ACE_LACKS_STRING_H */ + +// IRIX5 defines bzero() in this odd file... +# if defined (ACE_HAS_BSTRING) +# include /**/ +# endif /* ACE_HAS_BSTRING */ + +// We need strings.h on some platforms (qnx-neutrino, for example) +// to get the declaration for strcasecmp. And bzero() for AIX. +# if defined (ACE_HAS_STRINGS) +# include /**/ +# endif /* ACE_HAS_STRINGS */ + +# if defined (ACE_LACKS_STRTOK_R_PROTOTYPE) && !defined (_POSIX_SOURCE) +extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr); +# endif /* ACE_LACKS_STRTOK_R_PROTOTYPE */ + +#endif /* ACE_ACE_STRING_H */ + diff --git a/ace/ace_sys_ioctl.h b/ace/ace_sys_ioctl.h new file mode 100644 index 00000000000..aafe63ee187 --- /dev/null +++ b/ace/ace_sys_ioctl.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_ioctl.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_IOCTL_H +# define ACE_ACE_SYS_IOCTL_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SYS_IOCTL_H) +# include /**/ +# endif /* !ACE_LACKS_SYS_IOCTL_H */ + +#endif /* ACE_ACE_SYS_IOCTL_H */ diff --git a/ace/ace_sys_ipc.h b/ace/ace_sys_ipc.h new file mode 100644 index 00000000000..8334c3c9b74 --- /dev/null +++ b/ace/ace_sys_ipc.h @@ -0,0 +1,53 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_ipc.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_IPC_H +# define ACE_ACE_SYS_IPC_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SYS_IPC_H) +# include /**/ +# endif /* !ACE_LACKS_SYS_IPC_H */ + +# if !defined (IPC_CREAT) +# define IPC_CREAT 0 +# endif /* IPC_CREAT */ + +# if !defined (IPC_NOWAIT) +# define IPC_NOWAIT 0 +# endif /* IPC_NOWAIT */ + +# if !defined (IPC_RMID) +# define IPC_RMID 0 +# endif /* IPC_RMID */ + +# if !defined (IPC_EXCL) +# define IPC_EXCL 0 +# endif /* IPC_EXCL */ + +# if !defined (IPC_PRIVATE) +# define IPC_PRIVATE ACE_INVALID_SEM_KEY +# endif /* IPC_PRIVATE */ + +# if !defined (IPC_STAT) +# define IPC_STAT 0 +# endif /* IPC_STAT */ + +#endif /* ACE_ACE_SYS_IPC_H */ diff --git a/ace/ace_sys_select.h b/ace/ace_sys_select.h new file mode 100644 index 00000000000..4e369b93d45 --- /dev/null +++ b/ace/ace_sys_select.h @@ -0,0 +1,41 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_selct.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_SELECT_H +# define ACE_ACE_SYS_SELECT_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SYS_SELECT_H) +# include /**/ +# endif /* !ACE_LACKS_SYS_SELECT_H */ + +# if defined (ACE_NEEDS_SELECT_T) // __rtems__ +extern "C" +{ + int select (int n, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, const struct timeval *timeout); +}; +# endif /* ACE_NEEDS_SELECT_T */ + +# if !defined (NFDBITS) +# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ +# endif /* ! NFDBITS */ + +#endif /* ACE_ACE_SYS_SELECT_H */ diff --git a/ace/ace_sys_shm.h b/ace/ace_sys_shm.h new file mode 100644 index 00000000000..ce994d08f9c --- /dev/null +++ b/ace/ace_sys_shm.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_shm.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_SHM_H +# define ACE_ACE_SYS_SHM_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SYS_SHM_H) +# include /**/ +# endif /* !ACE_LACKS_SYS_SHM_H */ + +#endif /* ACE_ACE_SYS_SHM_H */ diff --git a/ace/ace_sys_times.h b/ace/ace_sys_times.h new file mode 100644 index 00000000000..323c0fb2689 --- /dev/null +++ b/ace/ace_sys_times.h @@ -0,0 +1,28 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_times.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_TIMES_H +# define ACE_ACE_SYS_TIMES_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_SYS_TIMES_H) +# include /**/ +# endif /* ACE_LACKS_SYS_TIMES_H */ + +#endif /* ACE_ACE_SYS_TIMES_H */ diff --git a/ace/ace_sys_utsname.h b/ace/ace_sys_utsname.h new file mode 100644 index 00000000000..78180acb51b --- /dev/null +++ b/ace/ace_sys_utsname.h @@ -0,0 +1,49 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_utsname.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_UTSNAME_H +# define ACE_ACE_SYS_UTSNAME_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_SYS_UTSNAME_H) +# include /**/ +# endif /* !ACE_LACKS_SYS_UTSNAME_H */ + + +# if defined (ACE_LACKS_UTSNAME_T) +# if !defined (SYS_NMLN) +# define SYS_NMLN 257 +# endif /* SYS_NMLN */ +# if !defined (_SYS_NMLN) +# define _SYS_NMLN SYS_NMLN +# endif /* _SYS_NMLN */ +struct ACE_utsname +{ + ACE_TCHAR sysname[_SYS_NMLN]; + ACE_TCHAR nodename[_SYS_NMLN]; + ACE_TCHAR release[_SYS_NMLN]; + ACE_TCHAR version[_SYS_NMLN]; + ACE_TCHAR machine[_SYS_NMLN]; +}; +# else +typedef struct utsname ACE_utsname; +# endif /* ACE_LACKS_UTSNAME_T */ + +#endif /* ACE_ACE_SYS_UTSNAME_H */ diff --git a/ace/ace_sys_wait.h b/ace/ace_sys_wait.h new file mode 100644 index 00000000000..6c60a2e3912 --- /dev/null +++ b/ace/ace_sys_wait.h @@ -0,0 +1,121 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_sys_wait.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_SYS_WAIT_H +# define ACE_ACE_SYS_WAIT_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# if !defined (ACE_LACKS_SYS_WAIT_H) +# include +# endif /* ACE_LACKS_SYS_WAIT_H */ + + + // Wrapping around wait status macros for platforms that + // lack them. + + // Evaluates to a non-zero value if status was returned for a child + // process that terminated normally. 0 means status wasn't + // returned. +# if !defined (WIFEXITED) +# define WIFEXITED(stat) 1 +# endif /* WIFEXITED */ + + // If the value of WIFEXITED(stat) is non-zero, this macro evaluates + // to the exit code that the child process exit(3C), or the value + // that the child process returned from main. Peaceful exit code is + // 0. +# if !defined (WEXITSTATUS) +# define WEXITSTATUS(stat) stat +# endif /* WEXITSTATUS */ + + // Evaluates to a non-zero value if status was returned for a child + // process that terminated due to the receipt of a signal. 0 means + // status wasnt returned. +# if !defined (WIFSIGNALED) +# define WIFSIGNALED(stat) 0 +# endif /* WIFSIGNALED */ + + // If the value of WIFSIGNALED(stat) is non-zero, this macro + // evaluates to the number of the signal that caused the + // termination of the child process. +# if !defined (WTERMSIG) +# define WTERMSIG(stat) 0 +# endif /* WTERMSIG */ + +# if !defined (WIFSTOPPED) +# define WIFSTOPPED(stat) 0 +# endif /* WIFSTOPPED */ + +# if !defined (WSTOPSIG) +# define WSTOPSIG(stat) 0 +# endif /* WSTOPSIG */ + +# if !defined (WIFCONTINUED) +# define WIFCONTINUED(stat) 0 +# endif /* WIFCONTINUED */ + +# if !defined (WCOREDUMP) +# define WCOREDUMP(stat) 0 +# endif /* WCOREDUMP */ +# if defined (ACE_HAS_IDTYPE_T) && !defined (ACE_IDTYPE_T_TYPE) +// typedef idtype_t ACE_idtype_t; +# define ACE_IDTYPE_T_TYPE idtype_t +# else +// typedef int ACE_idtype_t; +# define ACE_IDTYPE_T_TYPE int +# endif /* ACE_HAS_IDTYPE_T */ + +# if defined (ACE_HAS_STHREADS) || defined (DIGITAL_UNIX) +# if defined (ACE_LACKS_PRI_T) +// typedef int pri_t; +# if !defined (ACE_PRI_T_TYPE) +# define ACE_PRI_T_TYPE int +# endif /* !ACE_PRI_T_TYPE */ +# endif /* ACE_LACKS_PRI_T */ +# if !defined (ACE_ID_T_TYPE) +// typedef id_t ACE_id_t; +# define ACE_ID_T_TYPE id_t +# endif /* !ACE_ID_T_TYPE */ +# if !defined (ACE_SELF) +# define ACE_SELF P_MYID +# endif /* ACE_SELF */ +# if !defined (ACE_PRI_T_TYPE) +# define ACE_PRI_T_TYPE pri_t +// typedef pri_t ACE_pri_t; +# endif /* !ACE_PRI_T_TYPE */ +# else /* ! ACE_HAS_STHREADS && ! DIGITAL_UNIX */ +# if !defined (ACE_ID_T_TYPE) +# define ACE_ID_T_TYPE long +// typedef long ACE_id_t; +# endif /* !ACE_ID_T_TYPE */ +# if !defined (ACE_SELF) +# define ACE_SELF (-1) +# endif /* !ACE_SELF */ +# if !defined (ACE_PRI_T_TYPE) +# define ACE_PRI_T_TYPE short +// typedef short ACE_pri_t; +# endif /* !ACE_PRI_T_TYPE */ +# endif /* ! ACE_HAS_STHREADS && ! DIGITAL_UNIX */ + + +typedef ACE_IDTYPE_T_TYPE ACE_idtype_t; +typedef ACE_ID_T_TYPE ACE_id_t; +typedef ACE_PRI_T_TYPE ACE_pri_t; + +#endif /* ACE_ACE_SYS_WAIT_H */ diff --git a/ace/ace_termios.h b/ace/ace_termios.h new file mode 100644 index 00000000000..c3f09f97d11 --- /dev/null +++ b/ace/ace_termios.h @@ -0,0 +1,50 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_termios.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_TERMIOS_H +# define ACE_ACE_TERMIOS_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_TERMIOS_H) +# include /**/ +# endif /* !ACE_LACKS_TERMIOS_H */ + +// This is sorta interesting. but termios.h not sys/termios.h should be correct. +# if defined (ACE_NEEDS_TERMIOS_H) // __QNX__ +# include /**/ +# endif /* ACE_NEEDS_TERMIOS_H) */ + +# if defined (ACE_NEEDS_SYS_MODEM_H) // HPUX +# include /**/ +# endif /* ACE_NEEDS_SYS_MODEM_H */ + +# if !defined (VMIN) +# define ACE_VMIN 4 +# else +# define ACE_VMIN VMIN +# endif /* VMIN */ + +# if !defined (VTIME) +# define ACE_VTIME 5 +# else +# define ACE_VTIME VTIME +# endif /* VTIME */ + +#endif /* ACE_ACE_TERMIOS_H */ diff --git a/ace/ace_unistd.h b/ace/ace_unistd.h new file mode 100644 index 00000000000..2da7f541fc2 --- /dev/null +++ b/ace/ace_unistd.h @@ -0,0 +1,106 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_unistd.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_UNISTD_H +# define ACE_ACE_UNISTD_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +# include "ace/ace_sys_types.h" +// got to move the llseek stuff out of basic_types.h... +# include "ace/Basic_Types.h" + +# if !defined (ACE_LACKS_UNISTD_H) +# include /**/ +# endif /* ACE_LACKS_UNISTD_H */ + +# if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \ + !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED) +extern "C" pid_t getpgid (pid_t pid); +# endif /* ACE_LACKS_GETPGID_PROTOTYPE && + !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */ + + +# if !defined (_LARGEFILE64_SOURCE) +# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \ + defined (ACE_LACKS_LLSEEK_PROTOTYPE) +# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both! +# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE) +extern "C" ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence); +# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE) +extern "C" ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence); +# endif +# endif /* _LARGEFILE64_SOURCE */ + +# if defined (ACE_LACKS_PREAD_PROTOTYPE) && (_XOPEN_SOURCE - 0) < 500 +// _XOPEN_SOURCE == 500 Single Unix conformance +// It seems that _XOPEN_SOURCE == 500 means that the prototypes are +// already defined in the system headers. +extern "C" ssize_t pread (int fd, + void *buf, + size_t nbytes, + off_t offset); + +extern "C" ssize_t pwrite (int fd, + const void *buf, + size_t n, + off_t offset); +# endif /* ACE_LACKS_PREAD_PROTOTYPE && (_XOPEN_SOURCE - 0) < 500 */ + + +# if defined (ACE_LACKS_UALARM_PROTOTYPE) +extern "C" u_int ualarm (u_int usecs, u_int interval); +# endif /* ACE_LACKS_UALARM_PROTOTYPE */ + +# if defined (m88k) && !defined (RUSAGE_SELF) +# define RUSAGE_SELF 1 +# endif /* m88k */ + +# if defined (ACE_LACKS_SYSCALL) +extern "C" int syscall (int, ACE_HANDLE, struct rusage *); +# endif /* ACE_LACKS_SYSCALL */ + +# if !defined (R_OK) +# define R_OK 04 /* Test for Read permission. */ +# endif /* R_OK */ + +# if !defined (W_OK) +# define W_OK 02 /* Test for Write permission. */ +# endif /* W_OK */ + +# if !defined (X_OK) +# define X_OK 01 /* Test for eXecute permission. */ +# endif /* X_OK */ + +# if !defined (F_OK) +# define F_OK 0 /* Test for existence of File. */ +# endif /* F_OK */ + + +# if !defined (_SC_TIMER_MAX) +# define _SC_TIMER_MAX 44 +# endif /* _SC_TIMER_MAX */ + + +// Default number of s supported by +// . +# if !defined (ACE_DEFAULT_TIMERS) +# define ACE_DEFAULT_TIMERS _SC_TIMER_MAX +# endif /* ACE_DEFAULT_TIMERS */ + +#endif /* ACE_ACE_UNISTD_H */ diff --git a/ace/ace_utime.h b/ace/ace_utime.h new file mode 100644 index 00000000000..174ab1ad7c7 --- /dev/null +++ b/ace/ace_utime.h @@ -0,0 +1,29 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file ace_utime.h + * + * $Id$ + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) + * @author etc + */ +//============================================================================= + +#ifndef ACE_ACE_UTIME_H +# define ACE_ACE_UTIME_H +# include "ace/pre.h" + +# include "ace/config-all.h" + +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + +// Only include if platform/compiler provide the header. +# if !defined (ACE_LACKS_UTIME_H) +# include /**/ +# endif /* !ACE_LACKS_UTIME_H */ + +#endif /* ACE_ACE_UTIME_H */ -- cgit v1.2.1