On May 30, 2011, at 3:08 PM, Anders Broman wrote:
> Looking into the first problem
> .c:15542:19: error: ânum_wepkeysâ undeclared (first use in this function)
> It only happens inside of #ifdef HAVE_AIRPDCAP which is defined on Windows and all the buildbots
> hence no one discovered the problem until now. I suspect the other problems are similar.
> I'm not sure if Guys comment in the bug
> "The decryption code should be supported on all platforms;" implies that we could get rid of that #ifdef
> Perhaps Cmake needs to check for the availability of AIRPDCAP.
configure.in says
#
# Define HAVE_AIRPDCAP
# We'll want to remove this eventually.
#
AC_DEFINE(HAVE_AIRPDCAP, 1, [Enable AirPDcap (WPA/WPA2 decryption)])
so HAVE_AIRPDCAP is forcibly defined on all platforms if autoconf is being used.
For Windows, config.nmake currently does
!IFDEF AIRPCAP_DIR
AIRPCAP_CONFIG=^#define HAVE_AIRPCAP 1
AIRPDCAP_CONFIG=^#define HAVE_AIRPDCAP 1
#AIRPCAP_CFLAGS=/I$(AIRPCAP_DIR)\include
!ELSE
AIRPCAP_CONFIG=
AIRPDCAP_CONFIG=
!ENDIF
but, unless AirPcap somehow requires it, I don't see why it bases the setting of HAVE_AIRPDCAP on whether you have AirPcap-without-a-D. Perhaps, originally, the AirPDCap stuff was part of a library for Windows that was part of the AirPcap stuff, but I think it's now part of the standard epan crypto stuff.
So I'd vote for getting rid of the HAVE_AIRPDCAP #define (and unconditionally include all that code), get rid of the stuff in configure.in to set it, get rid of the stuff in config.nmake and config.h.win32 for it, and not do anything with it in CMake.