[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] Patch to sip-2.4 for SGI o32
From: Greg Green <gregory.p.green () boeing ! com>
Date: 2001-04-28 1:33:05
[Download RAW message or body]
The SGI o32 binary format doesn't have the 'bool' type in the native
C++ compiler. This has caused compilation errors in PyQt or other sip
modules. So I went ahead and took a shot at fixing the problem.
The other problem with SGI is that you must run automake -i to add
the dependencies into the makefiles instead of use the automatic
dependency checking provided by automake. With this patch and the
automake change, PyQt-2.4 compiles for me on the SGI irix 6.5 o32
format.
--
Greg Green
Advanced Design Systems
Math & Computing Technology
Boeing
(425) 865-2790
["sip_bool_patch" (application/octet-stream)]
diff -Naur sip-2.4.orig/acconfig.h sip-2.4/acconfig.h
--- sip-2.4.orig/acconfig.h
+++ sip-2.4/acconfig.h Fri Apr 27 11:36:46 2001
@@ -0,0 +1,3 @@
+/* Define if you have a real bool for C++ */
+#undef HAVE_BOOL
+
diff -Naur sip-2.4.orig/configure.in sip-2.4/configure.in
--- sip-2.4.orig/configure.in Sun Apr 22 03:05:08 2001
+++ sip-2.4/configure.in Fri Apr 27 11:27:48 2001
@@ -271,6 +271,32 @@
fi
+dnl check for a real bool
+
+AC_MSG_CHECKING([for bool])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+AC_TRY_COMPILE([],[
+void proxySlot(int);
+void proxySlot(bool);
+
+int main()
+{ return 0; }
+], sip_result=yes,
+ sip_result=no)
+
+CXXFLAGS="$save_CXXFLAGS"
+AC_LANG_RESTORE
+AC_MSG_RESULT($sip_result)
+
+if test $sip_result = "no"
+then
+ AC_DEFINE(HAVE_BOOL,0)
+else
+ AC_DEFINE(HAVE_BOOL,1)
+fi
+
dnl Find Python.
if test "X$with_python" = "X"
diff -Naur sip-2.4.orig/sip/gencode.c sip-2.4/sip/gencode.c
--- sip-2.4.orig/sip/gencode.c Fri Mar 16 16:22:36 2001
+++ sip-2.4/sip/gencode.c Fri Apr 27 11:46:45 2001
@@ -274,6 +274,12 @@
for (fl = pt -> sigargs; fl != NULL; fl = fl -> next)
{
+#if HAVE_BOOL == 0
+ /* SGI's o32 format doesn't have bool types. They are ints.
+ so don't generate a proxySlot(bool) method */
+ if (fl -> fa -> nrArgs == 1 &&
+ fl -> fa -> args[0] . atype == bool_type) continue;
+#endif
generateOredVersionStart(pt,fl -> vol,fp);
prcode(fp,
@@ -2399,6 +2405,12 @@
for (fl = pt -> sigargs; fl != NULL; fl = fl -> next)
{
+#if HAVE_BOOL == 0
+ /* SGI's o32 format doesn't have bool types. They are ints.
+ so don't generate a proxySlot(bool) method */
+ if (fl -> fa -> nrArgs == 1 &&
+ fl -> fa -> args[0] . atype == bool_type) continue;
+#endif
generateOredVersionStart(pt,fl -> vol,fp);
prcode(fp,
@@ -2422,6 +2434,12 @@
for (fl = pt -> sigargs; fl != NULL; fl = fl -> next)
{
+#if HAVE_BOOL == 0
+ /* SGI's o32 format doesn't have bool types. They are ints.
+ so don't generate a proxySlot(bool) method */
+ if (fl -> fa -> nrArgs == 1 &&
+ fl -> fa -> args[0] . atype == bool_type) continue;
+#endif
prcode(fp,
"\n"
);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic