FreeBSD port (8): missing include in fts.c

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


Hi,

io/fts.c uses the USHRT_MAX macro but does not include <limits.h>.
On FreeBSD I get a compilation error:

fts.c: In function `fts_build':
fts.c:721: `USHRT_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>

	* io/fts.c: Include <limits.h>.

diff -r -c3 glibc-20020627.bak/io/fts.c glibc-20020627/io/fts.c
--- glibc-20020627.bak/io/fts.c	Wed Jan  2 16:05:14 2002
+++ glibc-20020627/io/fts.c	Fri Jul  5 01:17:05 2002
@@ -37,6 +37,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fts.h>
+#include <limits.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>



More information about the Libc-alpha mailing list