diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2002-10-03 00:49:21 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2002-10-03 00:49:21 +0000 |
commit | 7c3de623b662e2dc389c005022fa59f4df626cce (patch) | |
tree | d0f5c19010d77348bf4ba73d74d7b254e4a6e43a /winsup/mingw/include/stdlib.h | |
parent | 14ab3f24e17b714e79e78108b1d0733e85f0e951 (diff) | |
download | cygnal-7c3de623b662e2dc389c005022fa59f4df626cce.tar.gz cygnal-7c3de623b662e2dc389c005022fa59f4df626cce.tar.bz2 cygnal-7c3de623b662e2dc389c005022fa59f4df626cce.zip |
* include/fcntl.h (_fmode): Remove declarations and
compatibility defines.
(_setmode, setmode): Remove prototypes.
* include/stdlib (_fmode): Add declarations and
compatibility defines. Change type to int.
* include/io.h (_setmode, setmode): Add prototypes.
* samples/fmode/all.c: Adjust includes.
* samples/fmode/test.c: Likewise.
* crt1.c (_CRT_fmode): Declare as int.
* CRTfmode.c (_CRT_fmode): Likewise.
* include/stdlib: Remove comment about MB_CUR_MAX.
Diffstat (limited to 'winsup/mingw/include/stdlib.h')
-rw-r--r-- | winsup/mingw/include/stdlib.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h index 50a0f8178..468bac1af 100644 --- a/winsup/mingw/include/stdlib.h +++ b/winsup/mingw/include/stdlib.h @@ -120,8 +120,6 @@ __MINGW_IMPORT char** __argv_dll; /* * Also defined in ctype.h. */ - -/* Also defined in stdlib.h */ #ifndef MB_CUR_MAX #ifdef __DECLSPEC_SUPPORTED # ifdef __MSVCRT__ @@ -142,6 +140,7 @@ __MINGW_IMPORT char** __argv_dll; # endif /* not __MSVCRT */ #endif /* __DECLSPEC_SUPPORTED */ #endif /* MB_CUR_MAX */ + /* * MS likes to declare errno in stdlib.h as well. */ @@ -281,6 +280,32 @@ wchar_t** __p__wpgmptr(void); /* no wide version in CRTDLL */ #endif /* __MSVCRT__ */ +/* + * This variable determines the default file mode. + * TODO: Which flags work? + */ +#ifndef __DECLSPEC_SUPPORTED + +#ifdef __MSVCRT__ +extern int* _imp___fmode; +#define _fmode (*_imp___fmode) +#else +/* CRTDLL */ +extern int* _imp___fmode_dll; +#define _fmode (*_imp___fmode_dll) +#endif + +#else /* __DECLSPEC_SUPPORTED */ + +#ifdef __MSVCRT__ +__MINGW_IMPORT int _fmode; +#else /* ! __MSVCRT__ */ +__MINGW_IMPORT int _fmode_dll; +#define _fmode _fmode_dll +#endif /* ! __MSVCRT__ */ + +#endif /* __DECLSPEC_SUPPORTED */ + #endif /* Not __STRICT_ANSI__ */ #ifdef __GNUC__ |