Commit 48ea2508 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Don't define __WINE_USE_MSVCRT in the Visual C++ project. It is not

needed as it is defined by the Wine headers. Use __WINE_USE_MSVCRT to detect whether we are being compiled with the Wine MSVCRT headers or the Windows ones. In the latter case: - don't try to include the Wine-specific msvcrt headers - skip all the headers.c tests since there's no MSVCRT_* symbols to check
parent 076d78b9
...@@ -15,19 +15,16 @@ ...@@ -15,19 +15,16 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* This file contains tests to ensure consystencies between symbols * This file contains tests to ensure the consistency between symbols
* defined in the msvcrt headers, and corresponding duplciated * defined in the regular msvcrt headers, and the corresponding duplicated
* symbol defined in msvcrt.h (prefixed by MSVCRT_). * symbol defined in msvcrt.h (prefixed by MSVCRT_).
*/ */
#define __WINE_MSVCRT_TEST
#include "dos.h" #include "dos.h"
#include "math.h" #include "math.h"
#include "stdlib.h" #include "stdlib.h"
#include "eh.h"
#include "io.h" #include "io.h"
#include "errno.h" #include "errno.h"
#include "unistd.h"
#include "fcntl.h" #include "fcntl.h"
#include "malloc.h" #include "malloc.h"
#include "limits.h" #include "limits.h"
...@@ -42,7 +39,6 @@ ...@@ -42,7 +39,6 @@
#include "float.h" #include "float.h"
#include "stddef.h" #include "stddef.h"
#include "mbstring.h" #include "mbstring.h"
#include "sys/unistd.h"
#include "sys/locking.h" #include "sys/locking.h"
#include "sys/utime.h" #include "sys/utime.h"
#include "sys/types.h" #include "sys/types.h"
...@@ -50,15 +46,19 @@ ...@@ -50,15 +46,19 @@
#include "sys/timeb.h" #include "sys/timeb.h"
#include "direct.h" #include "direct.h"
#include "conio.h" #include "conio.h"
#include "dirent.h"
#include "process.h" #include "process.h"
#include "string.h" #include "string.h"
#include "time.h" #include "time.h"
#include "locale.h" #include "locale.h"
#include "setjmp.h" #include "setjmp.h"
#include "msvcrt.h"
#include "wine/test.h" #include "wine/test.h"
#ifdef __WINE_USE_MSVCRT
/* Wine-specific msvcrt headers */
#define __WINE_MSVCRT_TEST
#include "eh.h"
#include "msvcrt.h"
#ifdef __GNUC__ #ifdef __GNUC__
#define TYPEOF(type) typeof(type) #define TYPEOF(type) typeof(type)
#else #else
...@@ -453,9 +453,13 @@ void test_defines() ...@@ -453,9 +453,13 @@ void test_defines()
#endif #endif
} }
#endif /* __WINE_USE_MSVCRT */
START_TEST(headers) START_TEST(headers)
{ {
#ifdef __WINE_USE_MSVCRT
test_types(); test_types();
test_structs(); test_structs();
test_defines(); test_defines();
#endif
} }
...@@ -673,7 +673,6 @@ sub _generate_dsp { ...@@ -673,7 +673,6 @@ sub _generate_dsp {
if($wine) { if($wine) {
push @defines2, "_\U${project}\E_"; push @defines2, "_\U${project}\E_";
push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/; push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/;
push @defines2, qw(__WINE_USE_MSVCRT);
if ($msvc_headers) { if ($msvc_headers) {
push @defines2, qw(__WINE_USE_NATIVE_HEADERS); push @defines2, qw(__WINE_USE_NATIVE_HEADERS);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment