X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fwget.h;h=1ac6eccb0ebdbdd018ec82756d592f0a28e3e533;hb=50d143f3fefbcb343d4d1968d4f9d0d59178ce3f;hp=edc159900a63fd04dabfa07d3acc087acc2fe549;hpb=1cfde0c27dfb57320a2fc44df50c3731336e4c33;p=wget diff --git a/src/wget.h b/src/wget.h index edc15990..1ac6eccb 100644 --- a/src/wget.h +++ b/src/wget.h @@ -101,6 +101,30 @@ 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 + /* Everything uses this, so include them here directly. */ #include "xmalloc.h" @@ -213,7 +237,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, @@ -223,15 +247,4 @@ typedef enum SSLERRCERTFILE,SSLERRCERTKEY,SSLERRCTXCREATE } uerr_t; -/* Whether the connection was unsuccessful or impossible. If the - connection is considered impossible (e.g. for unsupported socket - family errors), there is no sense in retrying. "Connection - refused" is normally not retried, except when opt.retry_connrefused - is specified. */ - -#define CONNECT_ERROR(err) ((unsupported_socket_family_error (err) \ - || ((err) == ECONNREFUSED \ - && !opt.retry_connrefused)) \ - ? CONIMPOSSIBLE : CONERROR) - #endif /* WGET_H */