diff options
-rw-r--r-- | src/H5.c | 12 | ||||
-rw-r--r-- | src/H5private.h | 4 |
2 files changed, 14 insertions, 2 deletions
@@ -830,6 +830,18 @@ HDvsnprintf(char *buf, size_t UNUSED size, const char *fmt, va_list ap) #endif /* H5_HAVE_VSNPRINTF */ #endif /* __PUMAGON__ */ +#ifndef H5_HAVE_ALARM +#ifdef WIN32 +unsigned int HDalarm(N) { + return 0; +} +#endif +#else +unsigned int HDalarm(unsigned int N) { + return alarm(N); +} +#endif + /*------------------------------------------------------------------------- * Function: HDfprintf diff --git a/src/H5private.h b/src/H5private.h index 22ad61f..11ff2f6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -545,7 +545,6 @@ H5_DLL void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds); #define HDabs(X) abs(X) #define HDaccess(F,M) access(F, M) #define HDacos(X) acos(X) -#define HDalarm(N) alarm(N) #define HDasctime(T) asctime(T) #define HDasin(X) asin(X) #define HDassert(X) assert(X) @@ -1394,6 +1393,7 @@ H5_DLL int H5S_term_interface(void); H5_DLL int H5T_term_interface(void); H5_DLL int H5Z_term_interface(void); - +/* Define alarm function since windows doesn't support alarm function*/ +H5_DLL unsigned int HDalarm(unsigned int N); #endif |