You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/07/06 10:10:17 UTC
[5/9] lucy-charmonizer git commit: Add MinGW detection
Add MinGW detection
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/2fcb176a
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/2fcb176a
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/2fcb176a
Branch: refs/heads/master
Commit: 2fcb176affecbb00db7d34e76a2663b9a1831609
Parents: 48dd396
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Jul 5 15:43:41 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Jul 5 15:43:41 2016 +0200
----------------------------------------------------------------------
src/Charmonizer/Core/Compiler.c | 11 ++++++++++-
src/Charmonizer/Core/Compiler.h | 3 +++
2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/2fcb176a/src/Charmonizer/Core/Compiler.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/Compiler.c b/src/Charmonizer/Core/Compiler.c
index 83177f2..f864a5d 100644
--- a/src/Charmonizer/Core/Compiler.c
+++ b/src/Charmonizer/Core/Compiler.c
@@ -69,12 +69,13 @@ static struct {
int intval___clang__;
int intval___SUNPRO_C;
int is_cygwin;
+ int is_mingw;
chaz_CFlags *extra_cflags;
chaz_CFlags *temp_cflags;
} chaz_CC = {
NULL, NULL, NULL,
"", "", "", "", "", "",
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
NULL, NULL
};
@@ -183,6 +184,9 @@ chaz_CC_init(const char *compiler_command, const char *compiler_flags) {
if (chaz_CC_has_macro("__CYGWIN__")) {
chaz_CC.is_cygwin = 1;
}
+ if (chaz_CC_has_macro("__MINGW32__")) {
+ chaz_CC.is_mingw = 1;
+ }
}
else {
chaz_Util_die("Failed to detect binary format");
@@ -556,6 +560,11 @@ chaz_CC_is_cygwin(void) {
return chaz_CC.is_cygwin;
}
+int
+chaz_CC_is_mingw(void) {
+ return chaz_CC.is_mingw;
+}
+
const char*
chaz_CC_link_command() {
if (chaz_CC.intval__MSC_VER) {
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/2fcb176a/src/Charmonizer/Core/Compiler.h
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/Compiler.h b/src/Charmonizer/Core/Compiler.h
index 8190123..02e2925 100644
--- a/src/Charmonizer/Core/Compiler.h
+++ b/src/Charmonizer/Core/Compiler.h
@@ -151,6 +151,9 @@ chaz_CC_sun_c_version_num(void);
int
chaz_CC_is_cygwin(void);
+int
+chaz_CC_is_mingw(void);
+
const char*
chaz_CC_link_command(void);