2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>

* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
	defining.
	* include/excpt.h (): Include windef.h not windows.h.
	* include/fcntl.h (_O_SHORT_LIVED): Add define.
	(_chmod): Add prototype.
        (_creat): Correct prototype.
	(SH_DENY*): Rename defines to _SH_DENY*.
	(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
	include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
	_IOAPPEND): Add defines.
	(_wfindfirst): Correct prototype.
	(_wfdopen): Add prototype.
	* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
	prototypes.
	* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
	 prototypes.
	(_wcsdup): Correct prototype.
	* include/mbstring.h: Remove comments about _mbschr, _mbstok,
	 _mbsncat being in string.h.
	* include/wchar.h (_wfindfirst): Correct prototype.
	* include/tchar.h (_tfdopen): Add _UNICODE mappings.
This commit is contained in:
Danny Smith 2002-06-18 04:13:18 +00:00
parent 6cde27195c
commit 9fe2a2157b
12 changed files with 83 additions and 28 deletions

View File

@ -1,3 +1,27 @@
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-15 Earnie Boyd <earnie@users.sf.net> 2002-06-15 Earnie Boyd <earnie@users.sf.net>
* include/_mingw.h: Increment to version 2.1. * include/_mingw.h: Increment to version 2.1.

View File

@ -44,13 +44,18 @@
style declarations. */ style declarations. */
#ifndef __GNUC__ #ifndef __GNUC__
# define __MINGW_IMPORT __declspec(dllimport) # ifndef __MINGW_IMPORT
# define __MINGW_IMPORT __declspec(dllimport)
# endif
# define __DECLSPEC_SUPPORTED # define __DECLSPEC_SUPPORTED
#else /* __GNUC__ */ #else /* __GNUC__ */
# ifdef __declspec # ifdef __declspec
# ifndef __MINGW_IMPORT
/* Note the extern. This is needed to work around GCC's /* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */ limitations in handling dllimport attribute. */
# define __MINGW_IMPORT extern __attribute__((dllimport)) # define __MINGW_IMPORT extern __attribute__((dllimport))
# endif
# define __DECLSPEC_SUPPORTED # define __DECLSPEC_SUPPORTED
# else # else
# undef __DECLSPEC_SUPPORTED # undef __DECLSPEC_SUPPORTED

View File

@ -36,7 +36,7 @@
#ifndef __STRICT_ANSI__ #ifndef __STRICT_ANSI__
#include <windows.h> #include <windef.h>
/* /*
* NOTE: The constants structs and typedefs below should be defined in the * NOTE: The constants structs and typedefs below should be defined in the

View File

@ -58,6 +58,8 @@
#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */ #define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
#define _O_EXCL 0x0400 /* Open only if the file does not exist. */ #define _O_EXCL 0x0400 /* Open only if the file does not exist. */
#define _O_SHORT_LIVED 0x1000
/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */ /* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */ #define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
#define _O_BINARY 0x8000 /* Input and output is not translated. */ #define _O_BINARY 0x8000 /* Input and output is not translated. */

View File

@ -125,6 +125,7 @@ char* _getcwd (char*, int);
int _mkdir (const char*); int _mkdir (const char*);
char* _mktemp (char*); char* _mktemp (char*);
int _rmdir (const char*); int _rmdir (const char*);
int _chmod (const char*, int);
#ifdef __MSVCRT__ #ifdef __MSVCRT__
@ -144,6 +145,7 @@ char* getcwd (char*, int);
int mkdir (const char*); int mkdir (const char*);
char* mktemp (char*); char* mktemp (char*);
int rmdir (const char*); int rmdir (const char*);
int chmod (const char*, int);
#endif /* _UWIN */ #endif /* _UWIN */
#endif /* Not _NO_OLDNAMES */ #endif /* Not _NO_OLDNAMES */
@ -181,7 +183,7 @@ int _commit(int);
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80), /* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
* the "owner write permission" bit (on FAT). */ * the "owner write permission" bit (on FAT). */
int _creat (const char*, unsigned); int _creat (const char*, int);
int _dup (int); int _dup (int);
int _dup2 (int, int); int _dup2 (int, int);
@ -228,7 +230,7 @@ int _write (int, const void*, unsigned int);
int _waccess(const wchar_t*, int); int _waccess(const wchar_t*, int);
int _wchmod(const wchar_t*, int); int _wchmod(const wchar_t*, int);
int _wcreat(const wchar_t*, int); int _wcreat(const wchar_t*, int);
long _wfindfirst(wchar_t*, struct _wfinddata_t*); long _wfindfirst(const wchar_t*, struct _wfinddata_t*);
int _wfindnext(long, struct _wfinddata_t *); int _wfindnext(long, struct _wfinddata_t *);
int _wunlink(const wchar_t*); int _wunlink(const wchar_t*);
int _wopen(const wchar_t*, int, ...); int _wopen(const wchar_t*, int, ...);

