+2003-08-29 Bruno Haible <bruno@clisp.org>
+
+ * vasnprintf.c: Test HAVE_DECL__SNPRINTF instead of HAVE__SNPRINTF.
+ Test HAVE_DECL__SNWPRINTF instead of HAVE__SNWPRINTF.
+ * printf.c: Likewise.
+
2003-08-27 Bruno Haible <bruno@clisp.org>
* Makefile.in (install-exec): Fix the 2003-04-06 patch.
#if HAVE_SNPRINTF
-# if HAVE__SNPRINTF
+# if HAVE_DECL__SNPRINTF
/* Windows. */
# define system_vsnprintf _vsnprintf
# else
#include "asnprintf.c"
#endif
-# if HAVE__SNWPRINTF
+# if HAVE_DECL__SNWPRINTF
/* Windows. */
# define system_vswprintf _vsnwprintf
# else
# define DIRECTIVES wchar_t_directives
# define PRINTF_PARSE wprintf_parse
# define USE_SNPRINTF 1
-# if HAVE__SNWPRINTF
+# if HAVE_DECL__SNWPRINTF
/* On Windows, the function swprintf() has a different signature than
on Unix; we use the _snwprintf() function instead. */
# define SNPRINTF _snwprintf
# define DIRECTIVE char_directive
# define DIRECTIVES char_directives
# define PRINTF_PARSE printf_parse
-# define USE_SNPRINTF (HAVE__SNPRINTF || HAVE_SNPRINTF)
-# if HAVE__SNPRINTF
+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
+# if HAVE_DECL__SNPRINTF
/* Windows. */
# define SNPRINTF _snprintf
# else
+2003-08-29 Bruno Haible <bruno@clisp.org>
+
+ * gettext.m4 (AM_INTL_SUBDIR): Test whether _snprintf and _snwprintf
+ are declared, not only existent as functions.
+
2003-08-24 Bruno Haible <bruno@clisp.org>
* gettext.m4 (AM_INTL_SUBDIR): Also check for _snprintf, _snwprintf.
-# gettext.m4 serial 24 (gettext-0.12.2)
+# gettext.m4 serial 25 (gettext-0.12.2)
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([asprintf getcwd getegid geteuid getgid getuid mempcpy \
munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup strtoul \
-tsearch wcslen wprintf _snprintf _snwprintf __argz_count __argz_stringify \
-__argz_next __fsetlocking])
+tsearch wcslen wprintf __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
dnl Use the *_unlocked functions only if they are declared.
dnl (because some of them were defined without being declared in Solaris