summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFang Guo <fangguo@ncsa.uiuc.edu>2005-09-29 17:34:18 (GMT)
committerFang Guo <fangguo@ncsa.uiuc.edu>2005-09-29 17:34:18 (GMT)
commit25b5aa05f34d2cdb450d5790145ce53f16cc068a (patch)
treec98fab9efc32168199dbef0a6a1e70d21d1c29f6 /src
parent3d21af7eb88d188e9a271d408a8d1e0395472e4e (diff)
downloadhdf5-25b5aa05f34d2cdb450d5790145ce53f16cc068a.zip
hdf5-25b5aa05f34d2cdb450d5790145ce53f16cc068a.tar.gz
hdf5-25b5aa05f34d2cdb450d5790145ce53f16cc068a.tar.bz2
[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:
Diffstat (limited to 'src')
-rw-r--r--src/H5.c12
-rw-r--r--src/H5private.h4
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