diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2007-05-18 15:14:43 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2007-05-18 15:14:43 (GMT) |
commit | 87a41d4286718ebc06acf6a9021ea85b9a93f278 (patch) | |
tree | 1e1946e375f700573b5718020a16c7e117f33c76 /tools | |
parent | 513c74a8da0e7bb29b727ddc1409e7e6d7902461 (diff) | |
download | hdf5-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 'tools')
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 2 | ||||
-rwxr-xr-x | tools/h5import/h5import.c | 16 | ||||
-rwxr-xr-x | tools/h5import/h5importtest.c | 18 | ||||
-rw-r--r-- | tools/h5jam/h5jamgentest.c | 6 | ||||
-rw-r--r-- | tools/h5ls/h5ls.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.c | 6 | ||||
-rw-r--r-- | tools/misc/h5repart.c | 4 |
7 files changed, 27 insertions, 27 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 78184fd..463230e 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -1190,7 +1190,7 @@ static void gent_many(void) for (i0 = 0; i0 < 2; i0++) { dset1[j].a[i3][i2][i1][i0] = i0+j; dset1[j].b[i3][i2][i1][i0] = (double)(i0+j); -#ifdef WIN32 +#ifdef _WIN32 dset1[j].c[i3][i2][i1][i0] = (double)(i0+j+(signed __int64)sdim); #else dset1[j].c[i3][i2][i1][i0] = (double)(i0+j+sdim); diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 3903e37..bfa2c82 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -336,7 +336,7 @@ readIntegerData(FILE **strm, struct Input *in) H5DT_INT8 *in08; H5DT_INT16 *in16, temp; H5DT_INT32 *in32; -#ifndef WIN32 +#ifndef _WIN32 H5DT_INT64 *in64; char buffer[256]; #endif @@ -452,7 +452,7 @@ readIntegerData(FILE **strm, struct Input *in) } break; -#ifndef WIN32 +#ifndef _WIN32 case 64: in64 = (H5DT_INT64 *) in->data; switch(in->inputClass) @@ -485,7 +485,7 @@ readIntegerData(FILE **strm, struct Input *in) return (-1); } break; -#endif /* ifndef WIN32 */ +#endif /* ifndef _WIN32 */ default: (void) fprintf(stderr, err3); @@ -500,7 +500,7 @@ readUIntegerData(FILE **strm, struct Input *in) H5DT_UINT8 *in08; H5DT_UINT16 *in16, temp; H5DT_UINT32 *in32; -#ifndef WIN32 +#ifndef _WIN32 H5DT_UINT64 *in64; char buffer[256]; #endif @@ -614,7 +614,7 @@ readUIntegerData(FILE **strm, struct Input *in) } break; -#ifndef WIN32 +#ifndef _WIN32 case 64: in64 = (H5DT_UINT64 *) in->data; switch(in->inputClass) @@ -647,7 +647,7 @@ readUIntegerData(FILE **strm, struct Input *in) return (-1); } break; -#endif /* ifndef WIN32 */ +#endif /* ifndef _WIN32 */ default: (void) fprintf(stderr, err3); @@ -1254,7 +1254,7 @@ validateConfigurationParameters(struct Input * in) const char *err4a = "OUTPUT-ARCHITECTURE cannot be STD if OUTPUT-CLASS is floating point (FP).\n"; const char *err4b = "OUTPUT-ARCHITECTURE cannot be IEEE if OUTPUT-CLASS is integer (IN).\n"; const char *err5 = "For OUTPUT-CLASS FP, valid values for OUTPUT-SIZE are (32, 64) .\n"; -#ifdef WIN32 +#ifdef _WIN32 const char *err6 = "No support for reading 64-bit integer (INPUT-CLASS: IN, TEXTIN, UIN, TEXTUIN files\n"; #endif @@ -1311,7 +1311,7 @@ validateConfigurationParameters(struct Input * in) return (-1); } -#ifdef WIN32 +#ifdef _WIN32 if (in->inputSize == 64 && (in->inputClass == 0 || in->inputClass == 4 || in->inputClass == 6 || in->inputClass == 7) ) { (void) fprintf(stderr, err6); diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 847f216..d9f5df2 100755 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -46,7 +46,7 @@ main(void) int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ; int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ; -#ifndef WIN32 +#ifndef _WIN32 long_long b64i2[3][4], b64i3[5][3][4]; long_long row4i64[3], col4i64[4], pln4i64[5]; long_long rowo4i64 = (long_long)11 , colo4i64 = (long_long)21 , plno4i64 = (long_long)51 ; @@ -96,7 +96,7 @@ main(void) col4i[0] = colo4i; pln4i[0] = plno4i; -#ifndef WIN32 +#ifndef _WIN32 row4i64[0] = rowo4i64; col4i64[0] = colo4i64; pln4i64[0] = plno4i64; @@ -115,7 +115,7 @@ main(void) row4[i] = row4[i - 1] + rowi4; row8[i] = row8[i - 1] + rowi8; row4i[i] = row4i[i - 1] + rowi4i; -#ifndef WIN32 +#ifndef _WIN32 row4i64[i] = row4i64[i - 1] + rowi4i64; #endif row4i16[i] = row4i16[i - 1] + rowi4i16; @@ -127,7 +127,7 @@ main(void) col4[j] = col4[j - 1] + coli4; col8[j] = col8[j - 1] + coli8; col4i[j] = col4i[j - 1] + coli4i; -#ifndef WIN32 +#ifndef _WIN32 col4i64[j] = col4i64[j - 1] + coli4i64; #endif col4i16[j] = col4i16[j - 1] + coli4i16; @@ -138,7 +138,7 @@ main(void) pln4[k] = pln4[k - 1] + plni4; pln8[k] = pln8[k - 1] + plni8; pln4i[k] = pln4i[k - 1] + plni4i; -#ifndef WIN32 +#ifndef _WIN32 pln4i64[k] = pln4i64[k - 1] + plni4i64; #endif pln4i16[k] = pln4i16[k - 1] + plni4i16; @@ -149,7 +149,7 @@ main(void) { for (j = 0; j < ncol; j++) { -#ifndef WIN32 +#ifndef _WIN32 b64i2[i][j] = row4i64[i] + col4i64[j]; #endif } @@ -170,7 +170,7 @@ main(void) b32r3[k][i][j] = row4[i] + col4[j] + pln4[k]; b64r3[k][i][j] = row8[i] + col8[j] + pln8[k]; b32i3[k][i][j] = row4i[i] + col4i[j] + pln4i[k]; -#ifndef WIN32 +#ifndef _WIN32 b64i3[k][i][j] = row4i64[i] + col4i64[j] + pln4i64[k]; #endif b16i3[k][i][j] = row4i16[i] + col4i16[j] + pln4i16[k]; @@ -221,7 +221,7 @@ main(void) (void) fwrite((char *) &b32i3[k][i][j], sizeof(unsigned int), 1, sp); (void) fclose(sp); -#ifndef WIN32 +#ifndef _WIN32 sp = fopen("bin64-2", "w"); for (i = 0; i < nrow; i++) @@ -254,7 +254,7 @@ main(void) sp); (void) fclose(sp); -#ifndef WIN32 +#ifndef _WIN32 sp = fopen("bin64-3", "w"); for (k = 0; k < npln; k++) diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c index 2498cd2..0ae81d8 100644 --- a/tools/h5jam/h5jamgentest.c +++ b/tools/h5jam/h5jamgentest.c @@ -330,11 +330,11 @@ create_textfile(const char *name, size_t size) size_t i; char *bp; - #ifdef WIN32 + #ifdef _WIN32 fd = _creat(name, _S_IREAD | _S_IWRITE); - #else /* WIN32 */ + #else /* _WIN32 */ fd = creat(name,(mode_t)0777); - #endif /* WIN32 */ + #endif /* _WIN32 */ if (fd < 0) { /* panic */ } diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d19f200..a362250 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1559,7 +1559,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) (unsigned long)total, 1==total?"":"s", (unsigned long)used, 1==used?"":"s"); if (used>0) { -#ifdef WIN32 +#ifdef _WIN32 utilization = (hssize_t)total * 100.0 / (hssize_t)used; #else utilization = (total*100.0)/used; diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 376daef..df26d52 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -100,13 +100,13 @@ warn_msg(const char *progname, const char *fmt, ...) va_start(ap, fmt); HDfflush(stdout); -#ifdef WIN32 +#ifdef _WIN32 HDfprintf(stdout, "%s warning: ", progname); HDvfprintf(stdout, fmt, ap); -#else /* WIN32 */ +#else /* _WIN32 */ HDfprintf(stderr, "%s warning: ", progname); HDvfprintf(stderr, fmt, ap); -#endif /* WIN32 */ +#endif /* _WIN32 */ va_end(ap); } diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index e9406e2..505b9e4 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -45,7 +45,7 @@ # include <sys/stat.h> #endif -#ifdef WIN32 +#ifdef _WIN32 # include <io.h> # include <fcntl.h> #endif @@ -216,7 +216,7 @@ main (int argc, char *argv[]) int dst_is_family; /*is dst name a family name? */ int dst_membno=0; /*destination member number */ -#if defined(WIN32) && ! defined (__MWERKS__) +#if defined(_WIN32) && ! defined (__MWERKS__) __int64 left_overs=0; /*amount of zeros left over */ __int64 src_offset=0; /*offset in source member */ __int64 dst_offset=0; /*offset in destination member */ |