tags 364629 + patch thanks I have attached a patch that fixes this bug.
-Roberto -- Roberto C. Sanchez http://familiasanchez.net/~roberto
diff -ur xosview-1.8.2.old/config/configure.in xosview-1.8.2/config/configure.in
--- xosview-1.8.2.old/config/configure.in 2006-05-13 16:25:08.000000000
-0400
+++ xosview-1.8.2/config/configure.in 2006-05-13 17:06:58.893427257 -0400
@@ -10,6 +10,74 @@
ICE_CXX_LONG_LONG
AC_PATH_X
CXXFLAGS="$CXXFLAGS -I$x_includes"
+
+dnl
+dnl Added a proper check for the snprintf() function
+dnl
+
+AC_DEFUN([AC_FUNC_SNPRINTF],
+[AC_CHECK_FUNCS(snprintf vsnprintf)
+AC_MSG_CHECKING(for working snprintf)
+AC_CACHE_VAL(ac_cv_have_working_snprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+
+int main(void)
+{
+ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+ int i;
+ i = snprintf (bufs, 2, "%s", "111");
+ if (strcmp (bufs, "1")) exit (1);
+ if (i != 3) exit (1);
+ i = snprintf (bufd, 2, "%d", 111);
+ if (strcmp (bufd, "1")) exit (1);
+ if (i != 3) exit (1);
+ exit(0);
+}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no,
ac_cv_have_working_snprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_snprintf])
+AC_MSG_CHECKING(for working vsnprintf)
+AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
+[AC_TRY_RUN(
+[#include <stdio.h>
+#include <stdarg.h>
+
+int my_vsnprintf (char *buf, const char *tmpl, ...)
+{
+ int i;
+ va_list args;
+ va_start (args, tmpl);
+ i = vsnprintf (buf, 2, tmpl, args);
+ va_end (args);
+ return i;
+}
+
+int main(void)
+{
+ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
+ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
+ int i;
+ i = my_vsnprintf (bufs, "%s", "111");
+ if (strcmp (bufs, "1")) exit (1);
+ if (i != 3) exit (1);
+ i = my_vsnprintf (bufd, "%d", 111);
+ if (strcmp (bufd, "1")) exit (1);
+ if (i != 3) exit (1);
+ exit(0);
+}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no,
ac_cv_have_working_vsnprintf=cross)])
+AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
+if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf !=
"xyesyes"; then
+ AC_LIBOBJ(snprintf)
+ AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from
http://www.ijs.si/software/snprintf/.])
+ AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if
system (v)snprintf is broken")
+fi])
+
+AC_FUNC_SNPRINTF
+
+dnl
+dnl End snprintf() check
+dnl
+
case $host_os in
linux*)
LIBS="-L$x_libraries $LIBS"
diff -ur xosview-1.8.2.old/debian/changelog xosview-1.8.2/debian/changelog
--- xosview-1.8.2.old/debian/changelog 2006-05-13 16:25:08.000000000 -0400
+++ xosview-1.8.2/debian/changelog 2006-05-13 17:01:29.000000000 -0400
@@ -1,3 +1,12 @@
+xosview (1.8.2-8.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Added portable check for snprintf to configure.in using code from
+ file:///usr/share/doc/autoconf-archive/htmldoc/ac_func_snprintf.html.
+ (Closes: #364629)
+
+ -- Roberto C. Sanchez <[EMAIL PROTECTED]> Sat, 13 May 2006 16:59:23 -0400
+
xosview (1.8.2-8) unstable; urgency=low
* Substituted build-dependency on xlibs-dev for its component packages
signature.asc
Description: OpenPGP digital signature

