From 8e397a26173c9590e703b923e6026f9702a6561c Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 6 Dec 2006 20:29:54 +0000 Subject: [PATCH] Don't define HAVE_AIRPDCAP if HAVE_AIRPCAP isn't defined. Fix a compiler warning in the 802.11 dissector. svn path=/trunk/; revision=20053 --- Makefile.nmake | 3 ++- config.h.win32 | 1 + config.nmake | 4 +++- epan/dissectors/Makefile.nmake | 2 +- epan/dissectors/packet-ieee80211.c | 4 ++-- gtk/Makefile.nmake | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.nmake b/Makefile.nmake index d39cf2a471..96aed8f049 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -13,7 +13,7 @@ LINK= link LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS) -CFLAGS=-DHAVE_CONFIG_H -DHAVE_AIRPDCAP $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \ +CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \ $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \ $(NET_SNMP_CFLAGS) \ $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(LUA_CFLAGS) \ @@ -249,6 +249,7 @@ config.h : config.h.win32 config.nmake -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \ -e "s/@HAVE_LUA_5_1@/$(LUA_VERSION)/" \ -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \ + -e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \ -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \ -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \ -e "s/@HAVE_NET_SNMP@/$(NET_SNMP_CONFIG)/" \ diff --git a/config.h.win32 b/config.h.win32 index be279f80ca..39233043b5 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -62,6 +62,7 @@ @HAVE_LIBWIRESHARKDLL@ @HAVE_AIRPCAP@ +@HAVE_AIRPDCAP@ /* availability of pcap_freecode() is handled at runtime */ #define HAVE_PCAP_FREECODE 1 diff --git a/config.nmake b/config.nmake index e8465c59ba..115ffc5cac 100644 --- a/config.nmake +++ b/config.nmake @@ -237,7 +237,7 @@ GETTEXT_DIR=$(WIRESHARK_LIBS)\gettext-0.14.5 # If you don't have the AirPcap developer's pack, comment this line out, # so that AIRPCAP_DIR isn't defined. # -AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap +#AIRPCAP_DIR=$(WIRESHARK_LIBS)\AirPcap @@ -472,8 +472,10 @@ PANGO_LIB_DIR=1.2.0 !IFDEF AIRPCAP_DIR AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1 +AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1 !ELSE AIRPCAP_CONFIG= +AIRPDCAP_CONFIG= !ENDIF !IFDEF PCAP_DIR diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake index 93ffda6289..d63ebd842f 100644 --- a/epan/dissectors/Makefile.nmake +++ b/epan/dissectors/Makefile.nmake @@ -9,7 +9,7 @@ include ..\..\config.nmake include Makefile.common -CFLAGS=-DHAVE_CONFIG_H -DHAVE_AIRPDCAP /I. /I.. /I../.. $(GLIB_CFLAGS) \ +CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \ $(NET_SNMP_CFLAGS) \ $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \ $(KFW_CFLAGS) \ diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index cc3e0645a8..026ecde8b7 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -3590,8 +3590,8 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo, } /* Davide Schiera (2006-11-21) ------------------------------------- */ /* Davide Schiera (2006-11-27): undefine macros and definitions */ -#undef IS_TKIP(tvb, hdr_len) -#undef IS_CCMP(tvb, hdr_len) +#undef IS_TKIP +#undef IS_CCMP #undef PROTECTION_ALG_CCMP #undef PROTECTION_ALG_TKIP #undef PROTECTION_ALG_WEP diff --git a/gtk/Makefile.nmake b/gtk/Makefile.nmake index 457cf24c72..76283c82b5 100644 --- a/gtk/Makefile.nmake +++ b/gtk/Makefile.nmake @@ -7,7 +7,7 @@ include ..\config.nmake ############### no need to modify below this line ######### -CFLAGS=-DHAVE_CONFIG_H -DHAVE_AIRPDCAP /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \ +CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ /I$(PCAP_DIR)\include $(NET_SNMP_CFLAGS) \