diff --git a/CMakeLists.txt b/CMakeLists.txt index c7aeeb1db6..4c841d141c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,9 +111,9 @@ add_definitions(-DCSFDB) if(WIN32) add_definitions(/DWNT -wd4996) elseif(APPLE) - add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H) + add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS) else() - add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN) + add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DLIN) endif() # enable structured exceptions for MSVC diff --git a/samples/qt/IESample/IESample.pro b/samples/qt/IESample/IESample.pro index 05ccdcfc46..b2127cd78a 100755 --- a/samples/qt/IESample/IESample.pro +++ b/samples/qt/IESample/IESample.pro @@ -51,7 +51,7 @@ unix { !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX - DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL + DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD LIBS += -lfreeimageplus LIBS += -ltbb -ltbbmalloc diff --git a/samples/qt/Tutorial/Tutorial.pro b/samples/qt/Tutorial/Tutorial.pro index e133f70e47..e0b4e2f3ed 100755 --- a/samples/qt/Tutorial/Tutorial.pro +++ b/samples/qt/Tutorial/Tutorial.pro @@ -54,7 +54,7 @@ unix { !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX - DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL + DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD LIBS += -lfreeimageplus LIBS += -ltbb -ltbbmalloc diff --git a/samples/qt/VoxelDemo/VoxelDemo.pro b/samples/qt/VoxelDemo/VoxelDemo.pro index 0fd2318781..d99102ec85 100644 --- a/samples/qt/VoxelDemo/VoxelDemo.pro +++ b/samples/qt/VoxelDemo/VoxelDemo.pro @@ -39,7 +39,7 @@ unix { !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX - DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL + DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD LIBS += -lfreeimageplus LIBS += -ltbb -ltbbmalloc diff --git a/src/BRepTest/BRepTest_ChamferCommands.cxx b/src/BRepTest/BRepTest_ChamferCommands.cxx index 45e2347f46..e53de8a766 100644 --- a/src/BRepTest/BRepTest_ChamferCommands.cxx +++ b/src/BRepTest/BRepTest_ChamferCommands.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include @@ -31,11 +27,6 @@ #include #include -#ifdef HAVE_STRINGS_H -# include -#endif - - //========================================================================= // function : chamfer diff --git a/src/BRepTest/BRepTest_CheckCommands.cxx b/src/BRepTest/BRepTest_CheckCommands.cxx index 701aca3232..f13c5ee337 100644 --- a/src/BRepTest/BRepTest_CheckCommands.cxx +++ b/src/BRepTest/BRepTest_CheckCommands.cxx @@ -15,10 +15,6 @@ // commercial license or contractual agreement. #include -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include @@ -72,9 +68,6 @@ #include #include -#ifdef HAVE_STRINGS_H -# include -#endif static char* checkfaultyname = NULL; Standard_EXPORT void BRepTest_CheckCommands_SetFaultyName(const char* name) diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index 54da5a851a..c4df4eb297 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include @@ -71,13 +67,10 @@ #include -#ifdef WNT +#ifdef _WIN32 //#define strcasecmp _stricmp Already defined Standard_IMPORT Draw_Viewer dout; #endif -#ifdef HAVE_STRINGS_H -# include -#endif static BRepFeat_MakeCylindricalHole theHole; static Standard_Boolean WithControl = Standard_True; diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index 8c45f8e154..ec1c1c8448 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -14,11 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - -#include #include #include #include @@ -57,14 +52,7 @@ #include #include -#ifdef WNT -//#define strcasecmp strcmp Already defined -#endif -#ifdef HAVE_STRINGS_H -# include -#endif #include -//#endif static Standard_Real t3d = 1.e-4; diff --git a/src/BRepTest/BRepTest_SurfaceCommands.cxx b/src/BRepTest/BRepTest_SurfaceCommands.cxx index fff7fb20ad..cf26e9411e 100644 --- a/src/BRepTest/BRepTest_SurfaceCommands.cxx +++ b/src/BRepTest/BRepTest_SurfaceCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include @@ -46,13 +43,10 @@ #include #include -#ifdef WNT +#ifdef _WIN32 //#define strcasecmp strcmp Already defined #include #endif -#ifdef HAVE_STRINGS_H -# include -#endif //----------------------------------------------------------------------- // suppressarg : suppress a[d],modifie na-- diff --git a/src/BRepTest/BRepTest_TopologyCommands.cxx b/src/BRepTest/BRepTest_TopologyCommands.cxx index a03f7b942f..b153e72055 100644 --- a/src/BRepTest/BRepTest_TopologyCommands.cxx +++ b/src/BRepTest/BRepTest_TopologyCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include @@ -49,10 +46,6 @@ #include #include -#ifdef HAVE_STRINGS_H -# include -#endif - //======================================================================= // topop //======================================================================= diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 944ef26bc1..b89e2bd417 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include @@ -50,14 +46,10 @@ // memory management #include -//#ifdef WNT #include -#ifdef WNT +#ifdef _WIN32 extern Draw_Viewer dout; #endif -#ifdef HAVE_STRINGS_H -# include -#endif #define Characters(IArg) (strspn (Arg[IArg], "0123456789.+-eE") != strlen (Arg[IArg])) #define Float(IArg) (strspn (Arg[IArg], "0123456789+-") != strlen (Arg[IArg])) diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx index 7884ee3eba..ed04b5f8fc 100644 --- a/src/Draw/Draw.cxx +++ b/src/Draw/Draw.cxx @@ -14,38 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#if defined(HAVE_TIME_H) || defined(WNT) -# include -#endif - #include #include #include #include -#ifdef HAVE_SYS_TIME_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif - - #include #include diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 00a5492312..4296fa5fd6 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -51,26 +51,7 @@ static clock_t CPU_CURRENT; // cpu time already used at last #else /* _WIN32 */ #include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif - -#if defined(HAVE_TIME_H) -# include -#endif - -#ifdef HAVE_SIGNAL_H -# include -#endif - -#ifdef HAVE_SYS_SIGNAL_H -# include -#endif +#include #if defined (__hpux) || defined ( HPUX ) #define RLIM_INFINITY 0x7fffffff diff --git a/src/Draw/Draw_GraphicCommands.cxx b/src/Draw/Draw_GraphicCommands.cxx index 983de89b3c..328b57b79d 100644 --- a/src/Draw/Draw_GraphicCommands.cxx +++ b/src/Draw/Draw_GraphicCommands.cxx @@ -18,10 +18,6 @@ // Modif : DFO 05/11/96 -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include @@ -34,13 +30,10 @@ #include #include -#ifdef WNT +#ifdef _WIN32 extern Draw_Viewer dout; extern Standard_Boolean Draw_Batch; #endif -#ifdef HAVE_STRINGS_H -# include -#endif extern Standard_Boolean Draw_BlackBackGround; diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx index 116d555bb1..bbceedfd14 100644 --- a/src/Draw/Draw_Interpretor.cxx +++ b/src/Draw/Draw_Interpretor.cxx @@ -29,14 +29,14 @@ #include #include +#ifndef _WIN32 +#include +#endif // for capturing of cout and cerr (dup(), dup2()) #ifdef _MSC_VER #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif #if ! defined(STDOUT_FILENO) #define STDOUT_FILENO fileno(stdout) diff --git a/src/Draw/Draw_Main.cxx b/src/Draw/Draw_Main.cxx index b2eb7653d3..c63bc69d13 100644 --- a/src/Draw/Draw_Main.cxx +++ b/src/Draw/Draw_Main.cxx @@ -41,17 +41,7 @@ // - Standard_IMPOR is differently defined, // - Draw_Appli is differently declared. - - -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif - -#ifdef WNT +#ifdef _WIN32 #include /* SW_SHOW */ #endif diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index e94de8fea9..be7f061d01 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. #include -#ifdef HAVE_CONFIG_H -# include -#endif #include #include @@ -36,12 +33,9 @@ #include -#ifdef WNT +#ifdef _WIN32 extern Draw_Viewer dout; #endif -#ifdef HAVE_STRINGS_H -# include -#endif #include #include diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx index 8d102b8dfb..7b9208e3e4 100644 --- a/src/Draw/Draw_Window.cxx +++ b/src/Draw/Draw_Window.cxx @@ -94,43 +94,9 @@ defaultPrompt: #if !defined(_WIN32) && !defined(__WIN32__) -#ifdef HAVE_CONFIG_H -# include -#endif - #include - -#ifdef HAVE_SYS_TIME_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifdef HAVE_SYS_FILIO_H -#include -#else -#include -#endif - -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - #include - -#ifdef HAVE_STRINGS_H -# include -#endif - -#include +#include #if defined(__APPLE__) && !defined(MACOSX_USE_GLX) // use forward declaration for small subset of used Tk functions diff --git a/src/DrawTrSurf/DrawTrSurf.cxx b/src/DrawTrSurf/DrawTrSurf.cxx index eeef95762b..3b2c4abf16 100644 --- a/src/DrawTrSurf/DrawTrSurf.cxx +++ b/src/DrawTrSurf/DrawTrSurf.cxx @@ -14,20 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_IOS -# include -#elif defined(HAVE_IOS_H) -# include -#endif - -#ifdef HAVE_STRINGS_H -# include -#endif - #include #include @@ -1741,7 +1727,7 @@ static void pntsave(const Handle(Draw_Drawable3D)&d, ostream& OS) { Handle(DrawTrSurf_Point) N = Handle(DrawTrSurf_Point)::DownCast(d); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) ios::fmtflags F = OS.flags(); OS.setf(ios::scientific,ios::floatfield); OS.precision(15); @@ -1758,7 +1744,7 @@ static void pntsave(const Handle(Draw_Drawable3D)&d, ostream& OS) OS << "0 "; OS << P.X() << " " << P.Y() << "\n"; } -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) OS.setf(F); #else OS.setf(form); @@ -1803,7 +1789,7 @@ static void triasave(const Handle(Draw_Drawable3D)&d, ostream& OS) { Handle(DrawTrSurf_Triangulation) T = Handle(DrawTrSurf_Triangulation)::DownCast(d); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) ios::fmtflags F = OS.flags(); OS.setf(ios::scientific,ios::floatfield); OS.precision(15); @@ -1812,7 +1798,7 @@ static void triasave(const Handle(Draw_Drawable3D)&d, ostream& OS) std::streamsize prec = OS.precision(15); #endif Poly::Write(T->Triangulation(),OS); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) OS.setf(F); #else OS.setf(form); @@ -1844,7 +1830,7 @@ static void poly3dsave(const Handle(Draw_Drawable3D)&d, ostream& OS) { Handle(DrawTrSurf_Polygon3D) T = Handle(DrawTrSurf_Polygon3D)::DownCast(d); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) ios::fmtflags F = OS.flags(); OS.setf(ios::scientific,ios::floatfield); OS.precision(15); @@ -1853,7 +1839,7 @@ static void poly3dsave(const Handle(Draw_Drawable3D)&d, ostream& OS) std::streamsize prec = OS.precision(15); #endif Poly::Write(T->Polygon3D(),OS); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) OS.setf(F); #else OS.setf(form); @@ -1884,7 +1870,7 @@ static void poly2dsave(const Handle(Draw_Drawable3D)&d, ostream& OS) { Handle(DrawTrSurf_Polygon2D) T = Handle(DrawTrSurf_Polygon2D)::DownCast(d); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) ios::fmtflags F = OS.flags(); OS.setf(ios::scientific, ios::floatfield); OS.precision(15); @@ -1893,7 +1879,7 @@ static void poly2dsave(const Handle(Draw_Drawable3D)&d, ostream& OS) std::streamsize prec = OS.precision(15); #endif Poly::Write(T->Polygon2D(),OS); -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) OS.setf(F); #else OS.setf(form); diff --git a/src/DrawTrSurf/DrawTrSurf_Point.cxx b/src/DrawTrSurf/DrawTrSurf_Point.cxx index 9c93a255e5..9b09b9ae42 100644 --- a/src/DrawTrSurf/DrawTrSurf_Point.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Point.cxx @@ -14,16 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_IOS -# include -#elif defined(HAVE_IOS_H) -# include -#endif - #include #include @@ -186,7 +176,7 @@ Handle(Draw_Drawable3D) DrawTrSurf_Point::Copy() const void DrawTrSurf_Point::Dump(Standard_OStream& S) const { -#if defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX) +#if !defined(_WIN32) && !defined(__sgi) && !defined(IRIX) ios::fmtflags F = S.flags(); S.setf(ios::scientific,ios::floatfield); S.precision(15); @@ -198,7 +188,7 @@ void DrawTrSurf_Point::Dump(Standard_OStream& S) const S << "Point : " << myPoint.X() << ", " << myPoint.Y() << ", " << myPoint.Z() < -#endif #include #include #include @@ -86,13 +83,10 @@ //#ifdef WNT #include -#ifdef WNT +#ifdef _WIN32 //#define strcasecmp strcmp Already defined Standard_IMPORT Draw_Viewer dout; #endif -#ifdef HAVE_STRINGS_H -# include -#endif diff --git a/src/Graphic3d/Graphic3d_Structure.pxx b/src/Graphic3d/Graphic3d_Structure.pxx index 41538693f1..a9fb02e64c 100644 --- a/src/Graphic3d/Graphic3d_Structure.pxx +++ b/src/Graphic3d/Graphic3d_Structure.pxx @@ -15,20 +15,6 @@ #ifndef STRUCTURE_PXX_INCLUDED #define STRUCTURE_PXX_INCLUDED -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_LIMITS -# include -#elif defined (HAVE_LIMITS_H) -# include -#endif - -#ifdef WNT -# include -#endif - // structure priority : range (do not change this range !) // call_togl_displaystructure, CALL_DEF_VIEW, MajView ... #define Structure_MAX_PRIORITY 10 diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index 8a8739b787..fe573f6da4 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -13,10 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H - #include -#endif - #ifdef HAVE_FREEIMAGE #include diff --git a/src/OSD/OSD.cxx b/src/OSD/OSD.cxx index 572a123f39..24478abf26 100644 --- a/src/OSD/OSD.cxx +++ b/src/OSD/OSD.cxx @@ -16,10 +16,7 @@ #include #include #include -#if HAVE_IEEEFP_H -# include -#endif -#if !defined(HAVE_FINITE) && defined(isfinite) +#if defined(isfinite) # define finite isfinite #endif @@ -82,13 +79,8 @@ Standard_Boolean OSD::CStringToReal(const Standard_CString aString, #else # define SLEEP(NSEC) sleep(NSEC) #endif - -#ifdef HAVE_VALUES_H -//# include -#endif - -#ifdef HAVE_UNISTD_H -# include +#ifndef _WIN32 +#include #endif void OSD::SecSleep(const Standard_Integer aDelay) @@ -101,7 +93,7 @@ void OSD::SecSleep(const Standard_Integer aDelay) //purpose : Cause the process to sleep during a amount of milliseconds //======================================================================= -#ifdef WNT +#ifdef _WIN32 void OSD::MilliSecSleep(const Standard_Integer aDelay) { @@ -110,9 +102,7 @@ void OSD::MilliSecSleep(const Standard_Integer aDelay) #else -#ifdef HAVE_SYS_TIME_H -# include -#endif +#include void OSD::MilliSecSleep(const Standard_Integer aDelay) { diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx index 900e91c847..99b4e284a5 100644 --- a/src/OSD/OSD_Chronometer.cxx +++ b/src/OSD/OSD_Chronometer.cxx @@ -23,21 +23,8 @@ //---------- Systemes autres que WNT : ---------------------------------- -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_SYS_TIMES_H -# include -#endif +#include +#include #ifdef SOLARIS # include @@ -51,7 +38,7 @@ # define _sysconf sysconf #endif -#if defined(HAVE_TIME_H) || defined(WNT) || defined(DECOSF1) +#if defined(DECOSF1) # include #endif @@ -59,12 +46,6 @@ # define CLK_TCK CLOCKS_PER_SEC # endif -#ifdef HAVE_LIMITS -# include -#elif defined (HAVE_LIMITS_H) -# include -#endif - #if (defined(__APPLE__)) #include #include diff --git a/src/OSD/OSD_Directory.cxx b/src/OSD/OSD_Directory.cxx index bfdd8b11ce..f64da88aae 100644 --- a/src/OSD/OSD_Directory.cxx +++ b/src/OSD/OSD_Directory.cxx @@ -12,39 +12,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include #include #include -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_STAT_H -# include -#endif - -#ifdef HAVE_SYS_PARAM_H -# include // For getwd() -#endif - +#include #include - -#ifdef HAVE_UNISTD_H -# include -#endif - #include - -#ifdef HAVE_OSFCN_H -# include -#endif +#include const OSD_WhoAmI Iam = OSD_WDirectory; diff --git a/src/OSD/OSD_DirectoryIterator.cxx b/src/OSD/OSD_DirectoryIterator.cxx index b8924ea5df..d33cbc4547 100644 --- a/src/OSD/OSD_DirectoryIterator.cxx +++ b/src/OSD/OSD_DirectoryIterator.cxx @@ -12,28 +12,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include #include #include - -#ifdef HAVE_DIRENT_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include +#include //const OSD_WhoAmI Iam = OSD_WDirectoryIterator; diff --git a/src/OSD/OSD_Disk.cxx b/src/OSD/OSD_Disk.cxx index 9421127c46..9676004420 100644 --- a/src/OSD/OSD_Disk.cxx +++ b/src/OSD/OSD_Disk.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -27,17 +23,7 @@ const OSD_WhoAmI Iam = OSD_WDisk; extern "C" { #endif - //#include - -#if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H) -# include -#elif defined(HAVE_STATFS) && defined(HAVE_SYS_VFS_H) - // Note: we want to use the "vfs" method on HP, not elsewhere -# include -#elif defined(HAVE_STATFS) -# include -# include -#endif +#include #ifdef __cplusplus } @@ -45,9 +31,7 @@ extern "C" { #include -#if defined(HAVE_STATVFS) extern "C" {int statvfs(const char *, struct statvfs *); } -#endif OSD_Disk::OSD_Disk() : myQuotaSize(0) {} @@ -76,18 +60,6 @@ OSD_Path OSD_Disk::Name()const{ Standard_Integer OSD_Disk::DiskSize(){ -#if !defined(HAVE_STATVFS) - -struct statfs buffer; - if ( statfs (DiskName.ToCString(),&buffer) == 0 ){ - long BSize512 = buffer.f_bsize / 512 ; - return buffer.f_blocks * BSize512 ; - } - else { - myError.SetValue(errno, Iam, "OSD_Disk: statfs failed."); - -#else - struct statvfs buffer; if ( statvfs(DiskName.ToCString(),&buffer) == 0 ){ @@ -96,28 +68,10 @@ struct statvfs buffer; } else { myError.SetValue(errno, Iam, "OSD_Disk: statvfs failed."); - -#endif return 0; } } -#if !defined(HAVE_STATVFS) -Standard_Integer OSD_Disk::DiskFree(){ - -struct statfs buffer; - if ( statfs (DiskName.ToCString(),&buffer) == 0 ){ - long BSize512 = buffer.f_bsize / 512 ; - return buffer.f_bavail * BSize512 ; - } - else { - myError.SetValue(errno, Iam, "OSD_Disk: statfs failed."); - return 0; - } -} - -#else - Standard_Integer OSD_Disk::DiskFree(){ struct statvfs buffer; @@ -131,8 +85,6 @@ struct statvfs buffer; } } -#endif - Standard_Integer OSD_Disk::DiskQuota(){ //@@@ A faire return 0; diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx index e94a8c82d1..afb4ee837a 100644 --- a/src/OSD/OSD_File.cxx +++ b/src/OSD/OSD_File.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - //------------------------------------------------------------------------ // UNIX Part //------------------------------------------------------------------------ @@ -39,22 +35,11 @@ const OSD_WhoAmI Iam = OSD_WFile; #endif #include - -#ifdef HAVE_UNISTD_H -# include -#endif - #include #include #include - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include +#include #define NEWLINE '\10'; diff --git a/src/OSD/OSD_FileIterator.cxx b/src/OSD/OSD_FileIterator.cxx index 106c7bdcf7..d6b9b1117c 100644 --- a/src/OSD/OSD_FileIterator.cxx +++ b/src/OSD/OSD_FileIterator.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -25,28 +21,11 @@ #include #include -#ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) # ifdef VMS extern char *vmsify PARAMS ((char *name, int type)); # endif -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# ifdef HAVE_SYS_NDIR_H -# include -# endif -# ifdef HAVE_SYS_DIR_H -# include -# endif -# ifdef HAVE_NDIR_H -# include -# endif -# ifdef HAVE_VMSDIR_H -# include "vmsdir.h" -# endif /* HAVE_VMSDIR_H */ -#endif /* In GNU systems, defines this macro for us. */ #ifdef _D_NAMLEN diff --git a/src/OSD/OSD_FileNode.cxx b/src/OSD/OSD_FileNode.cxx index a2bc09ca64..98f123ff2a 100644 --- a/src/OSD/OSD_FileNode.cxx +++ b/src/OSD/OSD_FileNode.cxx @@ -12,19 +12,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef _WIN32 //---------------------------------------------------------------------------- //------------------- Linux Sources of OSD_FileNode -------------------------- //---------------------------------------------------------------------------- -#include #include -#include #include #include @@ -32,34 +26,13 @@ #include #include -#if!defined(TM_IN_SYS_TIME) && defined(HAVE_TIME_H) -# include -#elif HAVE_SYS_TIME_H -# include -#endif - -#ifdef HAVE_SYS_TYPES_H -# include -#endif - -#ifdef HAVE_SYS_STAT_H -# include // for "stat" -#endif - #include // For "system" #include #include -#ifdef HAVE_UNISTD_H -# include -#endif - #include - -#ifdef HAVE_OSFCN_H -# include -#endif - +#include +#include const OSD_WhoAmI Iam = OSD_WFileNode; diff --git a/src/OSD/OSD_Host.cxx b/src/OSD/OSD_Host.cxx index 536305759a..da086d42a4 100644 --- a/src/OSD/OSD_Host.cxx +++ b/src/OSD/OSD_Host.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -27,20 +23,11 @@ const OSD_WhoAmI Iam = OSD_WHost; #include -#ifdef HAVE_SYS_UTSNAME_H -# include // For 'uname' -#endif - -#ifdef HAVE_NETDB_H -# include // This is for 'gethostbyname' -#endif - +#include // For 'uname' +#include // This is for 'gethostbyname' +#include #include -#ifdef HAVE_SYS_IOCTL_H -# include -#endif - #if defined(__osf__) || defined(DECOSF1) #include #include // For 'getsysinfo' @@ -52,26 +39,6 @@ extern "C" { } #endif -#ifdef HAVE_SYSENT_H -# include // for 'gethostname' -#endif - -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - -#ifdef HAVE_SYS_UNISTD_H -# include -#endif - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_SYS_SYSTEMINFO_H -# include -#endif - extern "C" {int sysinfo(int, char *, long);} @@ -84,22 +51,11 @@ OSD_Host::OSD_Host(){} TCollection_AsciiString OSD_Host::SystemVersion(){ struct utsname info; TCollection_AsciiString result; -#ifdef HAVE_SYS_SYSTEMINFO_H -char buf[100]; -#endif uname (&info); result = info.sysname; result += " "; result += info.release; -#ifdef HAVE_SYS_SYSTEMINFO_H - result += " "; - sysinfo(SI_ARCHITECTURE,buf,99); - result += buf; - result += " "; - sysinfo(SI_HW_PROVIDER,buf,99); - result += buf; -#endif return(result); } diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index 97ca76255c..0fbde8bfc1 100644 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -25,10 +21,6 @@ #include #include -#ifdef HAVE_SYS_UTSNAME_H -//# include -#endif - static OSD_SysType whereAmI(){ #if defined(__digital__) || defined(__FreeBSD__) || defined(SUNOS) || defined(__APPLE__) return OSD_UnixBSD; diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index 2cfdff3efe..2a6daf622c 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -25,28 +21,11 @@ const OSD_WhoAmI Iam = OSD_WProcess; #include - -#ifdef HAVE_UNISTD_H -# include -#endif - #include - -#ifdef HAVE_SYS_PARAM_H -# include -#endif - -#if defined(HAVE_TIME_H) || defined(WNT) -# include -#endif - -#ifdef HAVE_SYS_TIME_H -# include -#endif - -#ifdef HAVE_PWD_H -# include // For command getpwuid -#endif +#include +#include +#include // For command getpwuid +#include OSD_Process::OSD_Process(){ } diff --git a/src/OSD/OSD_SharedLibrary.cxx b/src/OSD/OSD_SharedLibrary.cxx index b42792498c..db201cb9f8 100644 --- a/src/OSD/OSD_SharedLibrary.cxx +++ b/src/OSD/OSD_SharedLibrary.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #ifndef WNT #include @@ -24,10 +20,6 @@ #include -#ifdef HAVE_MALLOC_H -# include -#endif - #ifdef __some_crappy_system__ /* * Values for 'mode' argument in dlopen(). @@ -49,13 +41,7 @@ extern "C" {int dlclose ( void *handle );} extern "C" {void *dlerror (void);} #endif -#ifdef HAVE_DLFCN_H -# include -#endif - -#ifdef HAVE_DL_H -# include -#endif +#include extern "C" {size_t strlen (const char* s );} @@ -125,25 +111,12 @@ void OSD_SharedLibrary::SetName(const Standard_CString aName) { // // ---------------------------------------------------------------- Standard_Boolean OSD_SharedLibrary::DlOpen(const OSD_LoadMode aMode ) { - -#ifdef HAVE_DL_H -if (aMode == OSD_RTLD_LAZY){ -// myHandle = cxxshl_load(myName, BIND_FIRST | BIND_TOGETHER | BIND_DEFERRED | BIND_VERBOSE | DYNAMIC_PATH, 0L); - myHandle = shl_load(myName, BIND_FIRST | BIND_TOGETHER | BIND_DEFERRED | BIND_VERBOSE | DYNAMIC_PATH, 0L); -} -else if (aMode == OSD_RTLD_NOW){ -// myHandle = cxxshl_load(myName, BIND_FIRST | BIND_TOGETHER | BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, 0L); - myHandle = shl_load(myName, BIND_FIRST | BIND_TOGETHER | BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, 0L); - -} -#else if (aMode == OSD_RTLD_LAZY){ myHandle = dlopen (myName,RTLD_LAZY); } else if (aMode == OSD_RTLD_NOW){ myHandle = dlopen (myName,RTLD_NOW); } -#endif if (!BAD(myHandle)){ return Standard_True; @@ -161,8 +134,6 @@ else { // // ---------------------------------------------------------------- OSD_Function OSD_SharedLibrary::DlSymb(const Standard_CString aName )const{ - -#ifndef HAVE_DL_H void (*fp)(); fp = (void (*)()) dlsym (myHandle,aName); if (!BAD(fp)){ @@ -171,20 +142,6 @@ if (!BAD(fp)){ else { return (OSD_Function)NULL; } -#else - void *adr_get = NULL; -// shl_t handlesym=0 ; - - errno = 0 ; - // if ( shl_findsym( &handlesym,aName,TYPE_PROCEDURE,&adr_get) == -1 ) { - if ( shl_findsym((shl_t *)&myHandle,aName,TYPE_PROCEDURE,&adr_get) == -1 ) { - if ( errno != 0 ) - perror("OSD_SharedLibrary : shl_findsym perror : ") ; - return (OSD_Function)NULL; - } - else return (OSD_Function) adr_get; -#endif - } // ---------------------------------------------------------------- // @@ -195,13 +152,7 @@ else { // // ---------------------------------------------------------------- void OSD_SharedLibrary::DlClose()const{ - -#ifndef HAVE_DL_H dlclose(myHandle); -#else - shl_unload((shl_t)myHandle); -#endif - } // ---------------------------------------------------------------- // @@ -210,12 +161,7 @@ void OSD_SharedLibrary::DlClose()const{ // // ---------------------------------------------------------------- Standard_CString OSD_SharedLibrary::DlError()const{ -#ifndef HAVE_DL_H return (char*) dlerror(); -#else -perror("shl_load, shl_findsym, or shl_unload : perror : ") ; -return (char*) errno; -#endif } // ---------------------------------------------------------------------------- // Destroy diff --git a/src/OSD/OSD_Timer.cxx b/src/OSD/OSD_Timer.cxx index 9373c11e76..ef8773f2ba 100644 --- a/src/OSD/OSD_Timer.cxx +++ b/src/OSD/OSD_Timer.cxx @@ -19,19 +19,13 @@ // system call gettimeofday. This function is portable and give us // elapsed time in seconds and microseconds. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #ifndef WNT //---------- No Windows NT Systems ---------------------------------- -#ifdef HAVE_SYS_TIME_H -# include -#endif +#include //======================================================================= //function : GetWallClockTime diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx index 31d362b914..249aede8e1 100644 --- a/src/OSD/OSD_signal.cxx +++ b/src/OSD/OSD_signal.cxx @@ -17,10 +17,6 @@ //---------- All Systems except Windows NT : ---------------------------------- -#ifdef HAVE_CONFIG_H -# include -#endif - # include #include @@ -40,16 +36,7 @@ #include // POSIX threads -#ifdef HAVE_PTHREAD_H - #include -#endif - -#ifdef HAVE_PTHREAD_H -static pthread_t getOCCThread () { - static pthread_t TheOCCThread = 0; - return TheOCCThread ; -} -#endif +#include #ifdef linux #include @@ -64,38 +51,10 @@ static Standard_Boolean fCtrlBrk; typedef void (ACT_SIGIO_HANDLER)(void) ; ACT_SIGIO_HANDLER *ADR_ACT_SIGIO_HANDLER = NULL ; -#if defined(HAVE_FLOATINGPOINT_H) && defined(HAVE_SYS_MACHSIG_H) -# include -# include -// JPT : Difference between SUN/SUNOS and SUN/SOLARIS -# define FPE_FLTDIV_TRAP FPE_FLTDIV -# define FPE_INTDIV_TRAP FPE_INTDIV -# define FPE_FLTOVF_TRAP FPE_FLTOVF -# define FPE_INTOVF_TRAP FPE_INTOVF -# define FPE_FLTUND_TRAP FPE_FLTUND - -#define FPE_FLTRES_TRAP FPE_FLTRES /* floating point inexact result */ -#define FPE_FLTINV_TRAP FPE_FLTINV /* invalid floating point operation */ -#define FPE_FLTSUB_TRAP FPE_FLTSUB /* subscript out of range */ - -extern "C" {int ieee_handler(char *,char *, sigfpe_handler_type&);} -# include -#endif - #ifdef DECOSF1 typedef void (* SIG_PFV) (int); #endif -#if defined(HAVE_SIGFPE_H) && defined(HAVE_SYS_SIGINFO_H) -# include -# include -# define FPE_FLTDIV_TRAP FPE_FLTDIV -# define FPE_INTDIV_TRAP FPE_INTDIV -# define FPE_FLTOVF_TRAP FPE_FLTOVF -# define FPE_INTOVF_TRAP FPE_INTOVF -# define FPE_FLTUND_TRAP FPE_FLTUND -#endif - #ifdef __GNUC__ # include # include @@ -108,13 +67,8 @@ typedef void (* SIG_PFV) (int); #endif typedef void (* SIG_PFV) (int); -#ifdef HAVE_SIGNAL_H -# include -#endif - -#ifdef HAVE_SYS_SIGNAL_H -# include -#endif +#include +#include #if defined(HAVE_PTHREAD_H) && defined(NO_CXX_EXCEPTION) //============================================================================ diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx index a0a3af968c..067140b33e 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -24,10 +24,7 @@ #include #include -#ifdef HAVE_CONFIG_H - #include -#endif -#ifdef HAVE_STRING_H +#ifndef _WIN32 #include #endif diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index e7f868960a..9e9003e1db 100755 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -13,10 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H - #include -#endif - #include #include #include diff --git a/src/OpenGl/OpenGl_GraphicDriver_Export.cxx b/src/OpenGl/OpenGl_GraphicDriver_Export.cxx index 7b02825090..abed43e79b 100644 --- a/src/OpenGl/OpenGl_GraphicDriver_Export.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver_Export.cxx @@ -17,10 +17,6 @@ #include -#ifdef HAVE_CONFIG_H -# include -#endif - #ifdef HAVE_GL2PS #include #endif diff --git a/src/OpenGl/OpenGl_LineAttributes.cxx b/src/OpenGl/OpenGl_LineAttributes.cxx index 27625db816..adb984b3ac 100644 --- a/src/OpenGl/OpenGl_LineAttributes.cxx +++ b/src/OpenGl/OpenGl_LineAttributes.cxx @@ -18,10 +18,6 @@ #include #include -#ifdef HAVE_CONFIG_H - #include -#endif - #ifdef HAVE_GL2PS #include #endif diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index e8151fcd82..1d8da4141f 100755 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -25,10 +25,6 @@ #include #include -#ifdef HAVE_CONFIG_H - #include -#endif - #ifdef HAVE_GL2PS #include #endif diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index 29a931be08..80d04093f6 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -13,10 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H - #include -#endif - #include #include diff --git a/src/OpenGl/OpenGl_Workspace_2.cxx b/src/OpenGl/OpenGl_Workspace_2.cxx index 833bb3f8c5..2195f78310 100644 --- a/src/OpenGl/OpenGl_Workspace_2.cxx +++ b/src/OpenGl/OpenGl_Workspace_2.cxx @@ -19,10 +19,6 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif - #if (defined(_WIN32) || defined(__WIN32__)) && defined(HAVE_FREEIMAGE) #include #include diff --git a/src/OpenGl/OpenGl_Workspace_5.cxx b/src/OpenGl/OpenGl_Workspace_5.cxx index b7a3d11569..d952455e6c 100644 --- a/src/OpenGl/OpenGl_Workspace_5.cxx +++ b/src/OpenGl/OpenGl_Workspace_5.cxx @@ -25,10 +25,6 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif - /* OCC22218 NOTE: project dependency on gl2ps is specified by macro */ #ifdef HAVE_GL2PS #include diff --git a/src/PCollection/PCollection_HAsciiString.cxx b/src/PCollection/PCollection_HAsciiString.cxx index 0cd41dbe8f..12bd5f7ac2 100644 --- a/src/PCollection/PCollection_HAsciiString.cxx +++ b/src/PCollection/PCollection_HAsciiString.cxx @@ -19,19 +19,7 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif -#if defined(HAVE_STRING_H) -# include -#endif #include -#if defined(HAVE_STDLIB_H) -# include -#endif -#if defined(HAVE_LIBC_H) -# include -#endif //------------------------------------ // Conversion functions and variables diff --git a/src/PCollection/PCollection_HExtendedString.cxx b/src/PCollection/PCollection_HExtendedString.cxx index 971c053b50..dda4259d64 100644 --- a/src/PCollection/PCollection_HExtendedString.cxx +++ b/src/PCollection/PCollection_HExtendedString.cxx @@ -19,19 +19,7 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif -#if defined(HAVE_STRING_H) -# include -#endif #include -#if defined(HAVE_STDLIB_H) -#include -#endif -#if defined(HAVE_LIBC_H) -# include -#endif //------------------------------------------------------------------------ // Create from an ExtendedString of TCollection diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx index fe4eed3817..f3313bbcef 100644 --- a/src/QABugs/QABugs_3.cxx +++ b/src/QABugs/QABugs_3.cxx @@ -14,9 +14,6 @@ // commercial license or contractual agreement. #include -#ifdef HAVE_CONFIG_H -#include -#endif #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_AP203Context.cxx b/src/STEPConstruct/STEPConstruct_AP203Context.cxx index d2d15d08fc..2660fd2425 100644 --- a/src/STEPConstruct/STEPConstruct_AP203Context.cxx +++ b/src/STEPConstruct/STEPConstruct_AP203Context.cxx @@ -14,28 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#ifdef HAVE_PWD_H +#ifndef _WIN32 # include -#endif - -#ifdef HAVE_NETDB_H # include -#endif - -#ifdef WNT +#else # include #endif -#if defined(HAVE_TIME_H) || defined(WNT) -# include -#endif - #include #include diff --git a/src/Standard/Standard_CLocaleSentry.cxx b/src/Standard/Standard_CLocaleSentry.cxx index e585ff2028..e3c88da670 100644 --- a/src/Standard/Standard_CLocaleSentry.cxx +++ b/src/Standard/Standard_CLocaleSentry.cxx @@ -13,10 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H - #include -#endif - #include #include diff --git a/src/Standard/Standard_ExtString.cxx b/src/Standard/Standard_ExtString.cxx index e3f246ea00..e49b0371f6 100644 --- a/src/Standard/Standard_ExtString.cxx +++ b/src/Standard/Standard_ExtString.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include diff --git a/src/Standard/Standard_MMgrOpt.cxx b/src/Standard/Standard_MMgrOpt.cxx index 51a3423dea..6f6b7d8e4a 100644 --- a/src/Standard/Standard_MMgrOpt.cxx +++ b/src/Standard/Standard_MMgrOpt.cxx @@ -16,37 +16,15 @@ #include #include #include -#ifdef HAVE_CONFIG_H -# include -#endif #include -#ifdef HAVE_STRING_H -# include -#endif - -#ifndef WNT -# include -# include -#endif - -#ifdef WNT -#include +#ifdef _WIN32 +# include #else -# ifdef HAVE_UNISTD_H -# include -# endif -# ifdef HAVE_SYS_MMAN_H -# include /* mmap() */ -# endif +# include /* mmap() */ #endif -#ifdef HAVE_MALLOC_H -# include -#endif -#include -#include -#include + #include // #if defined (__sun) || defined(SOLARIS) diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index cc5d7260c7..9a47dd9085 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -19,10 +19,6 @@ #ifndef _Standard_Macro_HeaderFile # define _Standard_Macro_HeaderFile -#ifdef HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ - // Standard OCC macros: Handle(), STANDARD_TYPE() # define Handle(ClassName) Handle_##ClassName # define STANDARD_TYPE(aType) aType##_Type_() diff --git a/src/Standard/Standard_Type.cxx b/src/Standard/Standard_Type.cxx index 1887a80c15..ac7a9720b9 100644 --- a/src/Standard/Standard_Type.cxx +++ b/src/Standard/Standard_Type.cxx @@ -12,10 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include diff --git a/src/Standard/Standard_values.h b/src/Standard/Standard_values.h index fa39731eb1..696a7a5a2b 100644 --- a/src/Standard/Standard_values.h +++ b/src/Standard/Standard_values.h @@ -21,23 +21,10 @@ #error "Wrong compiler options has been detected. Add /DWNT option for proper compilation!!!!!" #endif -#ifndef WNT -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_LIMITS +#ifdef _WIN32 # include -#elif defined (HAVE_LIMITS_H) -# include #else -#error "check config.h file or compilation options: either HAVE_LIMITS or HAVE_LIMITS_H should be defined" -#endif -#endif - - -#ifdef WNT -# include +# include #endif #if defined (__hpux) || defined (HPUX) diff --git a/src/StepFile/recfile.pc b/src/StepFile/recfile.pc index 9d0d557457..d0a32042aa 100644 --- a/src/StepFile/recfile.pc +++ b/src/StepFile/recfile.pc @@ -16,7 +16,7 @@ #include "stdio.h" #include "string.h" #include "stdlib.h" -#if defined(HAVE_MALLOC_H) +#if !defined(_WIN32) #include "malloc.h" #endif #include "recfile.ph" diff --git a/src/Storage/Storage_Schema.cxx b/src/Storage/Storage_Schema.cxx index 2b4591a75f..f618f2cc5f 100644 --- a/src/Storage/Storage_Schema.cxx +++ b/src/Storage/Storage_Schema.cxx @@ -37,18 +37,6 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif - -#if defined(HAVE_TIME_H) || defined(WNT) -# include -#endif - -#ifdef HAVE_SYS_TIME_H -# include -#endif - #include #include diff --git a/src/TCollection/TCollection_BasicMap.cxx b/src/TCollection/TCollection_BasicMap.cxx index a3fc4a867e..99be8f6e67 100644 --- a/src/TCollection/TCollection_BasicMap.cxx +++ b/src/TCollection/TCollection_BasicMap.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include diff --git a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx index 5d0686768d..428cdcd61e 100644 --- a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include @@ -26,9 +23,6 @@ #include #include #include -#ifdef HAVE_STRINGS_H -# include -#endif extern void suppressarg(Standard_Integer& na,const char** a,const Standard_Integer d); #ifdef DEB diff --git a/src/TestTopOpe/TestTopOpe_HDSCommands.cxx b/src/TestTopOpe/TestTopOpe_HDSCommands.cxx index 3b779dbb19..f2bdd7f2ba 100644 --- a/src/TestTopOpe/TestTopOpe_HDSCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_HDSCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include @@ -55,10 +52,6 @@ #include #include -#ifdef HAVE_STRINGS_H -# include -#endif - class TSEEpar { public: TSEEpar(const TCollection_AsciiString& s) { set(s); } diff --git a/src/TestTopOpe/TestTopOpe_OtherCommands.cxx b/src/TestTopOpe/TestTopOpe_OtherCommands.cxx index e2b225311d..2352b914ff 100644 --- a/src/TestTopOpe/TestTopOpe_OtherCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_OtherCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include @@ -40,12 +37,9 @@ #include #include -#ifdef WNT +#ifdef _WIN32 Standard_IMPORT Draw_Viewer dout; #endif -#ifdef HAVE_STRINGS_H -# include -#endif //======================================================================= // bounds S xmin ymin zmin zmax ymax zmax diff --git a/src/TestTopOpe/TestTopOpe_VarsTopo.cxx b/src/TestTopOpe/TestTopOpe_VarsTopo.cxx index 24ceb4bd6f..dd1f267c78 100644 --- a/src/TestTopOpe/TestTopOpe_VarsTopo.cxx +++ b/src/TestTopOpe/TestTopOpe_VarsTopo.cxx @@ -14,14 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include -#ifdef HAVE_STRINGS_H -# include -#endif VarsTopo::VarsTopo() : mytolarc(0.), mytoltan(0.) { diff --git a/src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx b/src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx index 5148d7e4fe..8ec55a45f9 100644 --- a/src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx +++ b/src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include @@ -27,9 +24,6 @@ #include #include #include -#ifdef HAVE_STRINGS_H -# include -#endif //----------------------------------------------------------------------- // 0 = testtopopedraw_cdinp diff --git a/src/TestTopOpeDraw/TestTopOpeDraw_TTOT.cxx b/src/TestTopOpeDraw/TestTopOpeDraw_TTOT.cxx index 4b03187e98..dd4ab1168a 100644 --- a/src/TestTopOpeDraw/TestTopOpeDraw_TTOT.cxx +++ b/src/TestTopOpeDraw/TestTopOpeDraw_TTOT.cxx @@ -14,16 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include #include -#ifdef HAVE_STRINGS_H -# include -#endif //======================================================================= //function : ShapeEnumToString diff --git a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx index c670f8ed9c..f3f32fe854 100644 --- a/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx +++ b/src/TestTopOpeTools/TestTopOpeTools_TraceCommands.cxx @@ -14,19 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include #include #include -#ifdef HAVE_STRINGS_H -# include -#endif - #ifdef DEB TestTopOpeTools_Trace theTrace(100,"trace"); TestTopOpeTools_Trace theContext(100,"context"); diff --git a/src/TopOpeBRep/TopOpeBRep_traceALWL.cxx b/src/TopOpeBRep/TopOpeBRep_traceALWL.cxx index fe910c7462..108c5268fc 100644 --- a/src/TopOpeBRep/TopOpeBRep_traceALWL.cxx +++ b/src/TopOpeBRep/TopOpeBRep_traceALWL.cxx @@ -14,11 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_STRINGS_H +#ifndef _WIN32 # include #endif diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx index b372e38102..f110ab565b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx @@ -14,9 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif #include #include #include @@ -63,9 +60,6 @@ #include #ifdef DEB -#ifdef HAVE_STRINGS_H -# include -#endif extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer); extern Standard_Boolean TopOpeBRepDS_GettraceSPSXX(const Standard_Integer,const Standard_Integer); static TCollection_AsciiString PRODINS("dins "); diff --git a/src/Units/Units_UnitsDictionary.cxx b/src/Units/Units_UnitsDictionary.cxx index 8e619b240e..ca2bd4f778 100644 --- a/src/Units/Units_UnitsDictionary.cxx +++ b/src/Units/Units_UnitsDictionary.cxx @@ -19,19 +19,8 @@ #include -#ifdef HAVE_CONFIG_H -# include -#endif #include -#ifdef HAVE_STDLIB_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#if defined (HAVE_SYS_STAT_H) || defined(WNT) -# include -#endif +#include #include #include diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 326c6814fb..1edd03e7ec 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -58,13 +58,7 @@ #include #include -#ifdef HAVE_CONFIG_H -# include -#endif #include -#ifdef HAVE_STRINGS_H -# include -#endif #include #include diff --git a/src/ViewerTest/ViewerTest_FilletCommands.cxx b/src/ViewerTest/ViewerTest_FilletCommands.cxx index 6fce7e96d3..f8c84cb44d 100644 --- a/src/ViewerTest/ViewerTest_FilletCommands.cxx +++ b/src/ViewerTest/ViewerTest_FilletCommands.cxx @@ -14,12 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#include #include #include #include @@ -55,12 +50,9 @@ #include #include -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef WNT +#ifdef _WIN32 //#define strcasecmp strcmp Already defined in Standard -#include +# include #endif extern Handle(AIS_Shape) GetAISShapeFromName(const char* name); diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 39be280e7a..a05402dde6 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -14,14 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -#include -#endif - #include -#include - #include #include #include @@ -139,13 +133,9 @@ #include #include -#ifdef HAVE_STRINGS_H -#include -#endif - -#ifdef WNT -#define _CRT_SECURE_NO_DEPRECATE -#pragma warning (disable:4996) +#ifdef _WIN32 +# define _CRT_SECURE_NO_DEPRECATE +# pragma warning (disable:4996) #endif extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 6b6436bbd0..add97289d7 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -13,10 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 5c11870f08..9531a0a35c 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. #include -#ifdef HAVE_CONFIG_H -# include -#endif #include #include @@ -57,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -82,10 +78,6 @@ extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); extern int ViewerMainLoop(Standard_Integer argc, const char** argv); extern Handle(AIS_InteractiveContext)& TheAISContext (); -#ifdef HAVE_STRINGS_H -# include -#endif - #define VertexMask 0x01 #define EdgeMask 0x02 #define FaceMask 0x04 diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 5d5e016582..000e20e2f4 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef HAVE_CONFIG_H - #include -#endif - #include #include #include