[Top][All Lists]

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

Re: [bug-gnulib] gcc -Wall warning for minmax.h

From: Paul Eggert
Subject: Re: [bug-gnulib] gcc -Wall warning for minmax.h
Date: Sun, 15 May 2005 20:27:11 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Derek Price <address@hidden> writes:

> +# include <limits.h>
> +# include <sys/param.h>
> +#endif

This doesn't work if <limits.h> and <sys/param.h> both define MIN.

> +  AC_CHECK_HEADERS_ONCE([sys/param.h],
> +    [gl_have_sys_param_h=:], [gl_have_sys_param_h=false])dnl

You don't need to check whether sys/param.h exists.  All you
need to do is to see whether the following program compiles:

#include <sys/param.h>
int x = MIN (1, 2);

Similarly for <limits.h>.  You shouldn't need to use EGREP_CPP.

reply via email to

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