OCC64
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
committerAdam C. Powell, IV <hazelsct@debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
Move _OCC64 macro definition into /usr/include/opencascade/arch-6.5.0/Standard_Macro64.hxx

This file is shipped by libopencascade-foundation-6.5.0, because include
files are in arch:all packages and this macro must be set only on 64-bit archs.
Closes: #486386
Gbp-Pq: Name OCC64.patch

ros/Makefile.am
ros/configure.in
ros/inc/Standard_Macro.hxx
ros/inc/arch-6.5.0/Standard_Macro64.hxx.in [new file with mode: 0644]
ros/src/OSD/OSD_signal.cxx

index 3dfd55d4b7145c527d1954556b34f41ac5abe1b5..37ae6f2eb81f8961bd94307d25756243356ffaeb 100644 (file)
@@ -107,6 +107,8 @@ install-exec-local:
        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; \
index d69152b3dd01854a3bac56d7c0eb4a194df812aa..d4269d38c5180cbe35fdf3199024726f15f1d11d 100644 (file)
@@ -662,10 +662,12 @@ LIBS="$LIBS_save"
 #  
 #---------------------------------------------------------------------
 AC_MSG_CHECKING([if platform is 64-bit])
+OCC_define_OCC64="#undef _OCC64"
 AC_TRY_COMPILE( [], 
  [int array[((int)sizeof(void*))-6];],
- [AC_MSG_RESULT([yes]); CPPFLAGS="$CPPFLAGS -D_OCC64"; case $platform in Linux*) CPPFLAGS="$CPPFLAGS -m64";; esac],
+ [AC_MSG_RESULT([yes]); OCC_define_OCC64="#define _OCC64 1"],
  [AC_MSG_RESULT([no])] )
+AC_SUBST(OCC_define_OCC64)
 
 AC_ARG_ENABLE([debug],
               [AC_HELP_STRING([--enable-debug],[Debug Symbols])],
@@ -980,4 +982,5 @@ adm/make/TKDCAF/Makefile \
 adm/make/TKXDEDRAW/Makefile \
 adm/make/TKTObjDRAW/Makefile \
 adm/make/DRAWEXE/Makefile \
+inc/arch-6.5.0/Standard_Macro64.hxx \
 ])
index fce21502d2c7cdd947a2fe74fe0c8bfda217014c..96bae49c74fcce0b8b235ae98864ba33561b850f 100644 (file)
 # endif  // __Standard_API
 
 // Define _OCC64 variable (unless already defined) if platform is known to be 64-bit
-#ifndef _OCC64
-#if defined (__alpha) || defined(DECOSF1) || defined(_WIN64) || defined(__amd64) || defined(__x86_64)
-#define _OCC64 1
-#endif
-#endif
+#include <arch-6.5.0/Standard_Macro64.hxx>
 
 #endif  
diff --git a/ros/inc/arch-6.5.0/Standard_Macro64.hxx.in b/ros/inc/arch-6.5.0/Standard_Macro64.hxx.in
new file mode 100644 (file)
index 0000000..e29cc56
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _Standard_Macro64_HeaderFile
+# define _Standard_Macro64_HeaderFile
+
+// This file must not be included directly because its name may change.
+#ifndef _Standard_Macro_HeaderFile
+# error "Standard_Macro64.hxx must not be included directly, include Standard_Macro.hxx instead!"
+#endif
+
+// Define _OCC64 variable on 64-bit platforms
+@OCC_define_OCC64@
+
+#endif  
index 8c9d4875b0659e2d5e155c33c120bf95f240a39a..65bb607b2a71ff9cd99e854f32bb474cf354d228 100644 (file)
@@ -24,6 +24,7 @@
 #include <Standard_NullObject.hxx>
 #include <Standard_DivideByZero.hxx>
 #include <Standard_Overflow.hxx>
+#include <Standard_Macro.hxx>
 
 #include <Standard_ErrorHandler.hxx>