summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-11-04 06:04:02 +0000
committerJim Meyering <jim@meyering.net>1994-11-04 06:04:02 +0000
commit0ccaadc62c0db66872517d9d6cc40333ed694100 (patch)
treef8f7d0d9b0978f8e2028519a071862c6bec862f9 /src/ls.c
parentaebff608dc00178e346b3d462cbfd35add1563df (diff)
downloadcoreutils-0ccaadc62c0db66872517d9d6cc40333ed694100.tar.xz
Include <limits.h> before system.h because limits.h on
some systems undefines PATH_MAX, whereas system.h includes pathmax.h which sets PATH_MAX. From Kaveh Ghazi.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ls.c b/src/ls.c
index 8c97800d0..e4fc6995b 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -45,12 +45,14 @@
#include <grp.h>
#include <pwd.h>
#include <getopt.h>
-#include "system.h"
-#include <fnmatch.h>
-
#if HAVE_LIMITS_H
+/* limits.h must come before system.h because limits.h on some systems
+ undefs PATH_MAX, whereas system.h includes pathmax.h which sets
+ PATH_MAX. */
#include <limits.h>
#endif
+#include "system.h"
+#include <fnmatch.h>
#include "obstack.h"
#include "ls.h"