diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2003-02-10 21:13:34 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2003-02-10 21:13:34 +0000 |
commit | 14e54d7c97e4b202bbd7eef189afa384887551c3 (patch) | |
tree | ffc6a63bbaeaaf3e1ec1a2a822af652880a1b91a /winsup/mingw/include/wchar.h | |
parent | 16f4e17208de78a7dd75038073c4bc1a2c254ce4 (diff) | |
download | newlib-14e54d7c97e4b202bbd7eef189afa384887551c3.zip newlib-14e54d7c97e4b202bbd7eef189afa384887551c3.tar.gz newlib-14e54d7c97e4b202bbd7eef189afa384887551c3.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/mingw/include/wchar.h')
-rw-r--r-- | winsup/mingw/include/wchar.h | 183 |
1 files changed, 91 insertions, 92 deletions
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h index 3c3fa29..90bb827 100644 --- a/winsup/mingw/include/wchar.h +++ b/winsup/mingw/include/wchar.h @@ -85,65 +85,65 @@ struct _wfinddatai64_t { applies to other wide character versions? */ #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 */ #ifndef _WSTDIO_DEFINED /* also in stdio.h - keep in sync */ -int fwprintf (FILE*, const wchar_t*, ...); -int wprintf (const wchar_t*, ...); -int swprintf (wchar_t*, const wchar_t*, ...); -int _snwprintf (wchar_t*, size_t, const wchar_t*, ...); -int vfwprintf (FILE*, const wchar_t*, va_list); -int vwprintf (const wchar_t*, va_list); -int vswprintf (wchar_t*, const wchar_t*, va_list); -int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list); -int fwscanf (FILE*, const wchar_t*, ...); -int wscanf (const wchar_t*, ...); -int swscanf (const wchar_t*, const wchar_t*, ...); -wint_t fgetwc (FILE*); -wint_t fputwc (wchar_t, FILE*); -wint_t ungetwc (wchar_t, FILE*); +_CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl wprintf (const wchar_t*, ...); +_CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...); +_CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...); +_CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VA_LIST); +_CRTIMP int __cdecl vwprintf (const wchar_t*, __VA_LIST); +_CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VA_LIST); +_CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VA_LIST); +_CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl wscanf (const wchar_t*, ...); +_CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...); +_CRTIMP wint_t __cdecl fgetwc (FILE*); +_CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*); +_CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*); #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ -int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...); -extern __inline__ int vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, - va_list arg) +int __cdecl snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...); +extern __inline__ int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, + __VA_LIST arg) { return _vsnwprintf ( s, n, format, arg); } #endif #ifdef __MSVCRT__ -wchar_t* fgetws (wchar_t*, int, FILE*); -int fputws (const wchar_t*, FILE*); -wint_t getwc (FILE*); -wint_t getwchar (void); -wchar_t* _getws (wchar_t*); -wint_t putwc (wint_t, FILE*); -int _putws (const wchar_t*); -wint_t putwchar (wint_t); -FILE* _wfdopen(int, wchar_t *); -FILE* _wfopen (const wchar_t*, const wchar_t*); -FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*); -FILE* _wfsopen (const wchar_t*, const wchar_t*, int); -wchar_t* _wtmpnam (wchar_t*); -wchar_t* _wtempnam (const wchar_t*, const wchar_t*); -int _wrename (const wchar_t*, const wchar_t*); -int _wremove (const wchar_t*) - -FILE* _wpopen (const wchar_t*, const wchar_t*) -void _wperror (const wchar_t*); +_CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*); +_CRTIMP int __cdecl fputws (const wchar_t*, FILE*); +_CRTIMP wint_t __cdecl getwc (FILE*); +_CRTIMP wint_t __cdecl getwchar (void); +_CRTIMP wchar_t* __cdecl _getws (wchar_t*); +_CRTIMP wint_t __cdecl putwc (wint_t, FILE*); +_CRTIMP int __cdecl _putws (const wchar_t*); +_CRTIMP wint_t __cdecl putwchar (wint_t); +_CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *); +_CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*); +_CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*); +_CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int); +_CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*); +_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl _wremove (const wchar_t*) + +_CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*) +_CRTIMP void __cdecl _wperror (const wchar_t*); #endif /* __MSVCRT__ */ #define _WSTDIO_DEFINED #endif /* _WSTDIO_DEFINED */ @@ -151,11 +151,11 @@ void _wperror (const wchar_t*); #ifndef _WDIRECT_DEFINED /* Also in direct.h */ #ifdef __MSVCRT__ -int _wchdir (const wchar_t*); -wchar_t* _wgetcwd (wchar_t*, int); -wchar_t* _wgetdcwd (int, wchar_t*, int); -int _wmkdir (const wchar_t*); -int _wrmdir (const wchar_t*); +_CRTIMP int __cdecl _wchdir (const wchar_t*); +_CRTIMP wchar_t* __cdecl _wgetcwd (wchar_t*, int); +_CRTIMP wchar_t* __cdecl _wgetdcwd (int, wchar_t*, int); +_CRTIMP int __cdecl _wmkdir (const wchar_t*); +_CRTIMP int __cdecl _wrmdir (const wchar_t*); #endif /* __MSVCRT__ */ #define _WDIRECT_DEFINED #endif /* _WDIRECT_DEFINED */ @@ -220,8 +220,8 @@ struct _stati64 { #if !defined ( _WSTAT_DEFINED) /* also declared in sys/stat.h */ #if defined __MSVCRT__ -int _wstat (const wchar_t*, struct _stat*); -int _wstati64 (const wchar_t*, struct _stati64*); +_CRTIMP int __cdecl _wstat (const wchar_t*, struct _stat*); +_CRTIMP int __cdecl _wstati64 (const wchar_t*, struct _stati64*); #endif /* __MSVCRT__ */ #define _WSTAT_DEFINED #endif /* ! _WSTAT_DEFIND */ @@ -229,28 +229,28 @@ int _wstati64 (const wchar_t*, struct _stati64*); #ifndef _WTIME_DEFINED #ifdef __MSVCRT__ /* wide function prototypes, also declared in time.h */ -wchar_t* _wasctime (const struct tm*); -wchar_t* _wctime (const time_t*); -wchar_t* _wstrdate (wchar_t*); -wchar_t* _wstrtime (wchar_t*); +_CRTIMP wchar_t* __cdecl _wasctime (const struct tm*); +_CRTIMP wchar_t* __cdecl _wctime (const time_t*); +_CRTIMP wchar_t* __cdecl _wstrdate (wchar_t*); +_CRTIMP wchar_t* __cdecl _wstrtime (wchar_t*); #endif /* __MSVCRT__ */ -size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); +_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); #define _WTIME_DEFINED #endif /* _WTIME_DEFINED */ #ifndef _WLOCALE_DEFINED /* also declared in locale.h */ -wchar_t* _wsetlocale (int, const wchar_t*); +_CRTIMP wchar_t* __cdecl _wsetlocale (int, const wchar_t*); #define _WLOCALE_DEFINED #endif #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ -long wcstol (const wchar_t*, wchar_t**, int); -unsigned long wcstoul (const wchar_t*, wchar_t**, int); -double wcstod (const wchar_t*, wchar_t**); +_CRTIMP long __cdecl wcstol (const wchar_t*, wchar_t**, int); +_CRTIMP unsigned long __cdecl wcstoul (const wchar_t*, wchar_t**, int); +_CRTIMP double __cdecl wcstod (const wchar_t*, wchar_t**); #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ -extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr) +extern __inline__ float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr) { return (wcstod(nptr, endptr)); } -long double wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); +long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); #endif /* __NO_ISOCEXT */ #define _WSTDLIB_DEFINED #endif @@ -261,17 +261,17 @@ long double wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); /* Wide character versions. Also declared in io.h. */ /* CHECK: Are these in the oldnames??? NO! */ #if (0) -int waccess (const wchar_t *, int); -int wchmod (const wchar_t *, int); -int wcreat (const wchar_t *, int); -long wfindfirst (wchar_t *, struct _wfinddata_t *); -int wfindnext (long, struct _wfinddata_t *); -int wunlink (const wchar_t *); -int wrename (const wchar_t *, const wchar_t *); -int wremove (const wchar_t *); -int wopen (const wchar_t *, int, ...); -int wsopen (const wchar_t *, int, int, ...); -wchar_t* wmktemp (wchar_t *); +int waccess (const wchar_t *, int); +int wchmod (const wchar_t *, int); +int wcreat (const wchar_t *, int); +long wfindfirst (wchar_t *, struct _wfinddata_t *); +int wfindnext (long, struct _wfinddata_t *); +int wunlink (const wchar_t *); +int wrename (const wchar_t *, const wchar_t *); +int wremove (const wchar_t *); +int wopen (const wchar_t *, int, ...); +int wsopen (const wchar_t *, int, int, ...); +wchar_t* wmktemp (wchar_t *); #endif #endif /* _NO_OLDNAMES */ @@ -283,29 +283,28 @@ wchar_t* wmktemp (wchar_t *); typedef int mbstate_t; typedef wchar_t _Wint_t; -wint_t btowc(int); -size_t mbrlen(const char *, size_t, mbstate_t *); -size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); -size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); +wint_t __cdecl btowc(int); +size_t __cdecl mbrlen(const char *, size_t, mbstate_t *); +size_t __cdecl mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); +size_t __cdecl mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); -size_t wcrtomb(char *, wchar_t, mbstate_t *); -size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); -int wctob(wint_t); +size_t __cdecl wcrtomb(char *, wchar_t, mbstate_t *); +size_t __cdecl wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); +int __cdecl wctob(wint_t); #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ -extern __inline__ int fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */ -extern __inline__ int mbsinit(const mbstate_t* ps) {return 1;} -wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n); -wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n); +extern __inline__ int __cdecl fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */ +extern __inline__ int __cdecl mbsinit(const mbstate_t* ps) {return 1;} +wchar_t* __cdecl wmemset(wchar_t* s, wchar_t c, size_t n); +wchar_t* __cdecl wmemchr(const wchar_t* s, wchar_t c, size_t n); int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n); -wchar_t* wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2, +wchar_t* __cdecl wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2, size_t n); -wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n); -long long wcstoll(const wchar_t* __restrict__ nptr, +wchar_t* __cdecl wmemmove(wchar_t* s1, const wchar_t* s2, size_t n); +long long __cdecl wcstoll(const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, int base); -unsigned long long wcstoull(const wchar_t* __restrict__ nptr, +unsigned long long __cdecl wcstoull(const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base); - #endif /* __NO_ISOCEXT */ |