Gisle Vanem <[EMAIL PROTECTED]> writes:

> - Defintion of gai_strerror() needs to be put after the one in
>   <ws2tcpip.h> So either include that in config-compiler.h or
>   move the whole ENABLE_IPV6 section to mswindows.h.

Both solutions kind of defeat the purpose of config-compiler.h, which
is supposed to only list compiler/environment characteristics rather
than actual declarations.

I think I'll make config-compiler.h even more abstract, for example:

// In mingw section
#ifdef ENABLE_IPV6
# define NEED_GAI_STRERROR
#endif

and then in mswindows.h:

#ifdef NEED_GAI_STRERROR
# define gai_strerror windows_strerror
#endif

This is a bit roundabout way of doing things, but it prevents
mswindows.h from being swamped with #ifdef __COMPILER__, but at the
same time allows config-compiler.h to be free from includes.

A similar distinction is made between config.h and sysdep.h in Unix
builds.

> - IMHO, important features should be set in Makefile.  Like
>   -DENABLE_IPV6 and not in .\windows\config.h.

This is somewhat controversial.  Arguments against -D in Makefile are:

* They accumulate easily and can exceed argument size limits on some
  systems and some versions of make.

* Some argue that it is easier to edit config.h and customize the
  defines to your preferences than do the same for Makefiles, which
  frequently pass the includes from top-level to src and such.

Having said that, I will also note that I'm not entirely satisfied
with the current config.h.in.  One problem is that it contains too
many symbols that Wget never uses, automatically inserted by
autoheader.  Another problem is that it confuses at least three
distinct purposes:

The first are system/compiler characteristics.  These should be
editable by advanced users, in case they want to correct a mistake
made by configure.

The second are modifiable symbols that control inclusion of built-in
features, such as ENABLE_DEBUG, ENABLE_OPIE, etc.  Normally defined
via configure, they should be editable by users.

The third are symbols that get defined based on decisions made by
configure.  Editing these is almost useless on its own -- for example,
what good is it to set HAVE_SSL unless you also enable compilation of
openssl.o and friends in Makefile?

>  /* The size of a `long long', as computed by sizeof. */
> -#define SIZEOF_LONG_LONG 0
> +#define SIZEOF_LONG_LONG 8

Note that size 0 means that the compiler doesn't understand long long.
The idea is for the compilers that do have long long to define
SIZEOF_LONG_LONG to actual value in their section of
config-compiler.h.

Reply via email to