View File

@ -76,13 +76,13 @@ unsigned char* _mbsnset (unsigned char*, unsigned int, size_t);
unsigned char* _mbsnbset (unsigned char*, unsigned int, size_t); unsigned char* _mbsnbset (unsigned char*, unsigned int, size_t);
unsigned char* _mbsdup (const unsigned char*); unsigned char* _mbsdup (const unsigned char*);
unsigned char* _mbsrev (unsigned char*); unsigned char* _mbsrev (unsigned char*);
unsigned char* _mbscat (unsigned char*, const unsigned char*); /* also in string.h */ unsigned char* _mbscat (unsigned char*, const unsigned char*);
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t); unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
unsigned char* _mbsnbcat (unsigned char*, const unsigned char*, size_t); unsigned char* _mbsnbcat (unsigned char*, const unsigned char*, size_t);
size_t _mbslen (const unsigned char*); size_t _mbslen (const unsigned char*);
size_t _mbsnbcnt (const unsigned char*, size_t); size_t _mbsnbcnt (const unsigned char*, size_t);
size_t _mbsnccnt (const unsigned char*, size_t); size_t _mbsnccnt (const unsigned char*, size_t);
unsigned char* _mbschr (const unsigned char*, unsigned int); /* also in string.h */ unsigned char* _mbschr (const unsigned char*, unsigned int);
unsigned char* _mbsrchr (const unsigned char*, unsigned int); unsigned char* _mbsrchr (const unsigned char*, unsigned int);
size_t _mbsspn (const unsigned char*, const unsigned char*); size_t _mbsspn (const unsigned char*, const unsigned char*);
size_t _mbscspn (const unsigned char*, const unsigned char*); size_t _mbscspn (const unsigned char*, const unsigned char*);
@ -107,7 +107,7 @@ unsigned char* _mbsdec (const unsigned char*, const unsigned char*);
unsigned int _mbsnextc (const unsigned char*); unsigned int _mbsnextc (const unsigned char*);
unsigned char* _mbslwr (unsigned char*); unsigned char* _mbslwr (unsigned char*);
unsigned char* _mbsupr (unsigned char*); unsigned char* _mbsupr (unsigned char*);
unsigned char* _mbstok (unsigned char*, const unsigned char*); /* also in string.h */ unsigned char* _mbstok (unsigned char*, const unsigned char*);
/* Kanji */ /* Kanji */
int _ismbchira (unsigned int); int _ismbchira (unsigned int);

View File

@ -32,11 +32,25 @@
/* All the headers include this file. */ /* All the headers include this file. */
#include <_mingw.h> #include <_mingw.h>
#define SH_COMPAT 0x00 /* Compatibility */ #define _SH_COMPAT 0x00 /* Compatibility */
#define SH_DENYRW 0x10 /* Deny read/write */ #define _SH_DENYRW 0x10 /* Deny read/write */
#define SH_DENYWR 0x20 /* Deny write */ #define _SH_DENYWR 0x20 /* Deny write */
#define SH_DENYRD 0x30 /* Deny read */ #define _SH_DENYRD 0x30 /* Deny read */
#define SH_DENYNO 0x40 /* Deny nothing */ #define _SH_DENYNO 0x40 /* Deny nothing */
#ifndef __STRICT_ANSI__
#ifndef _NO_OLDNAMES
/* Non ANSI names */
#define SH_DENYRW _SH_DENYRW
#define SH_DENYWR _SH_DENYWR
#define SH_DENYRD _SH_DENYRD
#define SH_DENYNO _SH_DENYNO
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#endif /* Not _SHARE_H_ */ #endif /* Not _SHARE_H_ */

View File

