]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] cmd_bytes now stores wgint, not long.
[wget] / src / wget.h
index e582e0082bfbae696db45119447606aa91c3f1af..aa133ccd540fc12dad60cba5536302922daca829 100644 (file)
@@ -88,7 +88,6 @@ so, delete this exception statement from your version.  */
 
 /* Include these, so random files need not include them.  */
 #include "sysdep.h"
-#include "options.h"
 /* locale independent replacement for ctype.h */
 #include "safe-ctype.h"
 
@@ -101,6 +100,32 @@ so, delete this exception statement from your version.  */
 # 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
+
+#include "options.h"
+
 /* Everything uses this, so include them here directly.  */
 #include "xmalloc.h"
 
@@ -213,7 +238,7 @@ typedef enum
   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,