diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-01-31 20:11:48 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-01-31 20:11:48 +0000 |
commit | e29d83550eb33be51fd9a92d6443633c812504f7 (patch) | |
tree | 6d203309f3a3893b84ce58081d83b229506f804e /newlib/libc/include/stdio.h | |
parent | f8da1507583d5064ee73b6bd5786a027da7ed6c0 (diff) | |
download | cygnal-e29d83550eb33be51fd9a92d6443633c812504f7.tar.gz cygnal-e29d83550eb33be51fd9a92d6443633c812504f7.tar.bz2 cygnal-e29d83550eb33be51fd9a92d6443633c812504f7.zip |
2001-01-31 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdio.h (FILENAME_MAX): Changed to use __FILENAME_MAX__
if defined.
(FOPEN_MAX): Changed to use __FOPEN_MAX__ if defined.
(L_tmpnam): Changed to use __L_tmpnam__ if defined.
* libc/include/sys/config.h: Changed to set __FILENAME_MAX__
appropriately for Cygwin and RTEMS so not to exceed PATH_MAX.
Diffstat (limited to 'newlib/libc/include/stdio.h')
-rw-r--r-- | newlib/libc/include/stdio.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index 5d794bd55..9c1a06f76 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -90,9 +90,24 @@ typedef struct __sFILE FILE; #define BUFSIZ 1024 #define EOF (-1) -#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */ -#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */ -#define L_tmpnam 1024 /* XXX must be == PATH_MAX */ +#ifdef __FOPEN_MAX__ +#define FOPEN_MAX __FOPEN_MAX__ +#else +#define FOPEN_MAX 20 +#endif + +#ifdef __FILENAME_MAX__ +#define FILENAME_MAX __FILENAME_MAX__ +#else +#define FILENAME_MAX 1024 +#endif + +#ifdef __L_tmpnam__ +#define L_tmpnam __L_tmpnam__ +#else +#define L_tmpnam FILENAME_MAX +#endif + #ifndef __STRICT_ANSI__ #define P_tmpdir "/tmp" #endif |