From 6b35cd2903bc9842ce54cee02caee2106625091d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 19 Feb 2020 12:02:18 +0100 Subject: [PATCH] include: Add corecrt_wio.h header. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/Makefile.in | 1 + include/msvcrt/corecrt_wio.h | 56 ++++++++++++++++++++++++++++++++++++ include/msvcrt/io.h | 43 +-------------------------- include/msvcrt/wchar.h | 45 +---------------------------- 4 files changed, 59 insertions(+), 86 deletions(-) create mode 100644 include/msvcrt/corecrt_wio.h diff --git a/include/Makefile.in b/include/Makefile.in index 21b4233ecd9..506e5fc96a4 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -425,6 +425,7 @@ SOURCES = \ msvcrt/conio.h \ msvcrt/corecrt.h \ msvcrt/corecrt_stdio_config.h \ + msvcrt/corecrt_wio.h \ msvcrt/corecrt_wstdio.h \ msvcrt/crtdbg.h \ msvcrt/crtdefs.h \ diff --git a/include/msvcrt/corecrt_wio.h b/include/msvcrt/corecrt_wio.h new file mode 100644 index 00000000000..6d4b73c915f --- /dev/null +++ b/include/msvcrt/corecrt_wio.h @@ -0,0 +1,56 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the Wine project. + */ + +#ifndef _WIO_DEFINED +#define _WIO_DEFINED + +#include + +#include + +typedef __msvcrt_ulong _fsize_t; + +struct _wfinddata_t { + unsigned attrib; + time_t time_create; + time_t time_access; + time_t time_write; + _fsize_t size; + wchar_t name[260]; +}; + +struct _wfinddatai64_t { + unsigned attrib; + time_t time_create; + time_t time_access; + time_t time_write; + __int64 DECLSPEC_ALIGN(8) size; + wchar_t name[260]; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +int __cdecl _waccess(const wchar_t*,int); +int __cdecl _wchmod(const wchar_t*,int); +int __cdecl _wcreat(const wchar_t*,int); +intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*); +intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); +int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*); +int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*); +wchar_t* __cdecl _wmktemp(wchar_t*); +int WINAPIV _wopen(const wchar_t*,int,...); +int __cdecl _wrename(const wchar_t*,const wchar_t*); +int WINAPIV _wsopen(const wchar_t*,int,int,...); +int __cdecl _wunlink(const wchar_t*); + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* _WIO_DEFINED */ diff --git a/include/msvcrt/io.h b/include/msvcrt/io.h index 5f1891586ac..b5e84490ae9 100644 --- a/include/msvcrt/io.h +++ b/include/msvcrt/io.h @@ -9,6 +9,7 @@ #define __WINE_IO_H #include +#include #include @@ -21,11 +22,6 @@ #define _A_SUBDIR 0x00000010 #define _A_ARCH 0x00000020 -#ifndef _FSIZE_T_DEFINED -typedef __msvcrt_ulong _fsize_t; -#define _FSIZE_T_DEFINED -#endif - #ifndef _FINDDATA_T_DEFINED #define _FINDDATA_T_DEFINED struct _finddata_t @@ -59,27 +55,6 @@ struct _finddata64_t }; #endif /* _FINDDATA_T_DEFINED */ -#ifndef _WFINDDATA_T_DEFINED -#define _WFINDDATA_T_DEFINED -struct _wfinddata_t { - unsigned attrib; - time_t time_create; - time_t time_access; - time_t time_write; - _fsize_t size; - wchar_t name[260]; -}; - -struct _wfinddatai64_t { - unsigned attrib; - time_t time_create; - time_t time_access; - time_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - wchar_t name[260]; -}; -#endif /* _WFINDDATA_T_DEFINED */ - #ifdef __cplusplus extern "C" { #endif @@ -125,22 +100,6 @@ int __cdecl _write(int,const void*,unsigned int); int __cdecl remove(const char*); int __cdecl rename(const char*,const char*); -#ifndef _WIO_DEFINED -#define _WIO_DEFINED -int __cdecl _waccess(const wchar_t*,int); -int __cdecl _wchmod(const wchar_t*,int); -int __cdecl _wcreat(const wchar_t*,int); -intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*); -intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); -int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*); -int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*); -wchar_t * __cdecl _wmktemp(wchar_t*); -int WINAPIV _wopen(const wchar_t*,int,...); -int __cdecl _wrename(const wchar_t*,const wchar_t*); -int WINAPIV _wsopen(const wchar_t*,int,int,...); -int __cdecl _wunlink(const wchar_t*); -#endif /* _WIO_DEFINED */ - #ifdef __cplusplus } #endif diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index e6a5e57fd2c..d5ae3561d03 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -9,6 +9,7 @@ #define __WINE_WCHAR_H #include +#include #include #include @@ -34,11 +35,6 @@ extern "C" { typedef int mbstate_t; -#ifndef _FSIZE_T_DEFINED -typedef __msvcrt_ulong _fsize_t; -#define _FSIZE_T_DEFINED -#endif - #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; #define _DEV_T_DEFINED @@ -69,29 +65,6 @@ struct tm { }; #endif /* _TM_DEFINED */ -#ifndef _WFINDDATA_T_DEFINED -#define _WFINDDATA_T_DEFINED - -struct _wfinddata_t { - unsigned attrib; - time_t time_create; - time_t time_access; - time_t time_write; - _fsize_t size; - wchar_t name[260]; -}; - -struct _wfinddatai64_t { - unsigned attrib; - time_t time_create; - time_t time_access; - time_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - wchar_t name[260]; -}; - -#endif /* _WFINDDATA_T_DEFINED */ - #ifndef _STAT_DEFINED #define _STAT_DEFINED @@ -236,22 +209,6 @@ int __cdecl _wmkdir(const wchar_t*); int __cdecl _wrmdir(const wchar_t*); #endif /* _WDIRECT_DEFINED */ -#ifndef _WIO_DEFINED -#define _WIO_DEFINED -int __cdecl _waccess(const wchar_t*,int); -int __cdecl _wchmod(const wchar_t*,int); -int __cdecl _wcreat(const wchar_t*,int); -intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*); -intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); -int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*); -int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*); -wchar_t* __cdecl _wmktemp(wchar_t*); -int WINAPIV _wopen(const wchar_t*,int,...); -int __cdecl _wrename(const wchar_t*,const wchar_t*); -int WINAPIV _wsopen(const wchar_t*,int,int,...); -int __cdecl _wunlink(const wchar_t*); -#endif /* _WIO_DEFINED */ - #ifndef _WLOCALE_DEFINED #define _WLOCALE_DEFINED wchar_t* __cdecl _wsetlocale(int,const wchar_t*);