Commit f53b8a1a authored by Ben Boeckel's avatar Ben Boeckel

windows: check for _WIN32, not WIN32

parent a5180063
Pipeline #9965 passed with stage
......@@ -73,7 +73,7 @@
/* Atomic operations */
#cmakedefine VTK_HAVE_SYNC_BUILTINS
#if defined(WIN32)
#if defined(_WIN32)
#cmakedefine VTK_HAS_INTERLOCKEDADD
#endif
......
......@@ -45,7 +45,7 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it;
//
// Windows specific stuff------------------------------------------
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
// define strict header for windows
#ifndef STRICT
......
......@@ -48,7 +48,7 @@ void otherTimerLogTest(ostream& strm)
{
a *= a;
}
#ifndef WIN32
#ifndef _WIN32
sleep (1);
#else
Sleep(1000);
......
......@@ -133,7 +133,7 @@ vtkParticleTracerBase::vtkParticleTracerBase()
this->SetNumberOfInputPorts(2);
#ifdef JB_H5PART_PARTICLE_OUTPUT
#ifdef WIN32
#ifdef _WIN32
vtkDebugMacro(<<"Setting vtkH5PartWriter");
vtkH5PartWriter *writer = vtkH5PartWriter::New();
#else
......
......@@ -46,7 +46,7 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkToolkits.h" // For VTK_USE_MPI
#include <cassert>
#ifdef WIN32
#ifdef _WIN32
#undef JB_H5PART_PARTICLE_OUTPUT
#else
// #define JB_H5PART_PARTICLE_OUTPUT
......@@ -66,7 +66,7 @@ using namespace vtkTemporalStreamTracerNamespace;
//----------------------------------------------------------------------------
//#define JB_DEBUG__
#if defined JB_DEBUG__
#ifdef WIN32
#ifdef _WIN32
#define OUTPUTTEXT(a) vtkOutputWindowDisplayText(a);
#else
#endif
......@@ -132,7 +132,7 @@ vtkTemporalStreamTracer::vtkTemporalStreamTracer()
this->SetNumberOfInputPorts(2);
#ifdef JB_H5PART_PARTICLE_OUTPUT
#ifdef WIN32
#ifdef _WIN32
vtkDebugMacro(<<"Setting vtkH5PartWriter");
vtkH5PartWriter *writer = vtkH5PartWriter::New();
#else
......
......@@ -41,7 +41,7 @@ vtkStandardNewMacro(vtkRInterface);
#include "Rversion.h"
#include "Rdefines.h"
#ifndef WIN32
#ifndef _WIN32
#define CSTACK_DEFNS
#define R_INTERFACE_PTRS
#include "Rinterface.h"
......@@ -75,7 +75,7 @@ public:
return;
}
#ifndef WIN32
#ifndef _WIN32
R_SignalHandlers = 0;
#endif
......@@ -97,7 +97,7 @@ public:
R_CStackLimit = (uintptr_t)-1;
#endif
#ifndef WIN32
#ifndef _WIN32
R_Interactive = static_cast<Rboolean>(TRUE);
#endif
setup_Rmainloop();
......@@ -112,7 +112,7 @@ public:
rcommand.append("f<-file(paste(tempdir(), \"/Routput.txt\", sep = \"\"), open=\"wt+\")\nsink(f)\n");
this->tmpFilePath.clear();
this->tmpFilePath.append(R_TempDir);
#ifdef WIN32
#ifdef _WIN32
this->tmpFilePath.append("\\Routput.txt");
#else
this->tmpFilePath.append("/Routput.txt");
......
......@@ -16,7 +16,7 @@
#include <vtkSmartPointer.h>
#include "vtkTestErrorObserver.h"
#ifndef WIN32
#ifndef _WIN32
#include <fcntl.h>
#endif
......@@ -28,7 +28,7 @@ int TestTIFFReaderMultiple(int argc, char *argv[])
return EXIT_FAILURE;
}
#ifndef WIN32
#ifndef _WIN32
// See how many file descriptors are in use
int fdUsedBefore = 1;
for (int i = 0; i < 1024; ++i)
......@@ -62,7 +62,7 @@ int TestTIFFReaderMultiple(int argc, char *argv[])
errorObserver->Clear();
}
#ifndef WIN32
#ifndef _WIN32
// See how many file descriptors are in use
int fdUsedAfter = 1;
for (int i = 0; i < 1024; ++i)
......
......@@ -1702,7 +1702,7 @@ void vtkVRMLYaccData::expect(int type)
#define FLEX_SCANNER
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
......
......@@ -36,7 +36,7 @@ namespace
// Usually stat uses 32 bit fields, and stat64 (with underscores in Windows) uses 64 bit fields.
// But on OS X and FreeBSD, stat uses 64 bit fields these days.
#if (VTK_SIZEOF_ID_TYPE == 8) && !defined(_DARWIN_FEATURE_64_BIT_INODE) && !defined(__FreeBSD__)
#ifndef WIN32
#ifndef _WIN32
#define USE_STAT_64
#else
#define USE_WIN_STAT_64
......@@ -64,7 +64,7 @@ namespace
vtkLSDynaFile_t VTK_LSDYNA_OPENFILE(const char* fname)
{
#ifndef WIN32
#ifndef _WIN32
vtkLSDynaFile_t f = open(fname, O_RDONLY);
return f;
#else
......
......@@ -42,7 +42,7 @@
//this is needs to be moved over to fseekpos and ftellpos
//in the future
#ifndef WIN32
#ifndef _WIN32
# include <unistd.h>
typedef off_t vtkLSDynaOff_t; // sanity
typedef int vtkLSDynaFile_t;
......@@ -53,7 +53,7 @@ typedef int vtkLSDynaFile_t;
# define VTK_LSDYNA_READ(fid,ptr,cnt) read(fid,ptr,cnt)
# define VTK_LSDYNA_ISBADFILE(fid) (fid < 0)
# define VTK_LSDYNA_CLOSEFILE(fid) close(fid)
#else // WIN32
#else // _WIN32
typedef long vtkLSDynaOff_t; // insanity
typedef FILE* vtkLSDynaFile_t;
# define VTK_LSDYNA_BADFILE 0
......
......@@ -152,7 +152,7 @@ static const char* vtkLSDynaCellTypes[] =
static void vtkLSGetLine( ifstream& deck, std::string& line )
{
#if !defined(_WIN32) && !defined(WIN32) && !defined(_MSC_VER) && !defined(__BORLANDC__)
#if !defined(_WIN32) && !defined(_MSC_VER) && !defined(__BORLANDC__)
// One line implementation for everyone but Windows (MSVC6 and BCC32 are the troublemakers):
std::getline( deck, line, '\n' );
#else
......@@ -3424,11 +3424,11 @@ int vtkLSDynaReader::ReadInputDeckKeywords( ifstream& deck )
{
deckExt = "";
}
#ifndef WIN32
#ifndef _WIN32
xmlSummary = deckDir + "/" + deckName + ".lsdyna";
#else
xmlSummary = deckDir + "\\" + deckName + ".lsdyna";
#endif // WIN32
#endif // _WIN32
// As long as we don't kill the input deck, write the summary XML:
if ( xmlSummary != this->InputDeck )
{
......@@ -3460,11 +3460,11 @@ int vtkLSDynaReader::WriteInputDeckSummary( const char* fname )
std::string dbName = this->P->Fam.GetDatabaseBaseName();
if ( this->IsDatabaseValid() && ! dbDir.empty() && ! dbName.empty() )
{
#ifndef WIN32
#ifndef _WIN32
if ( dbDir[0] == '/' )
#else
if ( dbDir[0] == '\\' )
#endif // WIN32
#endif // _WIN32
{
// OK, we have an absolute path, so it should be safe to write it out.
xmlSummary
......
......@@ -25,7 +25,7 @@
#include <errmsg.h>
#if defined(WIN32)
#if defined(_WIN32)
# include <string.h>
# include <locale.h>
# define LOWERCASE_COMPARE _stricmp
......
......@@ -39,7 +39,7 @@
vtkStandardNewMacro(vtkInteractorStyleUnicam);
// define 'TheTime()' function-- returns time in elapsed seconds
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
# include "vtkWindows.h"
static double TheTime()
......
......@@ -870,7 +870,7 @@ void vtkOpenGLExtensionManager::ReadOpenGLExtensions()
extensions_string += glu_extensions;
}
#if defined(WIN32)
#if defined(_WIN32)
// Don't use this->LoadExtension or we will go into an infinite loop.
vtkgl::LoadExtension("WGL_ARB_extensions_string", this);
if (vtkwgl::GetExtensionsStringARB)
......
......@@ -26,7 +26,7 @@
# define VTK_BRIDGE_EXPORT
#else
#if defined(WIN32) && defined(VTK_BUILD_SHARED_LIBS)
#if defined(_WIN32) && defined(VTK_BUILD_SHARED_LIBS)
#if defined(vtkBridge_EXPORTS)
#define VTK_BRIDGE_EXPORT __declspec( dllexport )
......
......@@ -12,7 +12,7 @@
#include <iomanip>
#include <algorithm>
#ifdef WIN32
#ifdef _WIN32
const static char * Slash = "\\";
#else
const static char * Slash = "/";
......
......@@ -8,7 +8,7 @@
#include <algorithm>
#include "math.h"
#ifdef WIN32
#ifdef _WIN32
const static char * Slash = "\\";
#else
const static char * Slash = "/";
......
......@@ -705,7 +705,7 @@ void DICOMAppHelper::TransferSyntaxCallback(DICOMParser *parser,
{
#ifdef DEBUG_DICOM_APP_HELPER
#ifdef WIN32
#ifdef _WIN32
char platformByteOrder = 'L';
#else
char platformByteOrder = 'B';
......
......@@ -55,7 +55,7 @@
#include <iostream>
#include <fstream>
#if (defined(_WIN32) || defined(WIN32)) && defined(vtkmetaio_BUILD_SHARED_LIBS)
#if defined(_WIN32) && defined(vtkmetaio_BUILD_SHARED_LIBS)
#ifdef vtkmetaio_EXPORTS
#define METAIO_EXPORT __declspec(dllexport)
#define METAIO_EXTERN
......
......@@ -76,7 +76,7 @@ public:
switch (itype)
{
case WGL:
out << "#ifdef WIN32" << endl;
out << "#ifdef _WIN32" << endl;
break;
case GLX:
out << "#ifdef VTK_USE_X" << endl;
......
......@@ -32,7 +32,7 @@
#endif
#endif
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
#define WIN32_JAWT_LOCK_HACK
#endif
......@@ -108,7 +108,7 @@ Java_vtk_vtkPanel_RenderCreate(JNIEnv *env, jobject canvas, jobject id0)
}
// Here is the win32 drawing code
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
temp0->Finalize();
JAWT_Win32DrawingSurfaceInfo* dsi_win;
dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
......@@ -209,7 +209,7 @@ Java_vtk_rendering_awt_vtkInternalAwtComponent_RenderCreate(JNIEnv *env, jobject
}
// Here is the win32 drawing code
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
temp0->Finalize();
JAWT_Win32DrawingSurfaceInfo* dsi_win;
dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
......
......@@ -20,7 +20,7 @@
#include "vtkCommand.h"
#include "vtkTcl.h"
#ifdef WIN32
#ifdef _WIN32
#define VTKTCL_EXPORT __declspec( dllexport )
#else
#define VTKTCL_EXPORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment