Files
MINGW-packages/mingw-w64-cling-git/cling-mingw64-fix.patch
2014-06-11 18:10:57 +01:00

196 lines
5.6 KiB
Diff

patch by martellmalone <martellmalone@gmail.com>
This fixes compiling cling on mingw64
diff --git a/Makefile b/Makefile
index d96f0a9..aa63f49 100644
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,8 @@ endif
CXX.Flags += -fno-strict-aliasing
# Determine cling's version:
-CLING_VERSION=$(shell cat "VERSION")
-CPP.Flags += -DCLING_VERSION='"$(CLING_VERSION) "'
+#CLING_VERSION=$(shell cat "VERSION")
+#CPP.Flags += -DCLING_VERSION='"$(CLING_VERSION) "'
###
# Cling Top Level specific stuff.
diff --git a/lib/Interpreter/DynamicLibraryManager.cpp b/lib/Interpreter/DynamicLibraryManager.cpp
index 5c3246e..700a597 100644
--- a/lib/Interpreter/DynamicLibraryManager.cpp
+++ b/lib/Interpreter/DynamicLibraryManager.cpp
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <sys/stat.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <Windows.h>
#include <shlobj.h>
#else
diff --git a/lib/Interpreter/Interpreter.cpp b/lib/Interpreter/Interpreter.cpp
index e1c1ae0..b8b6003 100644
--- a/lib/Interpreter/Interpreter.cpp
+++ b/lib/Interpreter/Interpreter.cpp
@@ -215,7 +215,12 @@ namespace cling {
}
const char* Interpreter::getVersion() const {
- return CLING_VERSION;
+ return "cling http://cern.ch/cling - version "
+#ifdef CLING_VERSION
+ CLING_VERSION;
+#else
+ "<unknown>";
+#endif
}
void Interpreter::handleFrontendOptions() {
diff --git a/lib/UserInterface/textinput/SignalHandler.cpp b/lib/UserInterface/textinput/SignalHandler.cpp
index 9c02dee..6a3cd5b 100644
--- a/lib/UserInterface/textinput/SignalHandler.cpp
+++ b/lib/UserInterface/textinput/SignalHandler.cpp
@@ -26,7 +26,7 @@ namespace textinput {
void
SignalHandler::EmitCtrlZ() {
-#ifndef WIN32
+#ifndef _WIN32
raise(SIGTSTP);
#endif
}
diff --git a/lib/UserInterface/textinput/StreamReader.cpp b/lib/UserInterface/textinput/StreamReader.cpp
index e8e65b6..9ddfa0f 100644
--- a/lib/UserInterface/textinput/StreamReader.cpp
+++ b/lib/UserInterface/textinput/StreamReader.cpp
@@ -14,7 +14,7 @@
#include "textinput/StreamReader.h"
-#ifdef WIN32
+#ifdef _WIN32
# include "textinput/StreamReaderWin.h"
#else
# include "textinput/StreamReaderUnix.h"
@@ -25,7 +25,7 @@ namespace textinput {
StreamReader*
StreamReader::Create() {
-#ifdef WIN32
+#ifdef _WIN32
return new StreamReaderWin();
#else
return new StreamReaderUnix();
diff --git a/lib/UserInterface/textinput/StreamReaderUnix.cpp b/lib/UserInterface/textinput/StreamReaderUnix.cpp
index 74e66c6..72e9367 100644
--- a/lib/UserInterface/textinput/StreamReaderUnix.cpp
+++ b/lib/UserInterface/textinput/StreamReaderUnix.cpp
@@ -13,7 +13,7 @@
// Axel Naumann <axel@cern.ch>, 2011-05-12
//===----------------------------------------------------------------------===//
-#ifndef WIN32
+#ifndef _WIN32
#include "textinput/StreamReaderUnix.h"
@@ -274,4 +274,4 @@ namespace textinput {
}
}
-#endif // ifndef WIN32
+#endif // ifndef _WIN32
diff --git a/lib/UserInterface/textinput/StreamReaderWin.cpp b/lib/UserInterface/textinput/StreamReaderWin.cpp
index 1615e46..bf59ebc 100644
--- a/lib/UserInterface/textinput/StreamReaderWin.cpp
+++ b/lib/UserInterface/textinput/StreamReaderWin.cpp
@@ -12,7 +12,7 @@
// Axel Naumann <axel@cern.ch>, 2011-05-12
//===----------------------------------------------------------------------===//
-#ifdef WIN32
+#ifdef _WIN32
#include "textinput/StreamReaderWin.h"
@@ -211,4 +211,4 @@ namespace textinput {
}
}
}
-#endif // WIN32
+#endif // _WIN32
diff --git a/lib/UserInterface/textinput/TerminalConfigUnix.cpp b/lib/UserInterface/textinput/TerminalConfigUnix.cpp
index 113e7c9..6f00c5e 100644
--- a/lib/UserInterface/textinput/TerminalConfigUnix.cpp
+++ b/lib/UserInterface/textinput/TerminalConfigUnix.cpp
@@ -1,4 +1,4 @@
-#ifndef WIN32
+#ifndef _WIN32
//===--- TerminalConfigUnix.cpp - termios storage -------------*- C++ -*-===//
//
@@ -143,4 +143,4 @@ bool TerminalConfigUnix::IsInteractive() const {
-#endif // ndef WIN32
+#endif // ifndef _WIN32
diff --git a/lib/UserInterface/textinput/TerminalDisplay.cpp b/lib/UserInterface/textinput/TerminalDisplay.cpp
index a54529c..f2c2416 100644
--- a/lib/UserInterface/textinput/TerminalDisplay.cpp
+++ b/lib/UserInterface/textinput/TerminalDisplay.cpp
@@ -14,7 +14,7 @@
#include "textinput/TerminalDisplay.h"
-#ifdef WIN32
+#ifdef _WIN32
#include "textinput/TerminalDisplayWin.h"
#else
#include "textinput/TerminalDisplayUnix.h"
@@ -30,7 +30,7 @@ namespace textinput {
TerminalDisplay*
TerminalDisplay::Create() {
-#ifdef WIN32
+#ifdef _WIN32
return new TerminalDisplayWin();
#else
return new TerminalDisplayUnix();
diff --git a/lib/UserInterface/textinput/TerminalDisplayUnix.cpp b/lib/UserInterface/textinput/TerminalDisplayUnix.cpp
index 17aef56..2b45168 100644
--- a/lib/UserInterface/textinput/TerminalDisplayUnix.cpp
+++ b/lib/UserInterface/textinput/TerminalDisplayUnix.cpp
@@ -1,4 +1,4 @@
-#ifndef WIN32
+#ifndef _WIN32
//===--- TerminalDisplayUnix.cpp - Output To UNIX Terminal ------*- C++ -*-===//
//
@@ -326,4 +326,4 @@ namespace textinput {
}
-#endif // #ifndef WIN32
+#endif // #ifndef _WIN32
diff --git a/lib/UserInterface/textinput/TerminalDisplayWin.cpp b/lib/UserInterface/textinput/TerminalDisplayWin.cpp
index 8b9dd80..0b38588 100644
--- a/lib/UserInterface/textinput/TerminalDisplayWin.cpp
+++ b/lib/UserInterface/textinput/TerminalDisplayWin.cpp
@@ -13,7 +13,7 @@
// Axel Naumann <axel@cern.ch>, 2011-05-12
//===----------------------------------------------------------------------===//
-#ifdef WIN32
+#ifdef _WIN32
#include "textinput/TerminalDisplayWin.h"
#include "textinput/Color.h"
@@ -214,4 +214,4 @@ namespace textinput {
}
-#endif // WIN32
+#endif // _WIN32