summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2001-01-12 06:41:11 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2001-01-12 06:41:11 (GMT)
commitdf0b3ecd5b38ab982bf290dd1618df41ee741313 (patch)
tree83de76c4755e8f2f8f01d7f2baabc0ac0adb124b /src
parent162c14cea376a05c496a285abebeaa5254fc9024 (diff)
downloadhdf5-df0b3ecd5b38ab982bf290dd1618df41ee741313.zip
hdf5-df0b3ecd5b38ab982bf290dd1618df41ee741313.tar.gz
hdf5-df0b3ecd5b38ab982bf290dd1618df41ee741313.tar.bz2
[svn-r3273]
Purpose: Avoid windows warnings Description: Solution: put some windows specified headers into this file Platforms tested: Win 2000, confirmed by eirene
Diffstat (limited to 'src')
-rw-r--r--src/H5private.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 9d5c933..e96cc0f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -130,6 +130,12 @@
#ifdef H5_HAVE_WINDOWS_H
#include <windows.h>
#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <process.h>
+#include <windows.h>
+#endif
#ifndef F_OK
# define F_OK 00
# define W_OK 02
@@ -721,10 +727,23 @@ __DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base);
* And now for a couple non-Posix functions... Watch out for systems that
* define these in terms of macros.
*/
-#if !defined strdup && !defined HAVE_STRDUP
+/*
+if !defined strdup && !defined HAVE_STRDUP && !defined _strdup
char *strdup(const char *s);
#endif
#define HDstrdup(S) strdup(S)
+*/
+
+
+#ifdef WIN32
+#define HDstrdup(S) _strdup(S)
+#elif !defined strdup && !defined HAVE_STRDUP
+char *strdup(const char *s);
+#define HDstrdup(S) strdup(S)
+#else
+#define HDstrdup(S) strdup(S)
+#endif
+
#ifndef H5_HAVE_SNPRINTF
__DLL__ int HDsnprintf(char *buf, size_t size, const char *fmt, ...);