# define NDEBUG
#endif
-/* Define this if you want primitive but extensive malloc debugging.
- It will make Wget extremely slow, so only do it in development
- builds. */
-#undef DEBUG_MALLOC
-
#ifndef PARAMS
# if PROTOTYPES
# define PARAMS(args) args
# define _(string) (string)
#endif /* not HAVE_NLS */
-/* No-op version of gettext, used for constant strings. */
-#define N_(string) (string)
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code. The purpose
+ of the N_("...") call is to make the message snarfer aware that the
+ "..." string needs to be translated. STRING should be a string
+ literal. Concatenated strings and other string expressions won't
+ work. The macro's expansion is not parenthesized, so that it is
+ suitable as initializer for static 'char[]' or 'const char[]'
+ variables. -- explanation partly taken from GNU make. */
+#define N_(string) string
/* I18N NOTE: You will notice that none of the DEBUGP messages are
marked as translatable. This is intentional, for a few reasons:
# define DEBUGP(x) DO_NOTHING
#endif /* not ENABLE_DEBUG */
+#ifdef __GNUC__
+# define GCC_FORMAT_ATTR(a, b) __attribute__ ((format (printf, a, b)))
+#else /* not __GNUC__ */
+# define GCC_FORMAT_ATTR(a, b)
+#endif /* not __GNUC__ */
+
+/* Define an integer type that works for LFS. off_t would be perfect
+ for this, but off_t is always 32-bit under Windows. */
+#ifndef WINDOWS
+typedef off_t wgint;
+# define SIZEOF_WGINT SIZEOF_OFF_T
+#endif
+
+/* Define a strtol/strtoll clone that works with wgint. */
+#ifndef str_to_wgint /* mswindows.h defines its own alias */
+# if SIZEOF_WGINT == SIZEOF_LONG
+# define str_to_wgint strtol
+# define WGINT_MAX LONG_MAX
+# else
+# define str_to_wgint strtoll
+# define WGINT_MAX LLONG_MAX
+# endif
+#endif
+
/* Everything uses this, so include them here directly. */
#include "xmalloc.h"
{
NOCONERROR, HOSTERR, CONSOCKERR, CONERROR, CONSSLERR,
CONIMPOSSIBLE, NEWLOCATION, NOTENOUGHMEM, CONPORTERR,
- BINDERR, BINDOK, LISTENERR, ACCEPTERR, ACCEPTOK,
- CONCLOSED, FTPOK, FTPLOGINC, FTPLOGREFUSED, FTPPORTERR,
+ CONCLOSED, FTPOK, FTPLOGINC, FTPLOGREFUSED, FTPPORTERR, FTPSYSERR,
FTPNSFOD, FTPRETROK, FTPUNKNOWNTYPE, FTPRERR,
FTPREXC, FTPSRVERR, FTPRETRINT, FTPRESTFAIL, URLERROR,
- FOPENERR, FWRITEERR, HOK, HLEXC, HEOF,
+ FOPENERR, FOPEN_EXCL_ERR, FWRITEERR, HOK, HLEXC, HEOF,
HERR, RETROK, RECLEVELEXC, FTPACCDENIED, WRONGCODE,
FTPINVPASV, FTPNOPASV,
CONTNOTSUPPORTED, RETRUNNEEDED, RETRFINISHED, READERR, TRYLIMEXC,
SSLERRCERTFILE,SSLERRCERTKEY,SSLERRCTXCREATE
} uerr_t;
-/* In case old systems don't have EAFNOSUPPORT, which we use below. */
-#ifndef EAFNOSUPPORT
-# define EAFNOSUPPORT EINVAL
-#endif
-
-#define CONNECT_ERROR(err) (( (err) == EAFNOSUPPORT \
- || (err) == EINVAL \
- || ((err) == ECONNREFUSED \
- && !opt.retry_connrefused)) \
- ? CONIMPOSSIBLE : CONERROR)
-
#endif /* WGET_H */