From a3eb3ac3332c24f9af2d4c9ce9ab88aa958d35f9 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 29 Jan 2015 15:28:13 -0500 Subject: [svn-r26075] Removed (HD)BSDtimeofday and H5_HAVE_BSDGETTIMEOFDAY. This is an obsolete system call from Irix 5.3. Part of HDFFV-9085 Tested on: jam --- config/cmake/H5pubconf.h.in | 3 --- src/H5Omtime.c | 19 ++++--------------- src/H5private.h | 3 --- tools/perform/sio_standalone.h | 1 - vms/src/h5pubconf.h | 3 --- 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 7551df6..0455724 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -98,9 +98,6 @@ /* Define if the __attribute__(()) extension is present */ #cmakedefine H5_HAVE_ATTRIBUTE @H5_HAVE_ATTRIBUTE@ -/* Define to 1 if you have the `BSDgettimeofday' function. */ -#cmakedefine H5_HAVE_BSDGETTIMEOFDAY @H5_HAVE_BSDGETTIMEOFDAY@ - /* Define if the compiler understands C99 designated initialization of structs and unions */ #cmakedefine H5_HAVE_C99_DESIGNATED_INITIALIZER @H5_HAVE_C99_DESIGNATED_INITIALIZER@ diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 612d656..cdaad8a 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -200,8 +200,8 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, /* decode */ for(i = 0; i < 14; i++) - if(!HDisdigit(p[i])) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") + if(!HDisdigit(p[i])) + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") /* * Convert YYYYMMDDhhmmss UTC to a time_t. This is a little problematic @@ -219,7 +219,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, tm.tm_sec = (p[12]-'0')*10 + (p[13]-'0'); tm.tm_isdst = -1; /*figure it out*/ if((time_t)-1 == (the_time = HDmktime(&tm))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") #if defined(H5_HAVE_TM_GMTOFF) /* FreeBSD, OSF 4.0 */ @@ -230,15 +230,6 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, #elif defined(H5_HAVE_TIMEZONE) /* Linux libc-5 */ the_time -= timezone - (tm.tm_isdst?3600:0); -#elif defined(H5_HAVE_BSDGETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) - /* Irix5.3 */ - { - struct timezone tz; - - if(HDBSDgettimeofday(NULL, &tz) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information") - the_time -= tz.tz_minuteswest * 60 - (tm.tm_isdst ? 3600 : 0); - } #elif defined(H5_HAVE_GETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) && defined(H5_GETTIMEOFDAY_GIVES_TZ) { struct timezone tz; @@ -257,14 +248,12 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, * only way a user can get the modification time is from our internal * query routines, which can gracefully recover. */ - - /* Irix64 */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information") #endif /* The return value */ if(NULL == (mesg = H5FL_MALLOC(time_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") *mesg = the_time; /* Set return value */ diff --git a/src/H5private.h b/src/H5private.h index e7de94b..445e919 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -570,9 +570,6 @@ typedef struct { #ifndef HDatol #define HDatol(S) atol(S) #endif /* HDatol */ -#ifndef HDBSDgettimeofday - #define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P) -#endif /* HDBSDgettimeofday */ #ifndef HDbsearch #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) #endif /* HDbsearch */ diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index b2f8220..4eb1ded 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -87,7 +87,6 @@ #define HDatof(S) atof(S) #define HDatoi(S) atoi(S) #define HDatol(S) atol(S) -#define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P) #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) #define HDcalloc(N,Z) calloc(N,Z) #define HDceil(X) ceil(X) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 21986b3..634ee66 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -70,9 +70,6 @@ /* Define if the __attribute__(()) extension is present */ /* #undef H5_HAVE_ATTRIBUTE */ -/* Define to 1 if you have the `BSDgettimeofday' function. */ -/* #undef H5_HAVE_BSDGETTIMEOFDAY */ - /* Define if the compiler understands C99 designated initialization of structs and unions */ #define H5_HAVE_C99_DESIGNATED_INITIALIZER 1 -- cgit v0.12