[Top][All Lists]

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


From: Ralf Wildenhues
Subject: fix AC_FUNC_OBSTACK
Date: Thu, 12 Oct 2006 20:03:37 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

In one of the recent post-2.60 macro cleanups [1], we changed the test
in AC_FUNC_OBSTACK to be more like the real usage.  Unfortunately, the
new test is worse (output from CVS coreutils):

| configure:35937: checking for obstacks
| configure:35965: gcc -std=gnu99 -o conftest -g -O2   -Wl,--as-needed 
conftest.c  >&5
| conftest.c: In function 'main':
| conftest.c:315: error: 'obstack_chunk_alloc' undeclared (first use in this 
| conftest.c:315: error: (Each undeclared identifier is reported only once
| conftest.c:315: error: for each function it appears in.)
| conftest.c:315: error: 'obstack_chunk_free' undeclared (first use in this 

And indeed '( for Obstacks' documents this quite
clearly.  I apologize for not being careful enough there (luckily this
did not end up in a released Autoconf).

OK to apply?



2006-10-12  Ralf Wildenhues  <address@hidden>

        * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): In the test,
        include the default headers, and redefine obstack_chunk_alloc
        and obstack_chunk_free.  Fixes false failure with glibc.

Index: lib/autoconf/functions.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.111
diff -u -r1.111 functions.m4
--- lib/autoconf/functions.m4   26 Sep 2006 20:57:16 -0000      1.111
+++ lib/autoconf/functions.m4   12 Oct 2006 18:03:12 -0000
@@ -1335,8 +1335,11 @@
 [AC_LIBSOURCES([obstack.h, obstack.c])dnl
 AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack,
-    [AC_LANG_PROGRAM(address@hidden:@include "obstack.h"]],
+                     address@hidden:@include "obstack.h"]],
                     [[struct obstack mem;
+                      @%:@define obstack_chunk_alloc malloc
+                      @%:@define obstack_chunk_free free
                       obstack_init (&mem);
                       obstack_free (&mem, 0);]])],

reply via email to

[Prev in Thread] Current Thread [Next in Thread]