diff options
author | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-05 20:09:07 +0000 |
---|---|---|
committer | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-05 20:09:07 +0000 |
commit | 59f98fc80fe0b5f5bdac9105a36992f63a899f4a (patch) | |
tree | 5a50c9c5d1e3e75e639fbfc4761eaf89b80461bf | |
parent | 4f690fbd2be24d7b3300180a883d0858226a9591 (diff) | |
download | ATCD-59f98fc80fe0b5f5bdac9105a36992f63a899f4a.tar.gz |
:ChangeLogTag:Wed Nov 5 19:03:20 UTC 2003 Don Hinton <dhinton@dresystems.com>
-rw-r--r-- | ChangeLog | 35 | ||||
-rw-r--r-- | ace/ACE.cpp | 4 | ||||
-rw-r--r-- | ace/INET_Addr.cpp | 2 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 4 | ||||
-rw-r--r-- | ace/OS.i | 21 | ||||
-rw-r--r-- | ace/Object_Manager.h | 44 | ||||
-rw-r--r-- | ace/Reactor.cpp | 29 | ||||
-rw-r--r-- | ace/TLI.cpp | 1 | ||||
-rw-r--r-- | ace/os_include/os_pwd.h | 14 | ||||
-rw-r--r-- | ace/os_include/os_stdlib.h | 4 | ||||
-rw-r--r-- | ace/os_include/os_time.h | 7 |
11 files changed, 90 insertions, 75 deletions
diff --git a/ChangeLog b/ChangeLog index 41004055185..b6191d7437d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +Wed Nov 5 19:03:20 UTC 2003 Don Hinton <dhinton@dresystems.com> + + * ace/ACE.cpp: + Added #include of OS_NS_poll.h if ACE_HAS_POLL and + ACE_HAS_LIMITED_SELECT are defined. Thanks to Andrew G. Harvey + <agh@cisco.com> for reporting this. + + * ace/INET_Addr.cpp: + Added ACE_UNUSED_ARG wrapper around the map variable when + ACE_HAS_IPV6 isn't defined to get rid of warning. + + * ace/Log_Msg.cpp: + Changed #ifdef to include Object_Manager_Base.h if ACE_MT_SAFE + != 0 (instead of == 0) instead of Object_Manger.h. + + * ace/Object_Manager.h: + * ace/Static_Object_Lock.h: + Added new file, Static_Object_Lock.h, and moved + ACE_Stratic_Object_Lock.h there to help reduce need to include + Object_Manger.h. + + * ace/Reactor.cpp: + Made #includes of Reactor implementations conditional on usage. + Removed #include of Reactor_Impl.h and Handle_Set.h + (Handle_Set.h isn't needed and Reactor_Impl.h doesn't need to be + read again). Include Static_Object_Lock.h instead of + Object_Manager.h. + + * OS.i: + * ace/os_include/os_pwd.h: + * ace/os_include/os_stdlib.h: + * ace/os_include/os_time.h: + Moved remaining functions prototypes for AIX and Digital Unix to + the appropriate places. + Wed Nov 5 11:58:04 2003 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> * ace/SOCK_Dgram_Mcast.cpp, diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 5499517e9ce..e23d5b01b6e 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -26,6 +26,10 @@ #include "ace/OS_NS_ctype.h" #include "ace/OS_TLI.h" +#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT) +# include "ace/OS_NS_poll.h" +#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */ + ACE_RCSID(ace, ACE, "$Id$") // Static data members. diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp index c387a11a7dd..3cf53ebd56b 100644 --- a/ace/INET_Addr.cpp +++ b/ace/INET_Addr.cpp @@ -850,6 +850,8 @@ int ACE_INET_Addr::set_address (const char *ip_addr, &newaddress, sizeof (newaddress)); } +#else + ACE_UNUSED_ARG (map); #endif /* ACE_HAS_IPV6 */ return 0; diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index a4a33298aca..89d059b8aac 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -17,8 +17,8 @@ #include "ace/OS_NS_wchar.h" #include "ace/OS_NS_signal.h" -#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 0) -# include "ace/Object_Manager.h" +#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0) +# include "ace/Object_Manager_Base.h" #endif /* ! ACE_MT_SAFE */ #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) @@ -81,27 +81,6 @@ using std::strftime; # endif /* ACE_HAS_GETIFADDRS */ -# if defined (DIGITAL_UNIX) -extern "C" { - extern char *_Pctime_r (const time_t *, char *); - extern struct tm *_Plocaltime_r (const time_t *, struct tm *); - extern struct tm *_Pgmtime_r (const time_t *, struct tm *); - extern char *_Pasctime_r (const struct tm *, char *); - extern int _Prand_r (unsigned int *seedptr); - extern int _Pgetpwnam_r (const char *, struct passwd *, - char *, size_t, struct passwd **); -} -# endif /* DIGITAL_UNIX */ - -// VAC++ doesn't correctly grok the ::getpwnam_r - the function is redefined -// in pwd.h, and that redefinition is used here -# if defined (_AIX) && defined (__IBMCPP__) && (__IBMCPP__ >= 400) -extern "C" { - extern int _posix_getpwnam_r(const char *, struct passwd *, char *, - int, struct passwd **); - } -#endif /* AIX and VAC++ 4 */ - #endif /* WIN32 */ #if defined (ACE_HAS_SHM_OPEN) && defined(INTEGRITY) diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index d5b1df15ea4..f01321f3eda 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -433,33 +433,7 @@ private: }; -#if defined (ACE_HAS_THREADS) - -class ACE_Recursive_Thread_Mutex; - -/** - * @class ACE_Static_Object_Lock - * - * @brief Provide an interface to access a global lock. - * - * This class is used to serialize the creation of static - * singleton objects. It really isn't needed any more, because - * anyone can access ACE_STATIC_OBJECT_LOCK directly. But, it - * is retained for backward compatibility. - */ -class ACE_Export ACE_Static_Object_Lock -{ -public: - /// Static lock access point. - static ACE_Recursive_Thread_Mutex *instance (void); - - /// For use only by ACE_Object_Manager to clean up lock if it - /// what dynamically allocated. - static void cleanup_lock (void); -}; - -#endif /* ACE_HAS_THREADS */ - +#include "ace/Static_Object_Lock.h" #if defined (__ACE_INLINE__) #include "ace/Object_Manager.i" @@ -477,22 +451,6 @@ ACE_Service_Object * _make_ACE_Service_Manager (ACE_Service_Object_Exterminator *); #endif /* ! ACE_LACKS_ACE_SVCCONF */ -// hack to get around errors while compiling using split-cpp -#if defined (ACE_HAS_THREADS) - -# if defined (ACE_IS_SPLITTING) -typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> ACE_Static_Object_Lock_Type; - -# if defined (__GNUC__) -// With g++, suppress the warning that this is unused. -static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock __attribute__ ((unused)) = 0; -# else -static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock = 0; -# endif /* __GNUC__ */ - -# endif /* ACE_IS_SPLITTING */ - -#endif /* ACE_HAS_THREADS */ #include /**/ "ace/post.h" #endif /* ACE_OBJECT_MANAGER_H */ diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp index 3dbc60d855d..41983c7e8f5 100644 --- a/ace/Reactor.cpp +++ b/ace/Reactor.cpp @@ -1,20 +1,31 @@ // $Id$ #include "ace/Reactor.h" -#include "ace/Reactor_Impl.h" -#include "ace/Handle_Set.h" //#if !defined (ACE_HAS_WINCE) # if !defined (ACE_LACKS_ACE_SVCCONF) # include "ace/Service_Config.h" # endif /* !ACE_LACKS_ACE_SVCCONF */ -# if defined (ACE_WIN32) -# include "ace/WFMO_Reactor.h" -# include "ace/Msg_WFMO_Reactor.h" -# endif /* ACE_WIN32 */ //#endif /* ! ACE_HAS_WINCE */ -#include "ace/Select_Reactor.h" -#include "ace/TP_Reactor.h" -#include "ace/Object_Manager.h" + +// Only include the headers needed to compile. +#if !defined (ACE_WIN32) \ + || !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0) \ + || defined (ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) \ + || defined (ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL) +# if defined (ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL) +# include "ace/TP_Reactor.h" +# else +# include "ace/Select_Reactor.h" +# endif /* ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL */ +#else /* We are on Win32 and we have winsock and ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL is not defined */ +# if defined (ACE_USE_MSG_WFMO_REACTOR_FOR_REACTOR_IMPL) +# include "ace/Msg_WFMO_Reactor.h" +# else +# include "ace/WFMO_Reactor.h" +# endif /* ACE_USE_MSG_WFMO_REACTOR_FOR_REACTOR_IMPL */ +#endif /* !defined (ACE_WIN32) || !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0) || defined (ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) */ + +#include "ace/Static_Object_Lock.h" #include "ace/Framework_Component.h" #if !defined (__ACE_INLINE__) diff --git a/ace/TLI.cpp b/ace/TLI.cpp index da0674c605e..db79f115b7e 100644 --- a/ace/TLI.cpp +++ b/ace/TLI.cpp @@ -7,6 +7,7 @@ #include "ace/Log_Msg.h" #include "ace/OS_Memory.h" #include "ace/OS_NS_string.h" +#include "ace/OS_NS_sys_socket.h" ACE_RCSID(ace, TLI, "$Id$") diff --git a/ace/os_include/os_pwd.h b/ace/os_include/os_pwd.h index f4759c60081..da08eb17ab9 100644 --- a/ace/os_include/os_pwd.h +++ b/ace/os_include/os_pwd.h @@ -36,6 +36,20 @@ extern "C" { #endif /* __cplusplus */ +#if !defined (ACE_WIN32) +// VAC++ doesn't correctly grok the ::getpwnam_r - the function is redefined +// in pwd.h, and that redefinition is used here +# if defined (_AIX) && defined (__IBMCPP__) && (__IBMCPP__ >= 400) + extern int _posix_getpwnam_r(const char *, struct passwd *, char *, + int, struct passwd **); +# endif /* AIX and VAC++ 4 */ +#endif /* !ACE_WIN32 */ + +#if defined (DIGITAL_UNIX) + extern int _Pgetpwnam_r (const char *, struct passwd *, + char *, size_t, struct passwd **); +#endif /* DIGITAL_UNIX */ + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ace/os_include/os_stdlib.h b/ace/os_include/os_stdlib.h index 95d56f67c54..d1e4b41dcd0 100644 --- a/ace/os_include/os_stdlib.h +++ b/ace/os_include/os_stdlib.h @@ -73,6 +73,10 @@ extern "C" char *mktemp (char *); #endif /* !ACE_WIN32 && ACE_LACKS_MKTEMP */ +#if defined (DIGITAL_UNIX) + extern int _Prand_r (unsigned int *seedptr); +#endif /* DIGITAL_UNIX */ + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/ace/os_include/os_time.h b/ace/os_include/os_time.h index 6ba9cc45aa9..d1a0a423217 100644 --- a/ace/os_include/os_time.h +++ b/ace/os_include/os_time.h @@ -87,6 +87,13 @@ typedef struct timespec * ACE_TIMESPEC_PTR; typedef const struct timespec * ACE_TIMESPEC_PTR; #endif /* HPUX */ +#if defined (DIGITAL_UNIX) + extern char *_Pctime_r (const time_t *, char *); + extern struct tm *_Plocaltime_r (const time_t *, struct tm *); + extern struct tm *_Pgmtime_r (const time_t *, struct tm *); + extern char *_Pasctime_r (const struct tm *, char *); +#endif /* DIGITAL_UNIX */ + #ifdef __cplusplus } #endif /* __cplusplus */ |