]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] If strtoll is not present, check for strtoimax and use it where available.
[wget] / src / wget.h
index 8c76282c6345a4336a4c0308722717559dddc062..c312471d0b391b479ce5a3d4003dd21ff93ab4c6 100644 (file)
@@ -133,11 +133,24 @@ typedef off_t wgint;
 #  define str_to_wgint strtol
 #  define WGINT_MAX LONG_MAX
 # else
-#  define str_to_wgint strtoll
 #  define WGINT_MAX LLONG_MAX
+#  ifdef HAVE_STRTOLL
+#   define str_to_wgint strtoll
+#  elif HAVE_STRTOIMAX
+#   define str_to_wgint strtoimax
+#  else
+#   define str_to_wgint strtoll
+#   define NEED_STRTOLL
+#   define strtoll_return long long
+#  endif
 # endif
 #endif
 
+/* Declare our strtoll replacement. */
+#ifdef NEED_STRTOLL
+strtoll_return strtoll (const char *, char **, int);
+#endif
+
 /* Now define a large integral type useful for storing sizes of *sums*
    of downloads, such as the value of the --quota option.  This should
    be a type able to hold 2G+ values even on systems without large