summaryrefslogtreecommitdiffstats
path: root/src/H5system.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-10-27 15:22:09 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-10-27 15:22:09 (GMT)
commit3537b69b5b57ac476bec26dd84be88a7c14123b3 (patch)
tree35bc6a430ceb18e954308b6f0fb727323d931801 /src/H5system.c
parent8e179b17aadbf8e011e59224270920878499dfa1 (diff)
downloadhdf5-3537b69b5b57ac476bec26dd84be88a7c14123b3.zip
hdf5-3537b69b5b57ac476bec26dd84be88a7c14123b3.tar.gz
hdf5-3537b69b5b57ac476bec26dd84be88a7c14123b3.tar.bz2
[svn-r28236] Rework get timezone function to add another exclusion define (H5_HAVA_TM_GMTOFF).
Also needed to add prototype - followed lead of HDrand. Tested linux and windows
Diffstat (limited to 'src/H5system.c')
-rw-r--r--src/H5system.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5system.c b/src/H5system.c
index fc01366..0de920c 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -599,24 +599,28 @@ void HDsrand(unsigned int seed)
*
*-------------------------------------------------------------------------
*/
+#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