aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2023-03-06 15:53:55 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-03-27 13:57:55 -0300
commitf65ca70deaf38db4ca12458e74cefd8ad9063956 (patch)
treef170b2f04d3912e20be14a57a56fd1eead03d579 /libio
parent88677348b4de73874ca7d5a47451f42880f65f07 (diff)
downloadglibc-f65ca70deaf38db4ca12458e74cefd8ad9063956.tar
glibc-f65ca70deaf38db4ca12458e74cefd8ad9063956.tar.gz
glibc-f65ca70deaf38db4ca12458e74cefd8ad9063956.tar.bz2
glibc-f65ca70deaf38db4ca12458e74cefd8ad9063956.zip
libio: Do not autogenerate stdio_lim.h
Instead define the required fields in system dependend files. The only system dependent definition is FILENAME_MAX, which should match POSIX PATH_MAX, and it is obtained from either kernel UAPI or mach headers. Currently set pre-defined value from current kernels. It avoids a circular dependendy when including stdio.h in gen-as-const-headers files. Checked on x86_64-linux-gnu and i686-linux-gnu Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'libio')
-rw-r--r--libio/stdio.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/libio/stdio.h b/libio/stdio.h
index 857f02888d..686c40f28d 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -120,18 +120,23 @@ typedef __fpos64_t fpos64_t;
# define P_tmpdir "/tmp"
#endif
+#define L_tmpnam 20
+#define TMP_MAX 238328
/* Get the values:
- L_tmpnam How long an array of chars must be to be passed to `tmpnam'.
- TMP_MAX The minimum number of unique filenames generated by tmpnam
- (and tempnam when it uses tmpnam's name space),
- or tempnam (the two are separate).
- L_ctermid How long an array to pass to `ctermid'.
- L_cuserid How long an array to pass to `cuserid'.
- FOPEN_MAX Minimum number of files that can be open at once.
FILENAME_MAX Maximum length of a filename. */
#include <bits/stdio_lim.h>
+#ifdef __USE_POSIX
+# define L_ctermid 9
+# if !defined __USE_XOPEN2K || defined __USE_GNU
+# define L_cuserid 9
+# endif
+#endif
+
+#undef FOPEN_MAX
+#define FOPEN_MAX 16
+
#if __GLIBC_USE (ISOC2X)
/* Maximum length of printf output for a NaN. */