diff options
-rw-r--r-- | ace/Basic_Types.h | 24 | ||||
-rw-r--r-- | ace/Configuration.cpp | 3 | ||||
-rw-r--r-- | ace/Event_Handler_T.h | 2 | ||||
-rw-r--r-- | ace/Event_Handler_T.i | 2 | ||||
-rw-r--r-- | ace/High_Res_Timer.cpp | 28 | ||||
-rw-r--r-- | ace/High_Res_Timer.i | 13 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 4 | ||||
-rw-r--r-- | ace/Memory_Pool.cpp | 5 | ||||
-rw-r--r-- | ace/NT_Service.cpp | 33 | ||||
-rw-r--r-- | ace/OS.cpp | 48 | ||||
-rw-r--r-- | ace/OS.h | 229 | ||||
-rw-r--r-- | ace/OS.i | 22 | ||||
-rw-r--r-- | ace/Process_Manager.cpp | 7 | ||||
-rw-r--r-- | ace/Profile_Timer.cpp | 6 | ||||
-rw-r--r-- | ace/Sock_Connect.cpp | 5 | ||||
-rw-r--r-- | ace/Stats.cpp | 2 | ||||
-rw-r--r-- | ace/WFMO_Reactor.cpp | 8 | ||||
-rw-r--r-- | ace/config-win32-common.h | 3 | ||||
-rw-r--r-- | ace/config-win32-ghs.h | 110 |
19 files changed, 296 insertions, 258 deletions
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h index 9ef3c923aed..b9ea4fe626b 100644 --- a/ace/Basic_Types.h +++ b/ace/Basic_Types.h @@ -421,20 +421,20 @@ typedef ACE_UINT16 ACE_USHORT16; # endif /* ! ACE_LACKS_LONGLONG_T */ // 64-bit literals require special marking on some platforms. -# if defined (ACE_WIN32) -# if defined (__IBMCPP__) && (__IBMCPP__ >= 400) -# define ACE_UINT64_LITERAL(n) n ## LL -# define ACE_INT64_LITERAL(n) n ## LL -#else -# define ACE_UINT64_LITERAL(n) n ## ui64 -# define ACE_INT64_LITERAL(n) n ## i64 -#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */ -# elif defined (ACE_LACKS_LONGLONG_T) +# if defined (ACE_LACKS_LONGLONG_T) // Can only specify 32-bit arguments. # define ACE_UINT64_LITERAL(n) (ACE_U_LongLong (n)) // This one won't really work, but it'll keep // some compilers happy until we have better support # define ACE_INT64_LITERAL(n) (ACE_U_LongLong (n)) +# elif defined (ACE_WIN32) +# if defined (__IBMCPP__) && (__IBMCPP__ >= 400) +# define ACE_UINT64_LITERAL(n) n ## LL +# define ACE_INT64_LITERAL(n) n ## LL +# else +# define ACE_UINT64_LITERAL(n) n ## ui64 +# define ACE_INT64_LITERAL(n) n ## i64 +# endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */ # else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ # define ACE_UINT64_LITERAL(n) n ## ull # define ACE_INT64_LITERAL(n) n ## ll @@ -450,11 +450,11 @@ typedef ACE_UINT16 ACE_USHORT16; // Cast from UINT64 to a double requires an intermediate cast to INT64 // on some platforms. -# if defined (ACE_WIN32) -# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_static_cast (__int64, n) -# elif defined (ACE_LACKS_LONGLONG_T) +# if defined (ACE_LACKS_LONGLONG_T) // Only use the low 32 bits. # define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_U64_TO_U32 (n) +# elif defined (ACE_WIN32) +# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_static_cast (__int64, n) # else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ # define ACE_UINT64_DBLCAST_ADAPTER(n) (n) # endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp index 7c686400698..ce7db1000e6 100644 --- a/ace/Configuration.cpp +++ b/ace/Configuration.cpp @@ -974,8 +974,9 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey, begin = end + 1; } - +#if !defined (ghs) return 0; +#endif // ghs } diff --git a/ace/Event_Handler_T.h b/ace/Event_Handler_T.h index 92d54b7dffe..16acbc4c7b6 100644 --- a/ace/Event_Handler_T.h +++ b/ace/Event_Handler_T.h @@ -106,7 +106,7 @@ public: virtual int handle_exception (ACE_HANDLE fd = -1); virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg = 0); virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask); - virtual int handle_signal (ACE_HANDLE signum, siginfo_t * = 0, ucontext_t * = 0); + virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); // = Get/set the operations handler. T *op_handler (void); diff --git a/ace/Event_Handler_T.i b/ace/Event_Handler_T.i index 4f2dc0374ae..b31415f7b73 100644 --- a/ace/Event_Handler_T.i +++ b/ace/Event_Handler_T.i @@ -66,7 +66,7 @@ ACE_Event_Handler_T<T>::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask } template<class T> ACE_INLINE int -ACE_Event_Handler_T<T>::handle_signal (ACE_HANDLE signum, siginfo_t *s, ucontext_t *u) +ACE_Event_Handler_T<T>::handle_signal (int signum, siginfo_t *s, ucontext_t *u) { ACE_TRACE ("ACE_Event_Handler_T<T>::handle_signal"); return this->sig_handler_ == 0 ? 0 : (this->op_handler_->*sig_handler_) (signum, s, u); diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp index 0b45234875c..cd139d8efb2 100644 --- a/ace/High_Res_Timer.cpp +++ b/ace/High_Res_Timer.cpp @@ -27,7 +27,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer) // value. /* static */ ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1u; - + #else /* ! (ACE_WIN32 || ACE_HAS_POWERPC_TIMER || \ ACE_HAS_PENTIUM || ACE_HAS_ALPHA_TIMER) || ACE_HAS_HI_RES_TIMER */ @@ -77,7 +77,7 @@ ACE_High_Res_Timer::get_cpuinfo (void) if (::sscanf (buf, "BogoMIPS : %d.%d\n", &whole, - &fractional) == 2 + &fractional) == 2 || ::sscanf (buf, "bogomips : %d.%d\n", &whole, @@ -173,13 +173,19 @@ ACE_High_Res_Timer::global_scale_factor (void) ACE_High_Res_Timer::global_scale_factor_status_ = 1; // We have a high-res timer - ACE_High_Res_Timer::global_scale_factor - (ACE_static_cast (unsigned int, +# if defined (ghs) + ACE_UINT64 uint64_freq(freq.u.LowPart, (ACE_UINT32) freq.u.HighPart); + ACE_High_Res_Timer::global_scale_factor + (uint64_freq / (ACE_UINT32) ACE_ONE_SECOND_IN_USECS); +# else + ACE_High_Res_Timer::global_scale_factor + (ACE_static_cast (unsigned int, freq.QuadPart / ACE_HR_SCALE_CONVERSION)); +# endif // (ghs) } else // High-Res timers not supported - ACE_High_Res_Timer::global_scale_factor_status_ = -1; + ACE_High_Res_Timer::global_scale_factor_status_ = -1; return ACE_High_Res_Timer::global_scale_factor_; @@ -187,9 +193,11 @@ ACE_High_Res_Timer::global_scale_factor (void) ACE_High_Res_Timer::global_scale_factor (ACE_High_Res_Timer::get_cpuinfo ()); # endif /* ! ACE_WIN32 && ! (linux && __alpha__) */ +# if !defined (ACE_WIN32) if (ACE_High_Res_Timer::global_scale_factor_ == 1u) // Failed to retrieve CPU speed from system, so calculate it. ACE_High_Res_Timer::calibrate (); +# endif // (ACE_WIN32) } } @@ -219,7 +227,7 @@ ACE_High_Res_Timer::calibrate (const ACE_UINT32 usec, const ACE_Time_Value sleep_time (0, usec); ACE_Stats delta_hrtime; // In units of 100 usec, to avoid overflow. - ACE_Stats actual_sleeps; + ACE_Stats actual_sleeps; for (u_int i = 0; i < iterations; @@ -358,10 +366,10 @@ ACE_High_Res_Timer::elapsed_time (ACE_hrtime_t &nanoseconds) const // designed and tested to avoid overflow on machines that don't have // native 64-bit ints. #if defined (ACE_WIN32) - nanoseconds = (this->end_ - this->start_) + nanoseconds = (this->end_ - this->start_) * (1000000u / ACE_High_Res_Timer::global_scale_factor ()); #else - nanoseconds = (this->end_ - this->start_) + nanoseconds = (this->end_ - this->start_) * (1000u / ACE_High_Res_Timer::global_scale_factor ()); #endif /* ACE_WIN32 */ } @@ -374,7 +382,7 @@ ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const nanoseconds = this->total_ / ACE_High_Res_Timer::global_scale_factor () * 1000000u; #else - nanoseconds = this->total_ + nanoseconds = this->total_ / ACE_High_Res_Timer::global_scale_factor () * 1000u; #endif } @@ -446,7 +454,7 @@ ACE_High_Res_Timer::print_total (const ACE_TCHAR *str, { ACE_hrtime_t avg_nsecs = this->total_ / (ACE_UINT32) count; - ACE_OS::sprintf (buf, + ACE_OS::sprintf (buf, ACE_LIB_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"), count, total_secs, diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i index 6fb562c6d80..d4338e83418 100644 --- a/ace/High_Res_Timer.i +++ b/ace/High_Res_Timer.i @@ -22,10 +22,15 @@ ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv, #if defined (ACE_WIN32) // Win32's scale factor is in ticks/msec, so multiply up to usec. ACE_hrtime_t subsec = hrt - tmp; // Remainder of ticks < 1sec - long msec = (long) (subsec / global_scale_factor ()); // #msec - long usec = (long) (subsec - (msec * global_scale_factor ())); - // (tick * usec/msec) / tick/msec = usec - usec = (usec * 1000) / (long) global_scale_factor (); + ACE_UINT32 msec = (ACE_UINT32) (subsec / global_scale_factor ()); // #msec + ACE_hrtime_t usec64 = subsec - (msec * global_scale_factor ()); +# if defined (ghs) + ACE_UINT32 usec = usec64.lo(); +# else + ACE_UINT32 usec = (ACE_UINT32) usec64; +# endif + // (tick * usec/msec) / tick/msec = usec + usec = (usec * 1000) / (ACE_UINT32) global_scale_factor (); tv.usec ((msec * 1000) + usec); #else tv.usec ((long) ((hrt - tmp) / global_scale_factor ())); diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 2d4cbd96813..35e8371d153 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -89,7 +89,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::remap (EXCEPTION_POINTERS *ep) // ACE_MMap_Memory_Pool. if (this->allocator_->alloc ().memory_pool ().remap (addr) == -1) // Kick it upstairs... - return (DWORD) EXCEPTION_CONTINUE_SEARCH; + return EXCEPTION_CONTINUE_SEARCH; #if __X86__ // This is 80x86-specific. @@ -100,7 +100,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::remap (EXCEPTION_POINTERS *ep) ep->ContextRecord->IntT5 = ep->ContextRecord->IntA0 + 3; #endif /* __X86__ */ // Resume execution at the original point of "failure." - return (DWORD) EXCEPTION_CONTINUE_EXECUTION; + return EXCEPTION_CONTINUE_EXECUTION; } #endif /* ACE_WIN32 */ diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp index bf7d22d0b01..86d0078f62b 100644 --- a/ace/Memory_Pool.cpp +++ b/ace/Memory_Pool.cpp @@ -200,7 +200,7 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name, ACE_DEFAULT_BACKING_STORE); #else /* ACE_DEFAULT_BACKING_STORE */ if (ACE_Lib_Find::get_temp_dir (this->backing_store_name_, - MAXPATHLEN - 17) == -1) + MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX { ACE_ERROR ((LM_ERROR, @@ -1165,7 +1165,6 @@ int ACE_Pagefile_Memory_Pool::map (int &first_time, int append_bytes) { - int mem_offset = 0; int map_size; void *map_addr; @@ -1282,8 +1281,6 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, + ACE_Pagefile_Memory_Pool::round_to_chunk_size (append_bytes); - mem_offset = - this->local_cb_.sh_.mapped_size_; map_addr = (void *)((char *) this->shared_cb_ + this->local_cb_.sh_.mapped_size_); diff --git a/ace/NT_Service.cpp b/ace/NT_Service.cpp index b65b24e0ee2..0fbfb41dd58 100644 --- a/ace/NT_Service.cpp +++ b/ace/NT_Service.cpp @@ -54,18 +54,18 @@ ACE_NT_Service::open (void *args) report_status (SERVICE_START_PENDING, 0); int svc_return = this->svc (); - if (svc_return == 0) + if (svc_return == 0) { this->svc_status_.dwWin32ExitCode = NO_ERROR; this->svc_status_.dwServiceSpecificExitCode = 0; } - else + else { - if (errno == 0) + if (errno == 0) { this->svc_status_.dwWin32ExitCode = GetLastError (); } - else + else { this->svc_status_.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; this->svc_status_.dwServiceSpecificExitCode = errno; @@ -81,7 +81,7 @@ ACE_NT_Service::open (void *args) void ACE_NT_Service::handle_control (DWORD control_code) { - switch(control_code) + switch(control_code) { case SERVICE_CONTROL_SHUTDOWN: case SERVICE_CONTROL_STOP: @@ -179,13 +179,13 @@ ACE_NT_Service::insert (DWORD start_type, if (exe_path == 0) { - if (ACE_TEXT_GetModuleFileName (0, this_exe, sizeof this_exe) == 0) + if (ACE_TEXT_GetModuleFileName (0, this_exe, sizeof this_exe) == 0) return -1; exe_path = this_exe; } - SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (), - 0, + SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (), + 0, SC_MANAGER_ALL_ACCESS); if (sc_mgr == 0) return -1; @@ -201,7 +201,7 @@ ACE_NT_Service::insert (DWORD start_type, group_name, tag_id, dependencies, - account_name, + account_name, password); CloseServiceHandle (sc_mgr); if (sh == 0) @@ -219,7 +219,7 @@ ACE_NT_Service::remove (void) if (this->svc_sc_handle () == 0) return -1; - if (DeleteService (this->svc_sc_handle()) == 0 + if (DeleteService (this->svc_sc_handle()) == 0 && GetLastError () != ERROR_SERVICE_MARKED_FOR_DELETE) return -1; @@ -264,14 +264,19 @@ ACE_NT_Service::startup (void) SC_HANDLE svc = this->svc_sc_handle (); if (svc == 0) - return -1; - + { + // To distinguish this error from the QueryServiceConfig failure + // below, return the DWORD equivalent of -2, rather than -1. + return MAXDWORD - 1; + } cfgsize = sizeof cfgbuff; cfg = (LPQUERY_SERVICE_CONFIG) cfgbuff; BOOL ok = QueryServiceConfig (svc, cfg, cfgsize, &needed_size); if (ok) return cfg->dwStartType; - return 0; + // Zero is a valid return value for QueryServiceConfig, so if + // QueryServiceConfig fails, return the DWORD equivalent of -1. + return MAXDWORD; } @@ -438,7 +443,7 @@ ACE_NT_Service::report_status (DWORD new_status, if (new_status != 0) this->svc_status_.dwCurrentState = new_status; - switch (this->svc_status_.dwCurrentState) + switch (this->svc_status_.dwCurrentState) { case SERVICE_START_PENDING: save_controls = this->svc_status_.dwControlsAccepted; diff --git a/ace/OS.cpp b/ace/OS.cpp index 4a0b1be6ed0..b6def44ae7d 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -241,8 +241,13 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Time_Value) // // In the beginning (Jan. 1, 1601), there was no time and no computer. // And Bill said: "Let there be time," and there was time.... +# if defined (ghs) +const ACE_U_LongLong ACE_Time_Value::FILETIME_to_timval_skew = +ACE_U_LongLong (0xd53e8000, 0x19db1de); +# else const DWORDLONG ACE_Time_Value::FILETIME_to_timval_skew = ACE_INT64_LITERAL (0x19db1ded53e8000); +# endif ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) { @@ -253,6 +258,14 @@ ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) void ACE_Time_Value::set (const FILETIME &file_time) { // Initializes the ACE_Time_Value object from a Win32 FILETIME +#if defined (ghs) + ACE_U_LongLong LL_100ns(file_time.dwLowDateTime, file_time.dwHighDateTime); + LL_100ns -= ACE_Time_Value::FILETIME_to_timval_skew; + // Convert 100ns units to seconds; + this->tv_.tv_sec = (long) (LL_100ns / ((double) (10000 * 1000))); + // Convert remainder to microseconds; + this->tv_.tv_usec = (long)((LL_100ns % ((ACE_UINT32)(10000 * 1000))) / 10); +#else ULARGE_INTEGER _100ns = { file_time.dwLowDateTime, @@ -264,21 +277,32 @@ void ACE_Time_Value::set (const FILETIME &file_time) this->tv_.tv_sec = (long) (_100ns.QuadPart / (10000 * 1000)); // Convert remainder to microseconds; this->tv_.tv_usec = (long) ((_100ns.QuadPart % (10000 * 1000)) / 10); +#endif // ghs } // Returns the value of the object as a Win32 FILETIME. ACE_Time_Value::operator FILETIME () const { + FILETIME file_time; ACE_OS_TRACE ("ACE_Time_Value::operator FILETIME"); + +#if defined (ghs) + ACE_U_LongLong LL_sec(this->tv_.tv_sec); + ACE_U_LongLong LL_usec(this->tv_.tv_usec); + ACE_U_LongLong LL_100ns = + LL_sec * (ACE_UINT32)(10000 * 1000) + LL_usec * (ACE_UINT32)10; + file_time.dwLowDateTime = LL_100ns.lo(); + file_time.dwHighDateTime = LL_100ns.hi(); +#else ULARGE_INTEGER _100ns; _100ns.QuadPart = (((DWORDLONG) this->tv_.tv_sec * (10000 * 1000) + this->tv_.tv_usec * 10) + ACE_Time_Value::FILETIME_to_timval_skew); - FILETIME file_time; file_time.dwLowDateTime = _100ns.LowPart; file_time.dwHighDateTime = _100ns.HighPart; +#endif //ghs return file_time; } @@ -430,7 +454,6 @@ ACE_OS_Exit_Info::call_hooks () (* ACE_reinterpret_cast (ACE_EXIT_HOOK, info.cleanup_hook_)) (); else (*info.cleanup_hook_) (info.object_, info.param_); - } } @@ -600,7 +623,11 @@ ACE_OS::uname (struct utsname *name) ACE_TCHAR processor[bufsize] = ACE_LIB_TEXT ("Unknown"); ACE_TCHAR subtype[bufsize] = ACE_LIB_TEXT ("Unknown"); - WORD arch = sinfo.wProcessorArchitecture; +# if defined (ghs) + WORD arch = sinfo.u.s.wProcessorArchitecture; +# else + WORD arch = sinfo.wProcessorArchitecture; +# endif switch (arch) { @@ -2402,8 +2429,11 @@ HANDLE WINAPI __IBMCPP__beginthreadex(void *stack, #define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ CreateThread (NULL, STACKSIZE, (unsigned long (__stdcall *) (void *)) ENTRY_POINT, ARGS, (FLAGS) & CREATE_SUSPENDED, (unsigned long *) THR_ID) #else +// Green Hills compiler gets confused when __stdcall is imbedded in parameter list, +// so we define the type ACE_WIN32THRFUNC_T and use it instead. + typedef unsigned (__stdcall *ACE_WIN32THRFUNC_T)(void*); #define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ - ::_beginthreadex (STACK, STACKSIZE, (unsigned (__stdcall *) (void *)) ENTRY_POINT, ARGS, FLAGS, (unsigned int *) THR_ID) + ::_beginthreadex (STACK, STACKSIZE, (ACE_WIN32THRFUNC_T) ENTRY_POINT, ARGS, FLAGS, (unsigned int *) THR_ID) #endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */ #if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) @@ -3785,9 +3815,9 @@ ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data) // If we are using TSS emulation then we shuld use ACE's implementation // of it and not make any PACE calls. #if defined (ACE_HAS_PACE) && !defined (ACE_HAS_TSS_EMULATION) -# if defined (ACE_WIN32) +# if defined (ACE_WIN32) int ace_result_ = 0; -# endif /* ACE_WIN32 */ +# endif /* ACE_WIN32 */ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_setspecific (key, data), ace_result_), int, -1); @@ -3969,9 +3999,9 @@ ACE_OS::thr_keycreate (ACE_thread_key_t *key, // of it and not make any PACE calls. #if defined (ACE_HAS_PACE) && !defined (ACE_HAS_TSS_EMULATION) && !defined (ACE_WIN32) ACE_UNUSED_ARG (inst); -# if defined (ACE_WIN32) +# if defined (ACE_WIN32) int ace_result_ = 0; -# endif /* ACE_WIN32 */ +# endif /* ACE_WIN32 */ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pace_pthread_key_create (key, dest), ace_result_), int, -1); @@ -4447,7 +4477,7 @@ ACE_OS::write_n (ACE_HANDLE handle, // "Fake" writev for operating systems without it. Note that this is // thread-safe. -int +int ACE_OS::writev_emulation (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n) { ACE_OS_TRACE ("::writev"); @@ -1062,6 +1062,10 @@ ACE_OS_Export ACE_Time_Value operator + (const ACE_Time_Value &tv1, ACE_OS_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); +// This forward declaration is needed by the set() and FILETIME() functions +#if defined (ghs) + class ACE_Export ACE_U_LongLong; +#endif //ghs // ------------------------------------------------------------------- /** @@ -1216,7 +1220,11 @@ public: # if defined (ACE_WIN32) /// Const time difference between FILETIME and POSIX time. +# if defined (ghs) + static const ACE_U_LongLong FILETIME_to_timval_skew; +# else static const DWORDLONG FILETIME_to_timval_skew; +# endif // ghs # endif /* ACE_WIN32 */ private: @@ -1490,209 +1498,55 @@ private: ACE_Time_Value *max_wait_time_; # undef ctime # endif /* ACE_HAS_BROKEN_CTIME */ -/// Service Objects, i.e., objects dynamically loaded via the service -/// configurator, must provide a destructor function with the -/// following prototype to perform object cleanup. extern "C" { typedef void (*ACE_Service_Object_Exterminator)(void *); } -/** @name Service Configurator macros - * - * The following macros are used to define helper objects used in - * ACE's Service Configurator. This is an implementation of the - * Service Configurator pattern: - * - * http://www.cs.wustl.edu/~schmidt/PDF/SvcConf.pdf - * - * The intent of this pattern is to allow developers to dynamically - * load and configure services into a system. With a little help from - * this macros statically linked services can also be dynamically - * configured. - * - * More details about this component are available in the documentation - * of the ACE_Service_Configurator class and also - * ACE_Dynamic_Service. - * - * Notice that in all the macros the SERVICE_CLASS parameter must be - * the name of a class derived from ACE_Service_Object. - */ -//@{ -/// Declare a the data structure required to register a statically -/// linked service into the service configurator. -/** - * The macro should be used in the header file where the service is - * declared, its only argument is usually the name of the class that - * implements the service. - * - * @param SERVICE_CLASS The name of the class implementing the - * service. - */ -# define ACE_STATIC_SVC_DECLARE(SERVICE_CLASS) \ -extern ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS ; - -/// As ACE_STATIC_SVC_DECLARE, but using an export macro for NT -/// compilers. -/** - * NT compilers require the use of explicit directives to export and - * import symbols from a DLL. If you need to define a service in a - * dynamic library you should use this version instead. - * Normally ACE uses a macro to inject the correct export/import - * directives on NT. Naturally it also the macro expands to a blank - * on platforms that do not require such directives. - * The first argument (EXPORT_NAME) is the prefix for this export - * macro, the full name is formed by appending _Export. - * ACE provides tools to generate header files that define the macro - * correctly on all platforms, please see - * $ACE_ROOT/bin/generate_export_file.pl - * - * @param EXPORT_NAME The export macro name prefix. - * @param SERVICE_CLASS The name of the class implementing the service. - */ -#define ACE_STATIC_SVC_DECLARE_EXPORT(EXPORT_NAME,SERVICE_CLASS) \ -extern EXPORT_NAME##_Export ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS; +// Static service macros +# define ACE_STATIC_SVC_DECLARE(X) \ +extern ACE_Static_Svc_Descriptor ace_svc_desc_##X ; +#define ACE_STATIC_SVC_DECLARE_EXPORT(CLS,X) \ +extern CLS##_Export ACE_Static_Svc_Descriptor ace_svc_desc_##X; +# define ACE_STATIC_SVC_DEFINE(X, NAME, TYPE, FN, FLAGS, ACTIVE) \ +ACE_Static_Svc_Descriptor ace_svc_desc_##X = { NAME, TYPE, FN, FLAGS, ACTIVE }; -/// Define the data structure used to register a statically linked -/// service into the Service Configurator. -/** - * The service configurator requires several arguments to build and - * control an statically linked service, including its name, the - * factory function used to construct the service, and some flags. - * All those parameters are configured in a single structure, an - * instance of this structure is statically initialized using the - * following macro. - * - * @param SERVICE_CLASS The name of the class that implements the - * service, must derive from ACE_Service_Configurator. - * @param NAME The name for this service, this name is used by the - * service configurator to match configuration options provided in - * the svc.conf file. - * @param TYPE The type of object. Objects can be streams or service - * objects. Please read the ACE_Service_Configurator and ASX - * documentation for more details. - * @param FN The name of the factory function, usually the - * ACE_SVC_NAME macro can be used to generate the name. The - * factory function is often defined using ACE_FACTORY_DECLARE and - * ACE_FACTORY_DEFINE. - * @param FLAGS Flags to control the ownership and lifecycle of the - * object. Please read the ACE_Service_Configurator documentation - * for more details. - * @param ACTIVE If not zero then a thread will be dedicate to the - * service. Please read the ACE_Service_Configurator documentation - * for more details. - */ -#define ACE_STATIC_SVC_DEFINE(SERVICE_CLASS, NAME, TYPE, FN, FLAGS, ACTIVE) \ -ACE_Static_Svc_Descriptor ace_svc_desc_##SERVICE_CLASS = { NAME, TYPE, FN, FLAGS, ACTIVE }; - -/// Automatically register a service with the service configurator -/** - * In some applications the services must be automatically registered - * with the service configurator, before main() starts. - * The ACE_STATIC_SVC_REQUIRE macro defines a class whose constructor - * register the service, it also defines a static instance of that - * class to ensure that the service is registered before main. - * - * On platforms that lack adequate support for static C++ objects the - * macro ACE_STATIC_SVC_REGISTER can be used to explicitly register - * the service. - * - * @todo One class per-Service_Object seems wasteful. It should be - * possible to define a single class and re-use it for all the - * service objects, just by passing the Service_Descriptor as an - * argument to the constructor. - */ #if defined(ACE_LACKS_STATIC_CONSTRUCTORS) -# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\ -class ACE_Static_Svc_##SERVICE_CLASS {\ +# define ACE_STATIC_SVC_REQUIRE(X)\ +class ACE_Static_Svc_##X {\ public:\ - ACE_Static_Svc_##SERVICE_CLASS() { \ - ACE_Service_Config::static_svcs ()->insert (\ - &ace_svc_desc_##SERVICE_CLASS); \ - } \ + ACE_Static_Svc_##X() { ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_##X); }\ }; -#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS)\ -ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS +#define ACE_STATIC_SVC_REGISTER(X)\ +ACE_Static_Svc_##X ace_static_svc_##X #else /* !ACE_LACKS_STATIC_CONSTRUCTORS */ -# define ACE_STATIC_SVC_REQUIRE(SERVICE_CLASS)\ -class ACE_Static_Svc_##SERVICE_CLASS {\ +# define ACE_STATIC_SVC_REQUIRE(X)\ +class ACE_Static_Svc_##X {\ public:\ - ACE_Static_Svc_##SERVICE_CLASS() { \ - ACE_Service_Config::static_svcs ()->insert (\ - &ace_svc_desc_##SERVICE_CLASS); \ - } \ + ACE_Static_Svc_##X() { ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_##X); }\ };\ -static ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS; -#define ACE_STATIC_SVC_REGISTER(SERVICE_CLASS) do {} while (0) +static ACE_Static_Svc_##X ace_static_svc_##X; +#define ACE_STATIC_SVC_REGISTER(X) do {} while (0) #endif /* !ACE_LACKS_STATIC_CONSTRUCTORS */ -/// Declare the factory method used to create dynamically loadable -/// services. -/** - * Once the service implementation is dynamically loaded the Service - * Configurator uses a factory method to create the object. - * This macro declares such a factory function with the proper - * interface and export macros. - * Normally used in the header file that declares the service - * implementation. - * - * @param CLS must match the prefix of the export macro used for this - * service. - * @param SERVICE_CLASS must match the name of the class that - * implements the service. - * - */ -#define ACE_FACTORY_DECLARE(CLS,SERVICE_CLASS) \ -extern "C" CLS##_Export ACE_Service_Object *\ -_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *); - -/// Define the factory method (and destructor) for a dynamically -/// loadable service. -/** - * Use with arguments matching ACE_FACTORY_DECLARE. - * Normally used in the .cpp file that defines the service - * implementation. - * - * This macro defines both the factory method and the function used to - * cleanup the service object. - */ -# define ACE_FACTORY_DEFINE(CLS,SERVICE_CLASS) \ -extern "C" void _gobble_##SERVICE_CLASS (void *p) { \ +// More generic dynamic/static service macros. +# define ACE_FACTORY_DECLARE(CLS,X) extern "C" CLS##_Export ACE_Service_Object *_make_##X (ACE_Service_Object_Exterminator *); +# define ACE_FACTORY_DEFINE(CLS,X) \ +extern "C" void _gobble_##X (void *p) { \ ACE_Service_Object *_p = ACE_reinterpret_cast (ACE_Service_Object *, p); \ ACE_ASSERT (_p != 0); \ delete _p; } \ -extern "C" ACE_Service_Object *\ -_make_##SERVICE_CLASS (ACE_Service_Object_Exterminator *gobbler) \ -{ \ - ACE_TRACE (#SERVICE_CLASS); \ - if (gobbler != 0) \ - *gobbler = (ACE_Service_Object_Exterminator) _gobble_##SERVICE_CLASS; \ - return new SERVICE_CLASS; \ -} +extern "C" ACE_Service_Object *_make_##X (ACE_Service_Object_Exterminator *gobbler) \ +{ ACE_TRACE (#X); \ +if (gobbler != 0) *gobbler = (ACE_Service_Object_Exterminator) _gobble_##X; return new X; } -/// The canonical name for a service factory method -#define ACE_SVC_NAME(SERVICE_CLASS) _make_##SERVICE_CLASS - -/// The canonical way to invoke (i.e. construct) a service factory -/// method. -#define ACE_SVC_INVOKE(SERVICE_CLASS) _make_##SERVICE_CLASS (0) - -//@} - -/** @name Helper macros for services defined in the netsvcs library. - * - * The ACE services defined in netsvcs use this helper macros for - * simplicity. - * - * @todo The macros should be moved into the netsvcs library, they - * have no place in ace/OS.h - */ -//@{ +// Dynamic/static service macros. # define ACE_SVC_FACTORY_DECLARE(X) ACE_FACTORY_DECLARE (ACE_Svc, X) +# define ACE_SVC_INVOKE(X) _make_##X (0) +# define ACE_SVC_NAME(X) _make_##X # define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X) -//@} # if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) # define ACE_TSS_TYPE(T) ACE_TSS< T > @@ -1900,7 +1754,7 @@ struct stat #else # if defined (ACE_HAS_EXCEPTIONS) # define ACE_THROW_SPEC(X) throw X -# if defined (ACE_WIN32) +# if defined (ACE_WIN32) && !defined (ghs) // @@ MSVC "supports" the keyword but doesn't implement it (Huh?). // Therefore, we simply supress the warning for now. # pragma warning( disable : 4290 ) @@ -2905,8 +2759,8 @@ typedef unsigned int size_t; typedef off64_t ACE_LOFF_T; # elif defined (__sun) typedef offset_t ACE_LOFF_T; -# elif defined (WIN32) //Add by Nick Lin -- for win32 llseek - typedef __int64 ACE_LOFF_T; //Add by Nick Lin -- for win32 llseek +# elif defined (WIN32) //Add by Nick Lin -- for win32 llseek + typedef __int64 ACE_LOFF_T; //Add by Nick Lin -- for win32 llseek # else typedef loff_t ACE_LOFF_T; # endif @@ -3101,7 +2955,7 @@ typedef void (*ACE_SignalHandlerV)(...); // Turn off warnings for /W4 // To resume any of these warning: #pragma warning(default: 4xxx) // which should be placed after these defines -# ifndef ALL_WARNINGS +# if !defined (ALL_WARNINGS) && !defined(ghs) // #pragma warning(disable: 4101) // unreferenced local variable # pragma warning(disable: 4127) /* constant expression for TRACE/ASSERT */ # pragma warning(disable: 4134) /* message map member fxn casts */ @@ -3342,12 +3196,17 @@ typedef HANDLE ACE_hthread_t; typedef DWORD ACE_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ +# if !defined (ghs) // 64-bit quad-word definitions. typedef unsigned __int64 ACE_QWORD; typedef unsigned __int64 ACE_hrtime_t; inline ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi) { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); } inline DWORD ACE_LOW_DWORD (ACE_QWORD q) { return (DWORD) q; } inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); } +# else +// Can't find ANY place that ACE_QWORD is used, but hrtime_t is. +typedef ACE_UINT64 ACE_hrtime_t; +# endif // Win32 dummies to help compilation. @@ -951,8 +951,11 @@ ACE_OS::gettimeofday (void) { // ACE_OS_TRACE ("ACE_OS::gettimeofday"); +#if !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32) timeval tv; int result = 0; +#endif // !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32) + #if (0) struct timespec ts; @@ -1001,11 +1004,13 @@ ACE_OS::gettimeofday (void) # else ACE_OSCALL (::gettimeofday (&tv), int, -1, result); # endif /* ACE_HAS_SVR4_GETTIMEOFDAY */ -#endif /* ACE_HAS_PACE */ +#endif /* 0 */ +#if !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32) if (result == -1) return -1; else return ACE_Time_Value (tv); +#endif // !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32) } ACE_INLINE int @@ -3597,8 +3602,8 @@ ACE_OS::sema_post (ACE_sema_t *s, size_t release_count) // Win32 supports this natively. # if defined (ACE_HAS_PACE) ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*(s->sema_), - release_count, 0), ace_result_), - int, -1); + release_count, 0), ace_result_), + int, -1); # else ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, release_count, 0), ace_result_), int, -1); @@ -10305,7 +10310,7 @@ ACE_OS::dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle) #endif /* ACE_HAS_PACE */ } -#if defined (ghs) && defined (ACE_HAS_PENTIUM) +#if defined (ghs) && defined (ACE_HAS_PENTIUM) && !defined (ACE_WIN32) extern "C" ACE_hrtime_t ACE_gethrtime (); #endif /* ghs && ACE_HAS_PENTIUM */ @@ -10324,7 +10329,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) ::time_base_to_time(&tb, TIMEBASE_SZ); return ACE_hrtime_t(tb.tb_high) * ACE_ONE_SECOND_IN_NSECS + tb.tb_low; -#elif defined (ghs) && defined (ACE_HAS_PENTIUM) +#elif defined (ghs) && defined (ACE_HAS_PENTIUM) && !defined (ACE_WIN32) ACE_UNUSED_ARG (op); // Use .obj/gethrtime.o, which was compiled with g++. return ACE_gethrtime (); @@ -10376,7 +10381,12 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) ::QueryPerformanceCounter (&freq); +# if defined (ghs) + ACE_UINT64 uint64_freq(freq.u.LowPart, ACE_static_cast (unsigned int, freq.u.HighPart)); + return uint64_freq; +# else return freq.QuadPart; +# endif //ghs #elif defined (CHORUS) if (op == ACE_OS::ACE_HRTIMER_GETTIME) @@ -10700,7 +10710,7 @@ ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence) #elif defined (ACE_HAS_LSEEK64) ACE_OSCALL_RETURN (::lseek64 (handle, offset, whence), ACE_LOFF_T, -1); #elif defined (ACE_HAS_LLSEEK) - # if defined (ACE_WIN32) + # if defined (ACE_WIN32) ACE_OSCALL_RETURN (::_lseeki64 (int (handle), offset, whence), ACE_LOFF_T, -1); # else ACE_OSCALL_RETURN (::llseek (handle, offset, whence), ACE_LOFF_T, -1); diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp index cce3aa3f349..5d90e221e86 100644 --- a/ace/Process_Manager.cpp +++ b/ace/Process_Manager.cpp @@ -809,8 +809,15 @@ ACE_Process_Manager::wait (pid_t pid, pid = 0; else { + // Green Hills produces a warning that result >= WAIT_OBJECT_0 is + // a pointless comparison because WAIT_OBJECT_0 is zero and DWORD is + // unsigned long, so this test is skipped for Green Hills. +# if defined (ghs) + ACE_ASSERT (result < WAIT_OBJECT_0 + current_count_); +# else ACE_ASSERT (result >= WAIT_OBJECT_0 && result < WAIT_OBJECT_0 + current_count_); +# endif idx = this->find_proc (handles[result - WAIT_OBJECT_0]); diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp index abc017ccfba..1ffbea072a9 100644 --- a/ace/Profile_Timer.cpp +++ b/ace/Profile_Timer.cpp @@ -302,9 +302,11 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_hrtime_t delta_t; // nanoseconds timer_.elapsed_time (delta_t); - +#if !defined (ghs) et.real_time = (__int64) delta_t / (double) ACE_ONE_SECOND_IN_NSECS; - +#else + et.real_time = delta_t / (double) ACE_ONE_SECOND_IN_NSECS; +#endif # if defined (ACE_HAS_GETRUSAGE) ACE_Time_Value atv = ACE_Time_Value (this->end_usage_.ru_utime) - ACE_Time_Value (this->begin_usage_.ru_utime); diff --git a/ace/Sock_Connect.cpp b/ace/Sock_Connect.cpp index bc0a9098fd5..f5e094a52ab 100644 --- a/ace/Sock_Connect.cpp +++ b/ace/Sock_Connect.cpp @@ -13,7 +13,8 @@ ACE_RCSID(ace, Sock_Connect, "$Id$") -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && \ +(!defined (ACE_HAS_WINSOCK2) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 0))) // Return value in buffer for a key/name pair from the Windows // Registry up to buf_len size. @@ -51,7 +52,7 @@ get_reg_value (const ACE_TCHAR *key, ::RegCloseKey (hk); return 0; } -#endif /* ACE_WIN32 */ +#endif //(ACE_WIN32) && !(ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 0) // Bind socket to an unused port. diff --git a/ace/Stats.cpp b/ace/Stats.cpp index 321649eba77..b2ee81353bd 100644 --- a/ace/Stats.cpp +++ b/ace/Stats.cpp @@ -478,7 +478,7 @@ ACE_Throughput_Stats::sample (ACE_UINT64 throughput, void ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs) { - if (rhs.samples_count () == 0) + if (rhs.samples_count () == 0u) return; this->ACE_Basic_Stats::accumulate (rhs); diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp index dfe492f9dc6..49dfe218241 100644 --- a/ace/WFMO_Reactor.cpp +++ b/ace/WFMO_Reactor.cpp @@ -1612,7 +1612,7 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time, int timeout = max_wait_time == 0 ? INFINITE : max_wait_time->msec (); // Atomically wait for both the <lock_> and <ok_to_wait_> event - int result = 0; + DWORD result = 0; while (1) { #if defined (ACE_HAS_PHARLAP) @@ -1721,7 +1721,7 @@ ACE_WFMO_Reactor::dispatch (int wait_status) // Expire timers handlers_dispatched += this->expire_timers (); - switch (wait_status) + switch ((DWORD)wait_status) { case WAIT_FAILED: // Failure. ACE_OS::set_errno_to_last_error (); @@ -1763,8 +1763,8 @@ ACE_WFMO_Reactor::dispatch_handles (size_t wait_status) number_of_handlers_dispatched++) { bool ok = ( -#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530)) - // wait_status is unsigned in Borland; +#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530)) && !defined (ghs) + // wait_status is unsigned in Borland and Green Hills; // This >= is always true, with a warning. wait_status >= WAIT_OBJECT_0 && #endif diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index f47959bfb7d..438b3e7b172 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -225,7 +225,10 @@ #define ACE_HAS_VFWPRINTF #define ACE_SIZEOF_LONG_LONG 8 +// Green Hills Native x86 does not support __int64 keyword +#if !defined (ghs) typedef unsigned __int64 ACE_UINT64; +#endif // (ghs) // Optimize ACE_Handle_Set for select(). #define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT diff --git a/ace/config-win32-ghs.h b/ace/config-win32-ghs.h new file mode 100644 index 00000000000..1e999f4a105 --- /dev/null +++ b/ace/config-win32-ghs.h @@ -0,0 +1,110 @@ +// -*- C++ -*- +// $Id$ + +// The following configuration file contains defines for Green Hills compilers. + +#ifndef ACE_WIN32_GHS_H +#define ACE_WIN32_GHS_H +#include "ace/pre.h" + +#if defined (ghs) + +#ifndef WIN32 +# define WIN32 +#endif /* WIN32 */ + +#undef _M_IX86 +// This turns on ACE_HAS_PENTIUM +#define _M_IX86 500 +// GHS does not provide DLL support +#define ACE_HAS_DLL 0 +#define TAO_HAS_DLL 0 +#undef _DLL +#define ACE_OS_HAS_DLL 0 + +# include "ace/config-win32-common.h" +//Green Hills Native x86 does not support structural exceptions +# undef ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS +# undef ACE_HAS_WCHAR +# define ACE_CONFIG_INCLUDE_GHS_COMMON +# include "ace/config-ghs-common.h" + +// Changed ACE_TEXT to ACE_LIB_TEXT in the following line +# define ACE_CC_NAME ACE_LIB_TEXT ("Green Hills C++") +# define ACE_CC_MAJOR_VERSION (1) +# define ACE_CC_MINOR_VERSION (8) +# define ACE_CC_BETA_VERSION (9) +# define ACE_CC_PREPROCESSOR "GCX.EXE" +# define ACE_CC_PREPROCESSOR_ARGS "-E" + +// GHS uses Microsoft's standard cpp library, which has auto_ptr. +# undef ACE_LACKS_AUTO_PTR +// Microsoft's standard cpp library auto_ptr doesn't have reset (). +# define ACE_AUTO_PTR_LACKS_RESET +// In earlier versions, the following line appeared in OS.cpp, +// but has been moved to config-win32.h. Since ghs does not use +// config-win32.h, the line must appear here. +#define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) STATUS) + +// This section below was extracted from config-win32-msvc +#define ACE_HAS_ITOA +#define ACE_ITOA_EQUIVALENT ::_itoa +#define ACE_STRCASECMP_EQUIVALENT ::_stricmp +#define ACE_STRNCASECMP_EQUIVALENT ::_strnicmp +#define ACE_WCSDUP_EQUIVALENT ::_wcsdup +// This section above was extracted from config-win32-msvc + +# define ACE_EXPORT_NESTED_CLASSES 1 +# define ACE_HAS_ANSI_CASTS 1 +# define ACE_HAS_CPLUSPLUS_HEADERS 1 +//# define ACE_HAS_EXCEPTIONS 1 +# define ACE_HAS_EXPLICIT_KEYWORD 1 +# define ACE_HAS_GNU_CSTRING_H 1 +# define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION 1 +# define ACE_HAS_MUTABLE_KEYWORD 1 +# define ACE_HAS_NONCONST_SELECT_TIMEVAL 1 +# define ACE_HAS_ONE_DEFINITION_RULE 1 +# define ACE_HAS_SIG_ATOMIC_T 1 +# define ACE_HAS_STANDARD_CPP_LIBRARY 1 +//# if (__BORLANDC__ <= 0x540) +//# define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION 1 +//# endif +# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION 1 +# define ACE_HAS_STDCPP_STL_INCLUDES 1 +# define ACE_HAS_STRERROR 1 +# define ACE_HAS_STRING_CLASS 1 +# define ACE_HAS_STRPTIME 1 +# define ACE_HAS_TEMPLATE_SPECIALIZATION 1 +# define ACE_HAS_TEMPLATE_TYPEDEFS 1 +# define ACE_HAS_TYPENAME_KEYWORD 1 +//# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION +# define ACE_HAS_USER_MODE_MASKS 1 +# define ACE_HAS_USING_KEYWORD 1 +# define ACE_LACKS_ACE_IOSTREAM 1 +//# define ACE_LACKS_LINEBUFFERED_STREAMBUF 1 +# define ACE_LACKS_MODE_MASKS 1 +# define ACE_LACKS_NATIVE_STRPTIME 1 +//# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE 1 +//# define ACE_LACKS_PRAGMA_ONCE 1 +# define ACE_LACKS_STRRECVFD 1 +//# define ACE_NEW_THROWS_EXCEPTIONS 1 +# define ACE_SIZEOF_LONG_DOUBLE 10 +# define ACE_TEMPLATES_REQUIRE_SOURCE 1 +// Changed ACE_TEXT to ACE_LIB_TEXT in the following two lines +# define ACE_UINT64_FORMAT_SPECIFIER ACE_LIB_TEXT ("%I64u") +# define ACE_INT64_FORMAT_SPECIFIER ACE_LIB_TEXT ("%I64d") +# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +// Set the following to zero to placate SString.h ACE_WString CTOR +# undef ACE_WSTRING_HAS_USHORT_SUPPORT + +/* need to ensure these are included before <iomanip> */ +# include <time.h> +# include <stdlib.h> + +# if !defined (ACE_LD_DECORATOR_STR) && defined (_DEBUG) +# define ACE_LD_DECORATOR_STR ACE_LIB_TEXT ("d") +# endif +#endif /* defined(ghs) */ + +#include "ace/post.h" +#endif /* ACE_WIN32_GHS_H */ |