diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-11-04 19:50:26 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-11-04 19:50:26 (GMT) |
commit | 5e37fd739c3a2c6332c5107bc2e3a481c86c251e (patch) | |
tree | 393950040e1798ab6db837b896f50a3d3ee0e52e | |
parent | 84b1e9e137fc5fd395556bcaaa50eef09bc8723c (diff) | |
download | hdf5-5e37fd739c3a2c6332c5107bc2e3a481c86c251e.zip hdf5-5e37fd739c3a2c6332c5107bc2e3a481c86c251e.tar.gz hdf5-5e37fd739c3a2c6332c5107bc2e3a481c86c251e.tar.bz2 |
[svn-r28275] Merge 28236 and 28241 from trunk to fix timezone and cmake issue on platypus.
-rw-r--r-- | src/H5Omtime.c | 2 | ||||
-rw-r--r-- | src/H5private.h | 8 | ||||
-rw-r--r-- | src/H5system.c | 8 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c index d8c5305..272e54a 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -226,7 +226,7 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 /* BSD-like systems */ the_time += tm.tm_gmtoff; #elif defined(H5_HAVE_TIMEZONE) - the_time -= HDget_timezone() - (tm.tm_isdst ? 3600 : 0); + the_time -= HDgettimezone() - (tm.tm_isdst ? 3600 : 0); #else /* * The catch-all. If we can't convert a character string universal diff --git a/src/H5private.h b/src/H5private.h index e24507f..911dbc8 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -974,6 +974,14 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifndef HDgets #define HDgets(S) gets(S) #endif /* HDgets */ +#ifndef H5_HAVE_TM_GMTOFF +#ifdef H5_HAVE_TIMEZONE + #ifndef HDgettimezone + #define HDgettimezone() HDget_timezone() + #endif /* HDgettimezone */ + H5_DLL long int HDget_timezone(void); +#endif /* H5_HAVE_TIMEZONE */ +#endif /* H5_HAVE_TM_GMTOFF */ #ifndef HDgettimeofday #define HDgettimeofday(S,P) gettimeofday(S,P) #endif /* HDgettimeofday */ diff --git a/src/H5system.c b/src/H5system.c index ff2a62b..5bca82a 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -661,24 +661,28 @@ Nflock(int fd, int operation) { * *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_TM_GMTOFF #ifdef H5_HAVE_TIMEZONE -long HDget_timezone(void) +long int HDget_timezone(void) { +#ifdef H5_HAVE_VISUAL_STUDIO #if _MSC_VER >= 1900 /* VS 2015 */ /* In gcc and in Visual Studio prior to VS 2015 'timezone' is a global * variable declared in time.h. That variable was deprecated and in * VS 2015 is removed, with _get_timezone replacing it. */ - long timezone = 0; + long int timezone = 0; #define HDget_timezone(V) _get_timezone(V); HDget_timezone(&timezone); #endif +#endif return timezone; } #endif /* H5_HAVE_TIMEZONE */ +#endif /* H5_HAVE_TM_GMTOFF */ /*------------------------------------------------------------------------- * Function: Wgettimeofday |