@ -46,8 +46,8 @@
/* Flags for the iobuf structure */ /* Flags for the iobuf structure */
#define _IOREAD 1 #define _IOREAD 1 /* currently reading */
#define _IOWRT 2 #define _IOWRT 2 /* currently writing */
#define _IORW 0x0080 /* opened as "r+w" */ #define _IORW 0x0080 /* opened as "r+w" */
@ -96,10 +96,17 @@
*/ */
#define L_tmpnam (16) #define L_tmpnam (16)
#define _IOFBF 0x0000 #define _IOFBF 0x0000 /* full buffered */
#define _IOLBF 0x0040 #define _IOLBF 0x0040 /* line buffered */
#define _IONBF 0x0004 #define _IONBF 0x0004 /* not buffered */
#define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
#define _IOEOF 0x0010 /* EOF reached on read */
#define _IOERR 0x0020 /* I/O error from system */
#define _IOSTRG 0x0040 /* Strange or no file descriptor */
#ifdef _POSIX_SOURCE
# define _IOAPPEND 0x0200
#endif
/* /*
* The buffer size as used by setbuf such that it is equivalent to * The buffer size as used by setbuf such that it is equivalent to
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ). * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
@ -353,6 +360,7 @@ wchar_t* _getws (wchar_t*);
wint_t putwc (wint_t, FILE*); wint_t putwc (wint_t, FILE*);
int _putws (const wchar_t*); int _putws (const wchar_t*);
wint_t putwchar (wint_t); wint_t putwchar (wint_t);
FILE* _wfdopen(int, wchar_t *);
FILE* _wfopen (const wchar_t*, const wchar_t*); FILE* _wfopen (const wchar_t*, const wchar_t*);
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*); FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
FILE* _wfsopen (const wchar_t*, const wchar_t*, int); FILE* _wfsopen (const wchar_t*, const wchar_t*, int);

View File

@ -416,6 +416,11 @@ void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t); wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t);
unsigned int _rotl(unsigned int, int);
unsigned int _rotr(unsigned int, int);
unsigned long _lrotl(unsigned long, int);
unsigned long _lrotr(unsigned long, int);
#endif #endif
#ifndef _NO_OLDNAMES #ifndef _NO_OLDNAMES

View File

@ -91,13 +91,6 @@ char* _strset (char*, int);
char* _strupr (char*); char* _strupr (char*);
void _swab (const char*, char*, size_t); void _swab (const char*, char*, size_t);
/*
* Multi-byte character functions
*/
unsigned char* _mbschr (unsigned char*, unsigned char*);
unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
unsigned char* _mbstok (unsigned char*, unsigned char*);
#ifdef __MSVCRT__ #ifdef __MSVCRT__
int _strncoll(const char*, const char*, size_t); int _strncoll(const char*, const char*, size_t);
int _strnicoll(const char*, const char*, size_t); int _strnicoll(const char*, const char*, size_t);
@ -134,7 +127,7 @@ size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */ /* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
#define _wcscmpi _wcsicmp #define _wcscmpi _wcsicmp
wchar_t* _wcsdup (wchar_t*); wchar_t* _wcsdup (const wchar_t*);
int _wcsicmp (const wchar_t*, const wchar_t*); int _wcsicmp (const wchar_t*, const wchar_t*);
int _wcsicoll (const wchar_t*, const wchar_t*); int _wcsicoll (const wchar_t*, const wchar_t*);
wchar_t* _wcslwr (wchar_t*); wchar_t* _wcslwr (wchar_t*);

View File

@ -187,6 +187,7 @@ typedef wchar_t _TCHAR;
#define _tcreat _wcreat #define _tcreat _wcreat
#define _tfindfirst _wfindfirst #define _tfindfirst _wfindfirst
#define _tfindnext _wfindnext #define _tfindnext _wfindnext
#define _tfopen _wfdopen
#define _tfopen _wfopen #define _tfopen _wfopen
#define _tgetenv _wgetenv #define _tgetenv _wgetenv
#define _tputenv _wputenv #define _tputenv _wputenv
@ -264,6 +265,7 @@ typedef char _TCHAR;
#define _fputtc fputc #define _fputtc fputc
#define _fputtchar _fputchar #define _fputtchar _fputchar
#define _fputts fputs #define _fputts fputs
#define _tfdopen _fdopen
#define _tfopen fopen #define _tfopen fopen
#define _tgetenv getenv #define _tgetenv getenv
#define _tputenv _putenv #define _tputenv _putenv

View File

@ -88,7 +88,7 @@ struct _wfinddatai64_t {
int _waccess (const wchar_t*, int); int _waccess (const wchar_t*, int);
int _wchmod (const wchar_t*, int); int _wchmod (const wchar_t*, int);
int _wcreat (const wchar_t*, int); int _wcreat (const wchar_t*, int);
long _wfindfirst (wchar_t*, struct _wfinddata_t *); long _wfindfirst (const wchar_t*, struct _wfinddata_t *);
int _wfindnext (long, struct _wfinddata_t *); int _wfindnext (long, struct _wfinddata_t *);
int _wunlink (const wchar_t*); int _wunlink (const wchar_t*);
int _wopen (const wchar_t*, int, ...); int _wopen (const wchar_t*, int, ...);
@ -133,7 +133,7 @@ wchar_t* _getws (wchar_t*);
wint_t putwc (wint_t, FILE*); wint_t putwc (wint_t, FILE*);
int _putws (const wchar_t*); int _putws (const wchar_t*);
wint_t putwchar (wint_t); wint_t putwchar (wint_t);
FILE* _wfdopen(int, wchar_t *);
FILE* _wfopen (const wchar_t*, const wchar_t*); FILE* _wfopen (const wchar_t*, const wchar_t*);
FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*); FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
FILE* _wfsopen (const wchar_t*, const wchar_t*, int); FILE* _wfsopen (const wchar_t*, const wchar_t*, int);