Patch 4: Minor changes to fix compilation on VxWorks ChangeLog [gcc]: * gcov-io.c (gcov_open): Pass third argument to open() unconditionally
ChangeLog [libstdc++-v3]: * libstdc++-v3/config/os/vxworks/os_defines.h: Define NOMINMAX
>From 420bf6c2b0bde5f1689663b477add8fc9df2a6f0 Mon Sep 17 00:00:00 2001 From: rbmj <r...@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(-) diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index d64fb42..f562654 100644 --- a/gcc/gcov-io.c +++ b/gcc/gcov-io.c @@ -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 { diff --git a/libstdc++-v3/config/os/vxworks/os_defines.h b/libstdc++-v3/config/os/vxworks/os_defines.h index c66063e..93ad1d4 100644 --- a/libstdc++-v3/config/os/vxworks/os_defines.h +++ b/libstdc++-v3/config/os/vxworks/os_defines.h @@ -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