# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Mar 3 16:54:03 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sun Mar 5 01:56:20 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
set strtoll d_strtoll
eval $inlibc
+case "$d_longlong-$d_strtoll" in
+"$define-$define")
+ $cat <<EOM
+Checking whether your strtoll() works okay...
+EOM
+ $cat >try.c <<'EOCP'
+#include <errno.h>
+#ifdef __hpux
+#define strtoll __strtoll
+#endif
+#include <stdio.h>
+extern long long int strtoll(char *s, char **, int);
+static int bad = 0;
+int check(char *s, long long ell, int een) {
+ long long gll;
+ errno = 0;
+ gll = strtoll(s, 0, 10);
+ if (!((gll == ell) && (errno == een)))
+ bad++;
+}
+int main() {
+ check(" 1", 1LL, 0);
+ check(" 0", 0LL, 0);
+ check("-1", -1LL, 0);
+ check("-9223372036854775808", -9223372036854775808LL, 0);
+ check("-9223372036854775808", -9223372036854775808LL, 0);
+ check(" 9223372036854775807", 9223372036854775807LL, 0);
+ check("-9223372036854775808", -9223372036854775808LL, 0);
+ check(" 9223372036854775808", 9223372036854775807LL, ERANGE);
+ check("-9223372036854775809", -9223372036854775808LL, ERANGE);
+ if (!bad)
+ printf("ok\n");
+}
+EOCP
+ set try
+ if eval $compile; then
+ case "`./try`" in
+ ok) echo "Your strtoll() seems to be working okay." ;;
+ *) cat <<EOM >&4
+Your strtoll() doesn't seem to be working okay.
+EOM
+ d_strtoll="$undef"
+ ;;
+ esac
+ fi
+ ;;
+esac
+
: see if strtoul exists
set strtoul d_strtoul
eval $inlibc
set strtoull d_strtoull
eval $inlibc
+case "$d_longlong-$d_strtoull" in
+"$define-$define")
+ $cat <<EOM
+Checking whether your strtoull() works okay...
+EOM
+ $cat >try.c <<'EOCP'
+#include <errno.h>
+#ifdef __hpux
+#define strtoull __strtoull
+#endif
+#include <stdio.h>
+extern unsigned long long int strtoull(char *s, char **, int);
+static int bad = 0;
+int check(char *s, long long eull, int een) {
+ long long gull;
+ errno = 0;
+ gull = strtoull(s, 0, 10);
+ if (!((gull == eull) && (errno == een)))
+ bad++;
+}
+int main() {
+ check(" 1", 1LL, 0);
+ check(" 0", 0LL, 0);
+ check("18446744073709551615", 18446744073709551615ULL, 0);
+ check("18446744073709551616", 18446744073709551615ULL, ERANGE);
+ if (!bad)
+ printf("ok\n");
+}
+EOCP
+ set try
+ if eval $compile; then
+ case "`./try`" in
+ ok) echo "Your strtoull() seems to be working okay." ;;
+ *) cat <<EOM >&4
+Your strtoull() doesn't seem to be working okay.
+EOM
+ d_strtoull="$undef"
+ ;;
+ esac
+ fi
+ ;;
+esac
+
: see if strtouq exists
set strtouq d_strtouq
eval $inlibc