[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug #340871: [m68k] packages ftbfs due to mathinline.h



Hi,

The attached patch file can be used directly in glibc to fix the build
problems (debian/patches/m68k/local-mathinline_h.diff).  This is the
same as the previous patch, but defines __THROW.  An alternative would
be to include <sys/cdefs.h>.  I'll let you decide which is most
appropriate.


Regards,
Roger

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
diff -urN libc.orig/sysdeps/m68k/fpu/bits/mathinline.h libc/sysdeps/m68k/fpu/bits/mathinline.h
--- libc.orig/sysdeps/m68k/fpu/bits/mathinline.h	2006-06-02 13:36:36.923649683 +0200
+++ libc/sysdeps/m68k/fpu/bits/mathinline.h	2006-06-02 13:40:12.155695178 +0200
@@ -20,6 +20,39 @@
 
 #ifdef	__GNUC__
 
+#ifdef __GNUC__
+
+/* GCC can always grok prototypes.  For C++ programs we add throw()
+ *    to help it optimize the function calls.  But this works only with
+ *       gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+ *          as non-throwing using a function attribute since programs can use
+ *             the -fexceptions options for C code as well.  */
+# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+#  define __THROW       __attribute__ ((__nothrow__))
+#  define __NTH(fct)    __attribute__ ((__nothrow__)) fct
+# else
+#  if defined __cplusplus && __GNUC_PREREQ (2,8)
+#   define __THROW      throw ()
+#   define __NTH(fct)   fct throw ()
+#  else
+#   define __THROW
+#   define __NTH(fct)   fct
+#  endif
+# endif
+
+#else   /* Not GCC.  */
+
+# define __inline               /* No inline functions.  */
+
+# define __THROW
+# define __NTH(fct)     fct
+
+# define __const        const
+# define __signed       signed
+# define __volatile     volatile
+
+#endif  /* GCC.  */
+
 #ifdef __USE_ISOC99
 /* GCC 3.1 and up have builtins that actually can be used.  */
 # if !__GNUC_PREREQ (3,1)

Attachment: pgpRJv4xF5wcJ.pgp
Description: PGP signature


Reply to: