* include/_mingw.h (_CRTIMP): Define for __GNUC__ if

__declspec(dllimport)  supported.
	(__cdecl): Define if not already defined.
	(__stdcall): Likewise.
	* include/dirent.h: Qualify fuctions with __cdecl.
	* include/fenv.h: Likewise.
	* include/inttypes.h: Likewise.
	* include/assert.h: Qualify fuctions with __cdecl. Qualify
	CRT dll imports with _CRTIMP.
	* include/conio.h: Likewise.
	* include/ctype.h: Likewise.
	* include/direct.h: Likewise.
	* include/dos.h: Likewise.
	* include/errno.h: Likewise.
	* include/float.h: Likewise.
	* include/io.h: Likewise.
	* include/locale.h: Likewise.
	* include/malloc.h: Likewise.
	* include/math.h: Likewise.
	* include/mbctype.h: Likewise.
	* include/mbstring.h: Likewise.
	* include/process.h: Likewise.
	* include/setjmp.h: Likewise.
	* include/signal.h: Likewise.
	* include/stdio.h: Likewise.
	* include/stdlib.h: Likewise.
	* include/string.h: Likewise.
	* include/time.h: Likewise.
	* include/wchar.h: Likewise.
	* include/wctype.h: Likewise.
	* include/sys/stat.h: Likewise.
	* include/sys/timeb.h: Likewise.
	* include/sys/utime.h: Likewise.

	* include/ctype.h: Guard ctype inlines with __NO_INLINE__.
	* include/wctype.h: Guard wctype inlines with __NO_INLINE__.

	* include/stdio.h (__VALIST): Guard against prior definition.
This commit is contained in:
Danny Smith
2003-02-10 21:13:34 +00:00
parent 16f4e17208
commit 14e54d7c97
30 changed files with 1116 additions and 1049 deletions

View File

@ -116,36 +116,36 @@ extern "C" {
* _findclose calls. _findnext also returns -1 if no match could be found,
* and 0 if a match was found. Call _findclose when you are finished.
*/
int _findfirst (const char*, struct _finddata_t*);
int _findnext (int, struct _finddata_t*);
int _findclose (int);
_CRTIMP int __cdecl _findfirst (const char*, struct _finddata_t*);
_CRTIMP int __cdecl _findnext (int, struct _finddata_t*);
_CRTIMP int __cdecl _findclose (int);
int _chdir (const char*);
char* _getcwd (char*, int);
int _mkdir (const char*);
char* _mktemp (char*);
int _rmdir (const char*);
int _chmod (const char*, int);
_CRTIMP int __cdecl _chdir (const char*);
_CRTIMP char* __cdecl _getcwd (char*, int);
_CRTIMP int __cdecl _mkdir (const char*);
_CRTIMP char* __cdecl _mktemp (char*);
_CRTIMP int __cdecl _rmdir (const char*);
_CRTIMP int __cdecl _chmod (const char*, int);
#ifdef __MSVCRT__
__int64 _filelengthi64(int);
long _findfirsti64(const char*, struct _finddatai64_t*);
int _findnexti64(long, struct _finddatai64_t*);
__int64 _lseeki64(int, __int64, int);
__int64 _telli64(int);
_CRTIMP __int64 __cdecl _filelengthi64(int);
_CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
_CRTIMP int __cdecl _findnexti64(long, struct _finddatai64_t*);
_CRTIMP __int64 __cdecl _lseeki64(int, __int64, int);
_CRTIMP __int64 __cdecl _telli64(int);
#endif /* __MSVCRT__ */
#ifndef _NO_OLDNAMES
#ifndef _UWIN
int chdir (const char*);
char* getcwd (char*, int);
int mkdir (const char*);
char* mktemp (char*);
int rmdir (const char*);
int chmod (const char*, int);
_CRTIMP int __cdecl chdir (const char*);
_CRTIMP char* __cdecl getcwd (char*, int);
_CRTIMP int __cdecl mkdir (const char*);
_CRTIMP char* __cdecl mktemp (char*);
_CRTIMP int __cdecl rmdir (const char*);
_CRTIMP int __cdecl chmod (const char*, int);
#endif /* _UWIN */
#endif /* Not _NO_OLDNAMES */
@ -176,21 +176,21 @@ int chmod (const char*, int);
extern "C" {
#endif
int _access (const char*, int);
int _chsize (int, long);
int _close (int);
int _commit(int);
_CRTIMP int __cdecl _access (const char*, int);
_CRTIMP int __cdecl _chsize (int, long);
_CRTIMP int __cdecl _close (int);
_CRTIMP int __cdecl _commit(int);
/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
* the "owner write permission" bit (on FAT). */
int _creat (const char*, int);
_CRTIMP int __cdecl _creat (const char*, int);
int _dup (int);
int _dup2 (int, int);
long _filelength (int);
int _fileno (FILE*);
long _get_osfhandle (int);
int _isatty (int);
_CRTIMP int __cdecl _dup (int);
_CRTIMP int __cdecl _dup2 (int, int);
_CRTIMP long __cdecl _filelength (int);
_CRTIMP int __cdecl _fileno (FILE*);
_CRTIMP long __cdecl _get_osfhandle (int);
_CRTIMP int __cdecl _isatty (int);
/* In a very odd turn of events this function is excluded from those
* files which define _STREAM_COMPAT. This is required in order to
@ -198,47 +198,47 @@ int _isatty (int);
* line 107. Actually I might just be able to change the name of
* the enum member in streambuf.h... we'll see. TODO */
#ifndef _STREAM_COMPAT
int _eof (int);
_CRTIMP int __cdecl _eof (int);
#endif
/* LK_... locking commands defined in sys/locking.h. */
int _locking (int, int, long);
_CRTIMP int __cdecl _locking (int, int, long);
long _lseek (int, long, int);
_CRTIMP long __cdecl _lseek (int, long, int);
/* Optional third argument is unsigned unPermissions. */
int _open (const char*, int, ...);
_CRTIMP int __cdecl _open (const char*, int, ...);
int _open_osfhandle (long, int);
int _pipe (int *, unsigned int, int);
int _read (int, void*, unsigned int);
int _setmode (int, int);
_CRTIMP int __cdecl _open_osfhandle (long, int);
_CRTIMP int __cdecl _pipe (int *, unsigned int, int);
_CRTIMP int __cdecl _read (int, void*, unsigned int);
_CRTIMP int __cdecl _setmode (int, int);
/* SH_... flags for nShFlags defined in share.h
* Optional fourth argument is unsigned unPermissions */
int _sopen (const char*, int, int, ...);
_CRTIMP int __cdecl _sopen (const char*, int, int, ...);
long _tell (int);
_CRTIMP long __cdecl _tell (int);
/* Should umask be in sys/stat.h and/or sys/types.h instead? */
int _umask (int);
int _unlink (const char*);
int _write (int, const void*, unsigned int);
_CRTIMP int __cdecl _umask (int);
_CRTIMP int __cdecl _unlink (const char*);
_CRTIMP int __cdecl _write (int, const void*, unsigned int);
/* Wide character versions. Also declared in wchar.h. */
/* Not in crtdll.dll */
#if !defined (_WIO_DEFINED)
#if defined (__MSVCRT__)
int _waccess(const wchar_t*, int);
int _wchmod(const wchar_t*, int);
int _wcreat(const wchar_t*, int);
long _wfindfirst(const wchar_t*, struct _wfinddata_t*);
int _wfindnext(long, struct _wfinddata_t *);
int _wunlink(const wchar_t*);
int _wopen(const wchar_t*, int, ...);
int _wsopen(const wchar_t*, int, int, ...);
wchar_t * _wmktemp(wchar_t*);
long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
int _wfindnexti64(long, struct _wfinddatai64_t*);
_CRTIMP int __cdecl _waccess(const wchar_t*, int);
_CRTIMP int __cdecl _wchmod(const wchar_t*, int);
_CRTIMP int __cdecl _wcreat(const wchar_t*, int);
_CRTIMP long __cdecl _wfindfirst(const wchar_t*, struct _wfinddata_t*);
_CRTIMP int __cdecl _wfindnext(long, struct _wfinddata_t *);
_CRTIMP int __cdecl _wunlink(const wchar_t*);
_CRTIMP int __cdecl _wopen(const wchar_t*, int, ...);
_CRTIMP int __cdecl _wsopen(const wchar_t*, int, int, ...);
_CRTIMP wchar_t * __cdecl _wmktemp(wchar_t*);
_CRTIMP long __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl _wfindnexti64(long, struct _wfinddatai64_t*);
#endif /* defined (__MSVCRT__) */
#define _WIO_DEFINED
#endif /* _WIO_DEFINED */
@ -250,25 +250,25 @@ int _wfindnexti64(long, struct _wfinddatai64_t*);
*/
#ifndef _UWIN
int access (const char*, int);
int chsize (int, long );
int close (int);
int creat (const char*, int);
int dup (int);
int dup2 (int, int);
int eof (int);
long filelength (int);
int fileno (FILE*);
int isatty (int);
long lseek (int, long, int);
int open (const char*, int, ...);
int read (int, void*, unsigned int);
int setmode (int, int);
int sopen (const char*, int, int, ...);
long tell (int);
int umask (int);
int unlink (const char*);
int write (int, const void*, unsigned int);
_CRTIMP int __cdecl access (const char*, int);
_CRTIMP int __cdecl chsize (int, long );
_CRTIMP int __cdecl close (int);
_CRTIMP int __cdecl creat (const char*, int);
_CRTIMP int __cdecl dup (int);
_CRTIMP int __cdecl dup2 (int, int);
_CRTIMP int __cdecl eof (int);
_CRTIMP long __cdecl filelength (int);
_CRTIMP int __cdecl fileno (FILE*);
_CRTIMP int __cdecl isatty (int);
_CRTIMP long __cdecl lseek (int, long, int);
_CRTIMP int __cdecl open (const char*, int, ...);
_CRTIMP int __cdecl read (int, void*, unsigned int);
_CRTIMP int __cdecl setmode (int, int);
_CRTIMP int __cdecl sopen (const char*, int, int, ...);
_CRTIMP long __cdecl tell (int);
_CRTIMP int __cdecl umask (int);
_CRTIMP int __cdecl unlink (const char*);
_CRTIMP int __cdecl write (int, const void*, unsigned int);
#endif /* _UWIN */
/* Wide character versions. Also declared in wchar.h. */