summaryrefslogtreecommitdiffstats
path: root/perform/pio_standalone.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-09-06 16:50:32 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-09-06 16:50:32 (GMT)
commit2457d8ecaf8a2195a2966ad6e0f649473bdb7177 (patch)
treea2de17f6db50218ffbde5ea230a6c65f62ba7cf8 /perform/pio_standalone.h
parent85726e28fc864da521234244802a39d5a1ac23c2 (diff)
downloadhdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.zip
hdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.tar.gz
hdf5-2457d8ecaf8a2195a2966ad6e0f649473bdb7177.tar.bz2
[svn-r21366] JIRA HDFFV-2748 replace use of _WIN32 in source. Created new defines H5_HAVE_WIN32_API and H5_HAVE_VISUAL_STUDIO defines to use. These can be properly set during configurration.
Tested: windows and local linux - reviewed internally
Diffstat (limited to 'perform/pio_standalone.h')
-rw-r--r--perform/pio_standalone.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/perform/pio_standalone.h b/perform/pio_standalone.h
index a4bc8b5..584a057 100644
--- a/perform/pio_standalone.h
+++ b/perform/pio_standalone.h
@@ -22,7 +22,7 @@
/** From H5private.h **/
-#include "H5public.h" /* Include Public Definitions */
+#include "H5public.h" /* Include Public Definitions */
/*
@@ -47,57 +47,57 @@
* 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 /* _WIN32 */
+#ifdef H5_HAVE_WIN32_API
+#define HDstrdup(S) _strdup(S)
+#else /* H5_HAVE_WIN32_API */
#if !defined strdup && !defined H5_HAVE_STRDUP
extern char *strdup(const char *s);
#endif
-#define HDstrdup(S) strdup(S)
+#define HDstrdup(S) strdup(S)
-#endif /* _WIN32 */
+#endif /* H5_HAVE_WIN32_API */
H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
-#define HDstrcmp(S,T) strcmp(S,T)
-#define HDstrlen(S) strlen(S)
-#define HDstrncmp(S,T,L) strncmp(S,T,L)
-#define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
-#define HDstrchr(S,C) strchr(S,C)
-#define HDfree(M) free(M)
+#define HDstrcmp(S,T) strcmp(S,T)
+#define HDstrlen(S) strlen(S)
+#define HDstrncmp(S,T,L) strncmp(S,T,L)
+#define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
+#define HDstrchr(S,C) strchr(S,C)
+#define HDfree(M) free(M)
#ifdef _O_BINARY
-#define HDopen(S,F,M) open(S,F|_O_BINARY,M)
+#define HDopen(S,F,M) open(S,F|_O_BINARY,M)
#else
-#define HDopen(S,F,M) open(S,F,M)
+#define HDopen(S,F,M) open(S,F,M)
#endif
-#define HDclose(F) close(F)
+#define HDclose(F) close(F)
-#ifdef _WIN32
-#define HDlseek(F,O,W) _lseeki64(F,O,W)
+#ifdef H5_HAVE_WIN32_API
+#define HDlseek(F,O,W) _lseeki64(F,O,W)
#else
-#define HDlseek(F,O,W) lseek(F,O,W)
+#define HDlseek(F,O,W) lseek(F,O,W)
#endif
-#define HDwrite(F,M,Z) write(F,M,Z)
+#define HDwrite(F,M,Z) write(F,M,Z)
-#define HDread(F,M,Z) read(F,M,Z)
+#define HDread(F,M,Z) read(F,M,Z)
-#ifdef _WIN32
- #define HDstat(S,B) _stati64(S,B)
+#ifdef H5_HAVE_WIN32_API
+ #define HDstat(S,B) _stati64(S,B)
#else
#define HDstat(S,B) stat(S,B)
#endif
-#ifdef _WIN32
-#define HDfstat(F,B) _fstati64(F,B)
-typedef struct _stati64 h5_stat_t;
-typedef __int64 h5_stat_size_t;
+#ifdef H5_HAVE_WIN32_API
+#define HDfstat(F,B) _fstati64(F,B)
+typedef struct _stati64 h5_stat_t;
+typedef __int64 h5_stat_size_t;
#else
#define HDfstat(F,B) fstat(F,B)
-typedef struct stat h5_stat_t;
+typedef struct stat h5_stat_t;
typedef off_t h5_stat_size_t;
#endif
@@ -134,7 +134,7 @@ extern const char *opt_arg; /* flag argument (or value) */
enum {
no_arg = 0, /* doesn't take an argument */
- require_arg, /* requires an argument */
+ require_arg, /* requires an argument */
optional_arg /* argument is optional */
};