From fd4b566a1654b10df6afc068140a659af17c3a76 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Wed, 24 Sep 2003 08:26:23 +0000 Subject: * include/io.h (_fileno): Remove prototype. (fileno): Likewise. (FILENAME_MAX): Define, if needed. Don't include . * include/stdio.h (FILENAME_MAX): Protect against prior definition. (_fileno): Define macro implementation. (fileno): Likewise. --- winsup/mingw/include/stdio.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'winsup/mingw/include/stdio.h') diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h index 6ad334ef3..c80b105a2 100644 --- a/winsup/mingw/include/stdio.h +++ b/winsup/mingw/include/stdio.h @@ -65,11 +65,11 @@ /* * The maximum length of a file name. You should use GetVolumeInformation * instead of this constant. But hey, this works. - * - * NOTE: This is used in the structure _finddata_t (see io.h) so changing it - * is probably not a good idea. + * Also defined in io.h. */ +#ifndef FILENAME_MAX #define FILENAME_MAX (260) +#endif /* * The maximum number of files that may be open at once. I have set this to @@ -336,11 +336,16 @@ _CRTIMP int __cdecl _getmaxstdio(void); _CRTIMP int __cdecl _setmaxstdio(int); #endif +#define _fileno(__F) ((__F)->_file) + #ifndef _NO_OLDNAMES _CRTIMP int __cdecl fgetchar (void); _CRTIMP int __cdecl fputchar (int); _CRTIMP FILE* __cdecl fdopen (int, const char*); _CRTIMP int __cdecl fileno (FILE*); + +#define fileno(__F) ((__F)->_file) + #endif /* Not _NO_OLDNAMES */ #endif /* Not __STRICT_ANSI__ */ -- cgit v1.2.3