diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-22 16:20:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-22 16:20:39 (GMT) |
commit | 69d8435cd1cf98623a903b35a3d4673788547475 (patch) | |
tree | 421ee7c29b9836c0373588c9d625f5fe437ee710 /src | |
parent | c115ef1e047e0832a858281b352a383976bcb279 (diff) | |
download | hdf5-69d8435cd1cf98623a903b35a3d4673788547475.zip hdf5-69d8435cd1cf98623a903b35a3d4673788547475.tar.gz hdf5-69d8435cd1cf98623a903b35a3d4673788547475.tar.bz2 |
[svn-r3317] Purpose:
Bug Fix
Description:
Fix definition of strdup on Windows machines.
Solution:
Merged duplicate definitions into one cohesive block of definitions.
Platforms tested:
FreeBSD 4.2 (hawkwind)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5private.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/H5private.h b/src/H5private.h index c19bd59..da63965 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -727,24 +727,21 @@ __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. */ +#ifdef WIN32 +#define HDstrdup(S) _strdup(S) +#else + #ifdef LATER -#if !defined strdup && !defined HAVE_STRDUP && !defined _strdup +#if !defined strdup && !defined HAVE_STRDUP extern char *strdup(const char *s); #endif #else /* LATER */ extern char *strdup(const char *s); #endif /* LATER */ -#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 + +#endif /* WIN32 */ #ifndef H5_HAVE_SNPRINTF |