]> sjero.net Git - wget/blobdiff - src/wget.h
[svn] Doc fix.
[wget] / src / wget.h
index 6a0756b0acdda251c883b57e009cc2ff2ba7810e..5abce2779145e5126493d86a95ecc06785c19581 100644 (file)
@@ -1,5 +1,5 @@
 /* Miscellaneous declarations.
-   Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2005 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -14,8 +14,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+along with Wget; if not, write to the Free Software Foundation, Inc.,
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
 In addition, as a special exception, the Free Software Foundation
 gives permission to link the code of its release of Wget with the
@@ -40,6 +40,10 @@ so, delete this exception statement from your version.  */
 # define NDEBUG
 #endif
 
+#if defined HAVE_OPENSSL || defined HAVE_GNUTLS
+# 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 +125,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
@@ -145,9 +160,8 @@ typedef off_t wgint;
    few places in Wget, this is acceptable.)  */
 
 #if SIZEOF_WGINT >= 8
-/* just use wgint, which we already know how to print */
+/* just use wgint */
 typedef wgint SUM_SIZE_INT;
-# define with_thousand_seps_sum with_thousand_seps
 #else
 /* On systems without LFS, use double, which buys us integers up to 2^53. */
 typedef double SUM_SIZE_INT;
@@ -244,7 +258,7 @@ typedef double SUM_SIZE_INT;
 } while (0)
 
 /* Used to print pointers (usually for debugging).  Print pointers
-   using printf ("%0*lx", PTR_FORMAT (p)).  (%p is too unpredictable;
+   using printf ("0x%0*lx", PTR_FORMAT (p)).  (%p is too unpredictable;
    some implementations prepend 0x, while some don't, and most don't
    0-pad the address.)  */
 #define PTR_FORMAT(p) (int) (2 * sizeof (void *)), (unsigned long) (p)