autoconf-patches
[Top][All Lists]
Advanced

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

Re: HP-UX 10.20 breakage in 2.57


From: Paul Eggert
Subject: Re: HP-UX 10.20 breakage in 2.57
Date: Mon, 23 Dec 2002 16:18:41 -0800

> Date: Mon, 23 Dec 2002 08:48:46 -0600
> From: Albert Chin <address@hidden>
> 
> > Does the following patch fix things?
> 
> Works now.

Thanks for testing it.  I installed this patch.

2002-12-23  Paul Eggert  <address@hidden>

        * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Define $1 to an
        innocuous variant befor including <limits.h> or <assert.h>.  This
        works around a bug reported by Albert Chin: HP-UX 11i
        (and earlier versions) have a <limits.h> that declares
        gettimeofday and many other functions.

Index: c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.173
retrieving revision 1.174
diff -p -u -r1.173 -r1.174
--- c.m4        3 Dec 2002 07:00:37 -0000       1.173
+++ c.m4        24 Dec 2002 00:16:41 -0000      1.174
@@ -176,15 +176,23 @@ char $2 ();])], [$2 ();])])
 #
 m4_define([AC_LANG_FUNC_LINK_TRY(C)],
 [AC_LANG_PROGRAM(
-[/* System header to define __stub macros and hopefully few prototypes,
+[/* Define $1 to an innocuous variant, in case <limits.h> declares $1.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $1 innocuous_$1
+
+/* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $1 (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
+
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+
+#undef $1
+
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"



reply via email to

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