Discussion:
[PATCH] Include sys/syslimits.h in limits.h
Keith Packard
2018-09-06 04:23:46 UTC
Permalink
This makes sure any system-defined limits are specified before the
defaults are checked. Without this, ARG_MAX and PATH_MAX end up
getting the default definitions from limits.h rather than the defines
from syslimits.h. This could potentially cause problems when
different files used different values for the same name.

Signed-off-by: Keith Packard <***@keithp.com>
---
newlib/libc/include/limits.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/newlib/libc/include/limits.h b/newlib/libc/include/limits.h
index dd09c1cee..893f10834 100644
--- a/newlib/libc/include/limits.h
+++ b/newlib/libc/include/limits.h
@@ -3,6 +3,7 @@

#include <newlib.h>
#include <sys/cdefs.h>
+#include <sys/syslimits.h>

# ifdef _MB_LEN_MAX
# define MB_LEN_MAX _MB_LEN_MAX
--
2.19.0.rc2
Corinna Vinschen
2018-09-06 12:22:06 UTC
Permalink
Post by Keith Packard
This makes sure any system-defined limits are specified before the
defaults are checked. Without this, ARG_MAX and PATH_MAX end up
getting the default definitions from limits.h rather than the defines
from syslimits.h. This could potentially cause problems when
different files used different values for the same name.
---
newlib/libc/include/limits.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/newlib/libc/include/limits.h b/newlib/libc/include/limits.h
index dd09c1cee..893f10834 100644
--- a/newlib/libc/include/limits.h
+++ b/newlib/libc/include/limits.h
@@ -3,6 +3,7 @@
#include <newlib.h>
#include <sys/cdefs.h>
+#include <sys/syslimits.h>
# ifdef _MB_LEN_MAX
# define MB_LEN_MAX _MB_LEN_MAX
--
2.19.0.rc2
Pushed.


Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
Loading...