Commit d445e827 authored by bonnell's avatar bonnell

Change windows #define to work with more than 1 or two versions of the MS compiler

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@2825 18c085ea-50e0-402c-830e-de6fd14e8384
parent 0a7c387b
......@@ -45,7 +45,7 @@
#else
#define AVTEXCEPTION_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -46,7 +46,7 @@
#else
#define COMM_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -468,7 +468,7 @@ GetRealVariableHelper(const string &var, set<string> expandedVars)
}
// For each leaf, look for a real variable
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
// Don't use const iterator on win32 MSVC 6.
for (std::vector<std::string>::iterator it = varLeaves.begin();
it != varLeaves.end(); ++it)
......
......@@ -45,7 +45,7 @@
#else
#define EXPR_API __declspec(dllimport)
#endif
#ifdef USING_MSVC6
#ifdef _MSC_VER
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define MISC_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define PARSER_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -41,7 +41,7 @@
#if defined(_WIN32)
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Disable inheritance by dominance warning message.
#pragma warning(disable:4250)
// Disable DLL interface warning.
......
......@@ -45,7 +45,7 @@
#else
#define PLUGIN_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about inheritance by dominance.
#pragma warning(disable:4250)
// Turn off warning about lack of DLL interface
......
......@@ -45,7 +45,7 @@
#else
#define PROXYBASE_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define STATE_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -830,7 +830,7 @@ Ares::Ares(const char * const *list, const char * const *dirList, int listN)
//
// The state is everything after the prefix and before the ".root".
//
char *root = strstr(list[i], ".root");
const char *root = strstr(list[i], ".root");
int stateLength = root - (list[i] + length);
strncpy(tmp, list[i]+length, stateLength);
tmp[stateLength] = '\0';
......@@ -844,9 +844,9 @@ Ares::Ares(const char * const *list, const char * const *dirList, int listN)
rootFile[i] = false;
validFile[i] = true;
char *firstHyphen = strstr(list[i], "-");
char *secondHyphen = strstr(firstHyphen+1, "-");
char *state = secondHyphen+1;
const char *firstHyphen = strstr(list[i], "-");
const char *secondHyphen = strstr(firstHyphen+1, "-");
const char *state = secondHyphen+1;
const char *end = strstr(state, ".");
if (end == NULL)
{
......@@ -1098,7 +1098,7 @@ Exodus::IsFormat(const char * const *list, int listSize)
for (int i = 0 ; i < listSize ; i++)
{
char *suffix = strstr(list[i], ".root");
const char *suffix = strstr(list[i], ".root");
if (suffix != NULL)
{
//
......@@ -1199,7 +1199,7 @@ Exodus::Exodus(const char * const *list, const char * const *dirList,int listN)
for (int i = 0 ; i < listN ; i++)
{
char *suffix = strstr(list[i], ".root");
const char *suffix = strstr(list[i], ".root");
if (suffix != NULL)
{
rootFile[i] = true;
......@@ -1261,7 +1261,7 @@ SiloObj::IsFormat(const char * const *list, int listSize)
for (int i = 0 ; i < listSize ; i++)
{
char *visit = strstr(list[i] + prefix, ".visit");
const char *visit = strstr(list[i] + prefix, ".visit");
if (visit != NULL)
{
char str[1024];
......@@ -1273,7 +1273,7 @@ SiloObj::IsFormat(const char * const *list, int listSize)
}
else
{
char *mesh = strstr(list[i]+prefix, ".mesh");
const char *mesh = strstr(list[i]+prefix, ".mesh");
if (mesh != NULL)
{
char str[1024];
......
......@@ -453,7 +453,7 @@ StringHelpers::ExtractRESubstr(const char *strToSearch, const char *re)
int matchToExtract;
if (re[0] != '<')
return retval;
char *last = strrchr(re, '>');
const char *last = strrchr(re, '>');
if (last == 0)
return retval;
if (*(last+1) == '\0')
......
......@@ -194,7 +194,7 @@ array_ref_ptr<T>::RemoveReference(void)
}
}
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200) // MSVC 6
template <class T, class S>
#else
template <class T>
......
......@@ -45,7 +45,7 @@
#else
#define UTILITY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -39,7 +39,7 @@
#ifndef VISIT_STREAM_H
#define VISIT_STREAM_H
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
// We're on Windows using the Microsoft VC++ 6.0 compiler. We need to
// include the .h versions of iostream and fstream.
......
......@@ -45,7 +45,7 @@
#else
#define DBATTS_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about signed/unsigned comparison.
#pragma warning(disable:4018)
// Turn off warning about lack of DLL interface.
......
......@@ -45,7 +45,7 @@
#else
#define AVTDDF_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define DATABASE_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about possible loss of data
#pragma warning(disable:4244)
// Turn off warning about inheritance via dominance
......
......@@ -92,7 +92,8 @@ namespace
// Use the preprocessor to help ensure that the right template ExchangeData
// function is instantiated.
//
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
// MSVC 6
static float hack_float;
static char hack_char;
static unsigned char hack_unsigned_char;
......@@ -1241,7 +1242,7 @@ vector<vtkDataArray*>
avtUnstructuredDomainBoundaries::ExchangeData(vector<int> &domainNum,
bool isPointData,
vector<vtkDataArray*> &data
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
, T signature
#endif
)
......@@ -1251,7 +1252,7 @@ avtUnstructuredDomainBoundaries::ExchangeData(vector<int> &domainNum,
T ***gainedData;
int **nGainedTuples;
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
//
// This code is an "inline" copy of the CommunicateDataInformation method
// without the various parallel ifdefs. The MSVC 6.0 compiler refused to
......@@ -2442,7 +2443,8 @@ avtUnstructuredDomainBoundaries::CommunicateMaterialInformation(
// Mark C. Miller, Mon Jan 22 22:09:01 PST 2007
// Changed MPI_COMM_WORLD to VISIT_MPI_COMM
// ****************************************************************************
#if !defined(_WIN32) || (defined(_WIN32) && !defined(USING_MSVC6))
#if !(defined(_MSC_VER) && (_MSC_VER <= 1200))
// not on windows or not on windows using MSVC 6
template <class T>
void
avtUnstructuredDomainBoundaries::CommunicateDataInformation(
......
......@@ -168,7 +168,7 @@ class DATABASE_API avtUnstructuredDomainBoundaries : public avtDomainBoundaries
vector<vtkDataArray*> ExchangeData(vector<int> &domainNum,
bool isPointData,
vector<vtkDataArray*> &data
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
// Extra argument to help the compiler instantiate the right function.
, T signature
#endif
......@@ -202,7 +202,8 @@ class DATABASE_API avtUnstructuredDomainBoundaries : public avtDomainBoundaries
int **&, float ***&);
#if !defined(USING_MSVC6)
#if !(defined(_MSC_VER) && (_MSC_VER <= 1200))
// not using MSVC 6 or earlier
template <class T>
void CommunicateDataInformation(const vector<int> &domain2proc,
const vector<int> &domainNum,
......
......@@ -248,7 +248,7 @@ avtUnstructuredPointBoundaries::Generate(vector<int> domainNum,
}
vector<int> givenCells, givenPoints;
#if defined(_WIN32) && defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200) // MSVC 6
for(std::set<int>::const_iterator cell_it = cells.begin();
cell_it != cells.end(); ++cell_it)
givenCells.push_back(*cell_it);
......
......@@ -45,7 +45,7 @@
#else
#define EXPRESSION_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about inheritance by dominance.
#pragma warning(disable:4250)
// Turn off warning about lack of DLL interface
......
......@@ -45,7 +45,7 @@
#else
#define AVTFILEWRITER_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define AVTFILTERS_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define MIR_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about possible loss of data
#pragma warning(disable:4244)
// Turn off warning about inheritance via dominance
......
......@@ -45,7 +45,7 @@
#else
#define MATH_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define PIPELINE_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about inheritance by dominance.
#pragma warning(disable:4250)
// Turn off warning about lack of DLL interface
......@@ -59,7 +59,7 @@
// Define VISIT_LONG_LONG so the Windows compiler can handle it.
#ifndef VISIT_LONG_LONG
#if defined(USING_MSVC6)
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
#define VISIT_LONG_LONG __int64
#else
#define VISIT_LONG_LONG long long
......
......@@ -45,7 +45,7 @@
#else
#define PLOTTER_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about inheritance by dominance.
#pragma warning(disable:4250)
// Turn off warning about lack of DLL interface
......
......@@ -45,7 +45,7 @@
#else
#define QTVISWINDOW_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define QUERY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about inheritance by dominance.
#pragma warning(disable:4250)
// Turn off warning about lack of DLL interface
......
......@@ -45,7 +45,7 @@
#else
#define AVTSHAPELETS_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define AVTVIEW_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define VISWINDOW_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -86,7 +86,7 @@ avtPLOT2DFileFormat::avtPLOT2DFileFormat(const char *fname)
{
EXCEPTION1(InvalidFilesException, fname);
}
char *start_of_ext = strstr(fname, ".p2d");
const char *start_of_ext = strstr(fname, ".p2d");
char soln_file[1024];
strncpy(soln_file, fname, start_of_ext - fname);
strcpy(soln_file + (start_of_ext - fname), ".q");
......
......@@ -2815,7 +2815,7 @@ avtPLOT3DFileFormat::avtPLOT3DFileFormat(const char *fname)
else if (strstr(fname, ".x") != NULL)
{
char soln_file[1024];
char *q = strstr(fname, ".x");
const char *q = strstr(fname, ".x");
strncpy(soln_file, fname, q-fname);
strcpy(soln_file + (q-fname), ".q");
......@@ -2826,7 +2826,7 @@ avtPLOT3DFileFormat::avtPLOT3DFileFormat(const char *fname)
else if (strstr(fname, ".q") != NULL)
{
char points_file[1024];
char *x = strstr(fname, ".q");
const char *x = strstr(fname, ".q");
strncpy(points_file, fname, x-fname);
strcpy(points_file + (x-fname), ".x");
......
......@@ -45,7 +45,7 @@
#else
#define ENGINE_PROXY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define ENGINE_RPC_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define GUI_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define LAUNCHER_PROXY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define LAUNCHER_RPC_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define MDSERVER_PROXY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define MDSERVER_RPC_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -229,10 +229,27 @@ cp $TOPDIR/src/include/vtk/Common/*.txx include/VTK
cp $TOPDIR/src/include/vtk/Filtering/*.txx include/VTK
# Copy vtkstd
cp -R $TOPDIR/src/include/vtk/vtkstd include/VTK
# Copy vtkexpat
cp $TOPDIR/src/include/vtk/Utilities/vtk_expat.h include/VTK
cp -R $TOPDIR/src/include/vtk/Utilities/vtkexpat include/VTK
# Copy vtktiff
cp $TOPDIR/src/include/vtk/Utilities/vtk_tiff.h include/VTK
cp -R $TOPDIR/src/include/vtk/Utilities/vtktiff include/VTK
# Copy vtkzlib
cp $TOPDIR/src/include/vtk/Utilities/vtk_zlib.h include/VTK
cp -R $TOPDIR/src/include/vtk/Utilities/vtkzlib include/VTK
# Copy mangled mesa
#mkdir include/VTK/MangleMesaInclude
#cp $TOPDIR/src/include/vtk/MangleMesaInclude/*.h include/VTK/MangleMesaInclude
#overwrite the linux version with windows version headers
cd include/VTK
mv MSVC/vtk*.h .
mv MSVC/tiffDllConfig.h ./vtktiff/
mv MSVC/zlibDllConfig.h ./vtkzlib/
rm -rf MSVC
#
# Create an include/Mesa directory and copy the Mesa files to it.
......
This diff is collapsed.
......@@ -45,7 +45,7 @@
#else
#define VIEWER_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define VIEWER_PROXY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define VIEWER_RPC_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define VISIT_VTK_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define VISIT_VTK_LIGHT_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define PARALLEL_VISIT_VTK_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -51,11 +51,15 @@
#include <Utility.h>
#include <VisItException.h>
#ifdef WIN32
#define VISITCLI_API __declspec(dllimport)
#else
#define VISITCLI_API
#endif
// For the VisIt module.
extern "C" void cli_initvisit(int, bool, int, char **, int, char **);
extern "C" void cli_runscript(const char *);
extern "C" int Py_Main(int, char **);
extern "C" VISITCLI_API int Py_Main(int, char **);
// ****************************************************************************
// Function: main
......
......@@ -45,7 +45,7 @@
#else
#define VISITPY_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
......@@ -45,7 +45,7 @@
#else
#define WINUTIL_API __declspec(dllimport)
#endif
#if defined(USING_MSVC6) || defined(USING_MSVC7)
#if defined(_MSC_VER)
// Turn off warning about lack of DLL interface
#pragma warning(disable:4251)
// Turn off warning non-dll class is base for dll-interface class.
......
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