diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-21 15:10:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-21 15:10:17 (GMT) |
commit | eb89d7b53ab95623ab454186a602e1cafc7391f0 (patch) | |
tree | ceafe458b3011e38853e765352d3c7e59bbecce1 /perform/sio_standalone.h | |
parent | 3e468e6ff65d540a439e99ea568a6bff7add7cea (diff) | |
download | hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.zip hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.gz hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.bz2 |
[svn-r22105] Description:
Bring r20557:22085 from trunk to this branch, also fixing some other
issues/failures in the branch simultaneously. The h5repack tests are still
failing, but Neil will be checking into those, so the branch can be fully
functional again.
Tested on:
Mac OSX/64 10.7.3 (amazon) w/debug
Diffstat (limited to 'perform/sio_standalone.h')
-rw-r--r-- | perform/sio_standalone.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h index 77bb7f8..677a8ae 100644 --- a/perform/sio_standalone.h +++ b/perform/sio_standalone.h @@ -21,7 +21,7 @@ /** From H5private.h **/ -#include "H5public.h" /* Include Public Definitions */ +#include "H5public.h" /* Include Public Definitions */ /* @@ -129,11 +129,11 @@ #define HDfgetc(F) fgetc(F) #define HDfgetpos(F,P) fgetpos(F,P) #define HDfgets(S,N,F) fgets(S,N,F) -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API #define HDfileno(F) _fileno(F) -#else /* _WIN32 */ +#else /* H5_HAVE_WIN32_API */ #define HDfileno(F) fileno(F) -#endif /* _WIN32 */ +#endif /* H5_HAVE_WIN32_API */ #define HDfloor(X) floor(X) #define HDfmod(X,Y) fmod(X,Y) #define HDfopen(S,M) fopen(S,M) @@ -169,7 +169,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); * For Unix, if off_t is not 64bit big, try use the pseudo-standard * xxx64 versions if available. */ -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API #define HDfstat(F,B) _fstati64(F,B) #define HDlstat(S,B) _lstati64(S,B) #define HDstat(S,B) _stati64(S,B) @@ -202,7 +202,11 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #define HDgetgrgid(G) getgrgid(G) #define HDgetgrnam(S) getgrnam(S) #define HDgetgroups(Z,G) getgroups(Z,G) +#ifdef H5_HAVE_VISUAL_STUDIO +#define HDgetlogin() Wgetlogin() +#else /* H5_HAVE_VISUAL_STUDIO */ #define HDgetlogin() getlogin() +#endif /* H5_HAVE_VISUAL_STUDIO */ #define HDgetpgrp() getpgrp() #define HDgetpid() getpid() #define HDgetppid() getppid() @@ -235,7 +239,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #define HDlog(X) log(X) #define HDlog10(X) log10(X) #define HDlongjmp(J,N) longjmp(J,N) -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API #define HDlseek(F,O,W) _lseeki64(F,O,W) #else #ifdef H5_HAVE_LSEEK64 @@ -258,18 +262,18 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #define HDmemcpy(X,Y,Z) memcpy((char*)(X),(const char*)(Y),Z) #define HDmemmove(X,Y,Z) memmove((char*)(X),(const char*)(Y),Z) /* - * The (void*) cast just avoids a compiler warning in _WIN32 + * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO */ -#ifdef _WIN32 +#ifdef H5_HAVE_VISUAL_STUDIO #define HDmemset(X,C,Z) memset((void*)(X),C,Z) -#else /* _WIN32 */ +#else /* H5_HAVE_VISUAL_STUDIO */ #define HDmemset(X,C,Z) memset(X,C,Z) -#endif /* _WIN32 */ -#ifdef _WIN32 +#endif /* H5_HAVE_VISUAL_STUDIO */ +#ifdef H5_HAVE_WIN32_API #define HDmkdir(S,M) _mkdir(S) -#else /* _WIN32 */ +#else /* H5_HAVE_WIN32_API */ #define HDmkdir(S,M) mkdir(S,M) -#endif /* _WIN32 */ +#endif /* H5_HAVE_WIN32_API */ #define HDmkfifo(S,M) mkfifo(S,M) #define HDmktime(T) mktime(T) #define HDmodf(X,Y) modf(X,Y) @@ -331,7 +335,7 @@ int HDremove_all(const char * fname); #define HDsetuid(U) setuid(U) /* Windows does not permit setting the buffer size to values less than 2. */ -#ifndef _WIN32 +#ifndef H5_HAVE_WIN32_API #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z) #else #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) @@ -350,7 +354,7 @@ int HDremove_all(const char * fname); #define HDsin(X) sin(X) #define HDsinh(X) sinh(X) #define HDsleep(N) sleep(N) -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API #define HDsnprintf _snprintf /*varargs*/ #else #define HDsnprintf snprintf /*varargs*/ @@ -369,7 +373,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* sscanf() variable arguments */ -#define HDstrcasecmp(X,Y) strcasecmp(X,Y) +#define HDstrcasecmp(X,Y) strcasecmp(X,Y) #define HDstrcat(X,Y) strcat(X,Y) #define HDstrchr(S,C) strchr(S,C) #define HDstrcmp(X,Y) strcmp(X,Y) @@ -415,7 +419,7 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDumask(N) umask(N) #define HDuname(S) uname(S) #define HDungetc(C,F) ungetc(C,F) -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API #define HDunlink(S) _unlink(S) #else #define HDunlink(S) unlink(S) @@ -428,7 +432,7 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A) #define HDvprintf(FMT,A) vprintf(FMT,A) #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A) -#ifdef _WIN32 +#ifdef H5_HAVE_WIN32_API # define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) #else # define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A) @@ -443,9 +447,9 @@ H5_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 +#ifdef H5_HAVE_WIN32_API #define HDstrdup(S) _strdup(S) -#else /* _WIN32 */ +#else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP extern char *strdup(const char *s); @@ -453,7 +457,7 @@ extern char *strdup(const char *s); #define HDstrdup(S) strdup(S) -#endif /* _WIN32 */ +#endif /* H5_HAVE_WIN32_API */ /* * HDF Boolean type. @@ -487,7 +491,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 */ }; |