autoconf
[Top][All Lists]
Advanced

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

Re: Proposal for macros to check for global variables (again)


From: Paul Eggert
Subject: Re: Proposal for macros to check for global variables (again)
Date: Thu, 11 Apr 2002 11:11:45 -0700 (PDT)

> From: Peter Eisentraut <address@hidden>
> Date: Thu, 11 Apr 2002 12:55:51 -0400 (EDT)
> 
> # AC_LANG_VAR_LINK_TRY(C)(VARIABLE)
> # ---------------------------------
> m4_define([AC_LANG_VAR_LINK_TRY(C)],
> [AC_LANG_PROGRAM(
> [#include <assert.h>

Why include <assert.h>.

> extern int $1;

This repeats a longstanding problem we've had with AC_CHECK_FUNC.  It
declares the variable to be 'int' even though it might be some other
type, and that violates the C standard.  The macro args should specify
the type of the variable, along with any other info needed to declare
it (e.g. type qualifiers).

Also, can you please give an example where this macro would be useful?
Why can't you use AC_CHECK_DECL?



reply via email to

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