X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fwget.h;h=c41a6814d30e010d106d2ea5d705027dc20d3b3b;hp=241537a952b650c976828019fd2a3f7bbfff6afe;hb=ef22bf610a448f198419122fec79130d43667d33;hpb=046ff43f1b51fc33cbf7192460e4da2be7323971 diff --git a/src/wget.h b/src/wget.h index 241537a9..c41a6814 100644 --- a/src/wget.h +++ b/src/wget.h @@ -107,6 +107,24 @@ so, delete this exception statement from your version. */ # 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"