From: Bruno Haible Date: Fri, 29 Aug 2003 20:18:02 +0000 (+0000) Subject: Portability tweaks for NetBSD. X-Git-Tag: v0.13~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a324d5d9597175c48f9e6884881afa1b1397de2;p=thirdparty%2Fgettext.git Portability tweaks for NetBSD. --- diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index 9e8ce65b1..052969ed6 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,8 @@ +2003-08-29 Bruno Haible + + * vasnprintf.c: Test HAVE_DECL__SNPRINTF instead of HAVE__SNPRINTF. + Test HAVE_DECL__SNWPRINTF instead of HAVE__SNWPRINTF. + 2003-08-24 Bruno Haible * vasnprintf.c (local_wcslen): Protect against multiple definition. diff --git a/gettext-runtime/libasprintf/configure.ac b/gettext-runtime/libasprintf/configure.ac index 7e9e1e6a7..e4c7f31bd 100644 --- a/gettext-runtime/libasprintf/configure.ac +++ b/gettext-runtime/libasprintf/configure.ac @@ -68,7 +68,8 @@ AC_EGREP_CPP([Need own alloca], [ ALLOCA_H=) AC_SUBST([ALLOCA_H]) -AC_CHECK_FUNCS([snprintf vasprintf wcslen _snprintf]) +AC_CHECK_FUNCS([snprintf vasprintf wcslen]) +AC_CHECK_DECLS([_snprintf]) gt_PRINTF_POSIX dnl Check for tools needed for formatting the documentation. diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c index 28938549f..7a46ca99a 100644 --- a/gettext-runtime/libasprintf/vasnprintf.c +++ b/gettext-runtime/libasprintf/vasnprintf.c @@ -88,7 +88,7 @@ local_wcslen (const wchar_t *s) # 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 @@ -102,8 +102,8 @@ local_wcslen (const wchar_t *s) # 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