mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 16:26:12 +08:00
* 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.
This commit is contained in:
parent
14ab3f24e1
commit
7c3de623b6
@ -17,4 +17,4 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned int _CRT_fmode = 0;
|
int _CRT_fmode = 0;
|
||||||
|
@ -1,6 +1,21 @@
|
|||||||
|
2002-10-03 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-10-02 Danny Smith <dannysmith@users.sourceforge.net>
|
2002-10-02 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* include/stdlib.h (_imp____mbcur_max): add missing ';'.
|
* include/stdlib.h (_imp____mbcur_max): Add missing ';'.
|
||||||
(_imp____mbcur_max_dll): Likewise.
|
(_imp____mbcur_max_dll): Likewise.
|
||||||
|
|
||||||
2002-09-18 Danny Smith <dannysmith@users.sourceforge.net>
|
2002-09-18 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
@ -59,7 +59,7 @@ __MINGW_IMPORT void __set_app_type(int);
|
|||||||
* Setup the default file handles to have the _CRT_fmode mode, as well as
|
* Setup the default file handles to have the _CRT_fmode mode, as well as
|
||||||
* any new files created by the user.
|
* any new files created by the user.
|
||||||
*/
|
*/
|
||||||
extern unsigned int _CRT_fmode;
|
extern int _CRT_fmode;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mingw32_init_fmode ()
|
_mingw32_init_fmode ()
|
||||||
|
@ -85,52 +85,6 @@
|
|||||||
|
|
||||||
#endif /* Not _NO_OLDNAMES */
|
#endif /* Not _NO_OLDNAMES */
|
||||||
|
|
||||||
|
|
||||||
#ifndef RC_INVOKED
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This variable determines the default file mode.
|
|
||||||
* TODO: Which flags work?
|
|
||||||
*/
|
|
||||||
#ifndef __DECLSPEC_SUPPORTED
|
|
||||||
|
|
||||||
#ifdef __MSVCRT__
|
|
||||||
extern unsigned int* _imp___fmode;
|
|
||||||
#define _fmode (*_imp___fmode)
|
|
||||||
#else
|
|
||||||
/* CRTDLL */
|
|
||||||
extern unsigned int* _imp___fmode_dll;
|
|
||||||
#define _fmode (*_imp___fmode_dll)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /* __DECLSPEC_SUPPORTED */
|
|
||||||
|
|
||||||
#ifdef __MSVCRT__
|
|
||||||
__MINGW_IMPORT unsigned int _fmode;
|
|
||||||
#else /* ! __MSVCRT__ */
|
|
||||||
__MINGW_IMPORT unsigned int _fmode_dll;
|
|
||||||
#define _fmode _fmode_dll
|
|
||||||
#endif /* ! __MSVCRT__ */
|
|
||||||
|
|
||||||
#endif /* __DECLSPEC_SUPPORTED */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int _setmode (int, int);
|
|
||||||
|
|
||||||
#ifndef _NO_OLDNAMES
|
|
||||||
int setmode (int, int);
|
|
||||||
#endif /* Not _NO_OLDNAMES */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* Not RC_INVOKED */
|
|
||||||
|
|
||||||
#endif /* Not _FCNTL_H_ */
|
#endif /* Not _FCNTL_H_ */
|
||||||
|
|
||||||
#endif /* Not __STRICT_ANSI__ */
|
#endif /* Not __STRICT_ANSI__ */
|
||||||
|
@ -212,6 +212,7 @@ int _open (const char*, int, ...);
|
|||||||
int _open_osfhandle (long, int);
|
int _open_osfhandle (long, int);
|
||||||
int _pipe (int *, unsigned int, int);
|
int _pipe (int *, unsigned int, int);
|
||||||
int _read (int, void*, unsigned int);
|
int _read (int, void*, unsigned int);
|
||||||
|
int _setmode (int, int);
|
||||||
|
|
||||||
/* SH_... flags for nShFlags defined in share.h
|
/* SH_... flags for nShFlags defined in share.h
|
||||||
* Optional fourth argument is unsigned unPermissions */
|
* Optional fourth argument is unsigned unPermissions */
|
||||||
@ -262,6 +263,7 @@ int isatty (int);
|
|||||||
long lseek (int, long, int);
|
long lseek (int, long, int);
|
||||||
int open (const char*, int, ...);
|
int open (const char*, int, ...);
|
||||||
int read (int, void*, unsigned int);
|
int read (int, void*, unsigned int);
|
||||||
|
int setmode (int, int);
|
||||||
int sopen (const char*, int, int, ...);
|
int sopen (const char*, int, int, ...);
|
||||||
long tell (int);
|
long tell (int);
|
||||||
int umask (int);
|
int umask (int);
|
||||||
|
@ -120,8 +120,6 @@ __MINGW_IMPORT char** __argv_dll;
|
|||||||
/*
|
/*
|
||||||
* Also defined in ctype.h.
|
* Also defined in ctype.h.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Also defined in stdlib.h */
|
|
||||||
#ifndef MB_CUR_MAX
|
#ifndef MB_CUR_MAX
|
||||||
#ifdef __DECLSPEC_SUPPORTED
|
#ifdef __DECLSPEC_SUPPORTED
|
||||||
# ifdef __MSVCRT__
|
# ifdef __MSVCRT__
|
||||||
@ -142,6 +140,7 @@ __MINGW_IMPORT char** __argv_dll;
|
|||||||
# endif /* not __MSVCRT */
|
# endif /* not __MSVCRT */
|
||||||
#endif /* __DECLSPEC_SUPPORTED */
|
#endif /* __DECLSPEC_SUPPORTED */
|
||||||
#endif /* MB_CUR_MAX */
|
#endif /* MB_CUR_MAX */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MS likes to declare errno in stdlib.h as well.
|
* MS likes to declare errno in stdlib.h as well.
|
||||||
*/
|
*/
|
||||||
@ -281,6 +280,32 @@ wchar_t** __p__wpgmptr(void);
|
|||||||
/* no wide version in CRTDLL */
|
/* no wide version in CRTDLL */
|
||||||
#endif /* __MSVCRT__ */
|
#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__ */
|
#endif /* Not __STRICT_ANSI__ */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
@ -13,7 +13,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <stdlib.h> /* _fmode */
|
||||||
|
#include <fcntl.h> /* _O_BINARY */
|
||||||
|
#include <io.h> /* _setmode */
|
||||||
|
|
||||||
|
|
||||||
unsigned int _CRT_fmode = _O_BINARY;
|
unsigned int _CRT_fmode = _O_BINARY;
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h> /* Required to get _fmode and _O_BINARY */
|
#include <stdlib.h> /* _fmode */
|
||||||
|
#include <fcntl.h> /* _O_BINARY */
|
||||||
|
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user