Alexandre Julliard : configure: Don't define _WIN32 for Cygwin builds.
Alexandre Julliard
julliard at winehq.org
Thu Oct 14 15:09:33 CDT 2021
Module: wine
Branch: master
Commit: 339950a7818e8d9b9ee504105513c159e0e89bd2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=339950a7818e8d9b9ee504105513c159e0e89bd2
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Oct 14 11:07:56 2021 +0200
configure: Don't define _WIN32 for Cygwin builds.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 1 -
configure.ac | 1 -
include/msvcrt/corecrt.h | 4 ++--
include/windef.h | 4 ++--
include/wine/port.h | 2 +-
tools/tools.h | 6 +++---
6 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/configure b/configure
index b61f1284ac4..56c78fc6295 100755
--- a/configure
+++ b/configure
@@ -5675,7 +5675,6 @@ case $host in
*-mingw32*|*-cygwin*)
enable_win16=${enable_win16:-no}
with_mingw=${with_mingw:-no}
- CFLAGS="$CFLAGS -D_WIN32"
;;
esac
diff --git a/configure.ac b/configure.ac
index f9caef8a857..af1cf7303ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,6 @@ case $host in
*-mingw32*|*-cygwin*)
enable_win16=${enable_win16:-no}
with_mingw=${with_mingw:-no}
- CFLAGS="$CFLAGS -D_WIN32"
;;
esac
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h
index 4cb738a6e2d..a02feb509e8 100644
--- a/include/msvcrt/corecrt.h
+++ b/include/msvcrt/corecrt.h
@@ -81,7 +81,7 @@
# else
# define __stdcall __attribute__((ms_abi))
# endif
-# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(_WIN32)
+# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
@@ -122,7 +122,7 @@
#endif
#ifndef WINAPIV
-# if defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(_WIN32)
+# if defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define WINAPIV __attribute__((pcs("aapcs")))
# else
# define WINAPIV __cdecl
diff --git a/include/windef.h b/include/windef.h
index ac2ec619fbd..f352706c7f2 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -72,7 +72,7 @@ extern "C" {
# else
# define __stdcall __attribute__((ms_abi))
# endif
-# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(_WIN32)
+# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define __stdcall __attribute__((pcs("aapcs-vfp")))
# elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi)
# define __stdcall __attribute__((ms_abi))
@@ -120,7 +120,7 @@ extern "C" {
# endif
#endif
-#if defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(_WIN32)
+#if defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define WINAPIV __attribute__((pcs("aapcs")))
#else
# define WINAPIV __cdecl
diff --git a/include/wine/port.h b/include/wine/port.h
index 00d3a8b5e3c..fda19f0ad4b 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -43,7 +43,7 @@
* Hard-coded values for the Windows platform
*/
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
#include <errno.h>
diff --git a/tools/tools.h b/tools/tools.h
index cd87e20c163..f1240370b46 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -34,7 +34,7 @@
# include <unistd.h>
#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
# include <direct.h>
# include <io.h>
# include <process.h>
@@ -201,7 +201,7 @@ static inline struct strarray strarray_fromstring( const char *str, const char *
static inline struct strarray strarray_frompath( const char *path )
{
if (!path) return empty_strarray;
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
return strarray_fromstring( path, ";" );
#else
return strarray_fromstring( path, ":" );
@@ -253,7 +253,7 @@ static inline void strarray_trace( struct strarray args )
static inline int strarray_spawn( struct strarray args )
{
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#ifdef _WIN32
strarray_add( &args, NULL );
return _spawnvp( _P_WAIT, args.str[0], args.str );
#else
More information about the wine-cvs
mailing list