diff options
-rw-r--r-- | ACE/ace/Bound_Ptr.h | 8 | ||||
-rw-r--r-- | ACE/ace/Bound_Ptr.inl | 6 | ||||
-rw-r--r-- | ACE/ace/Future.h | 3 | ||||
-rw-r--r-- | ACE/ace/High_Res_Timer.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/OS_NS_stdlib.inl | 16 | ||||
-rw-r--r-- | ACE/ace/OS_NS_sys_stat.h | 4 | ||||
-rw-r--r-- | ACE/ace/config-macros.h | 6 | ||||
-rw-r--r-- | ACE/ace/config-win32-borland.h | 1 | ||||
-rw-r--r-- | ACE/ace/config-win32-common.h | 11 | ||||
-rw-r--r-- | ACE/ace/config-win32-mingw.h | 3 | ||||
-rw-r--r-- | ACE/ace/config-win32-mingw64.h | 3 | ||||
-rw-r--r-- | ACE/ace/config-win32-msvc-14.h | 7 | ||||
-rw-r--r-- | ACE/tests/Compiler_Features_24_Test.cpp | 9 |
13 files changed, 31 insertions, 59 deletions
diff --git a/ACE/ace/Bound_Ptr.h b/ACE/ace/Bound_Ptr.h index ab39bc10623..a406cab3ce9 100644 --- a/ACE/ace/Bound_Ptr.h +++ b/ACE/ace/Bound_Ptr.h @@ -121,7 +121,7 @@ public: template <class Y> ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<Y, ACE_LOCK> &r) : counter_ (r.counter_), - ptr_ (dynamic_cast<X_t*>(r.ptr_)) + ptr_ (dynamic_cast<X*>(r.ptr_)) { // This ctor is temporarily defined here to increase our chances // of being accepted by broken compilers. @@ -151,7 +151,7 @@ public: // This will work if &r == this, by first increasing the ref count COUNTER *new_counter = r.counter_; - X* new_ptr = dynamic_cast<X_t*> (r.ptr_); + X* new_ptr = dynamic_cast<X*> (r.ptr_); COUNTER::attach_strong (new_counter); if (COUNTER::detach_strong (this->counter_) == 0) delete this->ptr_; @@ -214,8 +214,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - typedef X X_t; // This indirection is for Borland C++. - friend class ACE_Weak_Bound_Ptr<X, ACE_LOCK>; template <class Y, class L> @@ -350,8 +348,6 @@ public: ACE_ALLOC_HOOK_DECLARE; private: - typedef X X_t; // This indirection is for Borland C++. - friend class ACE_Strong_Bound_Ptr<X, ACE_LOCK>; /// The ACE_Bound_Ptr_Counter type. diff --git a/ACE/ace/Bound_Ptr.inl b/ACE/ace/Bound_Ptr.inl index 5a7de11982a..17ffe620f71 100644 --- a/ACE/ace/Bound_Ptr.inl +++ b/ACE/ace/Bound_Ptr.inl @@ -173,7 +173,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Strong_Bound_Ptr<X, ACE return; COUNTER *new_counter = rhs.counter_; - X_t *new_ptr = rhs.ptr_; + X *new_ptr = rhs.ptr_; COUNTER::attach_strong (new_counter); if (COUNTER::detach_strong (this->counter_) == 0) delete this->ptr_; @@ -190,7 +190,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Weak_Bound_Ptr<X, ACE_L return; COUNTER *new_counter = rhs.counter_; - X_t *new_ptr = rhs.ptr_; + X *new_ptr = rhs.ptr_; // When creating a strong pointer from a weak one we can't assume that the // underlying object still exists. Therefore we must check for a return value @@ -274,7 +274,7 @@ template<class X, class ACE_LOCK> inline void ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (X *p) { COUNTER *old_counter = this->counter_; - X_t *old_ptr = this->ptr_; + X *old_ptr = this->ptr_; this->counter_ = COUNTER::create_strong (); this->ptr_ = p; if (COUNTER::detach_strong (old_counter) == 0) diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h index 8238511b765..e928370f1e6 100644 --- a/ACE/ace/Future.h +++ b/ACE/ace/Future.h @@ -161,9 +161,6 @@ private: // = Encapsulate reference count and object lifetime of instances. - // These methods must go after the others to work around a bug with - // Borland's C++ Builder... - /// Allocate a new ACE_Future_Rep<T> instance, returning NULL if it /// cannot be created. static ACE_Future_Rep<T> *internal_create (void); diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp index e849e19a013..ef30f0833fb 100644 --- a/ACE/ace/High_Res_Timer.cpp +++ b/ACE/ace/High_Res_Timer.cpp @@ -374,8 +374,7 @@ ACE_High_Res_Timer::elapsed_time (ACE_hrtime_t &nanoseconds) const // For more background on this, please see bugzilla #1024. nanoseconds = ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_) * (1024000u / ACE_High_Res_Timer::global_scale_factor ()); - // Caution - Borland has a problem with >>=, so resist the temptation. - nanoseconds = nanoseconds >> 10; + nanoseconds >>= 10; // Right shift is implemented for non native 64-bit ints // operator/ only for a 32 bit result ! #else @@ -391,15 +390,11 @@ ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const { #if !defined (ACE_WIN32) // Same as above. - nanoseconds = this->total_ - * (1024000u / ACE_High_Res_Timer::global_scale_factor ()); - // Caution - Borland has a problem with >>=, so resist the temptation. - nanoseconds = nanoseconds >> 10; + nanoseconds = this->total_ * (1024000u / ACE_High_Res_Timer::global_scale_factor ()); + nanoseconds >>= 10; #else // This a higher-precision version, specific for Windows systems - nanoseconds = - this->total_ * 1000000000u / - ACE_High_Res_Timer::global_scale_factor (); + nanoseconds = this->total_ * 1000000000u / ACE_High_Res_Timer::global_scale_factor (); #endif } diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl index 61c90985c83..33484924803 100644 --- a/ACE/ace/OS_NS_stdlib.inl +++ b/ACE/ace/OS_NS_stdlib.inl @@ -9,12 +9,6 @@ # include "ace/os_include/os_signal.h" #endif -#if defined (ACE_WCHAR_IN_STD_NAMESPACE) -# define ACE_WCHAR_STD_NAMESPACE std -#else -# define ACE_WCHAR_STD_NAMESPACE ACE_STD_NAMESPACE -#endif /* ACE_WCHAR_IN_STD_NAMESPACE */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Doesn't need a macro since it *never* returns! @@ -501,7 +495,7 @@ ACE_OS::strtod (const char *s, char **endptr) ACE_INLINE double ACE_OS::strtod (const wchar_t *s, wchar_t **endptr) { - return ACE_WCHAR_STD_NAMESPACE::wcstod (s, endptr); + return std::wcstod (s, endptr); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_WCSTOD */ @@ -522,7 +516,7 @@ ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base) #if defined (ACE_LACKS_WCSTOL) return ACE_OS::wcstol_emulation (s, ptr, base); #else - return ACE_WCHAR_STD_NAMESPACE::wcstol (s, ptr, base); + return std::wcstol (s, ptr, base); #endif /* ACE_LACKS_WCSTOL */ } #endif /* ACE_HAS_WCHAR */ @@ -544,7 +538,7 @@ ACE_OS::strtoul (const wchar_t *s, wchar_t **ptr, int base) #if defined (ACE_LACKS_WCSTOUL) return ACE_OS::wcstoul_emulation (s, ptr, base); #else - return ACE_WCHAR_STD_NAMESPACE::wcstoul (s, ptr, base); + return std::wcstoul (s, ptr, base); #endif /* ACE_LACKS_WCSTOUL */ } #endif /* ACE_HAS_WCHAR */ @@ -570,7 +564,7 @@ ACE_OS::strtoll (const wchar_t *s, wchar_t **ptr, int base) #elif defined (ACE_WCSTOLL_EQUIVALENT) return ACE_WCSTOLL_EQUIVALENT (s, ptr, base); #else - return ACE_WCHAR_STD_NAMESPACE::wcstoll (s, ptr, base); + return std::wcstoll (s, ptr, base); #endif /* ACE_LACKS_WCSTOLL */ } #endif /* ACE_HAS_WCHAR */ @@ -596,7 +590,7 @@ ACE_OS::strtoull (const wchar_t *s, wchar_t **ptr, int base) #elif defined (ACE_WCSTOULL_EQUIVALENT) return ACE_WCSTOULL_EQUIVALENT (s, ptr, base); #else - return ACE_WCHAR_STD_NAMESPACE::wcstoull (s, ptr, base); + return std::wcstoull (s, ptr, base); #endif /* ACE_LACKS_WCSTOULL */ } #endif /* ACE_HAS_WCHAR */ diff --git a/ACE/ace/OS_NS_sys_stat.h b/ACE/ace/OS_NS_sys_stat.h index c8b7bb290f6..4fdc51b2898 100644 --- a/ACE/ace/OS_NS_sys_stat.h +++ b/ACE/ace/OS_NS_sys_stat.h @@ -39,11 +39,7 @@ typedef struct stati64 ACE_stat; # define ACE_STAT_FUNC_NAME ::_stati64 # define ACE_WSTAT_FUNC_NAME ::_wstati64 # elif !defined (ACE_HAS_WINCE) && defined (_MSC_VER) -# if defined (ACE_MSVC_USES_DOUBLE_UNDERSCORE_STAT64) -typedef struct __stat64 ACE_stat; -# else typedef struct _stat64 ACE_stat; -# endif # define ACE_STAT_FUNC_NAME ::_stat64 # define ACE_WSTAT_FUNC_NAME ::_wstat64 # elif defined (__MINGW32__) diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 5b302b80607..08e748d9276 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -253,9 +253,9 @@ // ============================================================================ #if !defined (ACE_UNUSED_ARG) -# if defined (__GNUC__) || (defined (__BORLANDC__) && defined (__clang__)) +# if defined (__GNUC__) || defined (__BORLANDC__) # define ACE_UNUSED_ARG(a) (void) (a) -# elif defined (ghs) || defined (__hpux) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (ACE_RM544) || defined (__DCC__) || defined (__PGI) +# elif defined (ghs) || defined (__hpux) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) // Some compilers complain about "statement with no effect" with (a). // This eliminates the warnings, and no code is generated for the null // conditional statement. @note that may only be true if -O is enabled, @@ -266,7 +266,7 @@ # endif /* ghs ..... */ #endif /* !ACE_UNUSED_ARG */ -#if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (ACE_RM544) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) || defined (__IAR_SYSTEMS_ICC__) +#if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) || defined (__IAR_SYSTEMS_ICC__) # define ACE_NOTREACHED(a) #else /* ghs || ..... */ # define ACE_NOTREACHED(a) a diff --git a/ACE/ace/config-win32-borland.h b/ACE/ace/config-win32-borland.h index 10856fbf747..3e13ecba237 100644 --- a/ACE/ace/config-win32-borland.h +++ b/ACE/ace/config-win32-borland.h @@ -163,6 +163,7 @@ #define ACE_HAS_BUILTIN_BSWAP32 #define ACE_HAS_BUILTIN_BSWAP64 #define ACE_LACKS_INLINE_ASSEMBLY +#define ACE_LACKS_PID_T #if __cplusplus >= 201103L # define ACE_HAS_CPP11 diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index 7a4ac9282b9..a22eb51989a 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -304,17 +304,6 @@ #define ACE_LACKS_IOVEC #define ACE_LACKS_LOG2 #define ACE_LACKS_CADDR_T -#if !defined(__MINGW32__) && !defined (__BORLANDC__) -# define ACE_LACKS_MODE_T -#endif -#if !defined(__MINGW32__) -# define ACE_LACKS_PID_T -#endif -#if !defined (__BORLANDC__) -# define ACE_LACKS_NLINK_T -# define ACE_LACKS_UID_T -# define ACE_LACKS_GID_T -#endif #define ACE_LACKS_SETENV #define ACE_LACKS_UNSETENV diff --git a/ACE/ace/config-win32-mingw.h b/ACE/ace/config-win32-mingw.h index 61f4b833632..767feb993fc 100644 --- a/ACE/ace/config-win32-mingw.h +++ b/ACE/ace/config-win32-mingw.h @@ -85,6 +85,9 @@ #define ACE_HAS_WINSOCK2_GQOS #define ACE_ISCTYPE_EQUIVALENT ::_isctype #define ACE_LACKS_SET_ABORT_BEHAVIOR +#define ACE_LACKS_NLINK_T +#define ACE_LACKS_UID_T +#define ACE_LACKS_GID_T // We trust the user: He must have used -mpentiumpro or -mpentium // if that is what he wants. diff --git a/ACE/ace/config-win32-mingw64.h b/ACE/ace/config-win32-mingw64.h index 1f3231b0e56..f7414ebda54 100644 --- a/ACE/ace/config-win32-mingw64.h +++ b/ACE/ace/config-win32-mingw64.h @@ -115,6 +115,9 @@ #define ACE_HAS_NONCONST_WCSDUP #define ACE_ISCTYPE_EQUIVALENT ::_isctype #define ACE_LACKS_SET_ABORT_BEHAVIOR +#define ACE_LACKS_NLINK_T +#define ACE_LACKS_UID_T +#define ACE_LACKS_GID_T #define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE diff --git a/ACE/ace/config-win32-msvc-14.h b/ACE/ace/config-win32-msvc-14.h index 44e670fc9d4..866c45f6dd2 100644 --- a/ACE/ace/config-win32-msvc-14.h +++ b/ACE/ace/config-win32-msvc-14.h @@ -141,5 +141,12 @@ #define ACE_LACKS_CLOSEDIR #define ACE_LACKS_READDIR +#define ACE_LACKS_MODE_T +#define ACE_LACKS_PID_T + +#define ACE_LACKS_NLINK_T +#define ACE_LACKS_UID_T +#define ACE_LACKS_GID_T + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_WIN32_MSVC_14_H */ diff --git a/ACE/tests/Compiler_Features_24_Test.cpp b/ACE/tests/Compiler_Features_24_Test.cpp index 895a28820ea..003b70fd525 100644 --- a/ACE/tests/Compiler_Features_24_Test.cpp +++ b/ACE/tests/Compiler_Features_24_Test.cpp @@ -71,14 +71,6 @@ run_main (int, ACE_TCHAR *[]) FOO::o_r<FOO::A> l = FOO::create(); -#if defined __clang__ && \ - (defined __apple_build_version__ && __apple_build_version__ < 9100000 \ - || __clang_major__ < 5) - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: This version of clang doesn't") - ACE_TEXT (" compile the C++11 code in this test.\n"))); - ACE_END_TEST; - return 1; -#else FOO::o_r<FOO::A> l2 = FOO::make_f<FOO::A>(); // next line doesn't compile and shouldn't //FOO::o_r<FOO::B> l3 = FOO::make_f<FOO::B>(); @@ -88,5 +80,4 @@ run_main (int, ACE_TCHAR *[]) ACE_END_TEST; return 0; -#endif } |