[lsb-discuss] An issue with the headers

Gordon.Schumacher at seagate.com Gordon.Schumacher at seagate.com
Thu Jun 21 15:33:43 PDT 2007


I've come across a problem with the LSB 3.0 headers, as described here:
http://gcc.gnu.org/ml/gcc/2004-01/msg01360.html

I'd suggest the following patch to fix it, which is in line with the
solution used by GCC:
--- math.h.orig 2007-06-21 16:32:51.000000000 -0600
+++ math.h      2007-06-21 13:51:53.000000000 -0600
@@ -11,7 +11,13 @@
 #define SING   2


+/* We have a problem when using C++ since `exception' is a reserved
+ *    name in C++.  */
+# ifdef __cplusplus
+    struct __exception {
+# else
     struct exception {
+#endif
        int type;
        char *name;
        double arg1;
@@ -367,7 +373,11 @@
     extern long int lround(double);
     extern long int lroundf(float);
     extern long int lroundl(long double);
+# ifdef __cplusplus
+    extern int matherr(struct __exception *);
+#else
     extern int matherr(struct exception *);
+#endif
     extern double nan(const char *);
     extern float nanf(const char *);
     extern long double nanl(const char *);




More information about the lsb-discuss mailing list