From 420bf6c2b0bde5f1689663b477add8fc9df2a6f0 Mon Sep 17 00:00:00 2001
From: rbmj <rbmj@verizon.net>
Date: Tue, 2 Oct 2012 13:55:02 -0400
Subject: [PATCH 4/4] Minor source changes to allow compilation on VxWorks
---
gcc/gcov-io.c | 3 ++-
libstdc++-v3/config/os/vxworks/os_defines.h | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
@@ -92,7 +92,8 @@ gcov_open (const char *name, int mode)
{
/* Read-only mode - acquire a read-lock. */
s_flock.l_type = F_RDLCK;
- fd = open (name, O_RDONLY);
+ /* pass mode (ignored) for compatibility */
+ fd = open (name, O_RDONLY, S_IRUSR | S_IWUSR);
}
else
{
@@ -33,4 +33,10 @@
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+//Keep vxWorks from defining min()/max() as macros
+#ifdef NOMINMAX
+#undef NOMINMAX
+#endif
+#define NOMINMAX 1
+
#endif
--
1.7.10.4