From 25b5aa05f34d2cdb450d5790145ce53f16cc068a Mon Sep 17 00:00:00 2001 From: Fang Guo Date: Thu, 29 Sep 2005 12:34:18 -0500 Subject: [svn-r11480] Purpose: Maintenance on Windows Description: No alarm function on Windows, opt out Solution: Platforms tested: MSVS 6.0 on Windows XP Misc. update: --- src/H5.c | 12 ++++++++++++ src/H5private.h | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/H5.c b/src/H5.c index cd4d2a2..51f81ea 100644 --- a/src/H5.c +++ b/src/H5.c @@ -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 -- cgit v0.12