According to Ralf Wildenhues on 2/8/2010 11:32 PM: > Sounds like a bug to me, $U should be initialized somewhere, or removed > from the LIBOBJS/LTLIBOBJS variables if ansi2knr is not used.
Aha. In many projects, U _is_ initialized, but by automake during AM_C_PROTOTYPES, and not by autoconf. IIUC, the problem can only occur if you are using autoconf but not automake. So one real fix would be to quit using U in autoconf, and to teach automake how to override _AC_LIBOBJS_NORMALIZE to re-support U; but that has the drawback of requiring upgrades in both automake and autoconf simultaneously. Here's a less-invasive fix, that only affects autoconf. tests/semantics.at:AC_REPLACE_FUNCS also uses $U, so we could see a spurious test failure; I'm not sure what to do there. Thoughts before I apply this to autoconf? > Or we > could also go ahead and remove ansi2knr support (after deprecating it > suitably). It's always been a desire of mine to switch to C89 as default and require extra effort on the part of people still wanting K&R, rather than the current situation of trying to support both by default. But it takes lots of time and energy to implement, and hasn't been a high priority for me. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
From 7bf5c4827f3d7edc7e139915690ce3a495410a07 Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Tue, 9 Feb 2010 06:22:59 -0700 Subject: [PATCH] Avoid $U if it is not initialized. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Ensure $U is set if automake did not define it. * THANKS: Update. Reported by Julien Ãlie. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 8 ++++++++ lib/autoconf/general.m4 | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43a7101..c1b74f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-02-09 Eric Blake <e...@byu.net> + + Avoid $U if it is not initialized. + * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Ensure $U is + set if automake did not define it. + * THANKS: Update. + Reported by Julien Ãlie. + 2009-09-16 Eric Blake <e...@byu.net> Optimize AC_REPLACE_FUNCS. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 28fd972..15640c8 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2919,6 +2919,8 @@ AC_DEFUN([AC_LIBOBJ], AC_DEFUN([_AC_LIBOBJS_NORMALIZE], [ac_libobjs= ac_ltlibobjs= +m4_ifndef([AM_C_PROTOTYPES], [U= +])dnl for ac_i in : $LIB@&t...@objs; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' -- 1.6.6.1
signature.asc
Description: OpenPGP digital signature