[rtems-tools commit] covoar: Add function defs to fix Windows build errors.

Chris Johns chrisj at rtems.org
Thu Sep 14 02:22:31 UTC 2017


Module:    rtems-tools
Branch:    master
Commit:    f4773ac5c755b6635b4bdde71d2fbc89112750c2
Changeset: http://git.rtems.org/rtems-tools/commit/?id=f4773ac5c755b6635b4bdde71d2fbc89112750c2

Author:    Cillian O'Donnell <cpodonnell8 at gmail.com>
Date:      Wed Sep 13 16:45:30 2017 +0100

covoar: Add function defs to fix Windows build errors.

Closes #3129

---

 tester/covoar/DesiredSymbols.cc | 2 +-
 tester/covoar/ReportsBase.cc    | 4 ++--
 tester/covoar/TraceConverter.cc | 4 ++++
 tester/covoar/covoar.cc         | 4 ++++
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
index 60bc7f7..fbb6ff2 100644
--- a/tester/covoar/DesiredSymbols.cc
+++ b/tester/covoar/DesiredSymbols.cc
@@ -511,7 +511,7 @@ namespace Coverage {
       inputBuffer[ strlen(inputBuffer) - 1] = '\0';
 
       // Use only the base filename without directory path.
-#if WIN32
+#ifdef _WIN32
       #define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
 #endif
       realpath( inputBuffer, rpath );
diff --git a/tester/covoar/ReportsBase.cc b/tester/covoar/ReportsBase.cc
index 01950d0..0244601 100644
--- a/tester/covoar/ReportsBase.cc
+++ b/tester/covoar/ReportsBase.cc
@@ -14,7 +14,7 @@
 #include "ReportsText.h"
 #include "ReportsHtml.h"
 
-#if WIN32
+#ifdef _WIN32
 #include <direct.h>
 #endif
 
@@ -39,7 +39,7 @@ FILE* ReportsBase::OpenFile(
   std::string  file;
 
   // Create the output directory if it does not already exist
-#if WIN32
+#ifdef _WIN32
   sc = _mkdir( outputDirectory );
 #else
   sc = mkdir( outputDirectory,0755 );
diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc
index 22b0f81..86bc6c1 100644
--- a/tester/covoar/TraceConverter.cc
+++ b/tester/covoar/TraceConverter.cc
@@ -24,6 +24,10 @@
 #include "rld.h"
 #include "rld-process.h"
 
+#ifdef _WIN32
+  #define kill(p,s) raise(s)
+#endif
+
 char*       progname;
 
 void usage()
diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index 5b55720..2d11f81 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -25,6 +25,10 @@
 
 #include "rld-process.h"
 
+#ifdef _WIN32
+  #define kill(p,s) raise(s)
+#endif
+
 /*
  *  Variables to control general behavior
  */



More information about the vc mailing list