about summary refs log tree commit diff
path: root/sysdeps/generic/bits/stdio_lim.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/bits/stdio_lim.h')
-rw-r--r--sysdeps/generic/bits/stdio_lim.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/sysdeps/generic/bits/stdio_lim.h b/sysdeps/generic/bits/stdio_lim.h
index d9b8fbc749..86e83cf1e2 100644
--- a/sysdeps/generic/bits/stdio_lim.h
+++ b/sysdeps/generic/bits/stdio_lim.h
@@ -17,17 +17,24 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _STDIO_H
+#if !defined _STDIO_H && !defined __need_FOPEN_MAX
 # error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
 #endif
 
-#define	L_tmpnam	1
-#define	TMP_MAX		0
+#ifndef __need_FOPEN_MAX
+# define L_tmpnam	1
+# define TMP_MAX	0
 
-#ifdef __USE_POSIX
-# define L_ctermid	1
-# define L_cuserid	1
+# ifdef __USE_POSIX
+#  define L_ctermid	1
+#  define L_cuserid	1
+# endif
+
+# define FILENAME_MAX	14
 #endif
 
-#define	FOPEN_MAX	16
-#define	FILENAME_MAX	14
+#if defined __need_FOPEN_MAX && !defined __defined_FOPEN_MAX
+# define __defined_FOPEN_MAX
+# define FOPEN_MAX	16
+#endif
+#undef __need_FOPEN_MAX