Mercurial > gnulib
annotate m4/c-strtod.m4 @ 17363:5a51fb7777a9
sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
Problem reported by Marco Atzeri in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>.
* lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
Simply delegate to the system <sys/select.h> in this case too.
Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
be needed on Solaris either.
* lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
Simply delgate to the system <sys/time.h> in this case.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 19 Mar 2013 09:08:47 -0700 |
parents | e542fd46ad6f |
children | 344018b6e5d7 |
rev | line source |
---|---|
17184
dcca7ac14066
c-strtod, memcoll, readutmp: no 'static inline'
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
1 # c-strtod.m4 serial 15 |
5114 | 2 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
17184
diff
changeset
|
3 # Copyright (C) 2004-2006, 2009-2013 Free Software Foundation, Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5558
diff
changeset
|
4 # This file is free software; the Free Software Foundation |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5558
diff
changeset
|
5 # gives unlimited permission to copy and/or distribute it, |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5558
diff
changeset
|
6 # with or without modifications, as long as this notice is preserved. |
5114 | 7 |
8 # Written by Paul Eggert. | |
9 | |
5558
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
10 AC_DEFUN([gl_C99_STRTOLD], |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
11 [ |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
12 AC_CACHE_CHECK([whether strtold conforms to C99], |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
13 [gl_cv_func_c99_strtold], |
6808
c0801910bd92
* c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
Paul Eggert <eggert@cs.ucla.edu>
parents:
5721
diff
changeset
|
14 [AC_LINK_IFELSE( |
5558
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
15 [AC_LANG_PROGRAM( |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
16 [[/* On HP-UX before 11.23, strtold returns a struct instead of |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
17 long double. Reject implementations like that, by requiring |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
18 compatibility with the C99 prototype. */ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
19 #include <stdlib.h> |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
20 static long double (*p) (char const *, char **) = strtold; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
21 static long double |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
22 test (char const *nptr, char **endptr) |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
23 { |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
24 long double r; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
25 r = strtold (nptr, endptr); |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
26 return r; |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11072
diff
changeset
|
27 }]], |
5558
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
28 [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
29 [gl_cv_func_c99_strtold=yes], |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
30 [gl_cv_func_c99_strtold=no])]) |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
31 if test $gl_cv_func_c99_strtold = yes; then |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7172
diff
changeset
|
32 AC_DEFINE([HAVE_C99_STRTOLD], [1], [Define to 1 if strtold conforms to C99.]) |
5558
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
33 fi |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
34 ]) |
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
35 |
15188
b17e131e479b
c-strtod: Move AC_LIBOBJ invocations to module description.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
36 dnl Prerequisites of lib/c-strtod.c. |
5114 | 37 AC_DEFUN([gl_C_STRTOD], |
38 [ | |
39 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | |
13877
5fb52cb372b0
c-strtold: Avoid link error on AIX 7.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
40 AC_CHECK_FUNCS([strtod_l]) |
5114 | 41 ]) |
42 | |
15189
baa289766f6b
c-strtold: Move AC_LIBOBJ invocations to module description.
Bruno Haible <bruno@clisp.org>
parents:
15188
diff
changeset
|
43 dnl Prerequisites of lib/c-strtold.c. |
5114 | 44 AC_DEFUN([gl_C_STRTOLD], |
45 [ | |
6912 | 46 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
5558
6260000d86d2
(gl_C99_STRTOLD): New macro.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5114
diff
changeset
|
47 AC_REQUIRE([gl_C99_STRTOLD]) |
13877
5fb52cb372b0
c-strtold: Avoid link error on AIX 7.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
48 AC_CHECK_FUNCS([strtold_l]) |
5114 | 49 ]) |