summaryrefslogtreecommitdiffstats
path: root/tester/covoar/covoar.cc
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-07-28 16:10:00 -0400
committerJoel Sherrill <joel@rtems.org>2021-08-03 15:56:53 -0500
commitd607f42d04c511c9d227dbf624665b1a4fc4ef8f (patch)
tree68b6879ddc3c4ede28ee49c5023a7c916291ff6f /tester/covoar/covoar.cc
parentRemove TargetInfo global variable (diff)
downloadrtems-tools-d607f42d04c511c9d227dbf624665b1a4fc4ef8f.tar.bz2
app_common: Remove functions and macros
- Moved functions from app_common to the file they are used - Got rid of FileIsNewer() since it's not being used - Removed macros
Diffstat (limited to 'tester/covoar/covoar.cc')
-rw-r--r--tester/covoar/covoar.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index e0dc341..25724b5 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -30,6 +30,12 @@
#include "TargetFactory.h"
#include "GcovData.h"
+#if HAVE_STAT64
+#define STAT stat64
+#else
+#define STAT stat
+#endif
+
#if defined(_WIN32) || defined(__CYGWIN__)
#define kill(p,s) raise(s)
#endif
@@ -40,6 +46,20 @@ typedef std::list<std::string> CoverageNames;
typedef std::list<Coverage::ExecutableInfo*> Executables;
typedef std::string option_error;
+bool FileIsReadable( const char *f1 )
+{
+ struct STAT buf1;
+
+ if (STAT( f1, &buf1 ) == -1)
+ return false;
+
+ if (buf1.st_size == 0)
+ return false;
+
+ // XXX check permission ??
+ return true;
+}
+
/*
* Create a build path from the executable paths. Also extract the build prefix
* and BSP names.