Skip to content
Snippets Groups Projects
Commit 031aaacd authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard
Browse files

include: Cleanup corecrt_io.h file and use it in io.h.

parent b6921584
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,15 @@ struct _finddata64_t {
char name[260];
};
/* The following are also defined in dos.h */
#define _A_NORMAL 0x00000000
#define _A_RDONLY 0x00000001
#define _A_HIDDEN 0x00000002
#define _A_SYSTEM 0x00000004
#define _A_VOLID 0x00000008
#define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020
#ifdef _UCRT
# ifdef _USE_32BIT_TIME_T
# define _findfirst _findfirst32
......@@ -86,7 +95,17 @@ extern "C" {
_ACRTIMP int __cdecl _access(const char*,int);
_ACRTIMP int __cdecl _chmod(const char*,int);
_ACRTIMP int __cdecl _chsize(int,__msvcrt_long);
_ACRTIMP int __cdecl _chsize_s(int,__int64);
_ACRTIMP int __cdecl _close(int);
_ACRTIMP int __cdecl _creat(const char*,int);
_ACRTIMP int __cdecl _dup(int);
_ACRTIMP int __cdecl _dup2(int,int);
_ACRTIMP int __cdecl _eof(int);
_ACRTIMP __int64 __cdecl _filelengthi64(int);
_ACRTIMP __msvcrt_long __cdecl _filelength(int);
_ACRTIMP int __cdecl _findclose(intptr_t);
#ifdef _UCRT
_ACRTIMP intptr_t __cdecl _findfirst32(const char*,struct _finddata32_t*);
_ACRTIMP intptr_t __cdecl _findfirst32i64(const char*, struct _finddata32i64_t*);
_ACRTIMP intptr_t __cdecl _findfirst64(const char*,struct _finddata64_t*);
......@@ -95,10 +114,36 @@ _ACRTIMP int __cdecl _findnext32(intptr_t,struct _finddata32_t*);
_ACRTIMP int __cdecl _findnext32i64(intptr_t,struct _finddata32i64_t*);
_ACRTIMP int __cdecl _findnext64(intptr_t,struct _finddata64_t*);
_ACRTIMP int __cdecl _findnext64i32(intptr_t,struct _finddata64i32_t*);
#else
_ACRTIMP intptr_t __cdecl _findfirst(const char*,struct _finddata_t*);
_ACRTIMP intptr_t __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
_ACRTIMP intptr_t __cdecl _findfirst64(const char*, struct _finddata64_t*);
_ACRTIMP int __cdecl _findnext(intptr_t,struct _finddata_t*);
_ACRTIMP int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
_ACRTIMP int __cdecl _findnext64(intptr_t, struct _finddata64_t*);
#endif
_ACRTIMP intptr_t __cdecl _get_osfhandle(int);
_ACRTIMP int __cdecl _isatty(int);
_ACRTIMP int __cdecl _locking(int,int,__msvcrt_long);
_ACRTIMP __msvcrt_long __cdecl _lseek(int,__msvcrt_long,int);
_ACRTIMP __int64 __cdecl _lseeki64(int,__int64,int);
_ACRTIMP char* __cdecl _mktemp(char*);
_ACRTIMP int __cdecl _mktemp_s(char*,size_t);
_ACRTIMP int __cdecl _open(const char*,int,...);
_ACRTIMP int __cdecl _open_osfhandle(intptr_t,int);
_ACRTIMP int __cdecl _pipe(int*,unsigned int,int);
_ACRTIMP int __cdecl _read(int,void*,unsigned int);
_ACRTIMP int __cdecl _setmode(int,int);
_ACRTIMP int __cdecl _sopen(const char*,int,int,...);
_ACRTIMP errno_t __cdecl _sopen_dispatch(const char*,int,int,int,int*,int);
_ACRTIMP errno_t __cdecl _sopen_s(int*,const char*,int,int,int);
_ACRTIMP __msvcrt_long __cdecl _tell(int);
_ACRTIMP __int64 __cdecl _telli64(int);
_ACRTIMP int __cdecl _umask(int);
_ACRTIMP int __cdecl _unlink(const char*);
_ACRTIMP int __cdecl _write(int,const void*,unsigned int);
_ACRTIMP int __cdecl remove(const char*);
_ACRTIMP int __cdecl rename(const char*,const char*);
#ifdef __cplusplus
}
......
......@@ -9,103 +9,7 @@
#define __WINE_IO_H
#include <corecrt.h>
#include <corecrt_wio.h>
#include <pshpack8.h>
/* The following are also defined in dos.h */
#define _A_NORMAL 0x00000000
#define _A_RDONLY 0x00000001
#define _A_HIDDEN 0x00000002
#define _A_SYSTEM 0x00000004
#define _A_VOLID 0x00000008
#define _A_SUBDIR 0x00000010
#define _A_ARCH 0x00000020
#ifndef _FINDDATA_T_DEFINED
#define _FINDDATA_T_DEFINED
struct _finddata_t
{
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
_fsize_t size;
char name[260];
};
struct _finddatai64_t
{
unsigned attrib;
time_t time_create;
time_t time_access;
time_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
char name[260];
};
struct _finddata64_t
{
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 DECLSPEC_ALIGN(8) size;
char name[260];
};
#endif /* _FINDDATA_T_DEFINED */
#ifdef __cplusplus
extern "C" {
#endif
_ACRTIMP int __cdecl _access(const char*,int);
_ACRTIMP int __cdecl _chmod(const char*,int);
_ACRTIMP int __cdecl _chsize(int,__msvcrt_long);
_ACRTIMP int __cdecl _chsize_s(int,__int64);
_ACRTIMP int __cdecl _close(int);
_ACRTIMP int __cdecl _commit(int);
_ACRTIMP int __cdecl _creat(const char*,int);
_ACRTIMP int __cdecl _dup(int);
_ACRTIMP int __cdecl _dup2(int,int);
_ACRTIMP int __cdecl _eof(int);
_ACRTIMP __int64 __cdecl _filelengthi64(int);
_ACRTIMP __msvcrt_long __cdecl _filelength(int);
_ACRTIMP int __cdecl _findclose(intptr_t);
_ACRTIMP intptr_t __cdecl _findfirst(const char*,struct _finddata_t*);
_ACRTIMP intptr_t __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
_ACRTIMP intptr_t __cdecl _findfirst64(const char*, struct _finddata64_t*);
_ACRTIMP int __cdecl _findnext(intptr_t,struct _finddata_t*);
_ACRTIMP int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
_ACRTIMP int __cdecl _findnext64(intptr_t, struct _finddata64_t*);
_ACRTIMP intptr_t __cdecl _get_osfhandle(int);
_ACRTIMP int __cdecl _isatty(int);
_ACRTIMP int __cdecl _locking(int,int,__msvcrt_long);
_ACRTIMP __msvcrt_long __cdecl _lseek(int,__msvcrt_long,int);
_ACRTIMP __int64 __cdecl _lseeki64(int,__int64,int);
_ACRTIMP char* __cdecl _mktemp(char*);
_ACRTIMP int __cdecl _mktemp_s(char*,size_t);
_ACRTIMP int __cdecl _open(const char*,int,...);
_ACRTIMP int __cdecl _open_osfhandle(intptr_t,int);
_ACRTIMP int __cdecl _pipe(int*,unsigned int,int);
_ACRTIMP int __cdecl _read(int,void*,unsigned int);
_ACRTIMP int __cdecl _setmode(int,int);
_ACRTIMP int __cdecl _sopen(const char*,int,int,...);
_ACRTIMP errno_t __cdecl _sopen_dispatch(const char*,int,int,int,int*,int);
_ACRTIMP errno_t __cdecl _sopen_s(int*,const char*,int,int,int);
_ACRTIMP __msvcrt_long __cdecl _tell(int);
_ACRTIMP __int64 __cdecl _telli64(int);
_ACRTIMP int __cdecl _umask(int);
_ACRTIMP int __cdecl _unlink(const char*);
_ACRTIMP int __cdecl _write(int,const void*,unsigned int);
_ACRTIMP int __cdecl remove(const char*);
_ACRTIMP int __cdecl rename(const char*,const char*);
#ifdef __cplusplus
}
#endif
#include <corecrt_io.h>
static inline int access(const char* path, int mode) { return _access(path, mode); }
static inline int chmod(const char* path, int mode) { return _chmod(path, mode); }
......@@ -141,6 +45,4 @@ _ACRTIMP int __cdecl sopen(const char*,int,int,...) __attribute__((alias("_sopen
#define sopen _sopen
#endif /* __GNUC__ */
#include <poppack.h>
#endif /* __WINE_IO_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment