X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrtoumax.c;h=a147604ad2bb32c012a0d56232eb6a7e09c0f48c;hb=559ac9667adc2becf7a2a956f00024b79056469d;hp=26d28ff36f74577e1736de195a926c9ce3ad334e;hpb=59660f86d2a1dd4f248cde28e04b1b0938d42a7c;p=gnulib.git diff --git a/lib/strtoumax.c b/lib/strtoumax.c index 26d28ff36..a147604ad 100644 --- a/lib/strtoumax.c +++ b/lib/strtoumax.c @@ -37,8 +37,18 @@ # endif #endif -#if HAVE_UNSIGNED_LONG_LONG && ! HAVE_STRTOULL - unsigned long long strtoull PARAMS ((char const *, char **, int)); +#ifndef HAVE_DECL_STRTOUL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOUL +unsigned long strtoul PARAMS ((char const *, char **, int)); +#endif + +#ifndef HAVE_DECL_STRTOULL +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG +unsigned long long strtoull PARAMS ((char const *, char **, int)); #endif uintmax_t @@ -56,3 +66,16 @@ strtoumax (char const *ptr, char **endptr, int base) abort (); } + +#ifdef TESTING +# include +int +main () +{ + char *p, *endptr; + printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t)); + printf ("sizeof strtoull(): %d\n", sizeof strtoull(p, &endptr, 10)); + printf ("sizeof strtoul(): %d\n", sizeof strtoul(p, &endptr, 10)); + exit (0); +} +#endif