Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/nanosleep.m4 @ 14249:52b55b447c02
TYPE_MAXIMUM: avoid theoretically undefined behavior
* lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a
negative number, which the C Standard says has undefined behavior.
In practice this is not a problem, but might as well do it by the book.
Reported by Rich Felker and Eric Blake; see
<http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00493.html>.
* lib/strtol.c (TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
* m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Likewise.
* m4/stdint.m4 (gl_STDINT_H): Likewise.
* lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 29 Jan 2011 23:59:31 -0800 |
parents | 97fc9a21a8fb |
children | a8e98ddfd3a1 |
rev | line source |
---|---|
14249
52b55b447c02
TYPE_MAXIMUM: avoid theoretically undefined behavior
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
1 # serial 33 |
2052 | 2 |
3 dnl From Jim Meyering. | |
2066 | 4 dnl Check for the nanosleep function. |
5 dnl If not found, use the supplied replacement. | |
2052 | 6 dnl |
7 | |
14079
97fc9a21a8fb
maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents:
13918
diff
changeset
|
8 # Copyright (C) 1999-2001, 2003-2011 Free Software Foundation, Inc. |
6671
5a2089992925
* modules/gettime (Depends-on): Add extensions module.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6275
diff
changeset
|
9 |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5016
diff
changeset
|
10 # 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:
5016
diff
changeset
|
11 # 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:
5016
diff
changeset
|
12 # with or without modifications, as long as this notice is preserved. |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5016
diff
changeset
|
13 |
5016
7141ea4946af
Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
Jim Meyering <jim@meyering.net>
parents:
4910
diff
changeset
|
14 AC_DEFUN([gl_FUNC_NANOSLEEP], |
2052 | 15 [ |
6795
9dc5bb3f3359
* lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6744
diff
changeset
|
16 dnl Persuade glibc and Solaris <time.h> to declare nanosleep. |
9dc5bb3f3359
* lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6744
diff
changeset
|
17 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
9dc5bb3f3359
* lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6744
diff
changeset
|
18 |
8276
0ead70460e39
Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
Paul Eggert <eggert@cs.ucla.edu>
parents:
8227
diff
changeset
|
19 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10245
diff
changeset
|
20 AC_CHECK_HEADERS_ONCE([sys/time.h]) |
12328
bf3fd58aaf19
nanosleep: improve port to mingw
Eric Blake <ebb9@byu.net>
parents:
12327
diff
changeset
|
21 AC_REQUIRE([gl_FUNC_SELECT]) |
6795
9dc5bb3f3359
* lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6744
diff
changeset
|
22 |
2491
9108f5af9d61
(jm_FUNC_NANOSLEEP): Save and restore LIBS around
Jim Meyering <jim@meyering.net>
parents:
2267
diff
changeset
|
23 nanosleep_save_libs=$LIBS |
9108f5af9d61
(jm_FUNC_NANOSLEEP): Save and restore LIBS around
Jim Meyering <jim@meyering.net>
parents:
2267
diff
changeset
|
24 |
2065
e1a744db4db5
(jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
Jim Meyering <jim@meyering.net>
parents:
2055
diff
changeset
|
25 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. |
e1a744db4db5
(jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
Jim Meyering <jim@meyering.net>
parents:
2055
diff
changeset
|
26 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. |
12169
d9a855dec815
don't let environment settings perturb build
Jim Meyering <meyering@redhat.com>
parents:
11069
diff
changeset
|
27 LIB_NANOSLEEP= |
12182
8ba00f285749
m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
Jim Meyering <meyering@redhat.com>
parents:
12169
diff
changeset
|
28 AC_SUBST([LIB_NANOSLEEP]) |
4910 | 29 AC_SEARCH_LIBS([nanosleep], [rt posix4], |
30 [test "$ac_cv_search_nanosleep" = "none required" || | |
12169
d9a855dec815
don't let environment settings perturb build
Jim Meyering <meyering@redhat.com>
parents:
11069
diff
changeset
|
31 LIB_NANOSLEEP=$ac_cv_search_nanosleep]) |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
32 if test "x$ac_cv_search_nanosleep" != xno; then |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
33 dnl The system has a nanosleep function. |
2065
e1a744db4db5
(jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
Jim Meyering <jim@meyering.net>
parents:
2055
diff
changeset
|
34 |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
35 AC_REQUIRE([gl_MULTIARCH]) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
36 if test $APPLE_UNIVERSAL_BUILD = 1; then |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
37 # A universal build on Apple MacOS X platforms. |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
38 # The test result would be 'no (mishandles large arguments)' in 64-bit |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
39 # mode but 'yes' in 32-bit mode. But we need a configuration result that |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
40 # is valid in both modes. |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
41 gl_cv_func_nanosleep='no (mishandles large arguments)' |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
42 fi |
11069
8488a80e49bc
nanosleep: skip configure test (fail it) for apple universal builds
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
43 |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
44 AC_CACHE_CHECK([for working nanosleep], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
45 [gl_cv_func_nanosleep], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
46 [ |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
47 AC_RUN_IFELSE( |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
48 [AC_LANG_SOURCE([[ |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
49 #include <errno.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
50 #include <limits.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
51 #include <signal.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
52 #if HAVE_SYS_TIME_H |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
53 #include <sys/time.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
54 #endif |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
55 #include <time.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
56 #include <unistd.h> |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
57 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
58 #define TYPE_MAXIMUM(t) \ |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
59 ((t) (! TYPE_SIGNED (t) \ |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
60 ? (t) -1 \ |
14249
52b55b447c02
TYPE_MAXIMUM: avoid theoretically undefined behavior
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
61 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) |
7237
119870bc83d7
Work around a bug in both the Linux and SunOS 64-bit kernels:
Paul Eggert <eggert@cs.ucla.edu>
parents:
7172
diff
changeset
|
62 |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
63 static void |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
64 check_for_SIGALRM (int sig) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
65 { |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
66 if (sig != SIGALRM) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
67 _exit (1); |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
68 } |
2052 | 69 |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
70 int |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
71 main () |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
72 { |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
73 static struct timespec ts_sleep; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
74 static struct timespec ts_remaining; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
75 static struct sigaction act; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
76 if (! nanosleep) |
13918
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
77 return 2; |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
78 act.sa_handler = check_for_SIGALRM; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
79 sigemptyset (&act.sa_mask); |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
80 sigaction (SIGALRM, &act, NULL); |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
81 ts_sleep.tv_sec = 0; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
82 ts_sleep.tv_nsec = 1; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
83 alarm (1); |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
84 if (nanosleep (&ts_sleep, NULL) != 0) |
13918
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
85 return 3; |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
86 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
87 ts_sleep.tv_nsec = 999999999; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
88 alarm (1); |
13918
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
89 if (nanosleep (&ts_sleep, &ts_remaining) != -1) |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
90 return 4; |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
91 if (errno != EINTR) |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
92 return 5; |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
93 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10) |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
94 return 6; |
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
95 return 0; |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
96 }]])], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
97 [gl_cv_func_nanosleep=yes], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
98 [case $? in dnl ( |
13918
d5a74c6ec06b
Put more information about failed tests into the test return codes.
Bruno Haible <bruno@clisp.org>
parents:
13134
diff
changeset
|
99 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl ( |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
100 *) gl_cv_func_nanosleep=no;; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
101 esac], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
102 [gl_cv_func_nanosleep=cross-compiling]) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
103 ]) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
104 if test "$gl_cv_func_nanosleep" = yes; then |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
105 REPLACE_NANOSLEEP=0 |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
106 else |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
107 REPLACE_NANOSLEEP=1 |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
108 if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
109 AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1], |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
110 [Define to 1 if nanosleep mishandles large arguments.]) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
111 else |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
112 for ac_lib in $LIBSOCKET; do |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
113 case " $LIB_NANOSLEEP " in |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
114 *" $ac_lib "*) ;; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
115 *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
116 esac |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
117 done |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
118 fi |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
119 fi |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
120 else |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
121 HAVE_NANOSLEEP=0 |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
122 fi |
2491
9108f5af9d61
(jm_FUNC_NANOSLEEP): Save and restore LIBS around
Jim Meyering <jim@meyering.net>
parents:
2267
diff
changeset
|
123 LIBS=$nanosleep_save_libs |
13134
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
124 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
125 AC_LIBOBJ([nanosleep]) |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
126 gl_PREREQ_NANOSLEEP |
080377ada58c
nanosleep: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
12559
diff
changeset
|
127 fi |
2052 | 128 ]) |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3486
diff
changeset
|
129 |
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3486
diff
changeset
|
130 # Prerequisites of lib/nanosleep.c. |
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3486
diff
changeset
|
131 AC_DEFUN([gl_PREREQ_NANOSLEEP], |
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3486
diff
changeset
|
132 [ |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10245
diff
changeset
|
133 AC_CHECK_HEADERS_ONCE([sys/select.h]) |
10245
18a5b4f796a2
Update after lib/sig-handler.h is no longer included by lib/sigprocmask.c.
Bruno Haible <bruno@clisp.org>
parents:
10230
diff
changeset
|
134 gl_PREREQ_SIG_HANDLER_H |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3486
diff
changeset
|
135 ]) |