Mercurial > hg > octave-kai > gnulib-hg
annotate m4/signal_h.m4 @ 15857:6b8400199763
New module 'sqrtf'.
* lib/math.in.h (sqrtf): New declaration.
* lib/sqrtf.c: New file.
* m4/sqrtf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether sqrtf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_SQRTF, HAVE_SQRTF.
* modules/math (Makefile.am): Substitute GNULIB_SQRTF, HAVE_SQRTF.
* modules/sqrtf: New file.
* tests/test-math-c++.cc: Check the declaration of sqrtf.
* doc/posix-functions/sqrtf.texi: Mention the new module.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 08 Oct 2011 21:16:48 +0200 |
parents | 68596f3bad3e |
children | 8250f2777afc |
rev | line source |
---|---|
15755 | 1 # signal_h.m4 serial 18 |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
13071
diff
changeset
|
2 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. |
8782 | 3 dnl This file is free software; the Free Software Foundation |
4 dnl gives unlimited permission to copy and/or distribute it, | |
5 dnl with or without modifications, as long as this notice is preserved. | |
6 | |
7 AC_DEFUN([gl_SIGNAL_H], | |
8 [ | |
9 AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) | |
15350
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
10 AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) |
14186
cd4635d4dbe6
assume <ctype.h>, ..., <time.h> exist
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
11 gl_NEXT_HEADERS([signal.h]) |
14686
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
12 |
11424
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
13 # AIX declares sig_atomic_t to already include volatile, and C89 compilers |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
14 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile. |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
15 AC_CHECK_TYPE([volatile sig_atomic_t], [], |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
16 [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
17 #include <signal.h> |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
18 ]]) |
14686
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
19 |
15594
f4cfbb6036d8
Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents:
15370
diff
changeset
|
20 dnl Ensure the type pid_t gets defined. |
f4cfbb6036d8
Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents:
15370
diff
changeset
|
21 AC_REQUIRE([AC_TYPE_PID_T]) |
f4cfbb6036d8
Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents:
15370
diff
changeset
|
22 |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
11424
diff
changeset
|
23 AC_REQUIRE([AC_TYPE_UID_T]) |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
24 |
14686
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
25 dnl Persuade glibc <signal.h> to define sighandler_t. |
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
26 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) |
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
27 AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ |
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
28 #include <signal.h> |
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
29 ]]) |
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
30 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
31 dnl Check for declarations of anything we want to poison if the |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
32 dnl corresponding gnulib module is not in use. |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
33 gl_WARN_ON_USE_PREPARE([[#include <signal.h> |
15343
107f8443e77a
pthread_sigmask: new module
Paul Eggert <eggert@cs.ucla.edu>
parents:
14686
diff
changeset
|
34 ]], [pthread_sigmask sigaction |
107f8443e77a
pthread_sigmask: new module
Paul Eggert <eggert@cs.ucla.edu>
parents:
14686
diff
changeset
|
35 sigaddset sigdelset sigemptyset sigfillset sigismember |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
36 sigpending sigprocmask]) |
8782 | 37 ]) |
38 | |
15350
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
39 AC_DEFUN([gl_CHECK_TYPE_SIGSET_T], |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
40 [ |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
41 AC_CHECK_TYPES([sigset_t], |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
42 [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
43 [[ |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
44 #include <signal.h> |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
45 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
46 #include <sys/types.h> |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
47 ]]) |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
48 if test $gl_cv_type_sigset_t != yes; then |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
49 HAVE_SIGSET_T=0 |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
50 fi |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
51 ]) |
f61aaaf49e43
sys_select: define sigset_t more portably
Paul Eggert <eggert@cs.ucla.edu>
parents:
15343
diff
changeset
|
52 |
8782 | 53 AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], |
54 [ | |
55 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | |
56 AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) | |
13066
fc8c984b0733
Factorize common .m4 code.
Bruno Haible <bruno@clisp.org>
parents:
12962
diff
changeset
|
57 gl_MODULE_INDICATOR_SET_VARIABLE([$1]) |
12962
2f466cb40423
Tests of module 'signal' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
58 dnl Define it also as a C macro, for the benefit of the unit tests. |
13071
b2385e7b332e
Distinguish two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents:
13066
diff
changeset
|
59 gl_MODULE_INDICATOR_FOR_TESTS([$1]) |
8782 | 60 ]) |
61 | |
62 AC_DEFUN([gl_SIGNAL_H_DEFAULTS], | |
63 [ | |
15343
107f8443e77a
pthread_sigmask: new module
Paul Eggert <eggert@cs.ucla.edu>
parents:
14686
diff
changeset
|
64 GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) |
15755 | 65 GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE]) |
10483
5a24031ebf7d
Support signal handling with SIGPIPE on native Windows platforms.
Bruno Haible <bruno@clisp.org>
parents:
10321
diff
changeset
|
66 GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) |
8783
bb4e89fdfa87
sigprocmask.h is replaced with <signal.h>.
Bruno Haible <bruno@clisp.org>
parents:
8782
diff
changeset
|
67 GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) |
10229
29502a2dd08a
New module sigaction, for mingw.
Eric Blake <ebb9@byu.net>
parents:
8995
diff
changeset
|
68 GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) |
8782 | 69 dnl Assume proper GNU behavior unless another module says otherwise. |
8783
bb4e89fdfa87
sigprocmask.h is replaced with <signal.h>.
Bruno Haible <bruno@clisp.org>
parents:
8782
diff
changeset
|
70 HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) |
15365
8e2f1d4b9199
pthread_sigmask: Make declaration C++ safe.
Bruno Haible <bruno@clisp.org>
parents:
15350
diff
changeset
|
71 HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) |
15755 | 72 HAVE_RAISE=1; AC_SUBST([HAVE_RAISE]) |
8783
bb4e89fdfa87
sigprocmask.h is replaced with <signal.h>.
Bruno Haible <bruno@clisp.org>
parents:
8782
diff
changeset
|
73 HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) |
10229
29502a2dd08a
New module sigaction, for mingw.
Eric Blake <ebb9@byu.net>
parents:
8995
diff
changeset
|
74 HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) |
29502a2dd08a
New module sigaction, for mingw.
Eric Blake <ebb9@byu.net>
parents:
8995
diff
changeset
|
75 HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) |
10321
a6493a165dd2
c-stack: fix regression on Irix 5.3 from 2008-06-21
Eric Blake <ebb9@byu.net>
parents:
10229
diff
changeset
|
76 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; |
a6493a165dd2
c-stack: fix regression on Irix 5.3 from 2008-06-21
Eric Blake <ebb9@byu.net>
parents:
10229
diff
changeset
|
77 AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) |
11424
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
78 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; |
2b94c0e7849d
signal.h: always support 'volatile sig_atomic_t'
Eric Blake <ebb9@byu.net>
parents:
10483
diff
changeset
|
79 AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) |
14686
e753ffb0501f
signal: Define sighandler_t.
Bruno Haible <bruno@clisp.org>
parents:
14186
diff
changeset
|
80 HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) |
15370
54bbcd9bb255
pthread_sigmask: Fix link requirements on OSF/1 5.1 and with pth.
Bruno Haible <bruno@clisp.org>
parents:
15365
diff
changeset
|
81 REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK]) |
15755 | 82 REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE]) |
8782 | 83 ]) |