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 <micah@cowan.name>
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
2007-10-18 Micah Cowan <micah@cowan.name>
- * 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 <micah@cowan.name>
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 \
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 <config.h>
#endif
Callers below should use malloc. */
#ifndef emacs
-#include "wget.h"
#define malloc xmalloc
#define free xfree
#endif
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#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
+++ /dev/null
-/* 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 <alloca.h>
-#elif defined WINDOWS
-# include <malloc.h>
-# ifndef alloca
-# define alloca _alloca
-# endif
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#else
-# include <stddef.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-void *alloca (size_t);
-#endif
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */
-
-#include "wget.h"
#include "utils.h"
#include "host.h"
#include "connect.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#endif /* HAVE_UNISTD_H */
#include <errno.h>
#include <assert.h>
-
-#include "wget.h"
#include "convert.h"
#include "url.h"
#include "recur.h"
sites that do send Set-Cookie2 also emit Set-Cookie for
compatibility. */
-#include <config.h>
+#include "wget.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <time.h>
-
-#include "wget.h"
#include "utils.h"
#include "hash.h"
#include "cookies.h"
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 <config.h>
+#include "wget.h"
#include <assert.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-
-#include "wget.h"
#include "utils.h"
#include "connect.h"
#include "host.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#endif
#include <errno.h>
#include <time.h>
-
-#include "wget.h"
#include "utils.h"
#include "ftp.h"
#include "url.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "wget.h"
#include "gen-md5.h"
#include "ftp.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#include "wget.h"
#include "utils.h"
#include "url.h"
#include "retr.h"
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 <config.h>
#include "wget.h"
#include "gen-md5.h"
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 <config.h>
+#include "wget.h"
#include <assert.h>
#include <errno.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#include "wget.h"
#include "utils.h"
#include "connect.h"
#include "url.h"
/* With -DSTANDALONE, this file can be compiled outside Wget source
tree. To test, also use -DTEST. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
+#ifndef STANDALONE
+# include "wget.h"
#endif
#include <stdio.h>
#ifndef STANDALONE
/* Get Wget's utility headers. */
-# include "wget.h"
# include "utils.h"
#else
/* Make do without them. */
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include "wget.h"
#include "utils.h"
#include "host.h"
#include "url.h"
/* To test as standalone, compile with `-DSTANDALONE -I.'. You'll
still need Wget headers to compile. */
-#include <config.h>
+#include "wget.h"
#ifdef STANDALONE
# define I_REALLY_WANT_CTYPE_MACROS
#include <string.h>
#include <assert.h>
-#include "wget.h"
#include "html-parse.h"
#ifdef STANDALONE
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "html-parse.h"
#include "url.h"
#include "utils.h"
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 <config.h>
+#include "wget.h"
/* NTLM details:
#include <openssl/md4.h>
#include <openssl/opensslv.h>
-#include "wget.h"
#include "utils.h"
#include "http-ntlm.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
-#include "wget.h"
#include "hash.h"
#include "http.h"
#include "utils.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#endif
#include <assert.h>
-#include "wget.h"
#include "utils.h"
#include "init.h"
#include "host.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include "wget.h"
#include "utils.h"
#include "log.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#include "wget.h"
#include "utils.h"
#include "init.h"
#include "retr.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#define INHIBIT_WRAP /* avoid wrapping of socket, bind, ... */
-#include "wget.h"
#include "utils.h"
#include "url.h"
/* This file used to be kept in synch with the code in Fetchmail, but
the latter has diverged since. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "wget.h"
#include "utils.h"
#include "netrc.h"
#include "init.h"
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 <config.h>
+#include "wget.h"
#include <assert.h>
#include <errno.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#include "wget.h"
#include "utils.h"
#include "connect.h"
#include "url.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#endif
#include <signal.h>
-#include "wget.h"
#include "progress.h"
#include "utils.h"
#include "retr.h"
double secs = ptimer_measure ();
printf ("The loop took %.2fs\n", secs); */
-#include <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
# include <windows.h>
#endif
-#include "wget.h"
#include "ptimer.h"
/* Depending on the OS, one and only one of PTIMER_POSIX,
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "url.h"
#include "recur.h"
#include "utils.h"
res_match_path, res_register_specs, res_get_specs, and
res_retrieve_file. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "utils.h"
#include "hash.h"
#include "url.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#include "wget.h"
#include "utils.h"
#include "retr.h"
#include "progress.h"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "spider.h"
#include "url.h"
#include "utils.h"
#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 <alloca.h>
+#elif defined WINDOWS
+# include <malloc.h>
+# ifndef alloca
+# define alloca _alloca
+# endif
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#else
+# include <stddef.h>
+# 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 <sys/types.h>
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "utils.h"
#include "url.h"
#include "host.h" /* for is_valid_ipv6_address */
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
# define USE_SIGNAL_TIMEOUT
#endif
-#include "wget.h"
#include "utils.h"
#include "hash.h"
#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
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"
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 <config.h>
+#include "wget.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
-#include "wget.h"
#include "xmalloc.h"
#include "hash.h" /* for hash_pointer */