From 33fa6c2e25437590d849e11eee7967d4b9f35fb7 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 11 Dec 2008 22:37:34 +0100 Subject: [PATCH] include: Add the msvcrt/crtdefs.h header and include it where needed. --- include/Makefile.in | 1 + include/msvcrt/conio.h | 5 +- include/msvcrt/crtdbg.h | 5 +- include/msvcrt/{stddef.h => crtdefs.h} | 83 ++++++++++++++++++++++------------ include/msvcrt/ctype.h | 18 +------- include/msvcrt/direct.h | 33 +------------- include/msvcrt/dos.h | 5 +- include/msvcrt/eh.h | 5 +- include/msvcrt/errno.h | 5 +- include/msvcrt/fcntl.h | 5 +- include/msvcrt/float.h | 5 +- include/msvcrt/io.h | 29 +----------- include/msvcrt/limits.h | 2 + include/msvcrt/locale.h | 10 +--- include/msvcrt/malloc.h | 26 +---------- include/msvcrt/math.h | 5 +- include/msvcrt/mbctype.h | 5 +- include/msvcrt/mbstring.h | 26 +---------- include/msvcrt/memory.h | 24 +--------- include/msvcrt/process.h | 30 +----------- include/msvcrt/search.h | 25 +--------- include/msvcrt/setjmp.h | 5 +- include/msvcrt/signal.h | 5 +- include/msvcrt/stddef.h | 58 +----------------------- include/msvcrt/stdio.h | 39 +--------------- include/msvcrt/stdlib.h | 34 +------------- include/msvcrt/string.h | 31 +------------ include/msvcrt/sys/stat.h | 18 +------- include/msvcrt/sys/timeb.h | 10 +--- include/msvcrt/sys/types.h | 25 +--------- include/msvcrt/sys/utime.h | 17 +------ include/msvcrt/time.h | 38 +--------------- include/msvcrt/wchar.h | 52 ++------------------- include/msvcrt/wctype.h | 18 +------- 34 files changed, 113 insertions(+), 589 deletions(-) copy include/msvcrt/{stddef.h => crtdefs.h} (55%) diff --git a/include/Makefile.in b/include/Makefile.in index 5b24e0d8cec..abb89ab428a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -290,6 +290,7 @@ SRCDIR_INCLUDES = \ mstcpip.h \ msvcrt/conio.h \ msvcrt/crtdbg.h \ + msvcrt/crtdefs.h \ msvcrt/ctype.h \ msvcrt/direct.h \ msvcrt/dirent.h \ diff --git a/include/msvcrt/conio.h b/include/msvcrt/conio.h index 0c958dff1b0..4384a37aef3 100644 --- a/include/msvcrt/conio.h +++ b/include/msvcrt/conio.h @@ -7,9 +7,8 @@ */ #ifndef __WINE_CONIO_H #define __WINE_CONIO_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #ifdef __cplusplus extern "C" { diff --git a/include/msvcrt/crtdbg.h b/include/msvcrt/crtdbg.h index a4393a9aab4..bd984498e61 100644 --- a/include/msvcrt/crtdbg.h +++ b/include/msvcrt/crtdbg.h @@ -19,9 +19,8 @@ */ #ifndef __WINE_CRTDBG_H_ #define __WINE_CRTDBG_H_ -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include /* The debug API is not implemented in Winelib. * Redirect everything to the regular APIs. diff --git a/include/msvcrt/stddef.h b/include/msvcrt/crtdefs.h similarity index 55% copy from include/msvcrt/stddef.h copy to include/msvcrt/crtdefs.h index d0fe7de3ef2..7234c1d9b6d 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/crtdefs.h @@ -1,5 +1,5 @@ /* - * Time definitions + * CRT definitions * * Copyright 2000 Francois Gouget. * @@ -17,8 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __WINE_STDDEF_H -#define __WINE_STDDEF_H + #ifndef __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT #endif @@ -35,12 +34,39 @@ # endif #endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#ifndef __stdcall +# ifdef __i386__ +# ifdef __GNUC__ +# ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */ +# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) +# else +# define __stdcall __attribute__((__stdcall__)) +# endif +# elif defined(_MSC_VER) + /* Nothing needs to be done. __stdcall already exists */ +# else +# error You need to define __stdcall for your compiler +# endif +# elif defined(__x86_64__) && defined (__GNUC__) +# define __stdcall __attribute__((ms_abi)) +# else +# define __stdcall +# endif +#endif /* __stdcall */ + +#ifndef __cdecl +# if defined(__i386__) && defined(__GNUC__) +# ifdef __APPLE__ /* Mac OS X uses 16-byte aligned stack and not a 4-byte one */ +# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) +# else +# define __cdecl __attribute__((__cdecl__)) +# endif +# elif defined(__x86_64__) && defined (__GNUC__) +# define __cdecl __attribute__((ms_abi)) +# elif !defined(_MSC_VER) +# define __cdecl +# endif +#endif /* __cdecl */ #ifndef _INTPTR_T_DEFINED #ifdef _WIN64 @@ -78,31 +104,30 @@ typedef unsigned int size_t; #define _SIZE_T_DEFINED #endif -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED #endif -#ifdef _WIN64 -#define offsetof(s,m) (size_t)((ptrdiff_t)&(((s*)NULL)->m)) -#else -#define offsetof(s,m) (size_t)&(((s*)NULL)->m) +#ifndef _TIME32_T_DEFINED +typedef long __time32_t; +#define _TIME32_T_DEFINED #endif - -#ifdef __cplusplus -extern "C" { +#ifndef _TIME64_T_DEFINED +typedef __int64 __time64_t; +#define _TIME64_T_DEFINED #endif -unsigned long __threadid(void); -unsigned long __threadhandle(void); -#define _threadid (__threadid()) - -#ifdef __cplusplus -} +#ifndef _WCHAR_T_DEFINED +#ifndef __cplusplus +typedef unsigned short wchar_t; +#endif +#define _WCHAR_T_DEFINED #endif -#endif /* __WINE_STDDEF_H */ +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif diff --git a/include/msvcrt/ctype.h b/include/msvcrt/ctype.h index 538dca7a9e0..bbcdba94424 100644 --- a/include/msvcrt/ctype.h +++ b/include/msvcrt/ctype.h @@ -7,31 +7,17 @@ */ #ifndef __WINE_CTYPE_H #define __WINE_CTYPE_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #ifdef __cplusplus extern "C" { #endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - #ifndef WEOF #define WEOF (wint_t)(0xFFFF) #endif -#ifndef _WCTYPE_T_DEFINED -typedef unsigned short wint_t; -typedef unsigned short wctype_t; -#define _WCTYPE_T_DEFINED -#endif - /* ASCII char classification table - binary compatible */ #define _UPPER 0x0001 /* C1_UPPER */ #define _LOWER 0x0002 /* C1_LOWER */ diff --git a/include/msvcrt/direct.h b/include/msvcrt/direct.h index d71aee0b632..4fc3943ec18 100644 --- a/include/msvcrt/direct.h +++ b/include/msvcrt/direct.h @@ -7,9 +7,8 @@ */ #ifndef __WINE_DIRECT_H #define __WINE_DIRECT_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #include @@ -17,34 +16,6 @@ extern "C" { #endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - #ifndef _DISKFREE_T_DEFINED #define _DISKFREE_T_DEFINED struct _diskfree_t { diff --git a/include/msvcrt/dos.h b/include/msvcrt/dos.h index be6d444f392..c91468d518d 100644 --- a/include/msvcrt/dos.h +++ b/include/msvcrt/dos.h @@ -7,9 +7,8 @@ */ #ifndef __WINE_DOS_H #define __WINE_DOS_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #include diff --git a/include/msvcrt/eh.h b/include/msvcrt/eh.h index 2f8281e2431..cadc8fe0382 100644 --- a/include/msvcrt/eh.h +++ b/include/msvcrt/eh.h @@ -19,9 +19,8 @@ */ #ifndef __WINE_EH_H #define __WINE_EH_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #if !defined(__cplusplus) && !defined(__WINE_MSVCRT_TEST) #error "eh.h is meant only for C++ applications" diff --git a/include/msvcrt/errno.h b/include/msvcrt/errno.h index ebb70b5861c..6214df9c9af 100644 --- a/include/msvcrt/errno.h +++ b/include/msvcrt/errno.h @@ -18,9 +18,8 @@ #ifndef __WINE_ERRNO_H #define __WINE_ERRNO_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include # define EPERM 1 # define ENOENT 2 diff --git a/include/msvcrt/fcntl.h b/include/msvcrt/fcntl.h index 7a6c6ec7fe8..d0ee97b3150 100644 --- a/include/msvcrt/fcntl.h +++ b/include/msvcrt/fcntl.h @@ -7,9 +7,8 @@ */ #ifndef __WINE_FCNTL_H #define __WINE_FCNTL_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #define _O_RDONLY 0 #define _O_WRONLY 1 diff --git a/include/msvcrt/float.h b/include/msvcrt/float.h index 312209303c4..3bb87460ca8 100644 --- a/include/msvcrt/float.h +++ b/include/msvcrt/float.h @@ -8,9 +8,8 @@ #ifndef __WINE_FLOAT_H #define __WINE_FLOAT_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #ifdef __cplusplus extern "C" { diff --git a/include/msvcrt/io.h b/include/msvcrt/io.h index ef4a312d271..f195d713342 100644 --- a/include/msvcrt/io.h +++ b/include/msvcrt/io.h @@ -7,30 +7,10 @@ */ #ifndef __WINE_IO_H #define __WINE_IO_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#include -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#include -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif +#include /* The following are also defined in dos.h */ #define _A_NORMAL 0x00000000 @@ -41,11 +21,6 @@ typedef unsigned short wchar_t; #define _A_SUBDIR 0x00000010 #define _A_ARCH 0x00000020 -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - #ifndef _FSIZE_T_DEFINED typedef unsigned long _fsize_t; #define _FSIZE_T_DEFINED diff --git a/include/msvcrt/limits.h b/include/msvcrt/limits.h index 209f2609314..938da762801 100644 --- a/include/msvcrt/limits.h +++ b/include/msvcrt/limits.h @@ -1,6 +1,8 @@ #ifndef __WINE_LIMITS_H #define __WINE_LIMITS_H +#include + #define CHAR_BIT 8 #define MB_LEN_MAX 2 diff --git a/include/msvcrt/locale.h b/include/msvcrt/locale.h index 72c80fab3ea..aaa30114889 100644 --- a/include/msvcrt/locale.h +++ b/include/msvcrt/locale.h @@ -19,16 +19,8 @@ */ #ifndef __WINE_LOCALE_H #define __WINE_LOCALE_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#include #define LC_ALL 0 #define LC_COLLATE 1 diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index b71c4fd2b80..cc60033f1c2 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h @@ -19,9 +19,8 @@ */ #ifndef __WINE_MALLOC_H #define __WINE_MALLOC_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include /* heap function constants */ #define _HEAPEMPTY -1 @@ -34,27 +33,6 @@ #define _FREEENTRY 0 #define _USEDENTRY 1 -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - #ifndef _HEAPINFO_DEFINED #define _HEAPINFO_DEFINED typedef struct _heapinfo diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index 4192378ce8f..5aaf7abc311 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -8,9 +8,8 @@ #ifndef __WINE_MATH_H #define __WINE_MATH_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #include diff --git a/include/msvcrt/mbctype.h b/include/msvcrt/mbctype.h index e21d3f36177..7a51399eed6 100644 --- a/include/msvcrt/mbctype.h +++ b/include/msvcrt/mbctype.h @@ -19,9 +19,8 @@ */ #ifndef __WINE_MBCTYPE_H #define __WINE_MBCTYPE_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #ifdef __cplusplus extern "C" { diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index a9c38cf4f51..f4fa6970669 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h @@ -19,32 +19,10 @@ */ #ifndef __WINE_MBSTRING_H #define __WINE_MBSTRING_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#include +#include -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif +#include #ifndef _NLSCMP_DEFINED #define _NLSCMPERROR ((unsigned int)0x7fffffff) diff --git a/include/msvcrt/memory.h b/include/msvcrt/memory.h index e2f5a37bdda..d501ece4f2e 100644 --- a/include/msvcrt/memory.h +++ b/include/msvcrt/memory.h @@ -7,30 +7,8 @@ */ #ifndef __WINE_MEMORY_H #define __WINE_MEMORY_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif +#include #ifdef __cplusplus extern "C" { diff --git a/include/msvcrt/process.h b/include/msvcrt/process.h index c6306718831..e9ac135572f 100644 --- a/include/msvcrt/process.h +++ b/include/msvcrt/process.h @@ -7,16 +7,8 @@ */ #ifndef __WINE_PROCESS_H #define __WINE_PROCESS_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#include /* Process creation flags */ #define _P_WAIT 0 @@ -28,26 +20,6 @@ typedef unsigned short wchar_t; #define _WAIT_CHILD 0 #define _WAIT_GRANDCHILD 1 -#ifndef __stdcall -# ifdef __i386__ -# ifdef __GNUC__ -# ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */ -# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) -# else -# define __stdcall __attribute__((__stdcall__)) -# endif -# elif defined(_MSC_VER) - /* Nothing needs to be done. __stdcall already exists */ -# else -# error You need to define __stdcall for your compiler -# endif -# elif defined(__x86_64__) && defined (__GNUC__) -# define __stdcall __attribute__((ms_abi)) -# else -# define __stdcall -# endif -#endif /* __stdcall */ - #ifdef __cplusplus extern "C" { #endif diff --git a/include/msvcrt/search.h b/include/msvcrt/search.h index ff5bf80a559..67833740666 100644 --- a/include/msvcrt/search.h +++ b/include/msvcrt/search.h @@ -19,31 +19,8 @@ */ #ifndef __WINE_SEARCH_H #define __WINE_SEARCH_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif +#include #ifdef __cplusplus extern "C" { diff --git a/include/msvcrt/setjmp.h b/include/msvcrt/setjmp.h index cf3b294fdf3..a880739dcf8 100644 --- a/include/msvcrt/setjmp.h +++ b/include/msvcrt/setjmp.h @@ -19,9 +19,8 @@ */ #ifndef __WINE_SETJMP_H #define __WINE_SETJMP_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #include diff --git a/include/msvcrt/signal.h b/include/msvcrt/signal.h index 2155bb4b46b..2ae6355ae4d 100644 --- a/include/msvcrt/signal.h +++ b/include/msvcrt/signal.h @@ -19,9 +19,8 @@ */ #ifndef _WINE_SIGNAL_H #define _WINE_SIGNAL_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #define SIGINT 2 #define SIGILL 4 diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index d0fe7de3ef2..c10fad19676 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h @@ -19,64 +19,8 @@ */ #ifndef __WINE_STDDEF_H #define __WINE_STDDEF_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - -#ifndef _INTPTR_T_DEFINED -#ifdef _WIN64 -typedef __int64 intptr_t; -#else -typedef int intptr_t; -#endif -#define _INTPTR_T_DEFINED -#endif - -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif - -#ifndef _PTRDIFF_T_DEFINED -#ifdef _WIN64 -typedef __int64 ptrdiff_t; -#else -typedef int ptrdiff_t; -#endif -#define _PTRDIFF_T_DEFINED -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif +#include #ifndef NULL #ifdef __cplusplus diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 55d944419d1..6a5ab65d147 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -7,27 +7,14 @@ */ #ifndef __WINE_STDIO_H #define __WINE_STDIO_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#include +#include #ifndef RC_INVOKED #include #endif -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif +#include /* file._flag flags */ #define _IOREAD 0x0001 @@ -89,28 +76,6 @@ typedef __int64 fpos_t; #define _FPOS_T_DEFINED #endif -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - -#ifndef _WCTYPE_T_DEFINED -typedef unsigned short wint_t; -typedef unsigned short wctype_t; -#define _WCTYPE_T_DEFINED -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 0010c3310fe..65c61a2b04e 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -7,9 +7,8 @@ */ #ifndef __WINE_STDLIB_H #define __WINE_STDLIB_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif + +#include #include @@ -21,14 +20,6 @@ #endif #endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - - typedef struct { float f; @@ -44,18 +35,6 @@ typedef struct unsigned char ld[10]; } _LDOUBLE; -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - #define EXIT_SUCCESS 0 #define EXIT_FAILURE -1 #define RAND_MAX 0x7FFF @@ -79,15 +58,6 @@ typedef struct _ldiv_t { long rem; } ldiv_t; -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - #define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b)) #ifndef __cplusplus diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index d70cd23947e..0a9a7a2b83a 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -7,37 +7,8 @@ */ #ifndef __WINE_STRING_H #define __WINE_STRING_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif +#include #ifndef _NLSCMP_DEFINED #define _NLSCMPERROR ((unsigned int)0x7fffffff) diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h index 03b1a1638f9..c29daf68e07 100644 --- a/include/msvcrt/sys/stat.h +++ b/include/msvcrt/sys/stat.h @@ -7,20 +7,11 @@ */ #ifndef __WINE_SYS_STAT_H #define __WINE_SYS_STAT_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#include +#include #include -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#include #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; @@ -32,11 +23,6 @@ typedef unsigned short _ino_t; #define _INO_T_DEFINED #endif -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - #ifndef _OFF_T_DEFINED typedef int _off_t; #define _OFF_T_DEFINED diff --git a/include/msvcrt/sys/timeb.h b/include/msvcrt/sys/timeb.h index 253b58135b8..3e2995a113c 100644 --- a/include/msvcrt/sys/timeb.h +++ b/include/msvcrt/sys/timeb.h @@ -19,16 +19,10 @@ */ #ifndef __WINE_SYS_TIMEB_H #define __WINE_SYS_TIMEB_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#include +#include -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif +#include #ifndef _TIMEB_DEFINED #define _TIMEB_DEFINED diff --git a/include/msvcrt/sys/types.h b/include/msvcrt/sys/types.h index dac8d64c984..a52e00d19bd 100644 --- a/include/msvcrt/sys/types.h +++ b/include/msvcrt/sys/types.h @@ -19,21 +19,8 @@ */ #ifndef __WINE_SYS_TYPES_H #define __WINE_SYS_TYPES_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif +#include #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; @@ -55,16 +42,6 @@ typedef int _off_t; #define _OFF_T_DEFINED #endif -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - -#ifndef _TIME64_T_DEFINED -#define _TIME64_T_DEFINED -typedef __int64 __time64_t; -#endif - #ifndef _BSDTYPES_DEFINED typedef unsigned char u_char; typedef unsigned short u_short; diff --git a/include/msvcrt/sys/utime.h b/include/msvcrt/sys/utime.h index 65a855ce649..f1315b1691d 100644 --- a/include/msvcrt/sys/utime.h +++ b/include/msvcrt/sys/utime.h @@ -19,23 +19,10 @@ */ #ifndef __WINE_SYS_UTIME_H #define __WINE_SYS_UTIME_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#include +#include -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif +#include #ifndef _UTIMBUF_DEFINED #define _UTIMBUF_DEFINED diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index 9b9a5164f30..10446227e7f 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -19,44 +19,10 @@ */ #ifndef __WINE_TIME_H #define __WINE_TIME_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#include - -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif +#include -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif +#include #ifndef _CLOCK_T_DEFINED typedef long clock_t; diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 4e4892ff1a7..dcefc0f2db4 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -7,25 +7,16 @@ */ #ifndef __WINE_WCHAR_H #define __WINE_WCHAR_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#include +#include #include +#include + #ifdef __cplusplus extern "C" { #endif -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif - #ifndef NULL #ifdef __cplusplus #define NULL 0 @@ -37,18 +28,6 @@ typedef unsigned short wchar_t; #define WCHAR_MIN 0 #define WCHAR_MAX ((wchar_t)-1) -#if defined(__x86_64__) && !defined(_WIN64) -#define _WIN64 -#endif - -#if !defined(_MSC_VER) && !defined(__int64) -# if defined(_WIN64) && !defined(__MINGW64__) -# define __int64 long -# else -# define __int64 long long -# endif -#endif - #ifndef DECLSPEC_ALIGN # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS) # define DECLSPEC_ALIGN(x) __declspec(align(x)) @@ -61,21 +40,6 @@ typedef unsigned short wchar_t; typedef int mbstate_t; -#ifndef _SIZE_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 size_t; -#else -typedef unsigned int size_t; -#endif -#define _SIZE_T_DEFINED -#endif - -#ifndef _WCTYPE_T_DEFINED -typedef unsigned short wint_t; -typedef unsigned short wctype_t; -#define _WCTYPE_T_DEFINED -#endif - #ifndef WEOF #define WEOF (wint_t)(0xFFFF) #endif @@ -100,16 +64,6 @@ typedef int _off_t; #define _OFF_T_DEFINED #endif -#ifndef _TIME_T_DEFINED -typedef long time_t; -#define _TIME_T_DEFINED -#endif - -#ifndef _TIME64_T_DEFINED -#define _TIME64_T_DEFINED -typedef __int64 __time64_t; -#endif - #ifndef _TM_DEFINED #define _TM_DEFINED struct tm { diff --git a/include/msvcrt/wctype.h b/include/msvcrt/wctype.h index 0f70e4d08cb..feebb778f57 100644 --- a/include/msvcrt/wctype.h +++ b/include/msvcrt/wctype.h @@ -19,18 +19,10 @@ */ #ifndef __WINE_WCTYPE_H #define __WINE_WCTYPE_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif -#include +#include -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif +#include /* ASCII char classification table - binary compatible */ #define _UPPER 0x0001 /* C1_UPPER */ @@ -48,12 +40,6 @@ typedef unsigned short wchar_t; #define WEOF (wint_t)(0xFFFF) #endif -#ifndef _WCTYPE_T_DEFINED -typedef unsigned short wint_t; -typedef unsigned short wctype_t; -#define _WCTYPE_T_DEFINED -#endif - /* FIXME: there's something to do with __p__pctype and __p__pwctype */ -- 2.11.4.GIT