Am 24.03.19 um 17:49 schrieb Iain Buclaw:
I've done the front-end merge, leaving just the following.
diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h
index efece15f3bc..6c18b69d4df 100644
--- a/gcc/d/d-system.h
+++ b/gcc/d/d-system.h
@@ -55,4 +55,10 @@
#undef tolower
#define tolower(c) TOLOWER(c)
+/* We do not include direct.h as it conflicts with system.h. */
+#ifdef _WIN32
+#undef _mkdir
+#define _mkdir(p) mkdir(p, 0)
+#endif
+
Does this mean that we can remove MinGW from the special casing in the
toplevel configure? See r265658.
Iain.
Thanks. I think we can indeed remove the special case in configure, new
patch attached. I'm not sure about cygwin though and I don't have a
build setup for cygwin either.
I will however bootstrap this on MinGW again, just to be sure.
Please note that these fixes are for MinGW hosts though, whereas the
check in configure checked for MinGW targets. I'm not aware of any build
issues affecting MinGW targets though and the MinGW bootstrap will check
both cases anyway.
Regards,
Johannes
>From 6b54d601ee5810260ba3e5e5134783a2f107ff36 Mon Sep 17 00:00:00 2001
From: Johannes Pfau <johannesp...@gmail.com>
Date: Sun, 24 Mar 2019 11:57:51 +0100
Subject: [PATCH] PR d/87799 Fix build on windows hosts
Provide _mkdir in d-system.h as we do not include the windows 'direct.h'
header. Fixes build for windows hosts.
gcc/d/ChangeLog:
2019-03-23 Johannes Pfau <johannesp...@gmail.com>
PR d/87799
* d-system.h (_mkdir): Define to mkdir for MinGW hosts.
2019-03-25 Johannes Pfau <johannesp...@gmail.com>
* configure: Rebuild.
* configure.ac: Mark D on MinGW as supported.
---
configure | 2 +-
configure.ac | 2 +-
gcc/d/d-system.h | 6 ++++++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index adf4fda0f69..325ea76ccee 100755
--- a/configure
+++ b/configure
@@ -3395,7 +3395,7 @@ case ,${enable_languages}, in
;;
*)
case "${target}" in
- *-*-darwin* | *-*-cygwin* | *-*-mingw*)
+ *-*-darwin* | *-*-cygwin*)
unsupported_languages="$unsupported_languages d"
;;
esac
diff --git a/configure.ac b/configure.ac
index 87f2aee0500..6e29ded6106 100644
--- a/configure.ac
+++ b/configure.ac
@@ -680,7 +680,7 @@ case ,${enable_languages}, in
;;
*)
case "${target}" in
- *-*-darwin* | *-*-cygwin* | *-*-mingw*)
+ *-*-darwin* | *-*-cygwin*)
unsupported_languages="$unsupported_languages d"
;;
esac
diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h
index efece15f3bc..6c18b69d4df 100644
--- a/gcc/d/d-system.h
+++ b/gcc/d/d-system.h
@@ -55,4 +55,10 @@
#undef tolower
#define tolower(c) TOLOWER(c)
+/* We do not include direct.h as it conflicts with system.h. */
+#ifdef _WIN32
+#undef _mkdir
+#define _mkdir(p) mkdir(p, 0)
+#endif
+
#endif /* GCC_D_SYSTEM_H */
--
2.19.2