Hello.

I've tried to build strace-4.6 with clang-3.0 and got the following
error:

  /usr/bin/clang -DHAVE_CONFIG_H -I.  -I./linux/x86_64 -I./linux -I./linux  
-Wall -Wwrite-strings -O2 -pipe -MT strace.o -MD -MP -MF .deps/strace.Tpo -c -o 
strace.o strace.c
  strace.c:102:8: error: unknown type name 'bool'
  static bool daemonized_tracer = 0;

When the configure script was running, i've got:
  checking for stdbool.h that conforms to C99... no

It happens because configure test for stdbool.h is failing on
clang-3.0. I've attached the patch that fixes the issue.
--- configure.orig      2012-01-15 02:53:50.320502926 +0300
+++ configure   2012-01-15 02:54:15.430503326 +0300
@@ -5409,6 +5409,16 @@
        _Bool n[m];
        char o[sizeof n == m * sizeof n[0] ? 1 : -1];
        char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+       /* Catch a bug in an HP-UX C compiler.  See
+          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+        */
+       _Bool q = true;
+       _Bool *pq = &q;
+
+int
+main ()
+{
 #      if defined __xlc__ || defined __GNUC__
         /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
            reported by James Lemley on 2005-10-05; see
@@ -5428,16 +5438,6 @@
         char digs[] = "0123456789";
         int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
 #      endif
-       /* Catch a bug in an HP-UX C compiler.  See
-          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
-        */
-       _Bool q = true;
-       _Bool *pq = &q;
-
-int
-main ()
-{
 
        *pq |= q;
        *pq |= ! q;

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to