mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-17 14:01:27 +08:00
(AC_LANG_FUNC_LINK_TRY(C)): Deine $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.
This commit is contained in:
parent
41cc02ab2b
commit
50a791a2fa
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user