1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

Avoid including other headers from the msvcrt headers, duplicate some

definitions instead like Windows does.
Always define wchar_t (suggested by Dimitrie O. Paun), and use wchar_t
everywhere instead of WCHAR to avoid depending on Windows headers.
This commit is contained in:
Alexandre Julliard 2002-12-18 20:17:20 +00:00
parent 1df8f18e46
commit 3f5ff2fba2
28 changed files with 1041 additions and 283 deletions

View File

@ -46,6 +46,7 @@
#include "msvcrt/sys/utime.h" #include "msvcrt/sys/utime.h"
#include "msvcrt/time.h" #include "msvcrt/time.h"
#include "msvcrt/share.h" #include "msvcrt/share.h"
#include "msvcrt/wctype.h"
#include "wine/debug.h" #include "wine/debug.h"

View File

@ -60,7 +60,7 @@ void _sleep(unsigned long timeout)
*/ */
void* _lfind(const void* match, const void* start, void* _lfind(const void* match, const void* start,
unsigned int* array_size, unsigned int elem_size, unsigned int* array_size, unsigned int elem_size,
MSVCRT_compar_fn_t cf) int (*cf)(const void*,const void*) )
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)
@ -78,7 +78,7 @@ void* _lfind(const void* match, const void* start,
*/ */
void* _lsearch(const void* match, void* start, void* _lsearch(const void* match, void* start,
unsigned int* array_size, unsigned int elem_size, unsigned int* array_size, unsigned int elem_size,
MSVCRT_compar_fn_t cf) int (*cf)(const void*,const void*) )
{ {
unsigned int size = *array_size; unsigned int size = *array_size;
if (size) if (size)

View File

@ -28,6 +28,8 @@
#include "msvcrt.h" #include "msvcrt.h"
#include "msvcrt/conio.h" #include "msvcrt/conio.h"
#include "msvcrt/io.h" #include "msvcrt/io.h"
#include "msvcrt/stdio.h"
#include "msvcrt/wctype.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);

View File

@ -9,13 +9,53 @@
#define __WINE_CTYPE_H #define __WINE_CTYPE_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/wctype.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef USE_MSVCRT_PREFIX
# ifndef WEOF
# define WEOF (wint_t)(0xFFFF)
# endif
#else
# ifndef MSVCRT_WEOF
# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
# endif
#endif /* USE_MSVCRT_PREFIX */
#ifndef MSVCRT_WCTYPE_T_DEFINED
typedef MSVCRT(wchar_t) MSVCRT(wint_t);
typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
#define MSVCRT_WCTYPE_T_DEFINED
#endif
/* ASCII char classification table - binary compatible */
#define _UPPER 0x0001 /* C1_UPPER */
#define _LOWER 0x0002 /* C1_LOWER */
#define _DIGIT 0x0004 /* C1_DIGIT */
#define _SPACE 0x0008 /* C1_SPACE */
#define _PUNCT 0x0010 /* C1_PUNCT */
#define _CONTROL 0x0020 /* C1_CNTRL */
#define _BLANK 0x0040 /* C1_BLANK */
#define _HEX 0x0080 /* C1_XDIGIT */
#define _LEADBYTE 0x8000
#define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
int MSVCRT(__isascii)(int); int MSVCRT(__isascii)(int);
int MSVCRT(__iscsym)(int); int MSVCRT(__iscsym)(int);
int MSVCRT(__iscsymf)(int); int MSVCRT(__iscsymf)(int);
@ -37,6 +77,27 @@ int MSVCRT(isxdigit)(int);
int MSVCRT(tolower)(int); int MSVCRT(tolower)(int);
int MSVCRT(toupper)(int); int MSVCRT(toupper)(int);
#ifndef MSVCRT_WCTYPE_DEFINED
#define MSVCRT_WCTYPE_DEFINED
int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
int MSVCRT(isleadbyte)(int);
int MSVCRT(iswalnum)(MSVCRT(wint_t));
int MSVCRT(iswalpha)(MSVCRT(wint_t));
int MSVCRT(iswascii)(MSVCRT(wint_t));
int MSVCRT(iswcntrl)(MSVCRT(wint_t));
int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
int MSVCRT(iswdigit)(MSVCRT(wint_t));
int MSVCRT(iswgraph)(MSVCRT(wint_t));
int MSVCRT(iswlower)(MSVCRT(wint_t));
int MSVCRT(iswprint)(MSVCRT(wint_t));
int MSVCRT(iswpunct)(MSVCRT(wint_t));
int MSVCRT(iswspace)(MSVCRT(wint_t));
int MSVCRT(iswupper)(MSVCRT(wint_t));
int MSVCRT(iswxdigit)(MSVCRT(wint_t));
MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t));
MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t));
#endif /* MSVCRT_WCTYPE_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -9,14 +9,40 @@
#define __WINE_DIRECT_H #define __WINE_DIRECT_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
#include "msvcrt/dos.h" /* For _getdiskfree & co */ # ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED
#endif
#ifndef MSVCRT_DISKFREE_T_DEFINED
#define MSVCRT_DISKFREE_T_DEFINED
struct _diskfree_t {
unsigned int total_clusters;
unsigned int avail_clusters;
unsigned int sectors_per_cluster;
unsigned int bytes_per_sector;
};
#endif /* MSVCRT_DISKFREE_T_DEFINED */
int _chdir(const char*); int _chdir(const char*);
int _chdrive(int); int _chdrive(int);
char* _getcwd(char*,int); char* _getcwd(char*,int);
@ -26,11 +52,14 @@ unsigned long _getdrives(void);
int _mkdir(const char*); int _mkdir(const char*);
int _rmdir(const char*); int _rmdir(const char*);
int _wchdir(const WCHAR*); #ifndef MSVCRT_WDIRECT_DEFINED
WCHAR* _wgetcwd(WCHAR*,int); #define MSVCRT_WDIRECT_DEFINED
WCHAR* _wgetdcwd(int,WCHAR*,int); int _wchdir(const MSVCRT(wchar_t)*);
int _wmkdir(const WCHAR*); MSVCRT(wchar_t)* _wgetcwd(MSVCRT(wchar_t)*,int);
int _wrmdir(const WCHAR*); MSVCRT(wchar_t)* _wgetdcwd(int,MSVCRT(wchar_t)*,int);
int _wmkdir(const MSVCRT(wchar_t)*);
int _wrmdir(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WDIRECT_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -19,12 +19,15 @@
#define _A_SUBDIR 0x00000010 #define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020 #define _A_ARCH 0x00000020
#ifndef MSVCRT_DISKFREE_T_DEFINED
#define MSVCRT_DISKFREE_T_DEFINED
struct _diskfree_t { struct _diskfree_t {
unsigned int total_clusters; unsigned int total_clusters;
unsigned int avail_clusters; unsigned int avail_clusters;
unsigned int sectors_per_cluster; unsigned int sectors_per_cluster;
unsigned int bytes_per_sector; unsigned int bytes_per_sector;
}; };
#endif /* MSVCRT_DISKFREE_T_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -25,10 +25,12 @@
#error "eh.h is meant only for C++ applications" #error "eh.h is meant only for C++ applications"
#endif #endif
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT
#define MSVCRT(x) MSVCRT_##x # ifdef USE_MSVCRT_PREFIX
#else # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) x # else
# define MSVCRT(x) x
# endif
#endif #endif
struct _EXCEPTION_POINTERS; struct _EXCEPTION_POINTERS;

View File

@ -20,6 +20,14 @@
#define __WINE_ERRNO_H #define __WINE_ERRNO_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifdef USE_MSVCRT_PREFIX #ifdef USE_MSVCRT_PREFIX
# define MSVCRT_EPERM 1 # define MSVCRT_EPERM 1
@ -104,4 +112,12 @@
#endif /* USE_MSVCRT_PREFIX */ #endif /* USE_MSVCRT_PREFIX */
extern int* MSVCRT(_errno)(void);
#ifndef USE_MSVCRT_PREFIX
# define errno (*_errno())
#else
# define MSVCRT_errno (*MSVCRT__errno())
#endif
#endif /* __WINE_ERRNO_H */ #endif /* __WINE_ERRNO_H */

View File

@ -9,8 +9,26 @@
#define __WINE_IO_H #define __WINE_IO_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/stdio.h" /* For FILENAME_MAX */ #ifndef MSVCRT
#include "msvcrt/sys/types.h" /* For time_t */ # ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef _MSC_VER
# ifndef __int64
# define __int64 long long
# endif
#endif
/* The following are also defined in dos.h */ /* The following are also defined in dos.h */
#define _A_NORMAL 0x00000000 #define _A_NORMAL 0x00000000
@ -21,8 +39,18 @@
#define _A_SUBDIR 0x00000010 #define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020 #define _A_ARCH 0x00000020
typedef unsigned long _fsize_t; #ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define MSVCRT_FSIZE_T_DEFINED
#endif
#ifndef MSVCRT_FINDDATA_T_DEFINED
#define MSVCRT_FINDDATA_T_DEFINED
struct _finddata_t struct _finddata_t
{ {
unsigned attrib; unsigned attrib;
@ -30,7 +58,7 @@ struct _finddata_t
MSVCRT(time_t) time_access; MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write; MSVCRT(time_t) time_write;
_fsize_t size; _fsize_t size;
char name[MSVCRT(FILENAME_MAX)]; char name[260];
}; };
struct _finddatai64_t struct _finddatai64_t
@ -40,16 +68,19 @@ struct _finddatai64_t
MSVCRT(time_t) time_access; MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write; MSVCRT(time_t) time_write;
__int64 size; __int64 size;
char name[MSVCRT(FILENAME_MAX)]; char name[260];
}; };
#endif /* MSVCRT_FINDDATA_T_DEFINED */
#ifndef MSVCRT_WFINDDATA_T_DEFINED
#define MSVCRT_WFINDDATA_T_DEFINED
struct _wfinddata_t { struct _wfinddata_t {
unsigned attrib; unsigned attrib;
MSVCRT(time_t) time_create; MSVCRT(time_t) time_create;
MSVCRT(time_t) time_access; MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write; MSVCRT(time_t) time_write;
_fsize_t size; _fsize_t size;
WCHAR name[MSVCRT(FILENAME_MAX)]; MSVCRT(wchar_t) name[260];
}; };
struct _wfinddatai64_t { struct _wfinddatai64_t {
@ -58,9 +89,9 @@ struct _wfinddatai64_t {
MSVCRT(time_t) time_access; MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write; MSVCRT(time_t) time_write;
__int64 size; __int64 size;
WCHAR name[MSVCRT(FILENAME_MAX)]; MSVCRT(wchar_t) name[260];
}; };
#endif /* MSVCRT_WFINDDATA_T_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -103,19 +134,21 @@ int _write(int,const void*,unsigned int);
int MSVCRT(remove)(const char*); int MSVCRT(remove)(const char*);
int MSVCRT(rename)(const char*,const char*); int MSVCRT(rename)(const char*,const char*);
int _waccess(const WCHAR*,int); #ifndef MSVCRT_WIO_DEFINED
int _wchmod(const WCHAR*,int); #define MSVCRT_WIO_DEFINED
int _wcreat(const WCHAR*,int); int _waccess(const MSVCRT(wchar_t)*,int);
long _wfindfirst(const WCHAR*,struct _wfinddata_t*); int _wchmod(const MSVCRT(wchar_t)*,int);
long _wfindfirsti64(const WCHAR*, struct _wfinddatai64_t*); int _wcreat(const MSVCRT(wchar_t)*,int);
long _wfindfirst(const MSVCRT(wchar_t)*,struct _wfinddata_t*);
long _wfindfirsti64(const MSVCRT(wchar_t)*, struct _wfinddatai64_t*);
int _wfindnext(long,struct _wfinddata_t*); int _wfindnext(long,struct _wfinddata_t*);
int _wfindnexti64(long, struct _wfinddatai64_t*); int _wfindnexti64(long, struct _wfinddatai64_t*);
WCHAR* _wmktemp(WCHAR*); MSVCRT(wchar_t)*_wmktemp(MSVCRT(wchar_t)*);
int _wopen(const WCHAR*,int,...); int _wopen(const MSVCRT(wchar_t)*,int,...);
int _wrename(const WCHAR*,const WCHAR*); int _wrename(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int _wsopen(const WCHAR*,int,int,...); int _wsopen(const MSVCRT(wchar_t)*,int,int,...);
int _wunlink(const WCHAR*); int _wunlink(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WIO_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,12 +21,19 @@
#define __WINE_LOCALE_H #define __WINE_LOCALE_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT(x) MSVCRT_##x #define MSVCRT_WCHAR_T_DEFINED
#else #ifndef __cplusplus
#define MSVCRT(x) x typedef unsigned short MSVCRT(wchar_t);
#endif
#endif #endif
#ifdef USE_MSVCRT_PREFIX #ifdef USE_MSVCRT_PREFIX
@ -49,6 +56,8 @@
#define LC_MAX LC_TIME #define LC_MAX LC_TIME
#endif /* USE_MSVCRT_PREFIX */ #endif /* USE_MSVCRT_PREFIX */
#ifndef MSVCRT_LCONV_DEFINED
#define MSVCRT_LCONV_DEFINED
struct MSVCRT(lconv) struct MSVCRT(lconv)
{ {
char* decimal_point; char* decimal_point;
@ -70,6 +79,7 @@ struct MSVCRT(lconv)
char p_sign_posn; char p_sign_posn;
char n_sign_posn; char n_sign_posn;
}; };
#endif /* MSVCRT_LCONV_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
@ -79,7 +89,10 @@ extern "C" {
char* MSVCRT(setlocale)(int,const char*); char* MSVCRT(setlocale)(int,const char*);
struct MSVCRT(lconv)* MSVCRT(localeconv)(void); struct MSVCRT(lconv)* MSVCRT(localeconv)(void);
WCHAR* _wsetlocale(int,const WCHAR*); #ifndef MSVCRT_WLOCALE_DEFINED
#define MSVCRT_WLOCALE_DEFINED
MSVCRT(wchar_t)* _wsetlocale(int,const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WLOCALE_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,13 +21,14 @@
#define __WINE_MALLOC_H #define __WINE_MALLOC_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT
#define MSVCRT(x) MSVCRT_##x # ifdef USE_MSVCRT_PREFIX
#else # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) x # else
# define MSVCRT(x) x
# endif
#endif #endif
/* heap function constants */ /* heap function constants */
#define _HEAPEMPTY -1 #define _HEAPEMPTY -1
#define _HEAPOK -2 #define _HEAPOK -2
@ -45,13 +46,15 @@ typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
#ifndef MSVCRT_HEAPINFO_DEFINED
#define MSVCRT_HEAPINFO_DEFINED
typedef struct _heapinfo typedef struct _heapinfo
{ {
int* _pentry; int* _pentry;
MSVCRT(size_t) _size; MSVCRT(size_t) _size;
int _useflag; int _useflag;
} _HEAPINFO; } _HEAPINFO;
#endif /* MSVCRT_HEAPINFO_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -37,13 +37,17 @@ int _ismbbkalnum(unsigned int);
int _ismbbkana(unsigned int); int _ismbbkana(unsigned int);
int _ismbbkprint(unsigned int); int _ismbbkprint(unsigned int);
int _ismbbkpunct(unsigned int); int _ismbbkpunct(unsigned int);
int _ismbblead(unsigned int);
int _ismbbprint(unsigned int); int _ismbbprint(unsigned int);
int _ismbbpunct(unsigned int); int _ismbbpunct(unsigned int);
int _setmbcp(int);
#ifndef MSVCRT_MBLEADTRAIL_DEFINED
#define MSVCRT_MBLEADTRAIL_DEFINED
int _ismbblead(unsigned int);
int _ismbbtrail(unsigned int); int _ismbbtrail(unsigned int);
int _ismbslead(const unsigned char*,const unsigned char*); int _ismbslead(const unsigned char*,const unsigned char*);
int _ismbstrail(const unsigned char*,const unsigned char*); int _ismbstrail(const unsigned char*,const unsigned char*);
int _setmbcp(int); #endif /* MSVCRT_MBLEADTRAIL_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,12 +21,12 @@
#define __WINE_MBSTRING_H #define __WINE_MBSTRING_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/mbctype.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
#ifdef USE_MSVCRT_PREFIX # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) MSVCRT_##x # else
#else # define MSVCRT(x) x
#define MSVCRT(x) x # endif
#endif #endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
@ -34,8 +34,10 @@ typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
#ifndef MSVCRT_NLSCMP_DEFINED
#define _NLSCMPERROR ((unsigned int)0x7fffffff) #define _NLSCMPERROR ((unsigned int)0x7fffffff)
#define MSVCRT_NLSCMP_DEFINED
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -114,6 +116,14 @@ unsigned char* _mbsstr(const unsigned char*,const unsigned char*);
unsigned char* _mbstok(unsigned char*,const unsigned char*); unsigned char* _mbstok(unsigned char*,const unsigned char*);
unsigned char* _mbsupr(unsigned char*); unsigned char* _mbsupr(unsigned char*);
#ifndef MSVCRT_MBLEADTRAIL_DEFINED
#define MSVCRT_MBLEADTRAIL_DEFINED
int _ismbblead(unsigned int);
int _ismbbtrail(unsigned int);
int _ismbslead(const unsigned char*,const unsigned char*);
int _ismbstrail(const unsigned char*,const unsigned char*);
#endif /* MSVCRT_MBLEADTRAIL_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -9,14 +9,20 @@
#define __WINE_PROCESS_H #define __WINE_PROCESS_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
#ifdef USE_MSVCRT_PREFIX # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) MSVCRT_##x # else
#else # define MSVCRT(x) x
#define MSVCRT(x) x # endif
#endif #endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
/* Process creation flags */ /* Process creation flags */
#define _P_WAIT 0 #define _P_WAIT 0
@ -66,23 +72,26 @@ void MSVCRT(abort)(void);
void MSVCRT(exit)(int); void MSVCRT(exit)(int);
int MSVCRT(system)(const char*); int MSVCRT(system)(const char*);
int _wexecl(const WCHAR*,const WCHAR*,...); #ifndef MSVCRT_WPROCESS_DEFINED
int _wexecle(const WCHAR*,const WCHAR*,...); #define MSVCRT_WPROCESS_DEFINED
int _wexeclp(const WCHAR*,const WCHAR*,...); int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexeclpe(const WCHAR*,const WCHAR*,...); int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexecv(const WCHAR*,const WCHAR* const *); int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexecve(const WCHAR*,const WCHAR* const *,const WCHAR* const *); int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexecvp(const WCHAR*,const WCHAR* const *); int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wexecvpe(const WCHAR*,const WCHAR* const *,const WCHAR* const *); int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wspawnl(int,const WCHAR*,const WCHAR*,...); int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wspawnle(int,const WCHAR*,const WCHAR*,...); int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wspawnlp(int,const WCHAR*,const WCHAR*,...); int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnlpe(int,const WCHAR*,const WCHAR*,...); int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnv(int,const WCHAR*,const WCHAR* const *); int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnve(int,const WCHAR*,const WCHAR* const *,const WCHAR* const *); int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnvp(int,const WCHAR*,const WCHAR* const *); int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wspawnvpe(int,const WCHAR*,const WCHAR* const *,const WCHAR* const *); int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wsystem(const WCHAR*); int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wsystem(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WPROCESS_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,13 +21,14 @@
#define __WINE_SEARCH_H #define __WINE_SEARCH_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT
#define MSVCRT(x) MSVCRT_##x # ifdef USE_MSVCRT_PREFIX
#else # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) x # else
# define MSVCRT(x) x
# endif
#endif #endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t); typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
@ -38,13 +39,14 @@ typedef unsigned int MSVCRT(size_t);
extern "C" { extern "C" {
#endif #endif
typedef int (*MSVCRT_compar_fn_t)(const void*,const void*); void* _lfind(const void*,const void*,unsigned int*,unsigned int,
int (*)(const void*,const void*));
void* _lfind(const void*,const void*,unsigned int*,unsigned int,MSVCRT_compar_fn_t); void* _lsearch(const void*,void*,unsigned int*,unsigned int,
void* _lsearch(const void*,void*,unsigned int*,unsigned int,MSVCRT_compar_fn_t); int (*)(const void*,const void*));
void* MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t),
void* MSVCRT(bsearch)(const void*,const void*,MSVCRT(size_t),MSVCRT(size_t),MSVCRT_compar_fn_t); int (*)(const void*,const void*));
void MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t),MSVCRT_compar_fn_t); void MSVCRT(qsort)(void*,MSVCRT(size_t),MSVCRT(size_t),
int (*)(const void*,const void*));
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,10 +21,12 @@
#define __WINE_SETJMP_H #define __WINE_SETJMP_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT
#define MSVCRT(x) MSVCRT_##x # ifdef USE_MSVCRT_PREFIX
#else # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) x # else
# define MSVCRT(x) x
# endif
#endif #endif

View File

@ -21,21 +21,38 @@
#define __WINE_STDDEF_H #define __WINE_STDDEF_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_PTRDIFF_T_DEFINED
typedef int ptrdiff_t; typedef int ptrdiff_t;
#define MSVCRT_PTRDIFF_T_DEFINED
#endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t); typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
/* Best to leave this one alone: wchar_t */ #ifndef NULL
#ifdef WINE_DEFINE_WCHAR_T #ifdef __cplusplus
typedef unsigned short wchar_t; #define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif #endif
#define offsetof(s,m) (size_t)&(((s*)NULL)->m) #define offsetof(s,m) (size_t)&(((s*)NULL)->m)

View File

@ -12,8 +12,14 @@
#ifndef RC_INVOKED #ifndef RC_INVOKED
#include <stdarg.h> #include <stdarg.h>
#endif #endif
#include "msvcrt/wctype.h" /* For wint_t */
#ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
/* file._flag flags */ /* file._flag flags */
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
@ -36,6 +42,13 @@
#define MSVCRT__IOAPPEND 0x0200 #define MSVCRT__IOAPPEND 0x0200
#endif /* USE_MSVCRT_PREFIX */ #endif /* USE_MSVCRT_PREFIX */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
@ -76,6 +89,8 @@
#endif /* USE_MSVCRT_PREFIX */ #endif /* USE_MSVCRT_PREFIX */
#ifndef MSVCRT_FILE_DEFINED
#define MSVCRT_FILE_DEFINED
typedef struct MSVCRT(_iobuf) typedef struct MSVCRT(_iobuf)
{ {
char* _ptr; char* _ptr;
@ -87,21 +102,40 @@ typedef struct MSVCRT(_iobuf)
int _bufsiz; int _bufsiz;
char* _tmpfname; char* _tmpfname;
} MSVCRT(FILE); } MSVCRT(FILE);
#endif /* MSVCRT_FILE_DEFINED */
#ifndef MSVCRT_FPOS_T_DEFINED
typedef long MSVCRT(fpos_t); typedef long MSVCRT(fpos_t);
#define MSVCRT_FPOS_T_DEFINED
#endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t); typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_WCTYPE_T_DEFINED
typedef MSVCRT(wchar_t) MSVCRT(wint_t);
typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
#define MSVCRT_WCTYPE_T_DEFINED
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifndef MSVCRT_STDIO_DEFINED
MSVCRT(FILE)* MSVCRT(__p__iob)(void); MSVCRT(FILE)* MSVCRT(__p__iob)(void);
#define _iob (__p__iob()) #define _iob (__p__iob())
#endif /* MSVCRT_STDIO_DEFINED */
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
#define stdin (_iob+STDIN_FILENO) #define stdin (_iob+STDIN_FILENO)
#define stdout (_iob+STDOUT_FILENO) #define stdout (_iob+STDOUT_FILENO)
@ -112,7 +146,8 @@ MSVCRT(FILE)* MSVCRT(__p__iob)(void);
#define MSVCRT_stderr (_iob+STDERR_FILENO) #define MSVCRT_stderr (_iob+STDERR_FILENO)
#endif /* USE_MSVCRT_PREFIX, __WINE__ */ #endif /* USE_MSVCRT_PREFIX, __WINE__ */
#ifndef MSVCRT_STDIO_DEFINED
#define MSVCRT_STDIO_DEFINED
int _fcloseall(void); int _fcloseall(void);
MSVCRT(FILE)* _fdopen(int,const char*); MSVCRT(FILE)* _fdopen(int,const char*);
int _fgetchar(void); int _fgetchar(void);
@ -176,43 +211,48 @@ int MSVCRT(vfprintf)(MSVCRT(FILE)*,const char*,va_list);
int MSVCRT(vprintf)(const char*,va_list); int MSVCRT(vprintf)(const char*,va_list);
int MSVCRT(vsprintf)(char*,const char*,va_list); int MSVCRT(vsprintf)(char*,const char*,va_list);
MSVCRT(wint_t) _fgetwchar(void); #ifndef MSVCRT_WSTDIO_DEFINED
MSVCRT(wint_t) _fputwchar(MSVCRT(wint_t)); #define MSVCRT_WSTDIO_DEFINED
WCHAR* _getws(WCHAR*); MSVCRT(wint_t) _fgetwchar(void);
int _putws(const WCHAR*); MSVCRT(wint_t) _fputwchar(MSVCRT(wint_t));
int _snwprintf(WCHAR*,MSVCRT(size_t),const WCHAR*,...); MSVCRT(wchar_t)*_getws(MSVCRT(wchar_t)*);
int _vsnwprintf(WCHAR*,MSVCRT(size_t),const WCHAR*,va_list); int _putws(const MSVCRT(wchar_t)*);
MSVCRT(FILE)* _wfdopen(int,const WCHAR*); int _snwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,...);
MSVCRT(FILE)* _wfopen(const WCHAR*,const WCHAR*); int _vsnwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,va_list);
MSVCRT(FILE)* _wfreopen(const WCHAR*,const WCHAR*,MSVCRT(FILE)*); MSVCRT(FILE)* _wfdopen(int,const MSVCRT(wchar_t)*);
MSVCRT(FILE)* _wfsopen(const WCHAR*,const WCHAR*,int); MSVCRT(FILE)* _wfopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
void _wperror(const WCHAR*); MSVCRT(FILE)* _wfreopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
MSVCRT(FILE)* _wpopen(const WCHAR*,const WCHAR*); MSVCRT(FILE)* _wfsopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,int);
int _wremove(const WCHAR*); void _wperror(const MSVCRT(wchar_t)*);
WCHAR* _wtempnam(const WCHAR*,const WCHAR*); MSVCRT(FILE)* _wpopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* _wtmpnam(WCHAR*); int _wremove(const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wtempnam(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wtmpnam(MSVCRT(wchar_t)*);
MSVCRT(wint_t) MSVCRT(fgetwc)(MSVCRT(FILE)*); MSVCRT(wint_t) MSVCRT(fgetwc)(MSVCRT(FILE)*);
WCHAR* MSVCRT(fgetws)(WCHAR*,int,MSVCRT(FILE)*); MSVCRT(wchar_t)*MSVCRT(fgetws)(MSVCRT(wchar_t)*,int,MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(fputwc)(MSVCRT(wint_t),MSVCRT(FILE)*); MSVCRT(wint_t) MSVCRT(fputwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
int MSVCRT(fputws)(const WCHAR*,MSVCRT(FILE)*); int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
int MSVCRT(fwprintf)(MSVCRT(FILE)*,const WCHAR*,...); int MSVCRT(fwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...);
int MSVCRT(fputws)(const WCHAR*,MSVCRT(FILE)*); int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
int MSVCRT(fwscanf)(MSVCRT(FILE)*,const WCHAR*,...); int MSVCRT(fwscanf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...);
MSVCRT(wint_t) MSVCRT(getwc)(MSVCRT(FILE)*); MSVCRT(wint_t) MSVCRT(getwc)(MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(getwchar)(void); MSVCRT(wint_t) MSVCRT(getwchar)(void);
WCHAR* MSVCRT(getws)(WCHAR*); MSVCRT(wchar_t)*MSVCRT(getws)(MSVCRT(wchar_t)*);
MSVCRT(wint_t) MSVCRT(putwc)(MSVCRT(wint_t),MSVCRT(FILE)*); MSVCRT(wint_t) MSVCRT(putwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(putwchar)(MSVCRT(wint_t)); MSVCRT(wint_t) MSVCRT(putwchar)(MSVCRT(wint_t));
int MSVCRT(putws)(const WCHAR*); int MSVCRT(putws)(const MSVCRT(wchar_t)*);
int MSVCRT(swprintf)(WCHAR*,const WCHAR*,...); int MSVCRT(swprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int MSVCRT(swscanf)(const WCHAR*,const WCHAR*,...); int MSVCRT(swscanf)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
MSVCRT(wint_t) MSVCRT(ungetwc)(MSVCRT(wint_t),MSVCRT(FILE)*); MSVCRT(wint_t) MSVCRT(ungetwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
int MSVCRT(vfwprintf)(MSVCRT(FILE)*,const WCHAR*,va_list); int MSVCRT(vfwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,va_list);
int MSVCRT(vswprintf)(WCHAR*,const WCHAR*,va_list); int MSVCRT(vswprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,va_list);
int MSVCRT(vwprintf)(const WCHAR*,va_list); int MSVCRT(vwprintf)(const MSVCRT(wchar_t)*,va_list);
int MSVCRT(wprintf)(const WCHAR*,...); int MSVCRT(wprintf)(const MSVCRT(wchar_t)*,...);
int MSVCRT(wscanf)(const WCHAR*,...); int MSVCRT(wscanf)(const MSVCRT(wchar_t)*,...);
#endif /* MSVCRT_WSTDIO_DEFINED */
#endif /* MSVCRT_STDIO_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -9,10 +9,26 @@
#define __WINE_STDLIB_H #define __WINE_STDLIB_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "basetsd.h" #ifndef MSVCRT
#include "msvcrt/malloc.h" /* For size_t, malloc & co */ # ifdef USE_MSVCRT_PREFIX
#include "msvcrt/search.h" /* For bsearch and qsort */ # define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef _MSC_VER
# ifndef __int64
# define __int64 long long
# endif
#endif
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
#define EXIT_SUCCESS 0 #define EXIT_SUCCESS 0
@ -41,6 +57,10 @@ typedef struct MSVCRT(_ldiv_t) {
long rem; long rem;
} MSVCRT(ldiv_t); } MSVCRT(ldiv_t);
#ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED
#endif
#define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __max(a,b) (((a) > (b)) ? (a) : (b))
#define __min(a,b) (((a) < (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b))
@ -71,9 +91,9 @@ extern unsigned int* __p__winminor();
extern int* __p___argc(void); extern int* __p___argc(void);
extern char*** __p___argv(void); extern char*** __p___argv(void);
extern WCHAR*** __p___wargv(void); extern MSVCRT(wchar_t)*** __p___wargv(void);
extern char*** __p__environ(void); extern char*** __p__environ(void);
extern WCHAR*** __p__wenviron(void); extern MSVCRT(wchar_t)*** __p__wenviron(void);
extern int* __p___mb_cur_max(void); extern int* __p___mb_cur_max(void);
extern unsigned long* __doserrno(void); extern unsigned long* __doserrno(void);
extern unsigned int* __p__fmode(void); extern unsigned int* __p__fmode(void);
@ -104,10 +124,10 @@ extern unsigned int* __p__fmode(void);
extern int* MSVCRT(_errno)(void); extern int* MSVCRT(_errno)(void);
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
#define errno (*_errno()) # define errno (*_errno())
#elif !defined(__WINE__) #else
#define MSVCRT_errno (*MSVCRT__errno()) # define MSVCRT_errno (*MSVCRT__errno())
#endif /* USE_MSVCRT_PREFIX, __WINE__ */ #endif
typedef int (*_onexit_t)(void); typedef int (*_onexit_t)(void);
@ -148,6 +168,7 @@ int MSVCRT(atexit)(void (*)(void));
double MSVCRT(atof)(const char*); double MSVCRT(atof)(const char*);
int MSVCRT(atoi)(const char*); int MSVCRT(atoi)(const char*);
long MSVCRT(atol)(const char*); long MSVCRT(atol)(const char*);
void* MSVCRT(calloc)(MSVCRT(size_t),MSVCRT(size_t));
#ifdef __i386__ #ifdef __i386__
long long MSVCRT(div)(int,int); long long MSVCRT(div)(int,int);
unsigned long long MSVCRT(ldiv)(long,long); unsigned long long MSVCRT(ldiv)(long,long);
@ -156,41 +177,47 @@ MSVCRT(div_t) MSVCRT(div)(int,int);
MSVCRT(ldiv_t) MSVCRT(ldiv)(long,long); MSVCRT(ldiv_t) MSVCRT(ldiv)(long,long);
#endif #endif
void MSVCRT(exit)(int); void MSVCRT(exit)(int);
void MSVCRT(free)(void*);
char* MSVCRT(getenv)(const char*); char* MSVCRT(getenv)(const char*);
long MSVCRT(labs)(long); long MSVCRT(labs)(long);
void* MSVCRT(malloc)(MSVCRT(size_t));
int MSVCRT(mblen)(const char*,MSVCRT(size_t)); int MSVCRT(mblen)(const char*,MSVCRT(size_t));
void MSVCRT(perror)(const char*); void MSVCRT(perror)(const char*);
int MSVCRT(rand)(void); int MSVCRT(rand)(void);
void* MSVCRT(realloc)(void*,MSVCRT(size_t));
void MSVCRT(srand)(unsigned int); void MSVCRT(srand)(unsigned int);
double MSVCRT(strtod)(const char*,char**); double MSVCRT(strtod)(const char*,char**);
long MSVCRT(strtol)(const char*,char**,int); long MSVCRT(strtol)(const char*,char**,int);
unsigned long MSVCRT(strtoul)(const char*,char**,int); unsigned long MSVCRT(strtoul)(const char*,char**,int);
int MSVCRT(system)(const char*); int MSVCRT(system)(const char*);
WCHAR* _itow(int,WCHAR*,int); #ifndef MSVCRT_WSTDLIB_DEFINED
WCHAR* _i64tow(__int64,WCHAR*,int); #define MSVCRT_WSTDLIB_DEFINED
WCHAR* _ltow(long,WCHAR*,int); MSVCRT(wchar_t)*_itow(int,MSVCRT(wchar_t)*,int);
WCHAR* _ui64tow(unsigned __int64,WCHAR*,int); MSVCRT(wchar_t)*_i64tow(__int64,MSVCRT(wchar_t)*,int);
WCHAR* _ultow(unsigned long,WCHAR*,int); MSVCRT(wchar_t)*_ltow(long,MSVCRT(wchar_t)*,int);
WCHAR* _wfullpath(WCHAR*,const WCHAR*,size_t); MSVCRT(wchar_t)*_ui64tow(unsigned __int64,MSVCRT(wchar_t)*,int);
WCHAR* _wgetenv(const WCHAR*); MSVCRT(wchar_t)*_ultow(unsigned long,MSVCRT(wchar_t)*,int);
void _wmakepath(WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*,const WCHAR*); MSVCRT(wchar_t)*_wfullpath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,size_t);
void _wperror(const WCHAR*); MSVCRT(wchar_t)*_wgetenv(const MSVCRT(wchar_t)*);
int _wputenv(const WCHAR*); void _wmakepath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
void _wsearchenv(const WCHAR*,const WCHAR*,WCHAR*); void _wperror(const MSVCRT(wchar_t)*);
void _wsplitpath(const WCHAR*,WCHAR*,WCHAR*,WCHAR*,WCHAR*); int _wputenv(const MSVCRT(wchar_t)*);
int _wsystem(const WCHAR*); void _wsearchenv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
int _wtoi(const WCHAR*); void _wsplitpath(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
__int64 _wtoi64(const WCHAR*); int _wsystem(const MSVCRT(wchar_t)*);
long _wtol(const WCHAR*); int _wtoi(const MSVCRT(wchar_t)*);
__int64 _wtoi64(const MSVCRT(wchar_t)*);
long _wtol(const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(mbstowcs)(WCHAR*,const char*,MSVCRT(size_t)); MSVCRT(size_t) MSVCRT(mbstowcs)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
int MSVCRT(mbtowc)(WCHAR*,const char*,MSVCRT(size_t)); int MSVCRT(mbtowc)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
double MSVCRT(wcstod)(const WCHAR*,WCHAR**); double MSVCRT(wcstod)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**);
long MSVCRT(wcstol)(const WCHAR*,WCHAR**,int); long MSVCRT(wcstol)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
MSVCRT(size_t) MSVCRT(wcstombs)(char*,const WCHAR*,MSVCRT(size_t)); MSVCRT(size_t) MSVCRT(wcstombs)(char*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
unsigned long MSVCRT(wcstoul)(const WCHAR*,WCHAR**,int); unsigned long MSVCRT(wcstoul)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
int MSVCRT(wctomb)(char*,WCHAR); int MSVCRT(wctomb)(char*,MSVCRT(wchar_t));
#endif /* MSVCRT_WSTDLIB_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -9,20 +9,38 @@
#define __WINE_STRING_H #define __WINE_STRING_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
#ifdef USE_MSVCRT_PREFIX # define MSVCRT(x) MSVCRT_##x
#define MSVCRT(x) MSVCRT_##x # else
#else # define MSVCRT(x) x
#define MSVCRT(x) x # endif
#endif #endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t); typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
#ifndef MSVCRT_NLSCMP_DEFINED
#define _NLSCMPERROR ((unsigned int)0x7fffffff)
#define MSVCRT_NLSCMP_DEFINED
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -65,32 +83,35 @@ char* MSVCRT(strstr)(const char*,const char*);
char* MSVCRT(strtok)(char*,const char*); char* MSVCRT(strtok)(char*,const char*);
MSVCRT(size_t) MSVCRT(strxfrm)(char*,const char*,MSVCRT(size_t)); MSVCRT(size_t) MSVCRT(strxfrm)(char*,const char*,MSVCRT(size_t));
WCHAR* _wcsdup(const WCHAR*); #ifndef MSVCRT_WSTRING_DEFINED
int _wcsicmp(const WCHAR*,const WCHAR*); #define MSVCRT_WSTRING_DEFINED
int _wcsicoll(const WCHAR*,const WCHAR*); MSVCRT(wchar_t)*_wcsdup(const MSVCRT(wchar_t)*);
WCHAR* _wcslwr(WCHAR*); int _wcsicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int _wcsnicmp(const WCHAR*,const WCHAR*,MSVCRT(size_t)); int _wcsicoll(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* _wcsnset(WCHAR*,WCHAR,MSVCRT(size_t)); MSVCRT(wchar_t)*_wcslwr(MSVCRT(wchar_t)*);
WCHAR* _wcsrev(WCHAR*); int _wcsnicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
WCHAR* _wcsset(WCHAR*,WCHAR); MSVCRT(wchar_t)*_wcsnset(MSVCRT(wchar_t)*,MSVCRT(wchar_t),MSVCRT(size_t));
WCHAR* _wcsupr(WCHAR*); MSVCRT(wchar_t)*_wcsrev(MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wcsset(MSVCRT(wchar_t)*,MSVCRT(wchar_t));
MSVCRT(wchar_t)*_wcsupr(MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcscat)(WCHAR*,const WCHAR*); MSVCRT(wchar_t)*MSVCRT(wcscat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcschr)(const WCHAR*,WCHAR); MSVCRT(wchar_t)*MSVCRT(wcschr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t));
int MSVCRT(wcscmp)(const WCHAR*,const WCHAR*); int MSVCRT(wcscmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int MSVCRT(wcscoll)(const WCHAR*,const WCHAR*); int MSVCRT(wcscoll)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcscpy)(WCHAR*,const WCHAR*); MSVCRT(wchar_t)*MSVCRT(wcscpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcscspn)(const WCHAR*,const WCHAR*); MSVCRT(size_t) MSVCRT(wcscspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcslen)(const WCHAR*); MSVCRT(size_t) MSVCRT(wcslen)(const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcsncat)(WCHAR*,const WCHAR*,MSVCRT(size_t)); MSVCRT(wchar_t)*MSVCRT(wcsncat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
int MSVCRT(wcsncmp)(const WCHAR*,const WCHAR*,MSVCRT(size_t)); int MSVCRT(wcsncmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
WCHAR* MSVCRT(wcsncpy)(WCHAR*,const WCHAR*,MSVCRT(size_t)); MSVCRT(wchar_t)*MSVCRT(wcsncpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
WCHAR* MSVCRT(wcspbrk)(const WCHAR*,const WCHAR*); MSVCRT(wchar_t)*MSVCRT(wcspbrk)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcsrchr)(const WCHAR*,WCHAR wcFor); MSVCRT(wchar_t)*MSVCRT(wcsrchr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t) wcFor);
MSVCRT(size_t) MSVCRT(wcsspn)(const WCHAR*,const WCHAR*); MSVCRT(size_t) MSVCRT(wcsspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcsstr)(const WCHAR*,const WCHAR*); MSVCRT(wchar_t)*MSVCRT(wcsstr)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
WCHAR* MSVCRT(wcstok)(WCHAR*,const WCHAR*); MSVCRT(wchar_t)*MSVCRT(wcstok)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcsxfrm)(WCHAR*,const WCHAR*,MSVCRT(size_t)); MSVCRT(size_t) MSVCRT(wcsxfrm)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
#endif /* MSVCRT_WSTRING_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -9,8 +9,48 @@
#define __WINE_SYS_STAT_H #define __WINE_SYS_STAT_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/sys/types.h" #include "sys/types.h"
#ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef _MSC_VER
# ifndef __int64
# define __int64 long long
# endif
#endif
#ifndef MSVCRT_DEV_T_DEFINED
typedef unsigned int _dev_t;
#define MSVCRT_DEV_T_DEFINED
#endif
#ifndef MSVCRT_INO_T_DEFINED
typedef unsigned short _ino_t;
#define MSVCRT_INO_T_DEFINED
#endif
#ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_OFF_T_DEFINED
typedef int MSVCRT(_off_t);
#define MSVCRT_OFF_T_DEFINED
#endif
#define _S_IEXEC 0x0040 #define _S_IEXEC 0x0040
#define _S_IWRITE 0x0080 #define _S_IWRITE 0x0080
@ -26,6 +66,9 @@
#undef st_ctime #undef st_ctime
#undef st_mtime #undef st_mtime
#ifndef MSVCRT_STAT_DEFINED
#define MSVCRT_STAT_DEFINED
struct _stat { struct _stat {
_dev_t st_dev; _dev_t st_dev;
_ino_t st_ino; _ino_t st_ino;
@ -53,7 +96,7 @@ struct _stati64 {
MSVCRT(time_t) st_mtime; MSVCRT(time_t) st_mtime;
MSVCRT(time_t) st_ctime; MSVCRT(time_t) st_ctime;
}; };
#endif /* MSVCRT_STAT_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -64,8 +107,11 @@ int MSVCRT(_stat)(const char*,struct _stat*);
int _fstati64(int,struct _stati64*); int _fstati64(int,struct _stati64*);
int _stati64(const char*,struct _stati64*); int _stati64(const char*,struct _stati64*);
int _wstat(const WCHAR*,struct _stat*); #ifndef MSVCRT_WSTAT_DEFINED
int _wstati64(const WCHAR*,struct _stati64*); #define MSVCRT_WSTAT_DEFINED
int _wstat(const MSVCRT(wchar_t)*,struct _stat*);
int _wstati64(const MSVCRT(wchar_t)*,struct _stati64*);
#endif /* MSVCRT_WSTAT_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,9 +21,21 @@
#define __WINE_SYS_TIMEB_H #define __WINE_SYS_TIMEB_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/sys/types.h" /* For time_t */ #ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_TIMEB_DEFINED
#define MSVCRT_TIMEB_DEFINED
struct _timeb struct _timeb
{ {
MSVCRT(time_t) time; MSVCRT(time_t) time;
@ -31,6 +43,7 @@ struct _timeb
short timezone; short timezone;
short dstflag; short dstflag;
}; };
#endif /* MSVCRT_TIMEB_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -21,18 +21,33 @@
#define __WINE_SYS_TYPES_H #define __WINE_SYS_TYPES_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifndef MSVCRT
#ifdef USE_MSVCRT_PREFIX # ifdef USE_MSVCRT_PREFIX
#define MSVCRT(x) MSVCRT_##x # define MSVCRT(x) MSVCRT_##x
#else # else
#define MSVCRT(x) x # define MSVCRT(x) x
# endif
#endif #endif
#ifndef MSVCRT_DEV_T_DEFINED
typedef unsigned int _dev_t; typedef unsigned int _dev_t;
#define MSVCRT_DEV_T_DEFINED
#endif
#ifndef MSVCRT_INO_T_DEFINED
typedef unsigned short _ino_t; typedef unsigned short _ino_t;
typedef int MSVCRT(_off_t); #define MSVCRT_INO_T_DEFINED
typedef long MSVCRT(time_t); #endif
#ifndef MSVCRT_OFF_T_DEFINED
typedef int MSVCRT(_off_t);
#define MSVCRT_OFF_T_DEFINED
#endif
#ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX

View File

@ -21,16 +21,34 @@
#define __WINE_SYS_UTIME_H #define __WINE_SYS_UTIME_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
#include "msvcrt/sys/types.h" /* For time_t */ # ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_UTIMBUF_DEFINED
#define MSVCRT_UTIMBUF_DEFINED
struct _utimbuf struct _utimbuf
{ {
MSVCRT(time_t) actime; MSVCRT(time_t) actime;
MSVCRT(time_t) modtime; MSVCRT(time_t) modtime;
}; };
#endif /* MSVCRT_UTIMBUF_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -39,7 +57,7 @@ extern "C" {
int _futime(int,struct _utimbuf*); int _futime(int,struct _utimbuf*);
int _utime(const char*,struct _utimbuf*); int _utime(const char*,struct _utimbuf*);
int _wutime(const WCHAR*,struct _utimbuf*); int _wutime(const MSVCRT(wchar_t)*,struct _utimbuf*);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,17 +21,46 @@
#define __WINE_TIME_H #define __WINE_TIME_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "winnt.h" #ifndef MSVCRT
#include "msvcrt/sys/types.h" /* For time_t */ # ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef MSVCRT_SIZE_T_DEFINED #ifndef MSVCRT_SIZE_T_DEFINED
typedef unsigned int MSVCRT(size_t); typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
typedef long MSVCRT(clock_t); #ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_CLOCK_T_DEFINED
typedef long MSVCRT(clock_t);
#define MSVCRT_CLOCK_T_DEFINED
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef MSVCRT_TM_DEFINED
#define MSVCRT_TM_DEFINED
struct MSVCRT(tm) { struct MSVCRT(tm) {
int tm_sec; int tm_sec;
int tm_min; int tm_min;
@ -43,7 +72,7 @@ struct MSVCRT(tm) {
int tm_yday; int tm_yday;
int tm_isdst; int tm_isdst;
}; };
#endif /* MSVCRT_TM_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -68,11 +97,14 @@ MSVCRT(time_t) MSVCRT(mktime)(struct MSVCRT(tm)*);
size_t MSVCRT(strftime)(char*,size_t,const char*,const struct MSVCRT(tm)*); size_t MSVCRT(strftime)(char*,size_t,const char*,const struct MSVCRT(tm)*);
MSVCRT(time_t) MSVCRT(time)(MSVCRT(time_t)*); MSVCRT(time_t) MSVCRT(time)(MSVCRT(time_t)*);
WCHAR* _wasctime(const struct MSVCRT(tm)*); #ifndef MSVCRT_WTIME_DEFINED
MSVCRT(size_t) wcsftime(WCHAR*,MSVCRT(size_t),const WCHAR*,const struct MSVCRT(tm)*); #define MSVCRT_WTIME_DEFINED
WCHAR* _wctime(const MSVCRT(time_t)*); MSVCRT(wchar_t)*_wasctime(const struct MSVCRT(tm)*);
WCHAR* _wstrdate(WCHAR*); MSVCRT(size_t) wcsftime(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,const struct MSVCRT(tm)*);
WCHAR* _wstrtime(WCHAR*); MSVCRT(wchar_t)*_wctime(const MSVCRT(time_t)*);
MSVCRT(wchar_t)*_wstrdate(MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wstrtime(MSVCRT(wchar_t)*);
#endif /* MSVCRT_WTIME_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -9,20 +9,37 @@
#define __WINE_WCHAR_H #define __WINE_WCHAR_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#include "msvcrt/io.h" #include <stdarg.h>
#include "msvcrt/locale.h"
#include "msvcrt/process.h"
#include "msvcrt/stdio.h"
#include "msvcrt/stdlib.h"
#include "msvcrt/string.h"
#include "msvcrt/sys/stat.h"
#include "msvcrt/sys/types.h"
#include "msvcrt/time.h"
#include "msvcrt/wctype.h"
#ifndef MSVCRT
# ifdef USE_MSVCRT_PREFIX
# define MSVCRT(x) MSVCRT_##x
# else
# define MSVCRT(x) x
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT_WCHAR_T_DEFINED
#ifndef __cplusplus
typedef unsigned short MSVCRT(wchar_t);
#endif
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define WCHAR_MIN 0 #define WCHAR_MIN 0
#define WCHAR_MAX ((WCHAR)-1) #define WCHAR_MAX ((MSVCRT(wchar_t))-1)
typedef int MSVCRT(mbstate_t); typedef int MSVCRT(mbstate_t);
@ -31,18 +48,343 @@ typedef unsigned int MSVCRT(size_t);
#define MSVCRT_SIZE_T_DEFINED #define MSVCRT_SIZE_T_DEFINED
#endif #endif
#ifndef MSVCRT_WCTYPE_T_DEFINED
#ifdef __cplusplus typedef MSVCRT(wchar_t) MSVCRT(wint_t);
extern "C" { typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
#define MSVCRT_WCTYPE_T_DEFINED
#endif #endif
WCHAR btowc(int); #ifndef _MSC_VER
MSVCRT(size_t) mbrlen(const char *,MSVCRT(size_t),MSVCRT(mbstate_t)*); # ifndef __int64
MSVCRT(size_t) mbrtowc(WCHAR*,const char*,MSVCRT(size_t),MSVCRT(mbstate_t)*); # define __int64 long long
MSVCRT(size_t) mbsrtowcs(WCHAR*,const char**,MSVCRT(size_t),MSVCRT(mbstate_t)*); # endif
MSVCRT(size_t) wcrtomb(char*,WCHAR,MSVCRT(mbstate_t)*); #endif
MSVCRT(size_t) wcsrtombs(char*,const WCHAR**,MSVCRT(size_t),MSVCRT(mbstate_t)*);
int wctob(MSVCRT(wint_t)); #ifndef USE_MSVCRT_PREFIX
# ifndef WEOF
# define WEOF (wint_t)(0xFFFF)
# endif
#else
# ifndef MSVCRT_WEOF
# define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
# endif
#endif /* USE_MSVCRT_PREFIX */
#ifndef MSVCRT_FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define MSVCRT_FSIZE_T_DEFINED
#endif
#ifndef MSVCRT_DEV_T_DEFINED
typedef unsigned int _dev_t;
#define MSVCRT_DEV_T_DEFINED
#endif
#ifndef MSVCRT_INO_T_DEFINED
typedef unsigned short _ino_t;
#define MSVCRT_INO_T_DEFINED
#endif
#ifndef MSVCRT_OFF_T_DEFINED
typedef int MSVCRT(_off_t);
#define MSVCRT_OFF_T_DEFINED
#endif
#ifndef MSVCRT_TIME_T_DEFINED
typedef long MSVCRT(time_t);
#define MSVCRT_TIME_T_DEFINED
#endif
#ifndef MSVCRT_TM_DEFINED
#define MSVCRT_TM_DEFINED
struct MSVCRT(tm) {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
#endif /* MSVCRT_TM_DEFINED */
#ifndef MSVCRT_FILE_DEFINED
#define MSVCRT_FILE_DEFINED
typedef struct MSVCRT(_iobuf)
{
char* _ptr;
int _cnt;
char* _base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char* _tmpfname;
} MSVCRT(FILE);
#endif /* MSVCRT_FILE_DEFINED */
#ifndef MSVCRT_WFINDDATA_T_DEFINED
#define MSVCRT_WFINDDATA_T_DEFINED
struct _wfinddata_t {
unsigned attrib;
MSVCRT(time_t) time_create;
MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write;
_fsize_t size;
MSVCRT(wchar_t) name[260];
};
struct _wfinddatai64_t {
unsigned attrib;
MSVCRT(time_t) time_create;
MSVCRT(time_t) time_access;
MSVCRT(time_t) time_write;
__int64 size;
MSVCRT(wchar_t) name[260];
};
#endif /* MSVCRT_WFINDDATA_T_DEFINED */
#ifndef MSVCRT_STAT_DEFINED
#define MSVCRT_STAT_DEFINED
struct _stat {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
MSVCRT(_off_t) st_size;
MSVCRT(time_t) st_atime;
MSVCRT(time_t) st_mtime;
MSVCRT(time_t) st_ctime;
};
struct _stati64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
MSVCRT(time_t) st_atime;
MSVCRT(time_t) st_mtime;
MSVCRT(time_t) st_ctime;
};
#endif /* MSVCRT_STAT_DEFINED */
/* ASCII char classification table - binary compatible */
#define _UPPER 0x0001 /* C1_UPPER */
#define _LOWER 0x0002 /* C1_LOWER */
#define _DIGIT 0x0004 /* C1_DIGIT */
#define _SPACE 0x0008 /* C1_SPACE */
#define _PUNCT 0x0010 /* C1_PUNCT */
#define _CONTROL 0x0020 /* C1_CNTRL */
#define _BLANK 0x0040 /* C1_BLANK */
#define _HEX 0x0080 /* C1_XDIGIT */
#define _LEADBYTE 0x8000
#define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
#ifndef MSVCRT_WCTYPE_DEFINED
#define MSVCRT_WCTYPE_DEFINED
int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
int MSVCRT(isleadbyte)(int);
int MSVCRT(iswalnum)(MSVCRT(wint_t));
int MSVCRT(iswalpha)(MSVCRT(wint_t));
int MSVCRT(iswascii)(MSVCRT(wint_t));
int MSVCRT(iswcntrl)(MSVCRT(wint_t));
int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
int MSVCRT(iswdigit)(MSVCRT(wint_t));
int MSVCRT(iswgraph)(MSVCRT(wint_t));
int MSVCRT(iswlower)(MSVCRT(wint_t));
int MSVCRT(iswprint)(MSVCRT(wint_t));
int MSVCRT(iswpunct)(MSVCRT(wint_t));
int MSVCRT(iswspace)(MSVCRT(wint_t));
int MSVCRT(iswupper)(MSVCRT(wint_t));
int MSVCRT(iswxdigit)(MSVCRT(wint_t));
MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t));
MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t));
#endif /* MSVCRT_WCTYPE_DEFINED */
#ifndef MSVCRT_WDIRECT_DEFINED
#define MSVCRT_WDIRECT_DEFINED
int _wchdir(const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)* _wgetcwd(MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)* _wgetdcwd(int,MSVCRT(wchar_t)*,int);
int _wmkdir(const MSVCRT(wchar_t)*);
int _wrmdir(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WDIRECT_DEFINED */
#ifndef MSVCRT_WIO_DEFINED
#define MSVCRT_WIO_DEFINED
int _waccess(const MSVCRT(wchar_t)*,int);
int _wchmod(const MSVCRT(wchar_t)*,int);
int _wcreat(const MSVCRT(wchar_t)*,int);
long _wfindfirst(const MSVCRT(wchar_t)*,struct _wfinddata_t*);
long _wfindfirsti64(const MSVCRT(wchar_t)*, struct _wfinddatai64_t*);
int _wfindnext(long,struct _wfinddata_t*);
int _wfindnexti64(long, struct _wfinddatai64_t*);
MSVCRT(wchar_t)*_wmktemp(MSVCRT(wchar_t)*);
int _wopen(const MSVCRT(wchar_t)*,int,...);
int _wrename(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int _wsopen(const MSVCRT(wchar_t)*,int,int,...);
int _wunlink(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WIO_DEFINED */
#ifndef MSVCRT_WLOCALE_DEFINED
#define MSVCRT_WLOCALE_DEFINED
MSVCRT(wchar_t)* _wsetlocale(int,const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WLOCALE_DEFINED */
#ifndef MSVCRT_WPROCESS_DEFINED
#define MSVCRT_WPROCESS_DEFINED
int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
int _wsystem(const MSVCRT(wchar_t)*);
#endif /* MSVCRT_WPROCESS_DEFINED */
#ifndef MSVCRT_WSTAT_DEFINED
#define MSVCRT_WSTAT_DEFINED
int _wstat(const MSVCRT(wchar_t)*,struct _stat*);
int _wstati64(const MSVCRT(wchar_t)*,struct _stati64*);
#endif /* MSVCRT_WSTAT_DEFINED */
#ifndef MSVCRT_WSTDIO_DEFINED
#define MSVCRT_WSTDIO_DEFINED
MSVCRT(wint_t) _fgetwchar(void);
MSVCRT(wint_t) _fputwchar(MSVCRT(wint_t));
MSVCRT(wchar_t)*_getws(MSVCRT(wchar_t)*);
int _putws(const MSVCRT(wchar_t)*);
int _snwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,...);
int _vsnwprintf(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,va_list);
MSVCRT(FILE)* _wfdopen(int,const MSVCRT(wchar_t)*);
MSVCRT(FILE)* _wfopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(FILE)* _wfreopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
MSVCRT(FILE)* _wfsopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,int);
void _wperror(const MSVCRT(wchar_t)*);
MSVCRT(FILE)* _wpopen(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int _wremove(const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wtempnam(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wtmpnam(MSVCRT(wchar_t)*);
MSVCRT(wint_t) MSVCRT(fgetwc)(MSVCRT(FILE)*);
MSVCRT(wchar_t)*MSVCRT(fgetws)(MSVCRT(wchar_t)*,int,MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(fputwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
int MSVCRT(fwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...);
int MSVCRT(fputws)(const MSVCRT(wchar_t)*,MSVCRT(FILE)*);
int MSVCRT(fwscanf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,...);
MSVCRT(wint_t) MSVCRT(getwc)(MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(getwchar)(void);
MSVCRT(wchar_t)*MSVCRT(getws)(MSVCRT(wchar_t)*);
MSVCRT(wint_t) MSVCRT(putwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
MSVCRT(wint_t) MSVCRT(putwchar)(MSVCRT(wint_t));
int MSVCRT(putws)(const MSVCRT(wchar_t)*);
int MSVCRT(swprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
int MSVCRT(swscanf)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
MSVCRT(wint_t) MSVCRT(ungetwc)(MSVCRT(wint_t),MSVCRT(FILE)*);
int MSVCRT(vfwprintf)(MSVCRT(FILE)*,const MSVCRT(wchar_t)*,va_list);
int MSVCRT(vswprintf)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,va_list);
int MSVCRT(vwprintf)(const MSVCRT(wchar_t)*,va_list);
int MSVCRT(wprintf)(const MSVCRT(wchar_t)*,...);
int MSVCRT(wscanf)(const MSVCRT(wchar_t)*,...);
#endif /* MSVCRT_WSTDIO_DEFINED */
#ifndef MSVCRT_WSTDLIB_DEFINED
#define MSVCRT_WSTDLIB_DEFINED
MSVCRT(wchar_t)*_itow(int,MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)*_i64tow(__int64,MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)*_ltow(long,MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)*_ui64tow(unsigned __int64,MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)*_ultow(unsigned long,MSVCRT(wchar_t)*,int);
MSVCRT(wchar_t)*_wfullpath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,size_t);
MSVCRT(wchar_t)*_wgetenv(const MSVCRT(wchar_t)*);
void _wmakepath(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
void _wperror(const MSVCRT(wchar_t)*);
int _wputenv(const MSVCRT(wchar_t)*);
void _wsearchenv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
void _wsplitpath(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*,MSVCRT(wchar_t)*);
int _wsystem(const MSVCRT(wchar_t)*);
int _wtoi(const MSVCRT(wchar_t)*);
__int64 _wtoi64(const MSVCRT(wchar_t)*);
long _wtol(const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(mbstowcs)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
int MSVCRT(mbtowc)(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t));
double MSVCRT(wcstod)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**);
long MSVCRT(wcstol)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
MSVCRT(size_t) MSVCRT(wcstombs)(char*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
unsigned long MSVCRT(wcstoul)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t)**,int);
int MSVCRT(wctomb)(char*,MSVCRT(wchar_t));
#endif /* MSVCRT_WSTDLIB_DEFINED */
#ifndef MSVCRT_WSTRING_DEFINED
#define MSVCRT_WSTRING_DEFINED
MSVCRT(wchar_t)*_wcsdup(const MSVCRT(wchar_t)*);
int _wcsicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int _wcsicoll(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wcslwr(MSVCRT(wchar_t)*);
int _wcsnicmp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
MSVCRT(wchar_t)*_wcsnset(MSVCRT(wchar_t)*,MSVCRT(wchar_t),MSVCRT(size_t));
MSVCRT(wchar_t)*_wcsrev(MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wcsset(MSVCRT(wchar_t)*,MSVCRT(wchar_t));
MSVCRT(wchar_t)*_wcsupr(MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcscat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcschr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t));
int MSVCRT(wcscmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
int MSVCRT(wcscoll)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcscpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcscspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcslen)(const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcsncat)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
int MSVCRT(wcsncmp)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
MSVCRT(wchar_t)*MSVCRT(wcsncpy)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
MSVCRT(wchar_t)*MSVCRT(wcspbrk)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcsrchr)(const MSVCRT(wchar_t)*,MSVCRT(wchar_t) wcFor);
MSVCRT(size_t) MSVCRT(wcsspn)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcsstr)(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*MSVCRT(wcstok)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*);
MSVCRT(size_t) MSVCRT(wcsxfrm)(MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,MSVCRT(size_t));
#endif /* MSVCRT_WSTRING_DEFINED */
#ifndef MSVCRT_WTIME_DEFINED
#define MSVCRT_WTIME_DEFINED
MSVCRT(wchar_t)*_wasctime(const struct MSVCRT(tm)*);
MSVCRT(size_t) wcsftime(MSVCRT(wchar_t)*,MSVCRT(size_t),const MSVCRT(wchar_t)*,const struct MSVCRT(tm)*);
MSVCRT(wchar_t)*_wctime(const MSVCRT(time_t)*);
MSVCRT(wchar_t)*_wstrdate(MSVCRT(wchar_t)*);
MSVCRT(wchar_t)*_wstrtime(MSVCRT(wchar_t)*);
#endif /* MSVCRT_WTIME_DEFINED */
MSVCRT(wchar_t) btowc(int);
MSVCRT(size_t) mbrlen(const char *,MSVCRT(size_t),MSVCRT(mbstate_t)*);
MSVCRT(size_t) mbrtowc(MSVCRT(wchar_t)*,const char*,MSVCRT(size_t),MSVCRT(mbstate_t)*);
MSVCRT(size_t) mbsrtowcs(MSVCRT(wchar_t)*,const char**,MSVCRT(size_t),MSVCRT(mbstate_t)*);
MSVCRT(size_t) wcrtomb(char*,MSVCRT(wchar_t),MSVCRT(mbstate_t)*);
MSVCRT(size_t) wcsrtombs(char*,const MSVCRT(wchar_t)**,MSVCRT(size_t),MSVCRT(mbstate_t)*);
int wctob(MSVCRT(wint_t));
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -21,51 +21,48 @@
#define __WINE_WCTYPE_H #define __WINE_WCTYPE_H
#define __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT
#ifndef MSVCRT
/* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get # ifdef USE_MSVCRT_PREFIX
* there but WCHAR is not defined. # define MSVCRT(x) MSVCRT_##x
*/ # else
/* Some systems might have wchar_t, but we really need 16 bit characters */ # define MSVCRT(x) x
#ifndef WINE_WCHAR_DEFINED # endif
#ifdef WINE_UNICODE_NATIVE
typedef wchar_t WCHAR, *PWCHAR;
#else
typedef unsigned short WCHAR, *PWCHAR;
#endif
#define WINE_WCHAR_DEFINED
#endif #endif
#ifdef USE_MSVCRT_PREFIX #ifndef MSVCRT_WCHAR_T_DEFINED
#define MSVCRT(x) MSVCRT_##x #define MSVCRT_WCHAR_T_DEFINED
#else #ifndef __cplusplus
#define MSVCRT(x) x typedef unsigned short MSVCRT(wchar_t);
#endif
#endif #endif
/* ASCII char classification table - binary compatible */ /* ASCII char classification table - binary compatible */
#define _UPPER C1_UPPER #define _UPPER 0x0001 /* C1_UPPER */
#define _LOWER C1_LOWER #define _LOWER 0x0002 /* C1_LOWER */
#define _DIGIT C1_DIGIT #define _DIGIT 0x0004 /* C1_DIGIT */
#define _SPACE C1_SPACE #define _SPACE 0x0008 /* C1_SPACE */
#define _PUNCT C1_PUNCT #define _PUNCT 0x0010 /* C1_PUNCT */
#define _CONTROL C1_CNTRL #define _CONTROL 0x0020 /* C1_CNTRL */
#define _BLANK C1_BLANK #define _BLANK 0x0040 /* C1_BLANK */
#define _HEX C1_XDIGIT #define _HEX 0x0080 /* C1_XDIGIT */
#define _LEADBYTE 0x8000 #define _LEADBYTE 0x8000
#define _ALPHA (C1_ALPHA|_UPPER|_LOWER) #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
#ifndef USE_MSVCRT_PREFIX #ifndef USE_MSVCRT_PREFIX
# ifndef WEOF # ifndef WEOF
# define WEOF (WCHAR)(0xFFFF) # define WEOF (wint_t)(0xFFFF)
# endif # endif
#else #else
# ifndef MSVCRT_WEOF # ifndef MSVCRT_WEOF
# define MSVCRT_WEOF (WCHAR)(0xFFFF) # define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
# endif # endif
#endif /* USE_MSVCRT_PREFIX */ #endif /* USE_MSVCRT_PREFIX */
typedef WCHAR MSVCRT(wctype_t); #ifndef MSVCRT_WCTYPE_T_DEFINED
typedef WCHAR MSVCRT(wint_t); typedef MSVCRT(wchar_t) MSVCRT(wint_t);
typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
#define MSVCRT_WCTYPE_T_DEFINED
#endif
/* FIXME: there's something to do with __p__pctype and __p__pwctype */ /* FIXME: there's something to do with __p__pctype and __p__pwctype */
@ -74,6 +71,8 @@ typedef WCHAR MSVCRT(wint_t);
extern "C" { extern "C" {
#endif #endif
#ifndef MSVCRT_WCTYPE_DEFINED
#define MSVCRT_WCTYPE_DEFINED
int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t)); int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
int MSVCRT(isleadbyte)(int); int MSVCRT(isleadbyte)(int);
int MSVCRT(iswalnum)(MSVCRT(wint_t)); int MSVCRT(iswalnum)(MSVCRT(wint_t));
@ -89,8 +88,9 @@ int MSVCRT(iswpunct)(MSVCRT(wint_t));
int MSVCRT(iswspace)(MSVCRT(wint_t)); int MSVCRT(iswspace)(MSVCRT(wint_t));
int MSVCRT(iswupper)(MSVCRT(wint_t)); int MSVCRT(iswupper)(MSVCRT(wint_t));
int MSVCRT(iswxdigit)(MSVCRT(wint_t)); int MSVCRT(iswxdigit)(MSVCRT(wint_t));
WCHAR MSVCRT(towlower)(WCHAR); MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t));
WCHAR MSVCRT(towupper)(WCHAR); MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t));
#endif /* MSVCRT_WCTYPE_DEFINED */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -293,14 +293,11 @@ typedef short SHORT, *PSHORT;
typedef long LONG, *PLONG; typedef long LONG, *PLONG;
/* Some systems might have wchar_t, but we really need 16 bit characters */ /* Some systems might have wchar_t, but we really need 16 bit characters */
#ifndef WINE_WCHAR_DEFINED
#ifdef WINE_UNICODE_NATIVE #ifdef WINE_UNICODE_NATIVE
typedef wchar_t WCHAR, *PWCHAR; typedef wchar_t WCHAR, *PWCHAR;
#else #else
typedef unsigned short WCHAR, *PWCHAR; typedef unsigned short WCHAR, *PWCHAR;
#endif #endif
#define WINE_WCHAR_DEFINED
#endif
/* 'Extended/Wide' numerical types */ /* 'Extended/Wide' numerical types */
#ifndef _ULONGLONG_ #ifndef _ULONGLONG_