diff --git a/src/silo/silo_win32_compatibility.h b/src/silo/silo_win32_compatibility.h index bc4d38f8..00b970cd 100644 --- a/src/silo/silo_win32_compatibility.h +++ b/src/silo/silo_win32_compatibility.h @@ -1,4 +1,4 @@ -#ifdef WIN32 +#ifdef _WIN32 #ifndef SILO_WIN32_COMPATIBILITY #define SILO_WIN32_COMPATIBILITY #include /* Include Windows IO */ diff --git a/tests/TestReadMask.c b/tests/TestReadMask.c index 045f9821..105f1f82 100644 --- a/tests/TestReadMask.c +++ b/tests/TestReadMask.c @@ -51,7 +51,7 @@ product endorsement purposes. */ #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #else #include diff --git a/tests/dir.c b/tests/dir.c index 55e21926..e9f85ed6 100644 --- a/tests/dir.c +++ b/tests/dir.c @@ -51,7 +51,7 @@ herein do not necessarily state or reflect those of the United States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. */ -#ifndef WIN32 +#ifndef _WIN32 #include #else #include @@ -298,7 +298,7 @@ int main(int argc, char *argv[]) /* test attempt to DBCreate a file without clobbering it and for which the path is really a dir in the host filesystem */ unlink("dir-test-foo"); -#ifndef WIN32 +#ifndef _WIN32 mkdir("dir-test-foo", 0777); #else mkdir("dir-test-foo"); @@ -307,7 +307,7 @@ int main(int argc, char *argv[]) unlink("dir-test-foo"); if (dbfile2 != 0) exit(EXIT_FAILURE); -#ifndef WIN32 +#ifndef _WIN32 mkdir("dir-test-foo", 0777); #else mkdir("dir-test-foo"); diff --git a/tests/grab.c b/tests/grab.c index 3c676c29..bb656ff0 100644 --- a/tests/grab.c +++ b/tests/grab.c @@ -56,7 +56,7 @@ be used for advertising or product endorsement purposes. #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #include #endif diff --git a/tests/largefile.c b/tests/largefile.c index d38fe0d7..d5e5f081 100644 --- a/tests/largefile.c +++ b/tests/largefile.c @@ -54,14 +54,14 @@ be used for advertising or product endorsement purposes. #include "silo.h" /*include public silo */ -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/tests/largefile_netcdf.c b/tests/largefile_netcdf.c index d5a76d44..2e3d59c2 100644 --- a/tests/largefile_netcdf.c +++ b/tests/largefile_netcdf.c @@ -1,14 +1,14 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/tests/merge_block.c b/tests/merge_block.c index 805839e2..07c79881 100644 --- a/tests/merge_block.c +++ b/tests/merge_block.c @@ -55,7 +55,7 @@ product endorsement purposes. #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #include #else @@ -713,7 +713,7 @@ GetFileList (char *baseName, char ***filesOut, int *nFilesOut) int nFileMax; char **files=NULL; -#ifndef WIN32 +#ifndef _WIN32 DIR *dirp=NULL; struct dirent *dp=NULL; #else @@ -727,7 +727,7 @@ GetFileList (char *baseName, char ***filesOut, int *nFilesOut) /* * Open the directory. */ -#ifndef WIN32 +#ifndef _WIN32 dirp = opendir ("."); if (dirp == NULL) { printf ("Error opening current directory\n"); @@ -754,7 +754,7 @@ GetFileList (char *baseName, char ***filesOut, int *nFilesOut) nFiles = 0; nFileMax = 128; files = ALLOC_N (char *, nFileMax); -#ifndef WIN32 +#ifndef _WIN32 for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp)) { char *fName = dp->d_name; @@ -790,7 +790,7 @@ GetFileList (char *baseName, char ***filesOut, int *nFilesOut) /* * Close the directory. */ -#ifndef WIN32 +#ifndef _WIN32 closedir (dirp); #else FindClose(dirHandle); diff --git a/tests/misc.c b/tests/misc.c index a22b33f5..48c5df0c 100644 --- a/tests/misc.c +++ b/tests/misc.c @@ -67,7 +67,7 @@ be used for advertising or product endorsement purposes. #include #endif -#ifdef WIN32 +#ifdef _WIN32 #include #endif diff --git a/tests/multi_file.c b/tests/multi_file.c index 4d052fdd..b7620606 100644 --- a/tests/multi_file.c +++ b/tests/multi_file.c @@ -62,7 +62,7 @@ product endorsement purposes. #include #include -#ifdef WIN32 +#ifdef _WIN32 # include #else # include diff --git a/tests/multi_file_memfile.c b/tests/multi_file_memfile.c index 26aa9740..a681343d 100644 --- a/tests/multi_file_memfile.c +++ b/tests/multi_file_memfile.c @@ -62,7 +62,7 @@ product endorsement purposes. #include #include -#ifdef WIN32 +#ifdef _WIN32 # include #else # include diff --git a/tests/obj.c b/tests/obj.c index aa0c7bd8..4fe45060 100644 --- a/tests/obj.c +++ b/tests/obj.c @@ -55,7 +55,7 @@ be used for advertising or product endorsement purposes. #include "silo.h" #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include diff --git a/tests/partial_io.c b/tests/partial_io.c index ad5d629f..9534af7c 100644 --- a/tests/partial_io.c +++ b/tests/partial_io.c @@ -55,7 +55,7 @@ product endorsement purposes. #include /* For abort() */ #include -#ifdef WIN32 +#ifdef _WIN32 #define strtok_r(s,sep,lasts) (*(lasts)=strtok((s),(sep))) #endif diff --git a/tests/point.c b/tests/point.c index 0294b0b8..24a2dd7e 100644 --- a/tests/point.c +++ b/tests/point.c @@ -55,7 +55,7 @@ be used for advertising or product endorsement purposes. #include "silo.h" #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include diff --git a/tests/sami.c b/tests/sami.c index b13d0494..ac824f23 100644 --- a/tests/sami.c +++ b/tests/sami.c @@ -67,7 +67,7 @@ be used for advertising or product endorsement purposes. #include #endif -#ifdef WIN32 +#ifdef _WIN32 #include #endif diff --git a/tests/simple.c b/tests/simple.c index 3598c79e..09bd90ff 100644 --- a/tests/simple.c +++ b/tests/simple.c @@ -57,7 +57,7 @@ be used for advertising or product endorsement purposes. #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/tests/testall.c b/tests/testall.c index 0ce5c9ff..77afdcd8 100644 --- a/tests/testall.c +++ b/tests/testall.c @@ -80,7 +80,7 @@ be used for advertising or product endorsement purposes. #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #else #include @@ -1636,7 +1636,7 @@ build_rect3d(DBfile * dbfile, int size, int order) DBPutQuadmesh(dbfile, meshname, NULL, coords, dims, ndims, DB_FLOAT, DB_COLLINEAR, optlist); -#ifndef WIN32 +#ifndef _WIN32 binf = open("rect3dz.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR); #else binf = open("rect3dz.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE); @@ -1653,7 +1653,7 @@ build_rect3d(DBfile * dbfile, int size, int order) close(binf); printf("zsize = nz=%d, ny=%d, nx=%d\n", zdims[2], zdims[1], zdims[0]); -#ifndef WIN32 +#ifndef _WIN32 binf = open("rect3dn.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR); #else binf = open("rect3dn.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE); diff --git a/tests/testfs.c b/tests/testfs.c index 809f3016..7b9b5cac 100644 --- a/tests/testfs.c +++ b/tests/testfs.c @@ -51,7 +51,7 @@ herein do not necessarily state or reflect those of the United States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. */ -#ifndef WIN32 +#ifndef _WIN32 #include #else #include diff --git a/tools/python/pysilo.cpp b/tools/python/pysilo.cpp index 6176c147..213631ec 100644 --- a/tools/python/pysilo.cpp +++ b/tools/python/pysilo.cpp @@ -68,7 +68,7 @@ static PyObject *siloModule = 0; std::vector SiloMethods; #if defined(_WIN32) -# if defined(Silo_EXPORTS) +# if defined(SiloPy_EXPORTS) || defined(Silo_EXPORTS) # define SILOMODULE_API __declspec(dllexport) # else # define SILOMODULE_API __declspec(dllimport)