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.
This commit is contained in:
Andrew Johnson
2010-08-11 10:45:17 -05:00
parent 0e4ff4f939
commit a0fb7fbed7
7 changed files with 26 additions and 15 deletions

View File

@@ -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.

View File

@@ -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 <string.h>
#include <stdlib.h>
#include <stdio.h>

View File

@@ -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 <vxWorks.h>
#include <stdlib.h>
#include <stdio.h>

View File

@@ -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 <limits.h>
#include <string.h>

View File

@@ -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 <string.h>
#include <stdio.h>
@@ -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 <hostLib.h>
#include <inetLib.h>

View File

@@ -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 <errno.h>
#include <sys/types.h>
@@ -26,8 +29,6 @@ extern "C" {
#include <sockLib.h>
#include <ioLib.h>
#include <sys/ioctl.h>
/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */
#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>

View File

@@ -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 <stddef.h>
#include <string.h>
#include <stdlib.h>