FreeBSD port (7): missing include in sprof.c

Bruno Haible bruno@clisp.org
Tue Jul 9 06:42:00 GMT 2002


Hi,

elf/sprof.c uses the ULONG_MAX macro but does not include <limits.h>.
On FreeBSD I get a compilation error:

sprof.c: In function `load_shobj':
sprof.c:484: `ULONG_MAX' undeclared (first use in this function)

On Linux <limits.h> is included by <sys/param.h> but since
<sys/param.h> is not standardized, one shouldn't rely on it.


2002-07-06  Bruno Haible  <bruno@clisp.org>

	* elf/sprof.c: Include <limits.h>.

diff -r -c3 glibc-20020627.bak/elf/sprof.c glibc-20020627/elf/sprof.c
--- glibc-20020627.bak/elf/sprof.c	Sat Mar  2 04:07:58 2002
+++ glibc-20020627/elf/sprof.c	Fri Jul  5 01:16:54 2002
@@ -25,6 +25,7 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <libintl.h>
+#include <limits.h>
 #include <locale.h>
 #include <obstack.h>
 #include <search.h>



More information about the Libc-alpha mailing list