bug-gnulib
[Top][All Lists]
Advanced

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

ULONG_MAX on Solaris


From: Simon Josefsson
Subject: ULONG_MAX on Solaris
Date: Thu, 08 Dec 2005 19:28:01 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Solaris:

SunOS sparc-solaris1 5.9 Generic_112233-03 sun4u sparc SUNW,Ultra-60

has ULONG_MAX in limits.h but not in stdlib.h.  I believe C89 it to be
in stdlib.h.

Could we work around this in gnulib?  How?  Test for ULONG_MAX in
stdlib.h, and if it is not there, but it is in limits.h, include
limits.h from config.h?

Meanwhile, I will include limits.h too, but I'd like to avoid this
since it appear as if it shouldn't be required.

Thanks.

address@hidden:/tmp/jas4711/gnutls-1.3.1$ cat foo.c
#include <limits.h>
int main () { printf ("%ul\n", ULONG_MAX);
}
address@hidden:/tmp/jas4711/gnutls-1.3.1$ gcc -o foo foo.c
address@hidden:/tmp/jas4711/gnutls-1.3.1$ cat bar.c
#include <stdlib.h>
int main () { printf ("%ul\n", ULONG_MAX);
}
address@hidden:/tmp/jas4711/gnutls-1.3.1$ gcc -o bar bar.c
bar.c: In function `main':
bar.c:2: error: `ULONG_MAX' undeclared (first use in this function)
bar.c:2: error: (Each undeclared identifier is reported only once
bar.c:2: error: for each function it appears in.)




reply via email to

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