summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2007-05-18 15:14:43 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2007-05-18 15:14:43 (GMT)
commit87a41d4286718ebc06acf6a9021ea85b9a93f278 (patch)
tree1e1946e375f700573b5718020a16c7e117f33c76 /src
parent513c74a8da0e7bb29b727ddc1409e7e6d7902461 (diff)
downloadhdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.zip
hdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.tar.gz
hdf5-87a41d4286718ebc06acf6a9021ea85b9a93f278.tar.bz2
[svn-r13766] In Visual Studio 2005 for 64-bit, _WIN32 is defined, but not WIN32, so I've standardized all #ifdef's to use _WIN32. This should not affect any other platform.
Tested: Visual Studio (32- and 64-bit) on Win XP
Diffstat (limited to 'src')
-rw-r--r--src/H5Eint.c4
-rw-r--r--src/H5FDdirect.c20
-rw-r--r--src/H5FDlog.c12
-rw-r--r--src/H5FDmpiposix.c24
-rw-r--r--src/H5FDsec2.c18
-rw-r--r--src/H5FDstdio.c24
-rw-r--r--src/H5FDstream.c4
-rw-r--r--src/H5Omtime.c6
-rw-r--r--src/H5api_adpt.h4
-rw-r--r--src/H5detect.c2
-rw-r--r--src/H5private.h42
11 files changed, 80 insertions, 80 deletions
diff --git a/src/H5Eint.c b/src/H5Eint.c
index a3568d7..168cc4d 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -266,7 +266,7 @@ H5E_walk_cb(unsigned n, const H5E_error_t *err_desc, void *client_data)
fprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
-#ifdef WIN32
+#ifdef _WIN32
fprintf(stream, "some thread: no way to know the thread number from pthread on windows");
#else
fprintf(stream, "thread %lu", (unsigned long)pthread_self());
@@ -385,7 +385,7 @@ H5E_walk2_cb(unsigned n, const H5E_error2_t *err_desc, void *client_data)
fprintf(stream, "thread 0");
} /* end block */
#elif defined(H5_HAVE_THREADSAFE)
-#ifdef WIN32
+#ifdef _WIN32
fprintf(stream, "some thread: no way to know the thread number from pthread on windows");
#else
fprintf(stream, "thread %lu", (unsigned long)pthread_self());
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 78db28e..23ff0fe 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -77,7 +77,7 @@ typedef struct H5FD_direct_t {
haddr_t pos; /*current file I/O position */
int op; /*last operation */
H5FD_direct_fapl_t fa; /*file access properties */
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -90,7 +90,7 @@ typedef struct H5FD_direct_t {
#endif /*H5_VMS*/
#else
/*
- * On WIN32 the low-order word of a unique identifier associated with the
+ * On _WIN32 the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -120,7 +120,7 @@ typedef struct H5FD_direct_t {
# define file_offset_t off64_t
# define file_seek lseek64
# define file_truncate ftruncate64
-#elif defined (WIN32) && !defined(__MWERKS__)
+#elif defined (_WIN32) && !defined(__MWERKS__)
# /*MSVC*/
# define file_offset_t __int64
# define file_seek _lseeki64
@@ -491,7 +491,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
int fd=(-1);
H5FD_direct_t *file=NULL;
H5FD_direct_fapl_t *fa;
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -542,7 +542,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef WIN32
+#ifdef _WIN32
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -556,7 +556,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
#else
file->inode = sb.st_ino;
#endif /*H5_VMS*/
-#endif /*WIN32*/
+#endif /*_WIN32*/
file->fa.mboundary = fa->mboundary;
file->fa.fbsize = fa->fbsize;
file->fa.cbsize = fa->cbsize;
@@ -668,7 +668,7 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI(H5FD_direct_cmp, H5FD_VFD_DEFAULT)
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -1266,7 +1266,7 @@ H5FD_direct_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
/* Extend the file to make sure it's large enough */
if (file->eoa!=file->eof) {
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
@@ -1279,10 +1279,10 @@ H5FD_direct_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
(void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle)==0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* WIN32 */
+#else /* _WIN32 */
if (-1==file_truncate(file->fd, (file_offset_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* Update the eof value */
file->eof = file->eoa;
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 4645003..5130c65 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -95,7 +95,7 @@ typedef struct H5FD_log_t {
size_t iosize; /* Size of I/O information buffers */
FILE *logfp; /* Log file pointer */
H5FD_log_fapl_t fa; /*driver-specific file access properties*/
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -104,7 +104,7 @@ typedef struct H5FD_log_t {
ino_t inode; /*file i-node number */
#else
/*
- * On WIN32 the low-order word of a unique identifier associated with the
+ * On _WIN32 the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -134,7 +134,7 @@ typedef struct H5FD_log_t {
#ifdef H5_HAVE_LSEEK64
# define file_offset_t off64_t
# define file_seek lseek64
-#elif defined (WIN32)
+#elif defined (_WIN32)
# ifdef __MWERKS__
# define file_offset_t off_t
# define file_seek lseek
@@ -502,7 +502,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
int fd=(-1);
H5FD_log_t *file=NULL;
H5FD_log_fapl_t *fa; /* File access property list information */
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -545,7 +545,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef WIN32
+#ifdef _WIN32
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -746,7 +746,7 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI(H5FD_log_cmp, H5FD_VFD_DEFAULT)
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index df39291..6c30065 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -99,7 +99,7 @@ typedef struct H5FD_mpiposix_t {
size_t blksize; /* Block size of file system */
#endif
hbool_t use_gpfs; /* Use GPFS to write things */
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -108,7 +108,7 @@ typedef struct H5FD_mpiposix_t {
ino_t inode; /*file i-node number */
#else
/*
- * On WIN32 the low-order word of a unique identifier associated with the
+ * On _WIN32 the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -138,7 +138,7 @@ typedef struct H5FD_mpiposix_t {
# define file_offset_t off64_t
# define file_seek lseek64
# define file_truncate ftruncate64
-#elif defined (WIN32) && !defined(__MWERKS__)
+#elif defined (_WIN32) && !defined(__MWERKS__)
# /*MSVC*/
# define file_offset_t __int64
# define file_seek _lseeki64
@@ -620,7 +620,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
H5FD_mpiposix_fapl_t _fa; /* Private copy of default file access property list information */
H5P_genplist_t *plist; /* Property list pointer */
h5_stat_t sb; /* Portable 'stat' struct */
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int results;
@@ -754,7 +754,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
file->fd = fd;
file->eof = sb.st_size;
- /* for WIN32 support. WIN32 'stat' does not have st_blksize and st_blksize
+ /* for _WIN32 support. _WIN32 'stat' does not have st_blksize and st_blksize
is only used for the H5_HAVE_GPFS case */
#ifdef H5_HAVE_GPFS
file->blksize = sb.st_blksize;
@@ -773,7 +773,7 @@ H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_id,
file->op = OP_UNKNOWN;
/* Set the information for the file's device and inode */
-#ifdef WIN32
+#ifdef _WIN32
filehandle = _get_osfhandle(fd);
results = GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -868,7 +868,7 @@ H5FD_mpiposix_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI(H5FD_mpiposix_cmp, H5FD_VFD_DEFAULT)
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -1383,10 +1383,10 @@ static herr_t
H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
-#endif /* WIN32 */
+#endif /* _WIN32 */
int mpi_code; /* MPI return code */
herr_t ret_value=SUCCEED;
@@ -1399,7 +1399,7 @@ H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing
if(file->eoa>file->last_eoa) {
/* Use the round-robin process to truncate (extend) the file */
if(file->mpi_rank == H5_PAR_META_WRITE) {
-#ifdef WIN32
+#ifdef _WIN32
/* Map the posix file handle to a Windows file handle */
filehandle = _get_osfhandle(file->fd);
@@ -1409,10 +1409,10 @@ H5FD_mpiposix_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing
SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle)==0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* WIN32 */
+#else /* _WIN32 */
if(-1==file_truncate(file->fd, (file_offset_t)file->eoa))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* WIN32 */
+#endif /* _WIN32 */
} /* end if */
/* Don't let any proc return until all have extended the file.
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index e7de10c..b01ba3f 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -66,7 +66,7 @@ typedef struct H5FD_sec2_t {
haddr_t eof; /*end of file; current file size*/
haddr_t pos; /*current file I/O position */
int op; /*last operation */
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -79,7 +79,7 @@ typedef struct H5FD_sec2_t {
#endif /*H5_VMS*/
#else
/*
- * On WIN32 the low-order word of a unique identifier associated with the
+ * On _WIN32 the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -110,7 +110,7 @@ typedef struct H5FD_sec2_t {
# define file_offset_t off64_t
# define file_seek lseek64
# define file_truncate ftruncate64
-#elif defined (WIN32) && !defined(__MWERKS__)
+#elif defined (_WIN32) && !defined(__MWERKS__)
# /*MSVC*/
# define file_offset_t __int64
# define file_seek _lseeki64
@@ -337,7 +337,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
int o_flags;
int fd=(-1);
H5FD_sec2_t *file=NULL;
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -377,7 +377,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id,
H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t);
file->pos = HADDR_UNDEF;
file->op = OP_UNKNOWN;
-#ifdef WIN32
+#ifdef _WIN32
filehandle = _get_osfhandle(fd);
(void)GetFileInformationByHandle((HANDLE)filehandle, &fileinfo);
file->fileindexhi = fileinfo.nFileIndexHigh;
@@ -468,7 +468,7 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_ENTER_NOAPI(H5FD_sec2_cmp, H5FD_VFD_DEFAULT)
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
if (f1->fileindexhi > f2->fileindexhi) HGOTO_DONE(1)
@@ -879,7 +879,7 @@ H5FD_sec2_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
/* Extend the file to make sure it's large enough */
if (file->eoa!=file->eof) {
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
@@ -892,10 +892,10 @@ H5FD_sec2_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
(void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle)==0)
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#else /* WIN32 */
+#else /* _WIN32 */
if (-1==file_truncate(file->fd, (file_offset_t)file->eoa))
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly")
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* Update the eof value */
file->eof = file->eoa;
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 6f1b204..c66b1ab 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -43,7 +43,7 @@
#include <unistd.h>
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#include <io.h>
@@ -91,7 +91,7 @@ typedef struct H5FD_stdio_t {
haddr_t pos; /*current file I/O position */
H5FD_stdio_file_op op; /*last operation */
unsigned write_access; /* Flag to indicate the file was opened with write access */
-#ifndef WIN32
+#ifndef _WIN32
/*
* On most systems the combination of device and i-node number uniquely
* identify a file.
@@ -100,7 +100,7 @@ typedef struct H5FD_stdio_t {
ino_t inode; /*file i-node number */
#else
/*
- * On WIN32 the low-order word of a unique identifier associated with the
+ * On _WIN32 the low-order word of a unique identifier associated with the
* file and the volume serial number uniquely identify a file. This number
* (which, both? -rpm) may change when the system is restarted or when the
* file is opened. After a process opens a file, the identifier is
@@ -116,7 +116,7 @@ typedef struct H5FD_stdio_t {
#ifdef H5_HAVE_LSEEK64
# define file_offset_t off64_t
# define file_truncate ftruncate64
-#elif defined (WIN32) && !defined(__MWERKS__)
+#elif defined (_WIN32) && !defined(__MWERKS__)
# /*MSVC*/
# define file_offset_t __int64
# define file_truncate _chsize
@@ -323,13 +323,13 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
unsigned write_access=0; /* File opened with write access? */
H5FD_stdio_t *file=NULL;
static const char *func="H5FD_stdio_open"; /* Function Name for error reporting */
-#ifdef WIN32
+#ifdef _WIN32
HFILE filehandle;
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
int fd;
-#else /* WIN32 */
+#else /* _WIN32 */
struct stat sb;
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* Sanity check on file offsets */
assert(sizeof(file_offset_t)>=sizeof(size_t));
@@ -393,7 +393,7 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
}
/* The unique key */
-#ifdef WIN32
+#ifdef _WIN32
/*#error "Needs correct fileindexhi & fileindexlo, code below is from sec2 driver"*/
fd = _fileno(f);
filehandle = _get_osfhandle(fd);
@@ -473,7 +473,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
-#ifdef WIN32
+#ifdef _WIN32
if (f1->fileindexhi < f2->fileindexhi) return -1;
if (f1->fileindexhi > f2->fileindexhi) return 1;
@@ -964,7 +964,7 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
if(file->write_access) {
/* Makes sure that the true file size is the same as the end-of-address. */
if (file->eoa!=file->eof) {
-#ifdef WIN32
+#ifdef _WIN32
int fd=_fileno(file->fp); /* File descriptor for HDF5 file */
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
@@ -978,12 +978,12 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
(void)SetFilePointer((HANDLE)filehandle,li.LowPart,&li.HighPart,FILE_BEGIN);
if(SetEndOfFile((HANDLE)filehandle)==0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to extend file properly", -1)
-#else /* WIN32 */
+#else /* _WIN32 */
int fd=fileno(file->fp); /* File descriptor for HDF5 file */
if (-1==file_truncate(fd, (file_offset_t)file->eoa))
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to extend file properly", -1)
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* Update the eof value */
file->eof = file->eoa;
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 678a1e5..06eaaaf 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -624,7 +624,7 @@ H5FD_stream_open (const char *filename,
H5FD_stream_t *stream=NULL;
const H5FD_stream_fapl_t *fapl;
int o_flags;
-#ifdef WIN32
+#ifdef _WIN32
WSADATA wsadata;
#endif
H5P_genplist_t *plist=NULL; /* Property list pointer */
@@ -649,7 +649,7 @@ H5FD_stream_open (const char *filename,
if ((O_RDWR & o_flags) && ! (O_CREAT & o_flags))
HGOTO_ERROR (H5E_ARGS, H5E_UNSUPPORTED, NULL, "open stream for read/write not supported")
-#ifdef WIN32
+#ifdef _WIN32
if (WSAStartup (MAKEWORD (2, 0), &wsadata))
HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL, "Couldn't start Win32 socket layer")
#endif
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 39d9a16..0a70e5b 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -27,7 +27,7 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
-#if defined (WIN32) && !defined (__MWERKS__)
+#if defined (_WIN32) && !defined (__MWERKS__)
#include <sys/types.h>
#include <sys/timeb.h>
#endif
@@ -247,7 +247,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_fla
the_time -= tz.tz_minuteswest * 60 - (tm.tm_isdst ? 3600 : 0);
}
-#elif defined (WIN32)
+#elif defined (_WIN32)
#if !defined (__MWERKS__) /* MSVC */
{
struct timeb timebuffer;
@@ -264,7 +264,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_fla
;
#endif /*__MWERKS__*/
-#else /* WIN32 */
+#else /* _WIN32 */
/*
* The catch-all. If we can't convert a character string universal
* coordinated time to a time_t value reliably then we can't decode the
diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h
index b93431f..740eab5 100644
--- a/src/H5api_adpt.h
+++ b/src/H5api_adpt.h
@@ -21,7 +21,7 @@
#ifndef H5API_ADPT_H
#define H5API_ADPT_H
-#if defined(WIN32) || defined(_WIN32)
+#if defined(_WIN32)
#if defined(_HDF5DLL_)
#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
@@ -108,7 +108,7 @@
#define H5_DLLCPP
#endif /* HDF5_CPPDLL_EXPORTS */
-#else /*WIN32*/
+#else /*_WIN32*/
#define H5_DLL
#define H5_HLDLL
#define H5_HLCPPDLL
diff --git a/src/H5detect.c b/src/H5detect.c
index 07c5b12..3cfa89a 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -1088,7 +1088,7 @@ bit.\n";
* The FQDM of this host or the empty string.
*/
#ifdef H5_HAVE_GETHOSTNAME
-#ifdef WIN32
+#ifdef _WIN32
/* windows DLL cannot recognize gethostname, so turn off on windows for the time being!
KY, 2003-1-14 */
host_name[0] = '\0';
diff --git a/src/H5private.h b/src/H5private.h
index eff8964..493818f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -140,12 +140,12 @@
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define VC_EXTRALEAN /*Exclude rarely-used stuff from Windows headers */
#include <windows.h>
-#endif /*WIN32*/
+#endif /*_WIN32*/
/* H5_inline */
#ifndef H5_inline
@@ -564,11 +564,11 @@ typedef enum {
#define HDfgetc(F) fgetc(F)
#define HDfgetpos(F,P) fgetpos(F,P)
#define HDfgets(S,N,F) fgets(S,N,F)
-#ifdef WIN32
+#ifdef _WIN32
#define HDfileno(F) _fileno(F)
-#else /* WIN32 */
+#else /* _WIN32 */
#define HDfileno(F) fileno(F)
-#endif /* WIN32 */
+#endif /* _WIN32 */
#define HDfloor(X) floor(X)
#define HDfmod(X,Y) fmod(X,Y)
#define HDfopen(S,M) fopen(S,M)
@@ -604,7 +604,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 _WIN32
#ifdef __MWERKS__
#define HDfstat(F,B) fstat(F,B)
#define HDstat(S,B) stat(S,B)
@@ -674,7 +674,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 _WIN32
#ifdef __MWERKS__
#define HDlseek(F,O,W) lseek(F,O,W)
#else /*MSVS */
@@ -701,18 +701,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 _WIN32
*/
-#ifdef WIN32
+#ifdef _WIN32
#define HDmemset(X,C,Z) memset((void*)(X),C,Z)
-#else /* WIN32 */
+#else /* _WIN32 */
#define HDmemset(X,C,Z) memset(X,C,Z)
-#endif /* WIN32 */
-#ifdef WIN32
+#endif /* _WIN32 */
+#ifdef _WIN32
#define HDmkdir(S,M) _mkdir(S)
-#else /* WIN32 */
+#else /* _WIN32 */
#define HDmkdir(S,M) mkdir(S,M)
-#endif /* WIN32 */
+#endif /* _WIN32 */
#define HDmkfifo(S,M) mkfifo(S,M)
#define HDmktime(T) mktime(T)
#define HDmodf(X,Y) modf(X,Y)
@@ -772,7 +772,7 @@ int HDremove_all(const char * fname);
#define HDsetpgid(P,PG) setpgid(P,PG)
#define HDsetsid() setsid()
#define HDsetuid(U) setuid(U)
-#ifndef WIN32
+#ifndef _WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif
#define HDsigaction(N,A) sigaction(N,A)
@@ -790,7 +790,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 _WIN32
#define HDsnprintf _snprintf /*varargs*/
#else
#define HDsnprintf snprintf /*varargs*/
@@ -854,7 +854,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 _WIN32
#define HDunlink(S) _unlink(S)
#else
#define HDunlink(S) unlink(S)
@@ -867,7 +867,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 _WIN32
# define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A)
#else
# define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A)
@@ -890,9 +890,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 _WIN32
#define HDstrdup(S) _strdup(S)
-#else /* WIN32 */
+#else /* _WIN32 */
#if !defined strdup && !defined H5_HAVE_STRDUP
extern char *strdup(const char *s);
@@ -900,7 +900,7 @@ extern char *strdup(const char *s);
#define HDstrdup(S) strdup(S)
-#endif /* WIN32 */
+#endif /* _WIN32 */
/*