annotate m4/c-strtod.m4 @ 112323:f3056cf0073a

Regenerate.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 11 Jan 2011 22:13:06 -0800
parents f31011c088d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112305
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
1 # c-strtod.m4 serial 12
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3 # Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc.
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 # This file is free software; the Free Software Foundation
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5 # gives unlimited permission to copy and/or distribute it,
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6 # with or without modifications, as long as this notice is preserved.
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8 # Written by Paul Eggert.
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
10 AC_DEFUN([gl_C99_STRTOLD],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 [
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
12 AC_CACHE_CHECK([whether strtold conforms to C99],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
13 [gl_cv_func_c99_strtold],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
14 [AC_LINK_IFELSE(
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
15 [AC_LANG_PROGRAM(
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
16 [[/* On HP-UX before 11.23, strtold returns a struct instead of
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
17 long double. Reject implementations like that, by requiring
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
18 compatibility with the C99 prototype. */
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
19 #include <stdlib.h>
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
20 static long double (*p) (char const *, char **) = strtold;
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
21 static long double
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
22 test (char const *nptr, char **endptr)
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
23 {
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
24 long double r;
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
25 r = strtold (nptr, endptr);
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
26 return r;
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
27 }]],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
28 [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
29 [gl_cv_func_c99_strtold=yes],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
30 [gl_cv_func_c99_strtold=no])])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
31 if test $gl_cv_func_c99_strtold = yes; then
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
32 AC_DEFINE([HAVE_C99_STRTOLD], [1], [Define to 1 if strtold conforms to C99.])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
33 fi
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
34 ])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
35
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
36 AC_DEFUN([gl_C_STRTOD],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37 [
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
38 AC_LIBOBJ([c-strtod])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
39
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
40 dnl Prerequisites of lib/c-strtod.c.
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
41 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
42 AC_CHECK_FUNCS([strtod_l])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
43
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
44 AC_REQUIRE([AC_C_INLINE])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
45 :
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
46 ])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
47
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
48 AC_DEFUN([gl_C_STRTOLD],
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
49 [
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
50 AC_LIBOBJ([c-strtold])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
51
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
52 dnl Prerequisites of lib/c-strtold.c.
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
53 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
54 AC_REQUIRE([gl_C99_STRTOLD])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
55 AC_CHECK_FUNCS([strtold_l])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
56
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
57 AC_REQUIRE([AC_C_INLINE])
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
58 :
f31011c088d9 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
59 ])