From 212396c7e1de6592294f92230254afdfd553843c Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Thu, 18 Oct 2007 20:50:40 -0700 Subject: [PATCH] Eschew config-post.h. --- ChangeLog | 2 ++ configure.ac | 3 -- src/ChangeLog | 13 +++++++- src/Makefile.am | 2 +- src/alloca.c | 3 +- src/cmpt.c | 4 +-- src/config-post.h | 79 ----------------------------------------------- src/connect.c | 4 +-- src/convert.c | 4 +-- src/cookies.c | 4 +-- src/ftp-basic.c | 4 +-- src/ftp-ls.c | 4 +-- src/ftp-opie.c | 3 +- src/ftp.c | 3 +- src/gen-md5.c | 1 - src/gnutls.c | 3 +- src/hash.c | 5 ++- src/host.c | 3 +- src/html-parse.c | 3 +- src/html-url.c | 3 +- src/http-ntlm.c | 3 +- src/http.c | 3 +- src/init.c | 3 +- src/log.c | 3 +- src/main.c | 3 +- src/mswindows.c | 3 +- src/netrc.c | 5 +-- src/openssl.c | 3 +- src/progress.c | 3 +- src/ptimer.c | 3 +- src/recur.c | 3 +- src/res.c | 5 +-- src/retr.c | 3 +- src/spider.c | 3 +- src/sysdep.h | 72 ++++++++++++++++++++++++++++++++++++++++++ src/url.c | 3 +- src/utils.c | 3 +- src/wget.h | 8 +++-- src/xmalloc.c | 3 +- 39 files changed, 125 insertions(+), 160 deletions(-) delete mode 100644 src/config-post.h diff --git a/ChangeLog b/ChangeLog index 7ede8309..e53dea30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ some point other than autoreconf. * Makefile.am: Put autogen.sh back in EXTRA_DIST. Just in case someone needs to rebuild configure. + * configure.ac: Removed config-post.h inclusion from bottom of + generated config.h. 2007-10-16 Micah Cowan diff --git a/configure.ac b/configure.ac index f61baa11..7ae240e2 100644 --- a/configure.ac +++ b/configure.ac @@ -458,7 +458,4 @@ AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in tests/Makefile tests/WgetTest.pm lib/Makefile windows/Makefile]) AC_CONFIG_HEADERS([src/config.h]) -AH_BOTTOM([ -#include "config-post.h" -]) AC_OUTPUT diff --git a/src/ChangeLog b/src/ChangeLog index 7fdcb2b6..6622308d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,17 @@ 2007-10-18 Micah Cowan - * Makefile.am: version.c should not be distributed. + * Makefile.am: version.c should not be distributed. Removed + config-post.h. + * sysdep.h: Got contents of config-post.h + * config-post.h: Removed. + * wget.h: #include "config.h". + * alloca.c, cmpt.c, connect.c, convert.c, cookies.c, + ftp-basic.c, ftp-ls.c, ftp-opie.c, ftp.c, gen-md5.c, gnutls.c, + hash.c, host.c, html-parse.c, html-url.c, http-ntlm.c, http.c, + init.c, log.c, main.c, mswindows.c, netrc.c, openssl.c, + progress.c, ptimer.c, recur.c, res.c, retr.c, spider.c, url.c, + utils.c, xmalloc.c: Use wget.h at very top, and instead of + config.h. 2007-10-15 Micah Cowan diff --git a/src/Makefile.am b/src/Makefile.am index 0c203f5c..f1049efa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,7 +39,7 @@ wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c ftp-basic.c \ init.c log.c main.c netrc.c progress.c ptimer.c recur.c \ res.c retr.c snprintf.c spider.c url.c \ utils.c xmalloc.c \ - config-post.h connect.h convert.h cookies.h \ + connect.h convert.h cookies.h \ ftp.h gen-md5.h hash.h host.h html-parse.h \ http.h http-ntlm.h init.h log.h mswindows.h netrc.h \ options.h progress.h ptimer.h recur.h res.h retr.h \ diff --git a/src/alloca.c b/src/alloca.c index 27228303..fd08295c 100644 --- a/src/alloca.c +++ b/src/alloca.c @@ -21,6 +21,8 @@ allocating any. It is a good idea to use alloca(0) in your main control loop, etc. to force garbage collection. */ +#include "wget.h" + #ifdef HAVE_CONFIG_H #include #endif @@ -88,7 +90,6 @@ typedef char *pointer; Callers below should use malloc. */ #ifndef emacs -#include "wget.h" #define malloc xmalloc #define free xfree #endif diff --git a/src/cmpt.c b/src/cmpt.c index 291056a4..ff60842d 100644 --- a/src/cmpt.c +++ b/src/cmpt.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -40,8 +40,6 @@ so, delete this exception statement from your version. */ #include -#include "wget.h" - /* Some systems lack certain functions normally taken for granted. For example, Windows doesn't have strptime, and some systems don't have a usable fnmatch. This file should contain fallback diff --git a/src/config-post.h b/src/config-post.h deleted file mode 100644 index f3cbec3c..00000000 --- a/src/config-post.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Some autoconf-unrelated preprocessor magic that needs to be done - *before* including the system includes and therefore cannot belong - in sysdep.h. - - Everything else related to system tweaking belongs to sysdep.h. - - This file is included at the bottom of config.h. */ - -/* Testing for __sun is not enough because it's also defined on SunOS. */ -#ifdef __sun -# ifdef __SVR4 -# define solaris -# endif -#endif - -/* The "namespace tweaks" below attempt to set a friendly "compilation - environment" under popular operating systems. Default compilation - environment often means that some functions that are "extensions" - are not declared -- `strptime' is one example. - - But non-default environments can expose bugs in the system header - files, crippling compilation in _very_ non-obvious ways. Because - of that, we define them only on well-tested architectures where we - know they will work. */ - -#undef NAMESPACE_TWEAKS - -#ifdef solaris -# define NAMESPACE_TWEAKS -#endif - -#ifdef __linux__ -# define NAMESPACE_TWEAKS -#endif - -#ifdef NAMESPACE_TWEAKS - -/* Request the "Unix 98 compilation environment". */ -#define _XOPEN_SOURCE 500 - -/* For Solaris: request everything else that is available and doesn't - conflict with the above. */ -#define __EXTENSIONS__ - -/* For Linux: request features of 4.3BSD and SVID (System V Interface - Definition). */ -#define _SVID_SOURCE -#define _BSD_SOURCE - -/* Under glibc-based systems we want all GNU extensions as well. This - declares some unnecessary cruft, but also useful functions such as - timegm, FNM_CASEFOLD extension to fnmatch, memrchr, etc. */ -#define _GNU_SOURCE - -#endif /* NAMESPACE_TWEAKS */ - - -/* Alloca declaration, based on recommendation in the Autoconf manual. - These have to be after the above namespace tweaks, but before any - non-preprocessor code. */ - -#if HAVE_ALLOCA_H -# include -#elif defined WINDOWS -# include -# ifndef alloca -# define alloca _alloca -# endif -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif diff --git a/src/connect.c b/src/connect.c index 6664c0af..19cca823 100644 --- a/src/connect.c +++ b/src/connect.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -50,8 +50,6 @@ so, delete this exception statement from your version. */ #ifdef HAVE_SYS_SELECT_H # include #endif /* HAVE_SYS_SELECT_H */ - -#include "wget.h" #include "utils.h" #include "host.h" #include "connect.h" diff --git a/src/convert.c b/src/convert.c index 8f04ed0c..e706154d 100644 --- a/src/convert.c +++ b/src/convert.c @@ -26,7 +26,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -36,8 +36,6 @@ so, delete this exception statement from your version. */ #endif /* HAVE_UNISTD_H */ #include #include - -#include "wget.h" #include "convert.h" #include "url.h" #include "recur.h" diff --git a/src/cookies.c b/src/cookies.c index 0f54f665..9045e83b 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -42,7 +42,7 @@ so, delete this exception statement from your version. */ sites that do send Set-Cookie2 also emit Set-Cookie for compatibility. */ -#include +#include "wget.h" #include #include @@ -50,8 +50,6 @@ so, delete this exception statement from your version. */ #include #include #include - -#include "wget.h" #include "utils.h" #include "hash.h" #include "cookies.h" diff --git a/src/ftp-basic.c b/src/ftp-basic.c index 4920f725..4e91a7e3 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,8 +38,6 @@ so, delete this exception statement from your version. */ #ifdef HAVE_UNISTD_H # include #endif - -#include "wget.h" #include "utils.h" #include "connect.h" #include "host.h" diff --git a/src/ftp-ls.c b/src/ftp-ls.c index b056572e..35350bb1 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -37,8 +37,6 @@ so, delete this exception statement from your version. */ #endif #include #include - -#include "wget.h" #include "utils.h" #include "ftp.h" #include "url.h" diff --git a/src/ftp-opie.c b/src/ftp-opie.c index 2159298a..713e14c0 100644 --- a/src/ftp-opie.c +++ b/src/ftp-opie.c @@ -27,13 +27,12 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include #include -#include "wget.h" #include "gen-md5.h" #include "ftp.h" diff --git a/src/ftp.c b/src/ftp.c index 302714af..04d24076 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -39,7 +39,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "url.h" #include "retr.h" diff --git a/src/gen-md5.c b/src/gen-md5.c index 8003c979..1e97277b 100644 --- a/src/gen-md5.c +++ b/src/gen-md5.c @@ -27,7 +27,6 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include #include "wget.h" #include "gen-md5.h" diff --git a/src/gnutls.c b/src/gnutls.c index 92c07807..a7c253f1 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -26,7 +26,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -39,7 +39,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "connect.h" #include "url.h" diff --git a/src/hash.c b/src/hash.c index cb65c7f7..e3fac111 100644 --- a/src/hash.c +++ b/src/hash.c @@ -30,8 +30,8 @@ so, delete this exception statement from your version. */ /* With -DSTANDALONE, this file can be compiled outside Wget source tree. To test, also use -DTEST. */ -#ifdef HAVE_CONFIG_H -# include +#ifndef STANDALONE +# include "wget.h" #endif #include @@ -42,7 +42,6 @@ so, delete this exception statement from your version. */ #ifndef STANDALONE /* Get Wget's utility headers. */ -# include "wget.h" # include "utils.h" #else /* Make do without them. */ diff --git a/src/host.c b/src/host.c index f6b0f163..60da2541 100644 --- a/src/host.c +++ b/src/host.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -48,7 +48,6 @@ so, delete this exception statement from your version. */ #include -#include "wget.h" #include "utils.h" #include "host.h" #include "url.h" diff --git a/src/html-parse.c b/src/html-parse.c index a72688e3..b98843e3 100644 --- a/src/html-parse.c +++ b/src/html-parse.c @@ -88,7 +88,7 @@ so, delete this exception statement from your version. */ /* To test as standalone, compile with `-DSTANDALONE -I.'. You'll still need Wget headers to compile. */ -#include +#include "wget.h" #ifdef STANDALONE # define I_REALLY_WANT_CTYPE_MACROS @@ -99,7 +99,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "html-parse.h" #ifdef STANDALONE diff --git a/src/html-url.c b/src/html-url.c index 6a96f6c2..3ab7f7fe 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -35,7 +35,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "html-parse.h" #include "url.h" #include "utils.h" diff --git a/src/http-ntlm.c b/src/http-ntlm.c index 5ca8e85c..6109ed9d 100644 --- a/src/http-ntlm.c +++ b/src/http-ntlm.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" /* NTLM details: @@ -44,7 +44,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "http-ntlm.h" diff --git a/src/http.c b/src/http.c index e6f48aa2..5a746da4 100644 --- a/src/http.c +++ b/src/http.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -40,7 +40,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "hash.h" #include "http.h" #include "utils.h" diff --git a/src/init.c b/src/init.c index 8000d73c..71a5ecec 100644 --- a/src/init.c +++ b/src/init.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -42,7 +42,6 @@ so, delete this exception statement from your version. */ #endif #include -#include "wget.h" #include "utils.h" #include "init.h" #include "host.h" diff --git a/src/log.c b/src/log.c index 5cce3513..357925d3 100644 --- a/src/log.c +++ b/src/log.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -39,7 +39,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "log.h" diff --git a/src/main.c b/src/main.c index 4c1a70e2..7e36e5d8 100644 --- a/src/main.c +++ b/src/main.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -43,7 +43,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "init.h" #include "retr.h" diff --git a/src/mswindows.c b/src/mswindows.c index 1bf8df93..2844c025 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,7 +38,6 @@ so, delete this exception statement from your version. */ #define INHIBIT_WRAP /* avoid wrapping of socket, bind, ... */ -#include "wget.h" #include "utils.h" #include "url.h" diff --git a/src/netrc.c b/src/netrc.c index 485e0757..c50b2581 100644 --- a/src/netrc.c +++ b/src/netrc.c @@ -29,16 +29,13 @@ so, delete this exception statement from your version. */ /* This file used to be kept in synch with the code in Fetchmail, but the latter has diverged since. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include "wget.h" #include #include #include #include -#include "wget.h" #include "utils.h" #include "netrc.h" #include "init.h" diff --git a/src/openssl.c b/src/openssl.c index aa44cbaa..296463f9 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -28,7 +28,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -42,7 +42,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "connect.h" #include "url.h" diff --git a/src/progress.c b/src/progress.c index 6dd96018..debd03e8 100644 --- a/src/progress.c +++ b/src/progress.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,7 +38,6 @@ so, delete this exception statement from your version. */ #endif #include -#include "wget.h" #include "progress.h" #include "utils.h" #include "retr.h" diff --git a/src/ptimer.c b/src/ptimer.c index 33ed913f..bce8a3e5 100644 --- a/src/ptimer.c +++ b/src/ptimer.c @@ -49,7 +49,7 @@ so, delete this exception statement from your version. */ double secs = ptimer_measure (); printf ("The loop took %.2fs\n", secs); */ -#include +#include "wget.h" #include #include @@ -70,7 +70,6 @@ so, delete this exception statement from your version. */ # include #endif -#include "wget.h" #include "ptimer.h" /* Depending on the OS, one and only one of PTIMER_POSIX, diff --git a/src/recur.c b/src/recur.c index 87440b41..8d7b0940 100644 --- a/src/recur.c +++ b/src/recur.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,7 +38,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "url.h" #include "recur.h" #include "utils.h" diff --git a/src/res.c b/src/res.c index 0aea66f3..1f46f6d1 100644 --- a/src/res.c +++ b/src/res.c @@ -66,9 +66,7 @@ so, delete this exception statement from your version. */ res_match_path, res_register_specs, res_get_specs, and res_retrieve_file. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include "wget.h" #include #include @@ -76,7 +74,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "hash.h" #include "url.h" diff --git a/src/retr.c b/src/retr.c index 3234286b..53bc5ee3 100644 --- a/src/retr.c +++ b/src/retr.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,7 +38,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "retr.h" #include "progress.h" diff --git a/src/spider.c b/src/spider.c index 37122ad1..391efc28 100644 --- a/src/spider.c +++ b/src/spider.c @@ -26,13 +26,12 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include #include -#include "wget.h" #include "spider.h" #include "url.h" #include "utils.h" diff --git a/src/sysdep.h b/src/sysdep.h index 9f775ce7..580e3d55 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -33,6 +33,78 @@ so, delete this exception statement from your version. */ #ifndef SYSDEP_H #define SYSDEP_H +/* Testing for __sun is not enough because it's also defined on SunOS. */ +#ifdef __sun +# ifdef __SVR4 +# define solaris +# endif +#endif + +/* The "namespace tweaks" below attempt to set a friendly "compilation + environment" under popular operating systems. Default compilation + environment often means that some functions that are "extensions" + are not declared -- `strptime' is one example. + + But non-default environments can expose bugs in the system header + files, crippling compilation in _very_ non-obvious ways. Because + of that, we define them only on well-tested architectures where we + know they will work. */ + +#undef NAMESPACE_TWEAKS + +#ifdef solaris +# define NAMESPACE_TWEAKS +#endif + +#ifdef __linux__ +# define NAMESPACE_TWEAKS +#endif + +#ifdef NAMESPACE_TWEAKS + +/* Request the "Unix 98 compilation environment". */ +#define _XOPEN_SOURCE 500 + +/* For Solaris: request everything else that is available and doesn't + conflict with the above. */ +#define __EXTENSIONS__ + +/* For Linux: request features of 4.3BSD and SVID (System V Interface + Definition). */ +#define _SVID_SOURCE +#define _BSD_SOURCE + +/* Under glibc-based systems we want all GNU extensions as well. This + declares some unnecessary cruft, but also useful functions such as + timegm, FNM_CASEFOLD extension to fnmatch, memrchr, etc. */ +#define _GNU_SOURCE + +#endif /* NAMESPACE_TWEAKS */ + + +/* Alloca declaration, based on recommendation in the Autoconf manual. + These have to be after the above namespace tweaks, but before any + non-preprocessor code. */ + +#if HAVE_ALLOCA_H +# include +#elif defined WINDOWS +# include +# ifndef alloca +# define alloca _alloca +# endif +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +#endif + /* Must include these, so we can test for the missing stat macros and define them as necessary. */ #include diff --git a/src/url.c b/src/url.c index 31dc09f6..2f6dc784 100644 --- a/src/url.c +++ b/src/url.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -38,7 +38,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "utils.h" #include "url.h" #include "host.h" /* for is_valid_ipv6_address */ diff --git a/src/utils.c b/src/utils.c index 003b3640..5e31e0e1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -80,7 +80,6 @@ so, delete this exception statement from your version. */ # define USE_SIGNAL_TIMEOUT #endif -#include "wget.h" #include "utils.h" #include "hash.h" diff --git a/src/wget.h b/src/wget.h index 9d302064..8dcb9f04 100644 --- a/src/wget.h +++ b/src/wget.h @@ -35,6 +35,11 @@ so, delete this exception statement from your version. */ #ifndef WGET_H #define WGET_H +#include "config.h" + +/* Include these, so random files need not include them. */ +#include "sysdep.h" + /* Disable assertions when debug support is not compiled in. */ #ifndef ENABLE_DEBUG # define NDEBUG @@ -76,9 +81,6 @@ so, delete this exception statement from your version. */ debug problems with Wget. If I get them in a language I don't understand, debugging will become a new challenge of its own! */ - -/* Include these, so random files need not include them. */ -#include "sysdep.h" /* locale independent replacement for ctype.h */ #include "c-ctype.h" diff --git a/src/xmalloc.c b/src/xmalloc.c index b003373b..ac80fb38 100644 --- a/src/xmalloc.c +++ b/src/xmalloc.c @@ -27,7 +27,7 @@ modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ -#include +#include "wget.h" #include #include @@ -35,7 +35,6 @@ so, delete this exception statement from your version. */ #include #include -#include "wget.h" #include "xmalloc.h" #include "hash.h" /* for hash_pointer */ -- 2.39.2