Skip to content

Commit

Permalink
windows: check for _WIN32, not WIN32
Browse files Browse the repository at this point in the history
  • Loading branch information
mathstuf committed Mar 22, 2016
1 parent a518006 commit f53b8a1
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Common/Core/vtkConfigure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

/* Atomic operations */
#cmakedefine VTK_HAVE_SYNC_BUILTINS
#if defined(WIN32)
#if defined(_WIN32)
#cmakedefine VTK_HAS_INTERLOCKEDADD
#endif

Expand Down
2 changes: 1 addition & 1 deletion Common/Core/vtkWin32Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Common/System/Testing/Cxx/otherTimerLog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void otherTimerLogTest(ostream& strm)
{
a *= a;
}
#ifndef WIN32
#ifndef _WIN32
sleep (1);
#else
Sleep(1000);
Expand Down
2 changes: 1 addition & 1 deletion Filters/FlowPaths/vtkParticleTracerBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Filters/FlowPaths/vtkTemporalStreamTracer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Filters/StatisticsGnuR/vtkRInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -75,7 +75,7 @@ class vtkImplementationRSingleton
return;
}

#ifndef WIN32
#ifndef _WIN32
R_SignalHandlers = 0;
#endif

Expand All @@ -97,7 +97,7 @@ class vtkImplementationRSingleton
R_CStackLimit = (uintptr_t)-1;
#endif

#ifndef WIN32
#ifndef _WIN32
R_Interactive = static_cast<Rboolean>(TRUE);
#endif
setup_Rmainloop();
Expand All @@ -112,7 +112,7 @@ class vtkImplementationRSingleton
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");
Expand Down
6 changes: 3 additions & 3 deletions IO/Image/Testing/Cxx/TestTIFFReaderMultiple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <vtkSmartPointer.h>
#include "vtkTestErrorObserver.h"

#ifndef WIN32
#ifndef _WIN32
#include <fcntl.h>
#endif

Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion IO/Import/vtkVRMLImporter_Yacc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ void vtkVRMLYaccData::expect(int type)

#define FLEX_SCANNER

#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
Expand Down
4 changes: 2 additions & 2 deletions IO/LSDyna/private/LSDynaFamily.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions IO/LSDyna/private/LSDynaFamily.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions IO/LSDyna/vtkLSDynaReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion IO/MySQL/vtkMySQLQuery.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <errmsg.h>


#if defined(WIN32)
#if defined(_WIN32)
# include <string.h>
# include <locale.h>
# define LOWERCASE_COMPARE _stricmp
Expand Down
2 changes: 1 addition & 1 deletion Interaction/Style/vtkInteractorStyleUnicam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Rendering/OpenGL/vtkOpenGLExtensionManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Testing/GenericBridge/vtkBridgeExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty/VPIC/VPICGlobal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <iomanip>
#include <algorithm>

#ifdef WIN32
#ifdef _WIN32
const static char * Slash = "\\";
#else
const static char * Slash = "/";
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty/VPIC/VPICView.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <algorithm>
#include "math.h"

#ifdef WIN32
#ifdef _WIN32
const static char * Slash = "\\";
#else
const static char * Slash = "/";
Expand Down
2 changes: 1 addition & 1 deletion Utilities/DICOMParser/DICOMAppHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion Utilities/MetaIO/vtkmetaio/localMetaConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Utilities/ParseOGLExt/ParseOGLExt.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Extension {
switch (itype)
{
case WGL:
out << "#ifdef WIN32" << endl;
out << "#ifdef _WIN32" << endl;
break;
case GLX:
out << "#ifdef VTK_USE_X" << endl;
Expand Down
6 changes: 3 additions & 3 deletions Wrapping/Java/vtkJavaAwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#endif
#endif

#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32)
#define WIN32_JAWT_LOCK_HACK
#endif

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Wrapping/Tcl/vtkTclUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "vtkCommand.h"
#include "vtkTcl.h"

#ifdef WIN32
#ifdef _WIN32
#define VTKTCL_EXPORT __declspec( dllexport )
#else
#define VTKTCL_EXPORT
Expand Down

0 comments on commit f53b8a1

Please sign in to comment.