]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] Abort configure if --with-ssl given but SSL unavailable. Use HAVE_LIBSSL
[wget] / src / wget.h
index 7ab17b7c8c75b29871a1df9efdd10bdfddaa4169..bfcaf8dd44c22ad7d514648d421325344e90577b 100644 (file)
@@ -40,6 +40,11 @@ so, delete this exception statement from your version.  */
 # define NDEBUG
 #endif
 
+/* Is OpenSSL or GNUTLS available? */
+#if defined HAVE_LIBSSL || defined HAVE_LIBGNUTLS
+# define HAVE_SSL
+#endif
+
 /* `gettext (FOO)' is long to write, so we use `_(FOO)'.  If NLS is
    unavailable, _(STRING) simply returns STRING.  */
 #ifdef HAVE_NLS
@@ -121,20 +126,31 @@ so, delete this exception statement from your version.  */
 #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 */
+/* Pick the strtol-like function that will work with wgint.  */
 # 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
+#  ifdef HAVE_STRTOLL
+#   define str_to_wgint strtoll
+#  elif defined HAVE_STRTOIMAX /* HPUX 11.0 has strtoimax, but no strtoll */
+#   define str_to_wgint strtoimax
+#  else
+#   define str_to_wgint strtoll
+#   define NEED_STRTOLL
+#   define strtoll_type long long
+#  endif
 # endif
+#endif /* not WINDOWS */
+
+/* Declare our strtoll replacement. */
+#ifdef NEED_STRTOLL
+strtoll_type strtoll (const char *, char **, int);
 #endif
 
-/* Now define a large integral type useful for storing sizes of *sums*
+/* Now define a large numeric 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
    file support.  (It is useful to limit Wget's download quota to say