Ethereal-dev: RE: [Ethereal-dev] Conversion of @foo@ macros in config.h.win32

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Thu, 11 Nov 2004 22:42:10 -0800 (PST)
Bryan Miller said:
> Only 6 of the 55 #defines in config.h are "escaped" with the caret token

When we build with MSVC++ 6.0, *NO* #defines in config.h are escaped.

> and the remaining 49 work fine with nmake.  What, if anything is special
> about those six?

Those six are generated by the "config.h" rule in Makefile.nmake, using a
makefile variable set in config.nmake, rather than being copied from
config.h.win32.  Therefore, the # has to be quoted in config.nmake, so
that the variables will be set to values such as "#define HAVE_LIBPCAP 1"
rather than to a null string, so that

    #define HAVE_LIBPCAP 1

rather than a blank line will be inserted into config.h.

If

    ^#define HAVE_LIBPCAP 1

appears in config.h, this is the result of an incompatibility with MSVC++
6.0 nmake in whatever make tool is being used.

> Usually, I see the caret token used in makefiles and not in header
> files, hence my question.

The caret token *is* used in a Makefile (config.nmake); it does not appear
in a header file if you are using a make tool compatible with MSVC++ 6.0's
nmake.

> Opus make with the /EN switch is meant to be nmake compatible

If using Opus make causes

    ^#define HAVE_LIBPCAP 1

and the like to appear in config.h, then, even if it is meant to be
nmake-compatible, it's not.  Report that as a bug to the people who
produce it, and cite the MSDN page I mentioned as a reference.