From 333ab2c3f214ab1ee166363a33d56afcc9f0a489 Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Fri, 6 May 2011 14:52:41 +0100 Subject: [PATCH] drop-config-h Unlike upstream, we do not install config.h since applications built with OpenCascade may want to ship their own config.h file. Installed headers must then not #include Unfortunately the situation became worse in 6.5.0, upstream relies on config.h being included by all files; we have to include config.h in recently added C++ files. Gbp-Pq: Name drop-config-h.patch --- ros/Makefile.am | 5 ----- ros/inc/OpenGl_TextRender.hxx | 4 ---- ros/inc/Standard_Macro.hxx | 4 ---- ros/inc/Standard_Stream.hxx | 14 -------------- ros/inc/Standard_values.h | 10 ---------- ros/inc/Xw_Extension.h | 4 ---- ros/src/BRepMesh/BRepMesh_FastDiscret.cxx | 4 ++++ ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx | 4 ++++ .../BinLDrivers_DocumentRetrievalDriver.cxx | 4 ++++ ros/src/Image/Image_PixMap.cxx | 4 ++++ ros/src/OSD/OSD.cxx | 4 ++++ ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx | 4 ++++ ros/src/OpenGl/OpenGl_TextRender.cxx | 4 ++++ ros/src/OpenGl/OpenGl_TextRender.hxx | 4 ---- ros/src/OpenGl/OpenGl_attri.cxx | 4 ++++ ros/src/Standard/Standard_MMgrTBBalloc.cxx | 4 ++++ 16 files changed, 36 insertions(+), 45 deletions(-) diff --git a/ros/Makefile.am b/ros/Makefile.am index 37ae6f2eb..e5ba1d0bb 100644 --- a/ros/Makefile.am +++ b/ros/Makefile.am @@ -106,14 +106,9 @@ install-exec-local: cp -fr$(CP_$(platform)) $(top_srcdir)/inc $(DESTDIR)$(prefix); \ fi; \ if [ "$$pd" != "$$bd" ]; then \ - cp -fr$(CP_$(platform)) $$bd/config.h $(DESTDIR)$(prefix); \ $(INSTALL) -d $(DESTDIR)$(prefix)/inc/arch-6.5.0; \ cp -f$(CP_$(platform)) $$bd/inc/arch-6.5.0/Standard_Macro64.hxx $(DESTDIR)$(prefix)/inc/arch-6.5.0; \ fi - if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \ - unlink $(DESTDIR)$(prefix)/inc/config.h; \ - fi - cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h bd=`pwd`; cd $(top_srcdir); sd=`pwd`; cd $(DESTDIR)$(prefix); pd=`pwd`; cd $$bd; \ if [ "$$pd" != "$$sd" -a -d $(top_srcdir)/src/UnitsAPI ]; then \ $(INSTALL) -d $(DESTDIR)$(prefix)/src; \ diff --git a/ros/inc/OpenGl_TextRender.hxx b/ros/inc/OpenGl_TextRender.hxx index f6ff34726..6bdc003c2 100644 --- a/ros/inc/OpenGl_TextRender.hxx +++ b/ros/inc/OpenGl_TextRender.hxx @@ -22,9 +22,7 @@ public: void RenderText( const Standard_Integer id, const char* text); void RenderText( char*, GLuint, int, GLfloat, GLfloat, GLfloat ); void ExportText( char* str, char* fontname, GLfloat height, GLfloat angle, GLint alingment, GLfloat x, GLfloat y, GLfloat z, GLboolean is2d ); -#ifdef HAVE_GL2PS static void getGL2PSFontName(char *src_font, char *ps_font); -#endif private: @@ -32,9 +30,7 @@ private: static int curSize ; static int curScale ; static int curTexFont ; -#ifdef HAVE_GL2PS int alignmentforgl2ps(int Hmode, int Vmode); -#endif struct FontMapNode { diff --git a/ros/inc/Standard_Macro.hxx b/ros/inc/Standard_Macro.hxx index 96bae49c7..0df32b7ad 100644 --- a/ros/inc/Standard_Macro.hxx +++ b/ros/inc/Standard_Macro.hxx @@ -7,10 +7,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/ros/inc/Standard_Stream.hxx b/ros/inc/Standard_Stream.hxx index 5cd566633..9ffb0138f 100644 --- a/ros/inc/Standard_Stream.hxx +++ b/ros/inc/Standard_Stream.hxx @@ -24,26 +24,12 @@ // Unix variant #ifndef WNT -#ifdef HAVE_IOSTREAM #include #define USE_STL_STREAM -#elif defined (HAVE_IOSTREAM_H) - #include -#else - #error "check config.h file or compilation options: either HAVE_IOSTREAM or HAVE_IOSTREAM_H should be defined" -#endif -#ifdef HAVE_IOMANIP #include -#elif defined (HAVE_IOMANIP_H) - #include -#endif -#ifdef HAVE_FSTREAM #include -#elif defined (HAVE_FSTREAM_H) - #include -#endif // Windows variant #else /* WNT */ diff --git a/ros/inc/Standard_values.h b/ros/inc/Standard_values.h index 917255b5b..623800a1a 100644 --- a/ros/inc/Standard_values.h +++ b/ros/inc/Standard_values.h @@ -23,17 +23,7 @@ Facility : CAS-CADE V1.3A #endif #ifndef WNT -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_LIMITS -# 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 diff --git a/ros/inc/Xw_Extension.h b/ros/inc/Xw_Extension.h index 57023a8a4..df6f35b91 100644 --- a/ros/inc/Xw_Extension.h +++ b/ros/inc/Xw_Extension.h @@ -22,10 +22,6 @@ #define min(a,b) (a>b ? b : a) #endif -#ifdef HAVE_CONFIG_H -# include -#endif - #ifdef HAVE_X11_EXTENSIONS_TRANSOLV_H #include #endif diff --git a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx index f75c47d15..4a0488593 100644 --- a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx +++ b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx @@ -77,6 +77,10 @@ #include +#ifdef HAVE_CONFIG_H +# include +#endif + // NOTE: replaced by more correct check // #if defined(WNT) || defined(LIN) // #define HAVE_TBB 1 diff --git a/ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx index dd3763e09..a95cab8e1 100644 --- a/ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx +++ b/ros/src/BRepMesh/BRepMesh_IncrementalMesh.cxx @@ -36,6 +36,10 @@ #include +#ifdef HAVE_CONFIG_H +# include +#endif + // NOTE: to be replaced by more correct check // #if defined(WNT) || defined(LIN) // #define HAVE_TBB 1 diff --git a/ros/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/ros/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 9633e8952..c43b51bd0 100644 --- a/ros/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/ros/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -18,6 +18,10 @@ #include #include +#ifdef HAVE_CONFIG_H +# include +#endif + #define SHAPESECTION_POS "SHAPE_SECTION_POS:" #define SIZEOFSHAPELABEL 18 diff --git a/ros/src/Image/Image_PixMap.cxx b/ros/src/Image/Image_PixMap.cxx index 22f64f3fe..c48d837ae 100644 --- a/ros/src/Image/Image_PixMap.cxx +++ b/ros/src/Image/Image_PixMap.cxx @@ -3,6 +3,10 @@ // Author KGV // Copyright OpenCASCADE 2010 +#ifdef HAVE_CONFIG_H +# include +#endif + #ifdef HAVE_FREEIMAGE #include #include diff --git a/ros/src/OSD/OSD.cxx b/ros/src/OSD/OSD.cxx index 13782d4f1..58e75b1fa 100644 --- a/ros/src/OSD/OSD.cxx +++ b/ros/src/OSD/OSD.cxx @@ -1,6 +1,10 @@ #include +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #if HAVE_IEEEFP_H diff --git a/ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx b/ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx index 0f57d20b6..d17480fea 100644 --- a/ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx +++ b/ros/src/OpenGl/OpenGl_GraphicDriver_Export.cxx @@ -5,6 +5,10 @@ #include #include +#ifdef HAVE_CONFIG_H +# include +#endif + #ifdef HAVE_GL2PS #include #endif diff --git a/ros/src/OpenGl/OpenGl_TextRender.cxx b/ros/src/OpenGl/OpenGl_TextRender.cxx index 85760417a..2acbadd94 100644 --- a/ros/src/OpenGl/OpenGl_TextRender.cxx +++ b/ros/src/OpenGl/OpenGl_TextRender.cxx @@ -19,6 +19,10 @@ #include #include +#ifdef HAVE_CONFIG_H +# include +#endif + #ifdef HAVE_GL2PS #include #endif diff --git a/ros/src/OpenGl/OpenGl_TextRender.hxx b/ros/src/OpenGl/OpenGl_TextRender.hxx index 8edfb6a84..8a28d0fd7 100644 --- a/ros/src/OpenGl/OpenGl_TextRender.hxx +++ b/ros/src/OpenGl/OpenGl_TextRender.hxx @@ -22,9 +22,7 @@ public: void RenderText( const Standard_Integer id, const char* text); void RenderText( char*, GLuint, int, GLfloat, GLfloat, GLfloat ); void ExportText( char* str, char* fontname, GLfloat height, GLfloat angle, GLint alingment, GLfloat x, GLfloat y, GLfloat z, GLboolean is2d ); -#ifdef HAVE_GL2PS static void getGL2PSFontName(char *src_font, char *ps_font); -#endif private: @@ -32,9 +30,7 @@ private: static int curSize ; static int curScale ; static int curTexFont ; -#ifdef HAVE_GL2PS int alignmentforgl2ps(int Hmode, int Vmode); -#endif struct FontMapNode { diff --git a/ros/src/OpenGl/OpenGl_attri.cxx b/ros/src/OpenGl/OpenGl_attri.cxx index 9739ba6e9..0e95e4a99 100644 --- a/ros/src/OpenGl/OpenGl_attri.cxx +++ b/ros/src/OpenGl/OpenGl_attri.cxx @@ -93,6 +93,10 @@ used in immediat mode context. #define NO_TRACE_MATRIX #define NO_TRACE_TEXT +#ifdef HAVE_CONFIG_H +# include +#endif + /*----------------------------------------------------------------------*/ /* * Includes diff --git a/ros/src/Standard/Standard_MMgrTBBalloc.cxx b/ros/src/Standard/Standard_MMgrTBBalloc.cxx index ad4ee4310..dbc7ef99b 100644 --- a/ros/src/Standard/Standard_MMgrTBBalloc.cxx +++ b/ros/src/Standard/Standard_MMgrTBBalloc.cxx @@ -5,6 +5,10 @@ #include #include +#ifdef HAVE_CONFIG_H +# include +#endif + // NOTE: replaced by more correct check //#if defined(WNT) || defined(LIN) //#define HAVE_TBB 1 -- 2.30.2