diff options
author | Sergey Matveychuk <sem@FreeBSD.org> | 2004-12-07 13:32:53 +0000 |
---|---|---|
committer | Sergey Matveychuk <sem@FreeBSD.org> | 2004-12-07 13:32:53 +0000 |
commit | 7896da2ae56d92ab1f7b186534b7468df69ae86e (patch) | |
tree | 0fa3d86d0629e50ca7429e2530de7f08fc44eef5 /devel/ace+tao/files/patch-ae | |
parent | 6638a6806fa9543afa6f8b9412bd75095027a25a (diff) | |
download | ports-7896da2ae56d92ab1f7b186534b7468df69ae86e.tar.gz ports-7896da2ae56d92ab1f7b186534b7468df69ae86e.zip |
Notes
Diffstat (limited to 'devel/ace+tao/files/patch-ae')
-rw-r--r-- | devel/ace+tao/files/patch-ae | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/devel/ace+tao/files/patch-ae b/devel/ace+tao/files/patch-ae new file mode 100644 index 000000000000..9e5753df0db6 --- /dev/null +++ b/devel/ace+tao/files/patch-ae @@ -0,0 +1,123 @@ +--- ace/OS_NS_time.h.orig Thu Jun 11 23:14:04 1970 ++++ ace/OS_NS_time.h Mon Dec 6 02:46:06 2004 +@@ -4,7 +4,7 @@ + /** + * @file OS_NS_time.h + * +- * OS_NS_time.h,v 1.8 2004/06/20 16:51:08 jtc Exp ++ * $Id: OS_NS_time.h,v 1.12 2004/11/12 00:03:08 gmaxey Exp $ + * + * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> + * @author Jesper S. M|ller<stophph@diku.dk> +@@ -25,6 +25,7 @@ + # pragma once + # endif /* ACE_LACKS_PRAGMA_ONCE */ + ++#include "ace/OS_NS_errno.h" + #include "ace/Basic_Types.h" + #include "ace/os_include/os_time.h" + #include "ace/ACE_export.h" +@@ -105,10 +106,6 @@ + #endif /* ACE_PSOS_HAS_TIME */ + + #if defined (ACE_HAS_WINCE) +- /// Supporting data for ctime and ctime_r functions on WinCE. +- const wchar_t *day_of_week_name[7]; +- const wchar_t *month_name[12]; +- + // WinCE doesn't have most of the standard C library time functions. It + // also doesn't define struct tm. SYSTEMTIME has pretty much the same + // info though, so we can map it when needed. Define struct tm here and +@@ -137,48 +134,35 @@ + */ + inline long ace_timezone() + { +-#if !defined (VXWORKS) && !defined (ACE_PSOS) && !defined (CHORUS) +-# if defined (ACE_HAS_WINCE) ++#if defined (ACE_HAS_WINCE) + TIME_ZONE_INFORMATION tz; + GetTimeZoneInformation (&tz); + return tz.Bias * 60; +-# elif defined (ACE_WIN32) && !defined (ACE_HAS_DINKUM_STL) ++#elif defined (ACE_WIN32) && !defined (ACE_HAS_DINKUM_STL) + return _timezone; // For Win32. +-# elif defined (ACE_WIN32) && defined (ACE_HAS_DINKUM_STL) ++#elif defined (ACE_WIN32) && defined (ACE_HAS_DINKUM_STL) + time_t tod = time(0); // get current time + time_t t1 = mktime(gmtime(&tod)); // convert without timezone + time_t t2 = mktime(localtime(&tod)); // convert with timezone + return difftime(t1, t2); // compute difference in seconds +-# elif defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) \ +- && !defined (__linux__) \ +- && !defined (__FreeBSD__) \ +- && !defined (__NetBSD__) ++#elif defined (ACE_HAS_TIMEZONE) ++ // The XPG/POSIX specification requires that tzset() be called to ++ // set the global variable <timezone>. ++ ::tzset(); ++ return timezone; ++#elif defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) + // The XPG/POSIX specification does not require gettimeofday to + // set the timezone struct (it leaves the behavior of passing a +- // non-null struct undefined). We know gettimeofday() on Linux +- // *BSD systems does not set the timezone, so we avoid using it +- // and use the global variable <timezone> instead. +- // +- // @note As of this writing, OpenBSD does not provide the global +- // variable timezone. +- // +- // @todo It would be better if we had a feature test macro that +- // could be used instead of a list of operating systems. ++ // non-null struct undefined). + long result = 0; + struct timeval time; + struct timezone zone; + ACE_UNUSED_ARG (result); + ACE_OSCALL (::gettimeofday (&time, &zone), int, -1, result); + return zone.tz_minuteswest * 60; +-# else /* ACE_HAS_TIMEZONE_GETTIMEOFDAY */ +- // The XPG/POSIX specification requires that tzset() be called to +- // set the global variable <timezone>. +- ::tzset(); +- return timezone; +-# endif /* ACE_HAS_TIMEZONE_GETTIMEOFDAY */ +-#else ++#else + ACE_NOTSUP_RETURN (0); +-#endif /* !ACE_HAS_WINCE && !VXWORKS && !ACE_PSOS */ ++#endif + } + + +@@ -217,6 +201,8 @@ + # endif // ACE_LACKS_LONGLONG_T + # elif defined (ACE_PSOS) + typedef ACE_UINT64 ACE_hrtime_t; ++# elif defined (_TNS_R_TARGET) ++typedef long long ACE_hrtime_t; + # else /* !ACE_WIN32 && !ACE_PSOS */ + # if defined (ACE_HAS_HI_RES_TIMER) && !defined (ACE_LACKS_LONGLONG_T) + /* hrtime_t is defined on systems (Suns) with ACE_HAS_HI_RES_TIMER */ +@@ -227,8 +213,22 @@ + # endif /* ACE_WIN32 */ + + ++# if defined (ACE_HRTIME_T_IS_BASIC_TYPE) ++# define ACE_HRTIME_CONVERSION(VAL) (VAL) ++# define ACE_HRTIME_TO_U64(VAL) ACE_U_LongLong(VAL) ++# else ++# define ACE_HRTIME_CONVERSION(VAL) ACE_U64_TO_U32(VAL) ++# define ACE_HRTIME_TO_U64(VAL) (VAL) ++# endif ++ + + namespace ACE_OS { ++ ++# if defined (ACE_HAS_WINCE) ++ /// Supporting data for ctime and ctime_r functions on WinCE. ++ const wchar_t *day_of_week_name[]; ++ const wchar_t *month_name[]; ++# endif /* ACE_HAS_WINCE */ + + # if defined (CHORUS) && !defined (CHORUS_4) + // We must format this code as follows to avoid confusing OSE. |