From b4971b39bf3df9edcdd6778c37cf667bd437cf92 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 27 Feb 2002 09:42:52 +0000 Subject: 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 --- epan/Makefile.nmake | 7 ++++++- epan/configure.in | 16 ++++++++++++---- epan/dfilter/Makefile.nmake | 7 ++++++- epan/ftypes/Makefile.nmake | 7 ++++++- 4 files changed, 30 insertions(+), 7 deletions(-) (limited to 'epan') 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 -- cgit v1.2.3