diff options
Diffstat (limited to 'ACE/ace')
37 files changed, 121 insertions, 539 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 06b0289b89a..88e75e8a9e4 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -215,10 +215,7 @@ ACE::select (int width, int ACE::terminate_process (pid_t pid) { -#if defined (ACE_HAS_PHARLAP) - ACE_UNUSED_ARG (pid); - ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) // Create a handle for the given process id. ACE_HANDLE process_handle = ::OpenProcess (PROCESS_TERMINATE, @@ -239,7 +236,7 @@ ACE::terminate_process (pid_t pid) } #else return ACE_OS::kill (pid, 9); -#endif /* ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ } int diff --git a/ACE/ace/CDR_Size.inl b/ACE/ace/CDR_Size.inl index 5d5edca3247..29cc5ac9a76 100644 --- a/ACE/ace/CDR_Size.inl +++ b/ACE/ace/CDR_Size.inl @@ -43,7 +43,7 @@ ACE_SizeCDR::write_octet (ACE_CDR::Octet x) ACE_INLINE ACE_CDR::Boolean ACE_SizeCDR::write_boolean (ACE_CDR::Boolean x) { - return (ACE_CDR::Boolean) this->write_octet (x ? (ACE_CDR::Octet) 1 : (ACE_CDR::Octet) 0); + return this->write_octet (x ? (ACE_CDR::Octet) 1 : (ACE_CDR::Octet) 0); } ACE_INLINE ACE_CDR::Boolean @@ -184,7 +184,7 @@ ACE_SizeCDR::write_wchar_array (const ACE_CDR::WChar* x, if (ACE_OutputCDR::wchar_maxbytes () == 0) { errno = EACCES; - return (ACE_CDR::Boolean) (this->good_bit_ = false); + return (this->good_bit_ = false); } if (ACE_OutputCDR::wchar_maxbytes () == sizeof (ACE_CDR::WChar)) return this->write_array (x, @@ -305,98 +305,98 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Char x) { ss.write_char (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Short x) { ss.write_short (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::UShort x) { ss.write_ushort (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Long x) { ss.write_long (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::ULong x) { ss.write_ulong (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::LongLong x) { ss.write_longlong (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::ULongLong x) { ss.write_ulonglong (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::LongDouble x) { ss.write_longdouble (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Float x) { ss.write_float (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Double x) { ss.write_double (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const ACE_CDR::Fixed &x) { ss.write_fixed (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const ACE_CDR::Char *x) { ss.write_string (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const ACE_CDR::WChar *x) { ss.write_wstring (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const std::string& x) { ss.write_string (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } #if !defined(ACE_LACKS_STD_WSTRING) @@ -404,7 +404,7 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const std::wstring& x) { ss.write_wstring (x); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } #endif @@ -413,28 +413,28 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_boolean x) { ss.write_boolean (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_char x) { ss.write_char (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wchar x) { ss.write_wchar (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_octet x) { ss.write_octet (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); + return ss.good_bit (); } ACE_INLINE ACE_CDR::Boolean @@ -448,8 +448,7 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_string x) } ss.write_string (len, x.val_); - return - (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_)); + return (ss.good_bit () && (!x.bound_ || len <= x.bound_)); } ACE_INLINE ACE_CDR::Boolean @@ -463,8 +462,7 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wstring x) } ss.write_wstring (len, x.val_); - return - (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_)); + return (ss.good_bit () && (!x.bound_ || len <= x.bound_)); } diff --git a/ACE/ace/CDR_Stream.inl b/ACE/ace/CDR_Stream.inl index 5f0a55da680..cbfa8203fb6 100644 --- a/ACE/ace/CDR_Stream.inl +++ b/ACE/ace/CDR_Stream.inl @@ -413,7 +413,7 @@ ACE_OutputCDR::write_wchar_array (const ACE_CDR::WChar* x, if (ACE_OutputCDR::wchar_maxbytes_ == 0) { errno = EACCES; - return (ACE_CDR::Boolean) (this->good_bit_ = false); + return (this->good_bit_ = false); } if (ACE_OutputCDR::wchar_maxbytes_ == sizeof (ACE_CDR::WChar)) @@ -742,7 +742,7 @@ ACE_InputCDR::read_boolean (ACE_CDR::Boolean& x) ACE_CDR::Octet tmp = 0; (void) this->read_octet (tmp); x = tmp ? true : false; - return (ACE_CDR::Boolean) this->good_bit_; + return this->good_bit_; } ACE_INLINE ACE_CDR::Boolean @@ -1271,114 +1271,110 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::Char x) { os.write_char (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::Short x) { os.write_short (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::UShort x) { os.write_ushort (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::Long x) { os.write_long (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::ULong x) { os.write_ulong (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::LongLong x) { os.write_longlong (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::ULongLong x) { os.write_ulonglong (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::LongDouble x) { os.write_longdouble (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::Float x) { os.write_float (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_CDR::Double x) { os.write_double (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, const ACE_CDR::Fixed &x) { os.write_fixed (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, const ACE_CDR::Char *x) { os.write_string (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, const ACE_CDR::WChar *x) { os.write_wstring (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_std_string x) { - ACE_CDR::ULong const len = - static_cast<ACE_CDR::ULong> (x.val_.size ()); + ACE_CDR::ULong const len = static_cast<ACE_CDR::ULong> (x.val_.size ()); os.write_string (len, x.val_.c_str ()); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); + return (os.good_bit () && (!x.bound_ || len <= x.bound_)); } #if !defined(ACE_LACKS_STD_WSTRING) ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_std_wstring x) { - ACE_CDR::ULong const len = - static_cast<ACE_CDR::ULong> (x.val_.size ()); + ACE_CDR::ULong const len = static_cast<ACE_CDR::ULong> (x.val_.size ()); os.write_wstring (len, x.val_.c_str ()); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); + return (os.good_bit () && (!x.bound_ || len <= x.bound_)); } #endif @@ -1386,7 +1382,7 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, const std::string& x) { os.write_string (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } #if !defined(ACE_LACKS_STD_WSTRING) @@ -1394,7 +1390,7 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, const std::wstring& x) { os.write_wstring (x); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } #endif @@ -1403,28 +1399,28 @@ ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_boolean x) { (void) os.write_boolean (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_char x) { os.write_char (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wchar x) { os.write_wchar (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_octet x) { os.write_octet (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean @@ -1438,8 +1434,7 @@ operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_string x) } os.write_string (len, x.val_); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); + return (os.good_bit () && (!x.bound_ || len <= x.bound_)); } ACE_INLINE ACE_CDR::Boolean @@ -1453,22 +1448,21 @@ operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wstring x) } os.write_wstring (len, x.val_); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); + return (os.good_bit () && (!x.bound_ || len <= x.bound_)); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_uint8 x) { os.write_uint8 (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } ACE_INLINE ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_int8 x) { os.write_int8 (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); + return os.good_bit (); } // **************************************************************** diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp index 56cb81fd8ea..a902e263c4a 100644 --- a/ACE/ace/Configuration.cpp +++ b/ACE/ace/Configuration.cpp @@ -401,7 +401,7 @@ ACE_Configuration::operator!= (const ACE_Configuration& rhs) const ////////////////////////////////////////////////////////////////////////////// -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) +#if defined (ACE_WIN32) static constexpr int ACE_DEFAULT_BUFSIZE = 256; @@ -1020,7 +1020,7 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey, return result; } -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ +#endif /* ACE_WIN32 */ /////////////////////////////////////////////////////////////// diff --git a/ACE/ace/Configuration.h b/ACE/ace/Configuration.h index b9cb18204d9..436ee3bf0ad 100644 --- a/ACE/ace/Configuration.h +++ b/ACE/ace/Configuration.h @@ -407,7 +407,7 @@ protected: ACE_Configuration_Section_Key root_; }; -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) +#if defined (ACE_WIN32) /** * @class ACE_Section_Key_Win32 @@ -534,7 +534,7 @@ protected: const u_long security_access_; }; -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ +#endif /* ACE_WIN32 */ // ACE_Allocator version diff --git a/ACE/ace/Lib_Find.cpp b/ACE/ace/Lib_Find.cpp index 085ed0b938e..ca7decd224b 100644 --- a/ACE/ace/Lib_Find.cpp +++ b/ACE/ace/Lib_Find.cpp @@ -25,14 +25,14 @@ ACE::ldfind (const ACE_TCHAR* filename, { ACE_TRACE ("ACE::ldfind"); -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) ACE_TCHAR expanded_filename[MAXPATHLEN]; if (ACE_TEXT_ExpandEnvironmentStrings (filename, expanded_filename, sizeof expanded_filename / sizeof (ACE_TCHAR))) filename = expanded_filename; -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ ACE_TCHAR tempcopy[MAXPATHLEN + 1]; ACE_TCHAR searchpathname[MAXPATHLEN + 1]; diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index dd7e904b36e..570711e99dc 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -80,7 +80,7 @@ public: }; #endif /* ACE_MT_SAFE */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_NT_Event_Log #elif defined (ACE_ANDROID) # define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_Android_Logcat @@ -1313,10 +1313,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, { errno = ACE::map_errno (this->errnum ()); ACE_TCHAR *lpMsgBuf = 0; - - // PharLap can't do FormatMessage, so try for socket - // error. -# if !defined (ACE_HAS_PHARLAP) ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_MAX_WIDTH_MASK | FORMAT_MESSAGE_FROM_SYSTEM, @@ -1328,7 +1324,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, (ACE_TCHAR *) &lpMsgBuf, 0, 0); -# endif /* ACE_HAS_PHARLAP */ // If we don't get a valid response from // <FormatMessage>, we'll assume this is a @@ -1521,10 +1516,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, { errno = ACE::map_errno (this->errnum ()); ACE_TCHAR *lpMsgBuf = 0; - - // PharLap can't do FormatMessage, so try for socket - // error. -# if !defined (ACE_HAS_PHARLAP) ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_MAX_WIDTH_MASK | FORMAT_MESSAGE_FROM_SYSTEM, @@ -1536,7 +1527,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, (ACE_TCHAR *) &lpMsgBuf, 0, 0); -# endif /* ACE_HAS_PHARLAP */ // If we don't get a valid response from // <FormatMessage>, we'll assume this is a diff --git a/ACE/ace/Msg_WFMO_Reactor.cpp b/ACE/ace/Msg_WFMO_Reactor.cpp index 57682de44f3..af05fb8929c 100644 --- a/ACE/ace/Msg_WFMO_Reactor.cpp +++ b/ACE/ace/Msg_WFMO_Reactor.cpp @@ -1,6 +1,6 @@ #include "ace/Msg_WFMO_Reactor.h" -#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO) +#if defined (ACE_WIN32) #if !defined (__ACE_INLINE__) #include "ace/Msg_WFMO_Reactor.inl" @@ -78,4 +78,4 @@ ACE_Msg_WFMO_Reactor::poll_remaining_handles (DWORD slot) ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/Msg_WFMO_Reactor.h b/ACE/ace/Msg_WFMO_Reactor.h index 3381da09d5d..835edb59513 100644 --- a/ACE/ace/Msg_WFMO_Reactor.h +++ b/ACE/ace/Msg_WFMO_Reactor.h @@ -20,7 +20,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO) +#if defined (ACE_WIN32) #include "ace/WFMO_Reactor.h" @@ -111,7 +111,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Msg_WFMO_Reactor.inl" #endif /* __ACE_INLINE__ */ -#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ +#endif /* ACE_WIN32 */ #include /**/ "ace/post.h" #endif /* ACE_MSG_WFMO_REACTOR_H */ diff --git a/ACE/ace/Msg_WFMO_Reactor.inl b/ACE/ace/Msg_WFMO_Reactor.inl index ee73e611812..cf6a280996c 100644 --- a/ACE/ace/Msg_WFMO_Reactor.inl +++ b/ACE/ace/Msg_WFMO_Reactor.inl @@ -1,5 +1,5 @@ // -*- C++ -*- -#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO) +#if defined (ACE_WIN32) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -29,4 +29,4 @@ ACE_Msg_WFMO_Reactor::alertable_handle_events (ACE_Time_Value *how_long) ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/NT_Service.cpp b/ACE/ace/NT_Service.cpp index cdc6ecc5bc8..66c8432ce10 100644 --- a/ACE/ace/NT_Service.cpp +++ b/ACE/ace/NT_Service.cpp @@ -1,5 +1,5 @@ #include "ace/config-all.h" -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES) +#if defined (ACE_WIN32) #include "ace/NT_Service.h" @@ -610,4 +610,4 @@ ACE_NT_Service::wait_for_service_state (DWORD desired_state, ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/NT_Service.h b/ACE/ace/NT_Service.h index 5c9f282884f..f931d0fbd55 100644 --- a/ACE/ace/NT_Service.h +++ b/ACE/ace/NT_Service.h @@ -19,7 +19,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES) +#if defined (ACE_WIN32) #include "ace/ACE.h" #include "ace/OS_Log_Msg_Attributes.h" @@ -429,7 +429,7 @@ extern VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \ #include "ace/NT_Service.inl" #endif /* __ACE_INLINE__ */ -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */ +#endif /* ACE_WIN32 */ #include /**/ "ace/post.h" diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index 5114aab6be8..1dff5ccf076 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -3166,34 +3166,12 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, } #elif defined (ACE_WIN32) - // PharLap ETS can act on the current thread - it can set the - // quantum also, unlike Win32. All this only works on the RT - // version. -# if defined (ACE_HAS_PHARLAP_RT) - if (id != ACE_SELF) - ACE_NOTSUP_RETURN (-1); - -# if !defined (ACE_PHARLAP_LABVIEW_RT) - if (sched_params.quantum() != ACE_Time_Value::zero) - EtsSetTimeSlice (sched_params.quantum().msec()); -# endif -# else - if (sched_params.quantum () != ACE_Time_Value::zero) - { - // I don't know of a way to set the quantum on Win32. - errno = EINVAL; - return -1; - } -# endif /* ACE_HAS_PHARLAP_RT */ - if (sched_params.scope () == ACE_SCOPE_THREAD) { // Setting the REALTIME_PRIORITY_CLASS on Windows is almost always // a VERY BAD THING. This include guard will allow people // to easily disable this feature in ACE. - // It won't work at all for Pharlap since there's no SetPriorityClass. -#if !defined (ACE_HAS_PHARLAP) && \ - !defined (ACE_DISABLE_WIN32_INCREASE_PRIORITY) +#if !defined (ACE_DISABLE_WIN32_INCREASE_PRIORITY) // Set the priority class of this process to the REALTIME process class // _if_ the policy is ACE_SCHED_FIFO. Otherwise, set to NORMAL. if (!::SetPriorityClass (::GetCurrentProcess (), @@ -3213,9 +3191,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, } else if (sched_params.scope () == ACE_SCOPE_PROCESS) { -# if defined (ACE_HAS_PHARLAP_RT) - ACE_NOTSUP_RETURN (-1); -# else HANDLE hProcess = ::OpenProcess (PROCESS_SET_INFORMATION, FALSE, @@ -3243,8 +3218,6 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, } ::CloseHandle (hProcess); return 0; -#endif /* ACE_HAS_PHARLAP_RT */ - } else { diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index b962281ed7e..17335f782c5 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -2488,22 +2488,11 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) # elif defined (ACE_HAS_WTHREADS) ACE_Errno_Guard error (errno); priority = ::GetThreadPriority (ht_id); - -# if defined (ACE_HAS_PHARLAP) -# if defined (ACE_PHARLAP_LABVIEW_RT) - policy = ACE_SCHED_FIFO; -# else - DWORD timeslice = ::EtsGetTimeSlice (); - policy = timeslice == 0 ? ACE_SCHED_OTHER : ACE_SCHED_FIFO; -# endif /* ACE_PHARLAP_LABVIEW_RT */ -# else DWORD const priority_class = ::GetPriorityClass (::GetCurrentProcess ()); if (priority_class == 0 && (error = ::GetLastError ()) != NO_ERROR) ACE_FAIL_RETURN (-1); policy = (priority_class == REALTIME_PRIORITY_CLASS) ? ACE_SCHED_FIFO : ACE_SCHED_OTHER; -# endif /* ACE_HAS_PHARLAP */ - return 0; # elif defined (ACE_HAS_VXTHREADS) return ::taskPriorityGet (ht_id, &priority); diff --git a/ACE/ace/OS_NS_dlfcn.inl b/ACE/ace/OS_NS_dlfcn.inl index b9928e2936a..058f4cb2ba9 100644 --- a/ACE/ace/OS_NS_dlfcn.inl +++ b/ACE/ace/OS_NS_dlfcn.inl @@ -8,10 +8,6 @@ #include "ace/os_include/os_fcntl.h" #include "ace/os_include/os_string.h" -#if defined (ACE_WIN32) && defined (ACE_HAS_PHARLAP) -# include "ace/OS_NS_stdio.h" -#endif - #if defined (ACE_USES_ASM_SYMBOL_IN_DLSYM) # include "ace/OS_Memory.h" # include "ace/OS_NS_string.h" @@ -69,9 +65,6 @@ ACE_OS::dlerror () //FUZZ: enable check_for_lack_ACE_OS # elif defined (ACE_WIN32) static ACE_TCHAR buf[128]; -# if defined (ACE_HAS_PHARLAP) - ACE_OS::sprintf (buf, "error code %d", GetLastError()); -# else ACE_TEXT_FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, ::GetLastError (), @@ -79,7 +72,6 @@ ACE_OS::dlerror () buf, sizeof buf / sizeof buf[0], 0); -# endif /* ACE_HAS_PHARLAP */ return buf; # else ACE_NOTSUP_RETURN (0); diff --git a/ACE/ace/OS_NS_netdb.cpp b/ACE/ace/OS_NS_netdb.cpp index 6ede9036026..49f658e5c5e 100644 --- a/ACE/ace/OS_NS_netdb.cpp +++ b/ACE/ace/OS_NS_netdb.cpp @@ -5,10 +5,6 @@ # include "ace/OS_NS_netdb.inl" #endif /* ACE_HAS_INLINED_OSCALLS */ -#if defined (ACE_WIN32) && defined (ACE_HAS_PHARLAP) -# include "ace/OS_NS_stdio.h" -#endif - #include "ace/os_include/net/os_if.h" #include "ace/Global_Macros.h" #include "ace/OS_NS_arpa_inet.h" @@ -44,7 +40,6 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) ACE_OS_TRACE ("ACE_OS::getmacaddress"); #if defined (ACE_WIN32) -# if !defined (ACE_HAS_PHARLAP) /** Define a structure for use with the netbios routine */ struct ADAPTERSTAT { @@ -96,35 +91,6 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) } } return 0; -# else -# if defined (ACE_HAS_PHARLAP_RT) - DEVHANDLE ip_dev = (DEVHANDLE)0; - EK_TCPIPCFG *devp = 0; - size_t i; - ACE_TCHAR dev_name[16]; - - for (i = 0; i < 10; i++) - { - // Ethernet. - ACE_OS::snprintf (dev_name, 16, "ether%d", i); - ip_dev = EtsTCPGetDeviceHandle (dev_name); - if (ip_dev != 0) - break; - } - if (ip_dev == 0) - return -1; - devp = EtsTCPGetDeviceCfg (ip_dev); - if (devp == 0) - return -1; - ACE_OS::memcpy (node->node, - &devp->EthernetAddress[0], - 6); - return 0; -# else - ACE_UNUSED_ARG (node); - ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_PHARLAP_RT */ -# endif /* ACE_HAS_PHARLAP */ #elif defined (ACE_LINUX) && !defined (ACE_LACKS_NETWORKING) // It's easiest to know the first MAC-using interface. Use the BSD diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index 6066165912e..f3268c7ac1d 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -39,7 +39,6 @@ ACE_OS::flock_adjust_params (ACE_OS::ace_flock_t *lock, case SEEK_CUR: { LARGE_INTEGER offset; -# if !defined (ACE_LACKS_WIN32_SETFILEPOINTEREX) LARGE_INTEGER distance; distance.QuadPart = 0; if (!::SetFilePointerEx (lock->handle_, @@ -50,18 +49,6 @@ ACE_OS::flock_adjust_params (ACE_OS::ace_flock_t *lock, ACE_OS::set_errno_to_last_error (); return; } -# else - offset.LowPart = ::SetFilePointer (lock->handle_, - 0, - &offset.HighPart, - FILE_CURRENT); - if (offset.LowPart == INVALID_SET_FILE_POINTER && - ::GetLastError() != NO_ERROR) - { - ACE_OS::set_errno_to_last_error (); - return; - } -# endif /* ACE_LACKS_WIN32_SETFILEPOINTEREX */ # if defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 start += offset.QuadPart; @@ -364,10 +351,6 @@ ACE_OS::cuserid (char *user, size_t maxlen) ::remCurIdGet (user, 0); return user; } -#elif defined (ACE_HAS_PHARLAP) - ACE_UNUSED_ARG (user); - ACE_UNUSED_ARG (maxlen); - ACE_NOTSUP_RETURN (0); #elif defined (ACE_WIN32) BOOL const result = GetUserNameA (user, (u_long *) &maxlen); if (result == FALSE) @@ -841,7 +824,7 @@ ACE_OS::rename (const char *old_name, ACE_UNUSED_ARG (new_name); ACE_UNUSED_ARG (flags); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX) +# elif defined (ACE_WIN32) // NT4 (and up) provides a way to rename/move a file with similar semantics // to what's usually done on UNIX - if there's an existing file with // <new_name> it is removed before the file is renamed/moved. The @@ -870,7 +853,7 @@ ACE_OS::rename (const wchar_t *old_name, ACE_UNUSED_ARG (new_name); ACE_UNUSED_ARG (flags); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_MOVEFILEEX) +# elif defined (ACE_WIN32) // NT4 (and up) provides a way to rename/move a file with similar semantics // to what's usually done on UNIX - if there's an existing file with // <new_name> it is removed before the file is renamed/moved. The diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl index 5ff514997b5..87cffd62937 100644 --- a/ACE/ace/OS_NS_sys_mman.inl +++ b/ACE/ace/OS_NS_sys_mman.inl @@ -40,11 +40,11 @@ ACE_OS::mmap (void *addr, const ACE_TCHAR *file_mapping_name) { ACE_OS_TRACE ("ACE_OS::mmap"); -#if !defined (ACE_WIN32) || defined (ACE_HAS_PHARLAP) +#if !defined (ACE_WIN32) ACE_UNUSED_ARG (file_mapping_name); -#endif /* !defined (ACE_WIN32) || defined (ACE_HAS_PHARLAP) */ +#endif /* !defined (ACE_WIN32) */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) if (!ACE_BIT_ENABLED (flags, MAP_FIXED)) addr = 0; else if (addr == 0) // can not map to address 0 @@ -149,7 +149,7 @@ ACE_OS::mmap (void *addr, ACE_UNUSED_ARG (file_mapping); ACE_UNUSED_ARG (sa); ACE_NOTSUP_RETURN (MAP_FAILED); -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ } // Implements simple read/write control for pages. Affects a page if @@ -161,7 +161,7 @@ ACE_INLINE int ACE_OS::mprotect (void *addr, size_t len, int prot) { ACE_OS_TRACE ("ACE_OS::mprotect"); -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) DWORD dummy; // Sigh! return ::VirtualProtect(addr, len, prot, &dummy) ? 0 : -1; #elif !defined (ACE_LACKS_MPROTECT) @@ -171,16 +171,15 @@ ACE_OS::mprotect (void *addr, size_t len, int prot) ACE_UNUSED_ARG (len); ACE_UNUSED_ARG (prot); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ } ACE_INLINE int ACE_OS::msync (void *addr, size_t len, int sync) { ACE_OS_TRACE ("ACE_OS::msync"); -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) ACE_UNUSED_ARG (sync); - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::FlushViewOfFile (addr, len), ace_result_), int, -1); #elif !defined (ACE_LACKS_MSYNC) return ::msync ((ACE_MMAP_TYPE) addr, len, sync); @@ -189,7 +188,7 @@ ACE_OS::msync (void *addr, size_t len, int sync) ACE_UNUSED_ARG (len); ACE_UNUSED_ARG (sync); ACE_NOTSUP_RETURN (-1); -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ } ACE_INLINE int diff --git a/ACE/ace/OS_NS_sys_socket.inl b/ACE/ace/OS_NS_sys_socket.inl index 3cbce8dc578..3b53035a777 100644 --- a/ACE/ace/OS_NS_sys_socket.inl +++ b/ACE/ace/OS_NS_sys_socket.inl @@ -400,13 +400,6 @@ ACE_OS::recvfrom (ACE_HANDLE handle, } else { -# if defined (ACE_HAS_PHARLAP) - // Pharlap ETS (at least to v13) returns a legit address but doesn't - // include the sin_zero[8] bytes in the count. Correct for this here. - if (addrlen != 0 && addr != 0 && - *addrlen == 8 && addr->sa_family == AF_INET) - *addrlen = sizeof(sockaddr_in); -# endif /* ACE_HAS_PHARLAP */ return result; } #else /* non Win32 */ diff --git a/ACE/ace/OS_NS_sys_utsname.cpp b/ACE/ace/OS_NS_sys_utsname.cpp index 604947b5825..8d4da8dbddd 100644 --- a/ACE/ace/OS_NS_sys_utsname.cpp +++ b/ACE/ace/OS_NS_sys_utsname.cpp @@ -41,21 +41,7 @@ ACE_OS::uname (ACE_utsname *name) # endif SYSTEM_INFO sinfo; -# if defined (ACE_HAS_PHARLAP) - // PharLap doesn't do GetSystemInfo. What's really wanted is the - // CPU architecture, so we can get that with EtsGetSystemInfo. Fill - // in what's wanted in the SYSTEM_INFO structure, and carry on. Note - // that the CPU type values in EK_KERNELINFO have the same values - // are the ones defined for SYSTEM_INFO. - EK_KERNELINFO ets_kern; - EK_SYSTEMINFO ets_sys; - EtsGetSystemInfo (&ets_kern, &ets_sys); - sinfo.wProcessorLevel = static_cast<WORD> (ets_kern.CpuType); - sinfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL; - sinfo.dwProcessorType = ets_kern.CpuType * 100 + 86; -# else ::GetSystemInfo(&sinfo); -# endif /* ACE_HAS_PHARLAP */ const char* unknown = "???"; diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index be45618f36c..145a34d3b43 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -379,9 +379,7 @@ ACE_OS::num_processors () { ACE_OS_TRACE ("ACE_OS::num_processors"); -#if defined (ACE_HAS_PHARLAP) - return 1; -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) SYSTEM_INFO sys_info; ::GetSystemInfo (&sys_info); return sys_info.dwNumberOfProcessors; @@ -407,9 +405,7 @@ ACE_OS::num_processors_online () { ACE_OS_TRACE ("ACE_OS::num_processors_online"); -#if defined (ACE_HAS_PHARLAP) - return 1; -#elif defined (ACE_WIN32) +#if defined (ACE_WIN32) SYSTEM_INFO sys_info; ::GetSystemInfo (&sys_info); long active_processors = 0; diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 8c5d2834ade..455192e4ee0 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -79,7 +79,7 @@ ACE_INLINE long ACE_OS::getpagesize () { ACE_OS_TRACE ("ACE_OS::getpagesize"); -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) SYSTEM_INFO sys_info; ::GetSystemInfo (&sys_info); return (long) sys_info.dwPageSize; @@ -356,16 +356,9 @@ ACE_OS::ftruncate (ACE_HANDLE handle, ACE_OFF_T offset) { ACE_OS_TRACE ("ACE_OS::ftruncate"); #if defined (ACE_WIN32) -# if !defined (ACE_LACKS_WIN32_SETFILEPOINTEREX) LARGE_INTEGER loff; loff.QuadPart = offset; if (::SetFilePointerEx (handle, loff, 0, FILE_BEGIN)) -# else - if (::SetFilePointer (handle, - offset, - 0, - FILE_BEGIN) != INVALID_SET_FILE_POINTER) -# endif ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle), ace_result_), int, -1); else ACE_FAIL_RETURN (-1); @@ -512,19 +505,7 @@ ACE_INLINE int ACE_OS::hostname (char name[], size_t maxnamelen) { ACE_OS_TRACE ("ACE_OS::hostname"); -#if defined (ACE_HAS_PHARLAP) - // PharLap only can do net stuff with the RT version. -# if defined (ACE_HAS_PHARLAP_RT) - // @@This is not at all reliable... requires ethernet and BOOTP to be used. - // A more reliable way is to go thru the devices w/ EtsTCPGetDeviceCfg until - // a legit IP address is found, then get its name w/ gethostbyaddr. - ACE_SOCKCALL_RETURN (gethostname (name, maxnamelen), int, SOCKET_ERROR); -# else - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (maxnamelen); - ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_PHARLAP_RT */ -#elif defined (ACE_VXWORKS) +#if defined (ACE_VXWORKS) return ::gethostname (name, maxnamelen); #elif defined (ACE_WIN32) if (::gethostname (name, ACE_Utils::truncate_cast<int> (maxnamelen)) == 0) @@ -548,7 +529,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen) return -1; #elif defined (ACE_LACKS_GETHOSTNAME) ACE_NOTSUP_RETURN (-1); -#else /* ACE_HAS_PHARLAP */ +#else /* ACE_VXWORKS */ ACE_utsname host_info; if (ACE_OS::uname (&host_info) == -1) @@ -558,7 +539,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen) ACE_OS::strsncpy (name, host_info.nodename, maxnamelen); return 0; } -#endif /* ACE_HAS_PHARLAP */ +#endif /* ACE_VXWORKS */ } #if defined (ACE_HAS_WCHAR) @@ -687,7 +668,6 @@ ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) return ::lseek64 (handle, offset, whence); #elif defined (ACE_HAS_LLSEEK) # if defined (ACE_WIN32) -# ifndef ACE_LACKS_WIN32_SETFILEPOINTEREX LARGE_INTEGER distance, new_file_pointer; distance.QuadPart = offset; @@ -696,22 +676,6 @@ ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) (::SetFilePointerEx (handle, distance, &new_file_pointer, whence) ? new_file_pointer.QuadPart : static_cast<ACE_LOFF_T> (-1)); -# else - LARGE_INTEGER l_offset; - l_offset.QuadPart = offset; - LONG low_offset = l_offset.LowPart; - LONG high_offset = l_offset.HighPart; - - l_offset.LowPart = ::SetFilePointer (handle, - low_offset, - &high_offset, - whence); - if (l_offset.LowPart == INVALID_SET_FILE_POINTER && - GetLastError () != NO_ERROR) - return static_cast<ACE_LOFF_T> (-1); - l_offset.HighPart = high_offset; - return l_offset.QuadPart; -# endif /* ACE_LACKS_WIN32_SETFILEPOINTEREX */ # else return ::llseek (handle, offset, whence); # endif /* WIN32 */ @@ -1067,33 +1031,16 @@ ACE_OS::truncate (const ACE_TCHAR *filename, { ACE_OS_TRACE ("ACE_OS::truncate"); #if defined (ACE_WIN32) - ACE_HANDLE handle = ACE_OS::open (filename, - O_WRONLY, - ACE_DEFAULT_FILE_PERMS); + ACE_HANDLE handle = ACE_OS::open (filename, O_WRONLY, ACE_DEFAULT_FILE_PERMS); -# if !defined (ACE_LACKS_WIN32_SETFILEPOINTEREX) LARGE_INTEGER loffset; loffset.QuadPart = offset; -#else - LONG low_offset = ACE_LOW_PART(offset); - LONG high_offset = ACE_HIGH_PART(offset); -#endif if (handle == ACE_INVALID_HANDLE) - ACE_FAIL_RETURN (-1); - -# if !defined (ACE_LACKS_WIN32_SETFILEPOINTEREX) - else if (::SetFilePointerEx (handle, - loffset, - 0, - FILE_BEGIN)) -# else - else if (::SetFilePointer (handle, - low_offset, - &high_offset, - FILE_BEGIN) != INVALID_SET_FILE_POINTER - || GetLastError () == NO_ERROR) -# endif /* ACE_LACKS_WIN32_SETFILEPOINTEREX */ + { + ACE_FAIL_RETURN (-1); + } + else if (::SetFilePointerEx (handle, loffset, 0, FILE_BEGIN)) { BOOL result = ::SetEndOfFile (handle); ::CloseHandle (handle); diff --git a/ACE/ace/Pagefile_Memory_Pool.cpp b/ACE/ace/Pagefile_Memory_Pool.cpp index 8af6e554b66..f5523223c68 100644 --- a/ACE/ace/Pagefile_Memory_Pool.cpp +++ b/ACE/ace/Pagefile_Memory_Pool.cpp @@ -19,7 +19,7 @@ #include "ace/Based_Pointer_Repository.h" #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) #define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd) \ MapViewOfFileEx (_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd) @@ -217,7 +217,6 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, // Create file mapping, if not yet done if (object_handle_ == 0) { -#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS) // Allow access by all users. SECURITY_ATTRIBUTES sa; SECURITY_DESCRIPTOR sd; @@ -230,7 +229,6 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, sa.nLength = sizeof (SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = &sd; sa.bInheritHandle = FALSE; -#endif /* ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */ // Get an object handle to the named reserved memory object. DWORD size_high; @@ -245,11 +243,7 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, object_handle_ = ACE_TEXT_CreateFileMapping (INVALID_HANDLE_VALUE, -#if !defined (ACE_LACKS_WIN32_SECURITY_DESCRIPTORS) &sa, -#else - 0, -#endif /* !ACE_LACKS_WIN32_SECURITY_DESCRIPTORS */ PAGE_READWRITE | SEC_RESERVE, size_high, size_low, @@ -369,4 +363,4 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/Pagefile_Memory_Pool.h b/ACE/ace/Pagefile_Memory_Pool.h index 254a5a7ad8a..4e8d4af8315 100644 --- a/ACE/ace/Pagefile_Memory_Pool.h +++ b/ACE/ace/Pagefile_Memory_Pool.h @@ -20,7 +20,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) #include "ace/ACE.h" #include "ace/os_include/sys/os_mman.h" @@ -190,7 +190,7 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ #if defined (__ACE_INLINE__) #include "ace/Pagefile_Memory_Pool.inl" diff --git a/ACE/ace/Pagefile_Memory_Pool.inl b/ACE/ace/Pagefile_Memory_Pool.inl index e6b2919d873..46734e75ba7 100644 --- a/ACE/ace/Pagefile_Memory_Pool.inl +++ b/ACE/ace/Pagefile_Memory_Pool.inl @@ -1,5 +1,5 @@ // -*- C++ -*- -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -48,4 +48,4 @@ ACE_Pagefile_Memory_Pool::base_addr () const ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 &7 !ACE_HAS_PHARLAP */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/README b/ACE/ace/README index 4111fd9d38c..eb25e0dda78 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -668,10 +668,6 @@ ACE_LACKS_MPROTECT The platform doesn't have LYNX)) ACE_LACKS_MSG_ACCRIGHTS Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}. -ACE_LACKS_MSG_WFMO Platform lacks - MsgWaitForMultipleObjects - (only needs to be defined when - ACE_WIN32 is also defined). ACE_LACKS_MSYNC Platform lacks msync() (e.g., Linux) ACE_LACKS_MUTEXATTR_PSHARED Platform lacks @@ -811,10 +807,6 @@ ACE_LACKS_UNAME Platform lacks uname calls ACE_LACKS_WAIT The platform lacks wait ACE_LACKS_WIN32_GETPROCESSTIMES The Windows platform doesn't have GetProcessTimes(). -ACE_LACKS_WIN32_MOVEFILEEX The Windows platform doesn't have - MoveFileEx(). -ACE_LACKS_WIN32_SECURITY_DESCRIPTORS The Windows platform doesn't have - security descriptor support. ACE_LACKS_WRITEV Platform doesn't define writev, so use our own ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with diff --git a/ACE/ace/Recursive_Thread_Mutex.cpp b/ACE/ace/Recursive_Thread_Mutex.cpp index 1f7b2dc8129..d75cf7d8354 100644 --- a/ACE/ace/Recursive_Thread_Mutex.cpp +++ b/ACE/ace/Recursive_Thread_Mutex.cpp @@ -79,7 +79,7 @@ int ACE_Recursive_Thread_Mutex::get_nesting_level () { // ACE_TRACE ("ACE_Recursive_Thread_Mutex::get_nesting_level"); -#if defined (ACE_HAS_VXTHREADS) || defined (ACE_HAS_PHARLAP) +#if defined (ACE_HAS_VXTHREADS) ACE_NOTSUP_RETURN (-1); #elif defined (ACE_HAS_RECURSIVE_MUTEXES) # if defined (ACE_WIN32) @@ -99,7 +99,7 @@ ACE_Recursive_Thread_Mutex::get_nesting_level () nesting_level = this->lock_.nesting_level_; ACE_OS::mutex_unlock (&this->lock_.nesting_mutex_); return nesting_level; -#endif /* ACE_HAS_VXTHREADS || ACE_HAS_PHARLAP */ +#endif /* ACE_HAS_VXTHREADS */ } void diff --git a/ACE/ace/Registry.cpp b/ACE/ace/Registry.cpp index ddd8e77923e..cc98d803395 100644 --- a/ACE/ace/Registry.cpp +++ b/ACE/ace/Registry.cpp @@ -1,6 +1,6 @@ #include "ace/Registry.h" -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) +#if defined (ACE_WIN32) # include "ace/os_include/os_netdb.h" # include "ace/OS_NS_unistd.h" @@ -1113,4 +1113,4 @@ ACE_Predefined_Naming_Contexts::is_local_host (const ACE_TCHAR *machine_name) ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ +#endif /* ACE_WIN32 */ diff --git a/ACE/ace/Registry.h b/ACE/ace/Registry.h index 8d5e613116e..f58f1a9808f 100644 --- a/ACE/ace/Registry.h +++ b/ACE/ace/Registry.h @@ -19,8 +19,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) -// This only works on registry-capable Win32 platforms. +#if defined (ACE_WIN32) #include "ace/Containers.h" #include "ace/SString.h" @@ -553,6 +552,6 @@ private: ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ +#endif /* ACE_WIN32 */ #include /**/ "ace/post.h" #endif /* ACE_REGISTRY_H */ diff --git a/ACE/ace/SPIPE_Connector.cpp b/ACE/ace/SPIPE_Connector.cpp index c507b47ee92..2822fa82b53 100644 --- a/ACE/ace/SPIPE_Connector.cpp +++ b/ACE/ace/SPIPE_Connector.cpp @@ -67,7 +67,7 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io, ACE_HANDLE handle; ACE_UNUSED_ARG (pipe_mode); -#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) // We need to allow for more than one attempt to connect, // calculate the absolute time at which we give up. ACE_Time_Value absolute_time; @@ -143,11 +143,11 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io, } } } -#else /* ACE_WIN32 && !ACE_HAS_PHARLAP */ +#else /* ACE_WIN32 */ handle = ACE::handle_timed_open (timeout, remote_sap.get_path_name (), flags, perms, sa); -#endif /* !ACE_WIN32 || ACE_HAS_PHARLAP */ +#endif /* !ACE_WIN32 */ new_io.set_handle (handle); new_io.remote_addr_ = remote_sap; // class copy. diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp index 37e8ea1a339..6d7fd6b1282 100644 --- a/ACE/ace/Sock_Connect.cpp +++ b/ACE/ace/Sock_Connect.cpp @@ -30,7 +30,7 @@ const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_IN const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT; #endif /* ACE_VXWORKS <= 0x670 && __RTP__ && ACE_HAS_IPV6 */ -#if defined (ACE_WIN32) && defined (ACE_HAS_PHARLAP) +#if defined (ACE_WIN32) # include "ace/OS_NS_stdio.h" #endif @@ -438,89 +438,6 @@ static int get_ip_interfaces_win32 (size_t &count, ACE_INET_Addr *&addrs) { -# if defined (ACE_HAS_PHARLAP) - // PharLap ETS has its own kernel routines to rummage through the device - // configs and extract the interface info, but only for Pharlap RT. -# if !defined (ACE_HAS_PHARLAP_RT) - ACE_NOTSUP_RETURN (-1); -# endif /* ACE_HAS_PHARLAP_RT */ - - // Locate all of the IP devices in the system, saving a DEVHANDLE - // for each. Then allocate the ACE_INET_Addrs needed and fetch all - // the IP addresses. To locate the devices, try the available - // device name roots and increment the device number until the - // kernel says there are no more of that type. - const size_t ACE_MAX_ETS_DEVICES = 64; // Arbitrary, but should be enough. - DEVHANDLE ip_dev[ACE_MAX_ETS_DEVICES]; - EK_TCPIPCFG *devp = 0; - size_t i, j; - ACE_TCHAR dev_name[16]; - - count = 0; - for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count) - { - // Ethernet. - ACE_OS::sprintf (dev_name, - "ether%d", - i); - ip_dev[count] = EtsTCPGetDeviceHandle (dev_name); - if (ip_dev[count] == 0) - break; - } - for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count) - { - // SLIP. - ACE_OS::sprintf (dev_name, - "sl%d", - i); - ip_dev[count] = EtsTCPGetDeviceHandle (dev_name); - if (ip_dev[count] == 0) - break; - } - for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count) - { - // PPP. - ACE_OS::sprintf (dev_name, - "ppp%d", - i); - ip_dev[count] = EtsTCPGetDeviceHandle (dev_name); - if (ip_dev[count] == 0) - break; - } - - if (count > 0) - ACE_NEW_RETURN (addrs, - ACE_INET_Addr[count], - -1); - else - addrs = 0; - - for (i = 0, j = 0; i < count; i++) - { - devp = EtsTCPGetDeviceCfg (ip_dev[i]); - if (devp != 0) - { - addrs[j].set (0, - devp->nwIPAddress, - 0); // Already in net order. - ++j; - } - // There's no call to close the DEVHANDLE. - } - - count = j; - if (count == 0 && addrs != 0) - { - delete [] addrs; - addrs = 0; - } - - return 0; - - -# else - // All non-CE, non-Pharlap Windows. Must support Winsock2. - int i, n_interfaces, status; INTERFACE_INFO info[64]; @@ -637,8 +554,6 @@ get_ip_interfaces_win32 (size_t &count, } return 0; - -# endif /* ACE_HAS_PHARLAP */ } #elif defined (ACE_HAS_GETIFADDRS) diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp index f5cd8859ebb..cf935f9dd45 100644 --- a/ACE/ace/WFMO_Reactor.cpp +++ b/ACE/ace/WFMO_Reactor.cpp @@ -1763,18 +1763,6 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time, DWORD result = 0; while (1) { -# if defined (ACE_HAS_PHARLAP) - // PharLap doesn't implement WaitForMultipleObjectsEx, and doesn't - // do async I/O, so it's not needed in this case anyway. - result = ::WaitForMultipleObjects (sizeof this->atomic_wait_array_ / sizeof (ACE_HANDLE), - this->atomic_wait_array_, - TRUE, - timeout); - - if (result != WAIT_IO_COMPLETION) - break; - -# else result = ::WaitForMultipleObjectsEx (sizeof this->atomic_wait_array_ / sizeof (ACE_HANDLE), this->atomic_wait_array_, TRUE, @@ -1783,8 +1771,6 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time, if (result != WAIT_IO_COMPLETION) break; - -# endif /* ACE_HAS_PHARLAP */ } switch (result) @@ -1811,22 +1797,11 @@ ACE_WFMO_Reactor::wait_for_multiple_events (int timeout, // Wait for any of handles_ to be active, or until timeout expires. // If <alertable> is enabled allow asynchronous completion of // ReadFile and WriteFile operations. - -#if defined (ACE_HAS_PHARLAP) - // PharLap doesn't do async I/O and doesn't implement - // WaitForMultipleObjectsEx, so use WaitForMultipleObjects. - ACE_UNUSED_ARG (alertable); - return ::WaitForMultipleObjects (this->handler_rep_.max_handlep1 (), - this->handler_rep_.handles (), - FALSE, - timeout); -#else return ::WaitForMultipleObjectsEx (this->handler_rep_.max_handlep1 (), this->handler_rep_.handles (), FALSE, timeout, alertable); -#endif /* ACE_HAS_PHARLAP */ } DWORD diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index 9ab89245007..b4c80688734 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -31,7 +31,7 @@ # define ACE_FALLTHROUGH [[gnu::fallthrough]] # else # define ACE_FALLTHROUGH -# endif +# endif # endif #endif diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 144e0283d98..ac57a80e0b3 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -101,7 +101,7 @@ # if !defined (ACE_HAS_PROCESS_SPAWN) # if !defined (ACE_LACKS_FORK) || \ - (defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)) + (defined (ACE_WIN32)) # define ACE_HAS_PROCESS_SPAWN 1 # endif # endif /* ACE_HAS_PROCESS_SPAWN */ diff --git a/ACE/ace/config-pharlap.h b/ACE/ace/config-pharlap.h deleted file mode 100644 index dbc933bc574..00000000000 --- a/ACE/ace/config-pharlap.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- C++ -*- */ -// This configuration file is for use with the PharLap Realtime ETS Kernel. -// It has been tested with PharLap TNT Embedded ToolSuite version 9.1. - -#ifndef ACE_CONFIG_PHARLAP_H -#define ACE_CONFIG_PHARLAP_H -#include /**/ "ace/pre.h" - -#define ACE_HAS_PHARLAP -// Some features are only available with the Realtime edition of ETS. -// Assume that if using ACE, the realtime version is also being used, but -// allow it to be turned off as well. -#ifndef ACE_HAS_PHARLAP_RT -# define ACE_HAS_PHARLAP_RT -#else -# if (ACE_HAS_PHARLAP_RT == 0) -# undef ACE_HAS_PHARLAP_RT -# endif -#endif - -// Fortunately, PharLap ETS offers much of the Win32 API. But it's still on -// Winsock 1.1 -#define ACE_HAS_WINSOCK2 0 -#define ACE_HAS_WINSOCK1 1 - -// The TSS implementation doesn't pass muster on the TSS_Test, but it works -// well with ACE's TSS emulation. -#define ACE_HAS_TSS_EMULATION - -#define ACE_LACKS_MMAP -#define ACE_LACKS_MPROTECT -#define ACE_LACKS_MSYNC -#define ACE_LACKS_TCP_NODELAY -#define ACE_LACKS_MSG_WFMO -#define ACE_LACKS_WIN32_MOVEFILEEX -#define ACE_LACKS_WIN32_REGISTRY -#define ACE_LACKS_WIN32_SECURITY_DESCRIPTORS -#define ACE_LACKS_WIN32_SERVICES -#define ACE_LACKS_WIN32_SETFILEPOINTEREX - -// There's no host table, by default. So using "localhost" won't work. -// If your system does have the ability to use "localhost" and you want to, -// define it before including this file. -#if !defined (ACE_LOCALHOST) -# define ACE_LOCALHOST "127.0.0.1" -#endif /* ACE_LOCALHOST */ - -// The normal Windows default stack size doesn't hold for ETS. Set what you -// want explicitly. -#if !defined (ACE_DEFAULT_THREAD_STACKSIZE) -# define ACE_DEFAULT_THREAD_STACKSIZE (1024*1024) -#endif /* ACE_DEFAULT_THREAD_STACKSIZE */ - -// Don't know how to get the page size at execution time. This is most likely -// the correct value. -#define ACE_PAGE_SIZE 4096 - -#if defined (ACE_HAS_PHARLAP_RT) -# define ACE_HAS_IP_MULTICAST - // ETS winsock doesn't define IP level socket options -//# define IP_TOS 8 -#endif /* ACE_HAS_PHARLAP_RT */ - -// Let the config-win32.h file do its thing -#undef ACE_CONFIG_H -#include "ace/config-win32.h" -// Now remove things that desktop/server Windows has but Pharlap ETS doesn't. -#undef ACE_HAS_INTERLOCKED_EXCHANGEADD -#undef ACE_HAS_WCHAR - -// PharLap's exports apparantly define LockFile, but it's documented as -// unsupported. LockFileEx is not present. -#define ACE_LACKS_FILELOCKS - -#include /**/ <embkern.h> -#if defined (ACE_HAS_PHARLAP_RT) -# include /**/ <embtcpip.h> -#define ACE_LACKS_IP_ADD_MEMBERSHIP -#endif /* ACE_HAS_PHARLAP_RT */ - -// Although IN_CLASSD is defined in both winsock.h and winsock2.h, it ends -// up undefined for Pharlap ETS builds. If this is the case, set things up -// so nothing looks like class D. -#if !defined (IN_CLASSD) -# define IN_CLASSD(i) (0) -#endif - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIG_PHARLAP_H */ diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index f22fbb0f063..7e433c02da6 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -460,7 +460,7 @@ // PharLap ETS has its own winsock lib, so don't grab the one // supplied with the OS. -# if defined (_MSC_VER) && !defined (ACE_HAS_PHARLAP) +# if defined (_MSC_VER) # pragma comment(lib, "wsock32.lib") # endif /* _MSC_VER */ @@ -490,17 +490,14 @@ #define ACE_HAS_INTERLOCKED_EXCHANGEADD -#if !defined (ACE_HAS_PHARLAP) - -# if _WIN32_WINNT >= 0x400 -# define ACE_HAS_SIGNAL_OBJECT_AND_WAIT -# endif +#if _WIN32_WINNT >= 0x400 +# define ACE_HAS_SIGNAL_OBJECT_AND_WAIT +#endif // If CancelIO is undefined get the updated sp2-sdk from MS -# define ACE_HAS_CANCEL_IO -# define ACE_HAS_WIN32_OVERLAPPED_IO -# define ACE_HAS_WIN32_NAMED_PIPES -#endif /* !ACE_HAS_PHARLAP */ +#define ACE_HAS_CANCEL_IO +#define ACE_HAS_WIN32_OVERLAPPED_IO +#define ACE_HAS_WIN32_NAMED_PIPES #if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION) # define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH @@ -544,9 +541,7 @@ # define ACE_DISABLES_THREAD_LIBRARY_CALLS 0 #endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */ -#if !defined (ACE_HAS_PHARLAP) -# define ACE_HAS_LOG_MSG_NT_EVENT_LOG -#endif /* !ACE_HAS_PHARLAP */ +#define ACE_HAS_LOG_MSG_NT_EVENT_LOG #define ACE_HAS_LLSEEK diff --git a/ACE/ace/os_include/netinet/os_in.h b/ACE/ace/os_include/netinet/os_in.h index f71e757532b..a9bca3fe2f8 100644 --- a/ACE/ace/os_include/netinet/os_in.h +++ b/ACE/ace/os_include/netinet/os_in.h @@ -41,11 +41,9 @@ extern "C" #endif /* !ACE_LACKS_NETINET_IN_H */ -# if defined (ACE_HAS_PHARLAP_RT) -# define ACE_IPPROTO_TCP SOL_SOCKET -# elif !defined (ACE_IPPROTO_TCP) +# if !defined (ACE_IPPROTO_TCP) # define ACE_IPPROTO_TCP IPPROTO_TCP -# endif /* ACE_HAS_PHARLAP_RT */ +# endif /* !ACE_IPPROTO_TCP */ # if !defined (ACE_HAS_IP_MULTICAST) && defined (ACE_LACKS_IP_ADD_MEMBERSHIP) // Even if ACE_HAS_IP_MULTICAST is not defined, if IP_ADD_MEMBERSHIP |