From a0fb7fbed73ada3dc0b947a0581f85a2a8c18492 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 11 Aug 2010 10:45:17 -0500 Subject: [PATCH] Clean up warnings from vxWorks 6.8. Added back the -include vxWorks.h option for gcc with vxWorks 6, it resolves many warnings about OFFSET being redefined. --- configure/os/CONFIG.Common.vxWorksCommon | 7 ++++--- src/libCom/osi/os/vxWorks/osdEnv.c | 6 ++++-- src/libCom/osi/os/vxWorks/osdFindSymbol.c | 3 +++ src/libCom/osi/os/vxWorks/osdProcess.c | 6 ++++-- src/libCom/osi/os/vxWorks/osdSock.c | 8 ++++---- src/libCom/osi/os/vxWorks/osdSock.h | 5 +++-- src/libCom/osi/os/vxWorks/osdThread.c | 6 ++++-- 7 files changed, 26 insertions(+), 15 deletions(-) diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index e0057e6c7..c7340fd7b 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -164,9 +164,10 @@ OP_SYS_CFLAGS += -fno-builtin # Fix for vxWorks 5 headers that use macros defined in vxWorks.h but # which don't actually include vxWorks.h themselves, for example the -# target/h/sys/stat.h file which uses ULONG -OP_SYS_INCLUDE_CPPFLAGS_5 += -include $(VX_DIR)/target/h/vxWorks.h -OP_SYS_INCLUDE_CPPFLAGS = $(OP_SYS_INCLUDE_CPPFLAGS_$(VXWORKS_MAJOR_VERSION)) +# target/h/sys/stat.h file which uses ULONG. This also stops dbDefs.h +# from defining the OFFSET macro, which generates lots of warnings in +# both vxWorks 5 and 6. +OP_SYS_INCLUDE_CPPFLAGS += -include $(VX_DIR)/target/h/vxWorks.h #-------------------------------------------------- # Optimization: Officially vxWorks only supports -O2 or less. diff --git a/src/libCom/osi/os/vxWorks/osdEnv.c b/src/libCom/osi/os/vxWorks/osdEnv.c index 9584d9c3f..b652e4da4 100644 --- a/src/libCom/osi/os/vxWorks/osdEnv.c +++ b/src/libCom/osi/os/vxWorks/osdEnv.c @@ -1,7 +1,6 @@ /*************************************************************************\ * Copyright (c) 2002 The University of Saskatchewan -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* osdEnv.c */ @@ -15,6 +14,9 @@ * */ +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include #include diff --git a/src/libCom/osi/os/vxWorks/osdFindSymbol.c b/src/libCom/osi/os/vxWorks/osdFindSymbol.c index fbed10f9c..d9c9d1161 100644 --- a/src/libCom/osi/os/vxWorks/osdFindSymbol.c +++ b/src/libCom/osi/os/vxWorks/osdFindSymbol.c @@ -8,6 +8,9 @@ \*************************************************************************/ /* osi/os/vxWorks/osiFindSymbol */ +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include #include diff --git a/src/libCom/osi/os/vxWorks/osdProcess.c b/src/libCom/osi/os/vxWorks/osdProcess.c index 71b38facf..58fc9bf76 100644 --- a/src/libCom/osi/os/vxWorks/osdProcess.c +++ b/src/libCom/osi/os/vxWorks/osdProcess.c @@ -3,8 +3,7 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ @@ -17,6 +16,9 @@ * */ +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include diff --git a/src/libCom/osi/os/vxWorks/osdSock.c b/src/libCom/osi/os/vxWorks/osdSock.c index 67adba5cd..dd6bab973 100644 --- a/src/libCom/osi/os/vxWorks/osdSock.c +++ b/src/libCom/osi/os/vxWorks/osdSock.c @@ -3,11 +3,13 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include @@ -15,8 +17,6 @@ #error this is a vxWorks specific source code #endif -/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ -#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> #include #include diff --git a/src/libCom/osi/os/vxWorks/osdSock.h b/src/libCom/osi/os/vxWorks/osdSock.h index a8384ec79..3ebc5799a 100644 --- a/src/libCom/osi/os/vxWorks/osdSock.h +++ b/src/libCom/osi/os/vxWorks/osdSock.h @@ -18,6 +18,9 @@ extern "C" { #endif +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include @@ -26,8 +29,6 @@ extern "C" { #include #include #include -/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ -#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> #include #include #include diff --git a/src/libCom/osi/os/vxWorks/osdThread.c b/src/libCom/osi/os/vxWorks/osdThread.c index 064052ab8..09d451fab 100644 --- a/src/libCom/osi/os/vxWorks/osdThread.c +++ b/src/libCom/osi/os/vxWorks/osdThread.c @@ -3,14 +3,16 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* osi/os/vxWorks/epicsThread.c */ /* Author: Marty Kraimer Date: 25AUG99 */ +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> + #include #include #include