diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-27 09:42:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-27 09:42:52 +0000 |
commit | b4971b39bf3df9edcdd6778c37cf667bd437cf92 (patch) | |
tree | 7d61dda2c3a822cfc6971bd47bf643aaf6b79427 | |
parent | cbf5c537c4e0ad18f3363815c89e71511a3d3fd7 (diff) | |
download | wireshark-b4971b39bf3df9edcdd6778c37cf667bd437cf92.tar.gz wireshark-b4971b39bf3df9edcdd6778c37cf667bd437cf92.tar.bz2 wireshark-b4971b39bf3df9edcdd6778c37cf667bd437cf92.zip |
From Joerg Mayer:
In the "configure.in" files, add
-D_U_="__attribute__((unused))"
to CFLAGS if we're using GCC, and add
-D_U_=""
otherwise, so _U_ can be used to mark arguments as unused.
Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works
with Microsoft Visual C++ as well.
Add comments and RCS IDs to the Makefile.nmake files that don't already
have them.
svn path=/trunk/; revision=4824
-rw-r--r-- | AUTHORS | 3 | ||||
-rw-r--r-- | Makefile.nmake | 4 | ||||
-rw-r--r-- | configure.in | 16 | ||||
-rw-r--r-- | epan/Makefile.nmake | 7 | ||||
-rw-r--r-- | epan/configure.in | 16 | ||||
-rw-r--r-- | epan/dfilter/Makefile.nmake | 7 | ||||
-rw-r--r-- | epan/ftypes/Makefile.nmake | 7 | ||||
-rw-r--r-- | gtk/Makefile.nmake | 7 | ||||
-rw-r--r-- | plugins/Makefile.nmake | 4 | ||||
-rw-r--r-- | plugins/giop/Makefile.nmake | 4 | ||||
-rw-r--r-- | plugins/gryphon/Makefile.nmake | 4 | ||||
-rw-r--r-- | plugins/mgcp/Makefile.nmake | 4 | ||||
-rwxr-xr-x | tools/Makefile.nmake | 4 | ||||
-rw-r--r-- | tools/lemon/Makefile.nmake | 6 | ||||
-rw-r--r-- | wiretap/Makefile.nmake | 4 | ||||
-rw-r--r-- | wiretap/configure.in | 16 |
16 files changed, 84 insertions, 29 deletions
@@ -84,6 +84,9 @@ Joerg Mayer <jmayer[AT]loplof.de> { Remove trailing blanks from hex dump in print/Tethereal Remove unused variables and declarations of non-existent functions + In configure scripts, if the compiler is GCC, add to CFLAGS a -D + flag to define _U_ as something that marks an argument + unused in GCC, and as nothing for other compilers } Martin Maciaszek <fastjack[AT]i-s-o.net> { diff --git a/Makefile.nmake b/Makefile.nmake index 272faeb0db..2455b94a03 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -1,7 +1,7 @@ ## Makefile for building ethereal.exe with Microsoft C and nmake ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake # -# $Id: Makefile.nmake,v 1.171 2002/02/17 00:16:19 guy Exp $ +# $Id: Makefile.nmake,v 1.172 2002/02/27 09:42:38 guy Exp $ include config.nmake include <win32.mak> @@ -15,7 +15,7 @@ LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS) CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) /I$(GLIB_DIR) /I$(GLIB_DIR)\gmodule \ /I$(GTK_DIR) /I. /Iwiretap /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)/include + /I$(PCAP_DIR)/include -D_U_="" CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/configure.in b/configure.in index cf38a334fd..34ebff63a0 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.153 2002/02/05 18:39:05 gram Exp $ +# $Id: configure.in,v 1.154 2002/02/27 09:42:38 guy Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -51,12 +51,20 @@ AC_SUBST(HAVE_SVR4_PACKAGING) AC_ETHEREAL_RPM_CHECK AC_SUBST(HAVE_RPM) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# +# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add +# '-D_U_="__attribute__((unused))"' as well, for future use when we +# remove '-Wno-unused'. +# +# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function +# argument will compile with non-GCC compilers. +# +AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS" AC_MSG_RESULT(yes) else + CFLAGS="-D_U_=\"\" $CFLAGS" AC_MSG_RESULT(no) fi diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index b165a1b8b5..1f1dbe97a4 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -1,3 +1,8 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.22 2002/02/27 09:42:39 guy Exp $ + include ..\config.nmake ############### no need to modify below this line ######### @@ -5,7 +10,7 @@ include ..\config.nmake CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/epan/configure.in b/epan/configure.in index e54f0519ae..4ff6b554eb 100644 --- a/epan/configure.in +++ b/epan/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.19 2002/02/02 22:27:44 gerald Exp $ +# $Id: configure.in,v 1.20 2002/02/27 09:42:39 guy Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -29,12 +29,20 @@ AC_PATH_PROG(LEX, flex) AC_SUBST(FLEX_PATH) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# +# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add +# '-D_U_="__attribute__((unused))"' as well, for future use when we +# remove '-Wno-unused'. +# +# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function +# argument will compile with non-GCC compilers. +# +AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS" AC_MSG_RESULT(yes) else + CFLAGS="-D_U_=\"\" $CFLAGS" AC_MSG_RESULT(no) fi diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake index 161d0374a4..e8105fbf11 100644 --- a/epan/dfilter/Makefile.nmake +++ b/epan/dfilter/Makefile.nmake @@ -1,3 +1,8 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.8 2002/02/27 09:42:41 guy Exp $ + include ..\..\config.nmake ############### no need to modify below this line ######### @@ -7,7 +12,7 @@ LEMON=..\..\tools\lemon CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I..\.. /I$(LEMON) \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)\gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/epan/ftypes/Makefile.nmake b/epan/ftypes/Makefile.nmake index a802286070..0fe6ba167e 100644 --- a/epan/ftypes/Makefile.nmake +++ b/epan/ftypes/Makefile.nmake @@ -1,3 +1,8 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.4 2002/02/27 09:42:42 guy Exp $ + include ..\..\config.nmake ############### no need to modify below this line ######### @@ -5,7 +10,7 @@ include ..\..\config.nmake CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../.. \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/gtk/Makefile.nmake b/gtk/Makefile.nmake index 9f6f07a291..171ea6a08b 100644 --- a/gtk/Makefile.nmake +++ b/gtk/Makefile.nmake @@ -1,3 +1,8 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.26 2002/02/27 09:42:43 guy Exp $ + include ..\config.nmake ############### no need to modify below this line ######### @@ -7,7 +12,7 @@ CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/plugins/Makefile.nmake b/plugins/Makefile.nmake index ee5ea02043..cc6042b7fe 100644 --- a/plugins/Makefile.nmake +++ b/plugins/Makefile.nmake @@ -1,5 +1,5 @@ # -# $Id: Makefile.nmake,v 1.12 2002/01/21 07:37:45 guy Exp $ +# $Id: Makefile.nmake,v 1.13 2002/02/27 09:42:44 guy Exp $ # include ..\config.nmake @@ -9,7 +9,7 @@ include ..\config.nmake CFLAGS=/DHAVE_CONFIG_H /I.. /I../wiretap /I. \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) OBJECTS=plugin_api.obj diff --git a/plugins/giop/Makefile.nmake b/plugins/giop/Makefile.nmake index 12d6ed1686..73e838168b 100644 --- a/plugins/giop/Makefile.nmake +++ b/plugins/giop/Makefile.nmake @@ -1,5 +1,5 @@ # -# $Id: Makefile.nmake,v 1.5 2002/01/21 07:37:46 guy Exp $ +# $Id: Makefile.nmake,v 1.6 2002/02/27 09:42:46 guy Exp $ # include ..\..\config.nmake @@ -9,7 +9,7 @@ include ..\..\config.nmake CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) OBJECTS=packet-cosnaming.obj packet-coseventcomm.obj diff --git a/plugins/gryphon/Makefile.nmake b/plugins/gryphon/Makefile.nmake index 768c014077..07b4e122d6 100644 --- a/plugins/gryphon/Makefile.nmake +++ b/plugins/gryphon/Makefile.nmake @@ -1,5 +1,5 @@ # -# $Id: Makefile.nmake,v 1.7 2002/01/21 07:37:48 guy Exp $ +# $Id: Makefile.nmake,v 1.8 2002/02/27 09:42:47 guy Exp $ # include ..\..\config.nmake @@ -9,7 +9,7 @@ include ..\..\config.nmake CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) OBJECTS=packet-gryphon.obj diff --git a/plugins/mgcp/Makefile.nmake b/plugins/mgcp/Makefile.nmake index a925755d83..5092aca329 100644 --- a/plugins/mgcp/Makefile.nmake +++ b/plugins/mgcp/Makefile.nmake @@ -1,5 +1,5 @@ # -# $Id: Makefile.nmake,v 1.4 2002/01/21 07:37:49 guy Exp $ +# $Id: Makefile.nmake,v 1.5 2002/02/27 09:42:48 guy Exp $ # include ..\..\config.nmake @@ -9,7 +9,7 @@ include ..\..\config.nmake CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap \ /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \ /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \ - /I$(PCAP_DIR)\include $(LOCAL_CFLAGS) + /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) OBJECTS=packet-mgcp.obj diff --git a/tools/Makefile.nmake b/tools/Makefile.nmake index 9f78b6ccc7..6e1585d80a 100755 --- a/tools/Makefile.nmake +++ b/tools/Makefile.nmake @@ -1,3 +1,7 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.3 2002/02/27 09:42:49 guy Exp $ all: lemon diff --git a/tools/lemon/Makefile.nmake b/tools/lemon/Makefile.nmake index a98eba4fd9..2f098dfa93 100644 --- a/tools/lemon/Makefile.nmake +++ b/tools/lemon/Makefile.nmake @@ -1,7 +1,11 @@ +## Makefile for building ethereal.exe with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id: Makefile.nmake,v 1.8 2002/02/27 09:42:51 guy Exp $ include ..\..\config.nmake -CFLAGS=$(LOCAL_CFLAGS) +CFLAGS=-D_U_="" $(LOCAL_CFLAGS) .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/wiretap/Makefile.nmake b/wiretap/Makefile.nmake index 34d8ffd860..4cfdd46d13 100644 --- a/wiretap/Makefile.nmake +++ b/wiretap/Makefile.nmake @@ -1,5 +1,5 @@ # -# $Id: Makefile.nmake,v 1.24 2001/12/12 01:29:13 guy Exp $ +# $Id: Makefile.nmake,v 1.25 2002/02/27 09:42:52 guy Exp $ # include ..\config.nmake @@ -7,7 +7,7 @@ include <win32.mak> ############### no need to modify below this line ######### -CFLAGS=-DHAVE_CONFIG_H /I$(GLIB_DIR) /I$(ZLIB_DIR) $(LOCAL_CFLAGS) +CFLAGS=-DHAVE_CONFIG_H /I$(GLIB_DIR) /I$(ZLIB_DIR) -D_U_="" $(LOCAL_CFLAGS) .c.obj:: $(CC) $(cvarsdll) $(CFLAGS) -Fd.\ -c $< diff --git a/wiretap/configure.in b/wiretap/configure.in index 8b64c969cb..e3431e5615 100644 --- a/wiretap/configure.in +++ b/wiretap/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.35 2002/02/06 09:58:30 guy Exp $ +# $Id: configure.in,v 1.36 2002/02/27 09:42:52 guy Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -28,12 +28,20 @@ AC_PATH_PROG(LEX, flex) AC_SUBST(FLEX_PATH) -# If we're running gcc, add '-Wall' to CFLAGS. -AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS) +# +# If we're running gcc, add '-Wall -W -Wno-unused' to CFLAGS, and add +# '-D_U_="__attribute__((unused))"' as well, for future use when we +# remove '-Wno-unused'. +# +# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function +# argument will compile with non-GCC compilers. +# +AC_MSG_CHECKING(to see if we can add '-Wall -W -Wno-unused' to CFLAGS) if test x$GCC != x ; then - CFLAGS="-Wall -W -Wno-unused $CFLAGS" + CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wno-unused $CFLAGS" AC_MSG_RESULT(yes) else + CFLAGS="-D_U_=\"\" $CFLAGS" AC_MSG_RESULT(no) fi |