Mercurial > gnulib
annotate m4/vsnprintf.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 |
---|---|
15340
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
1 # vsnprintf.m4 serial 6 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16201
diff
changeset
|
2 dnl Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5340
diff
changeset
|
3 dnl 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:
5340
diff
changeset
|
4 dnl 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:
5340
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
5340 | 6 |
15340
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
7 dnl Libintl 0.17 will replace vsnprintf only if it does not support %1$s, |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
8 dnl but defers to any gnulib vsnprintf replacements. Therefore, gnulib |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
9 dnl must guarantee that the decision for replacing vsnprintf is a superset |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
10 dnl of the reasons checked by libintl. |
5340 | 11 AC_DEFUN([gl_FUNC_VSNPRINTF], |
12 [ | |
8211
a7182ec8249f
vsnprintf.h is replaced with <stdio.h>.
Bruno Haible <bruno@clisp.org>
parents:
5611
diff
changeset
|
13 AC_REQUIRE([gl_STDIO_H_DEFAULTS]) |
9940
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
14 gl_cv_func_vsnprintf_usable=no |
8363
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
15 AC_CHECK_FUNCS([vsnprintf]) |
9940
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
16 if test $ac_cv_func_vsnprintf = yes; then |
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
17 gl_SNPRINTF_SIZE1 |
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
18 case "$gl_cv_func_snprintf_size1" in |
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
19 *yes) |
14003
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
20 gl_SNPRINTF_RETVAL_C99 |
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
21 case "$gl_cv_func_snprintf_retval_c99" in |
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
22 *yes) |
15340
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
23 gl_PRINTF_POSITIONS |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
24 case "$gl_cv_func_printf_positions" in |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
25 *yes) |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
26 gl_cv_func_vsnprintf_usable=yes |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
27 ;; |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
14079
diff
changeset
|
28 esac |
14003
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
29 ;; |
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
30 esac |
9940
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
31 ;; |
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
32 esac |
0471a8660b70
Work around snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
8368
diff
changeset
|
33 fi |
9959 | 34 if test $gl_cv_func_vsnprintf_usable = no; then |
8363
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
35 gl_REPLACE_VSNPRINTF |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
36 fi |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
37 AC_CHECK_DECLS_ONCE([vsnprintf]) |
8211
a7182ec8249f
vsnprintf.h is replaced with <stdio.h>.
Bruno Haible <bruno@clisp.org>
parents:
5611
diff
changeset
|
38 if test $ac_cv_have_decl_vsnprintf = no; then |
a7182ec8249f
vsnprintf.h is replaced with <stdio.h>.
Bruno Haible <bruno@clisp.org>
parents:
5611
diff
changeset
|
39 HAVE_DECL_VSNPRINTF=0 |
a7182ec8249f
vsnprintf.h is replaced with <stdio.h>.
Bruno Haible <bruno@clisp.org>
parents:
5611
diff
changeset
|
40 fi |
8363
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
41 ]) |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
42 |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
43 AC_DEFUN([gl_REPLACE_VSNPRINTF], |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
44 [ |
8368
0a5e8b4fe214
Fix last commit: Require gl_STDIO_H_DEFAULTS.
Bruno Haible <bruno@clisp.org>
parents:
8363
diff
changeset
|
45 AC_REQUIRE([gl_STDIO_H_DEFAULTS]) |
8363
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
46 AC_LIBOBJ([vsnprintf]) |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
47 if test $ac_cv_func_vsnprintf = yes; then |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
48 REPLACE_VSNPRINTF=1 |
b55fb0efed6d
New module 'vsnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
8211
diff
changeset
|
49 fi |
5340 | 50 gl_PREREQ_VSNPRINTF |
51 ]) | |
52 | |
53 # Prerequisites of lib/vsnprintf.c. | |
54 AC_DEFUN([gl_PREREQ_VSNPRINTF], [:]) |