Index: demos/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/demos/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- demos/Imakefile	17 Apr 2003 11:48:17 -0000	1.4
+++ demos/Imakefile	17 Apr 2003 13:41:37 -0000
@@ -98,7 +98,7 @@ DEPOBJS		= $(DEPSRCS:.c=.o)
 PROGRAMS	= $(DEMOSRCS:.c=)
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if Solaris64Bit
Index: fd2ps/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/fd2ps/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- fd2ps/Imakefile	17 Apr 2003 11:48:17 -0000	1.4
+++ fd2ps/Imakefile	17 Apr 2003 13:41:37 -0000
@@ -42,7 +42,7 @@ SRCS	= \
 OBJS	= $(SRCS:.c=.o)
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if !defined( PpcDarwinArchitecture )
Index: fdesign/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/fdesign/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- fdesign/Imakefile	17 Apr 2003 11:48:17 -0000	1.4
+++ fdesign/Imakefile	17 Apr 2003 13:41:37 -0000
@@ -60,7 +60,7 @@ SRCS	= \
 OBJS	= $(SRCS:.c=.o)
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if Solaris64Bit
Index: gl/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/gl/Imakefile,v
retrieving revision 1.4
diff -u -p -r1.4 Imakefile
--- gl/Imakefile	17 Apr 2003 11:48:17 -0000	1.4
+++ gl/Imakefile	17 Apr 2003 13:41:38 -0000
@@ -31,7 +31,7 @@ HAVE_STRERROR	= -DHAVE_STRERROR
 #endif
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if defined( PpcDarwinArchitecture )
Index: image/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/image/Imakefile,v
retrieving revision 1.5
diff -u -p -r1.5 Imakefile
--- image/Imakefile	17 Apr 2003 11:48:17 -0000	1.5
+++ image/Imakefile	17 Apr 2003 13:41:38 -0000
@@ -58,7 +58,7 @@ HAVE_STRERROR	= -DHAVE_STRERROR
 #endif
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if NonstandardXpm
Index: lib/Imakefile
===================================================================
RCS file: /cvsroot/xforms/xforms/lib/Imakefile,v
retrieving revision 1.5
diff -u -p -r1.5 Imakefile
--- lib/Imakefile	17 Apr 2003 12:45:12 -0000	1.5
+++ lib/Imakefile	17 Apr 2003 13:41:40 -0000
@@ -113,7 +113,7 @@ HAVE_STRERROR	= -DHAVE_STRERROR
 #endif
 
 #if HaveSnprintf
-HAVE_SNPRINTF	= -DHAVE_SNPRINTF
+HAVE_SNPRINTF	= -DHAVE_SNPRINTF -DHAVE_DECL_SNPRINTF -DHAVE_DECL_VSNPRINTF
 #endif
 
 #if NonstandardXpm
Index: lib/flsnprintf.c
===================================================================
RCS file: /cvsroot/xforms/xforms/lib/flsnprintf.c,v
retrieving revision 1.1
diff -u -p -r1.1 flsnprintf.c
--- lib/flsnprintf.c	17 Apr 2003 09:04:57 -0000	1.1
+++ lib/flsnprintf.c	17 Apr 2003 13:41:44 -0000
@@ -321,11 +321,9 @@ int vasnprintf (char **ptr, size_t str_m
 #endif
 
 #if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
-static int
-portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
+int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
 #if !defined(NEED_SNPRINTF_ONLY)
-static int
-portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
+int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
 #endif
 #endif
 
@@ -447,8 +445,7 @@ int vasnprintf (char **ptr, size_t str_m
 #if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF)
 
 #if !defined(NEED_SNPRINTF_ONLY)
-static int
-portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) {
+int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) {
   va_list ap;
   int str_l;
 
@@ -460,11 +457,9 @@ portable_snprintf(char *str, size_t str_
 #endif
 
 #if defined(NEED_SNPRINTF_ONLY)
-static int
-portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) {
+int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...) {
 #else
-static int
-portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
+int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
 #endif
 
 #if defined(NEED_SNPRINTF_ONLY)
@@ -846,25 +841,3 @@ portable_vsnprintf(char *str, size_t str
                       written to the buffer if it were large enough */
 }
 #endif
-
-/* added by Angus Leeming, the xforms project */
-#if defined(HAVE_SNPRINTF)
-#define portable_snprintf snprintf
-#define portable_vsnprintf vsnprintf
-#endif
-
- int fl_snprintf(char *str, size_t str_m, const char *fmt, ...)
-{
-    int result;
-    va_list args;
-    va_start(args, fmt);
-    result = portable_vsnprintf(str, str_m, fmt, args);
-    va_end(args);
-    return result;
-}
-
-
-int fl_vsnprintf(char *str, size_t str_m, const char *fmt, va_list args)
-{
-    return portable_vsnprintf(str, str_m, fmt, args);
-}
Index: lib/private/flsnprintf.h
===================================================================
RCS file: /cvsroot/xforms/xforms/lib/private/flsnprintf.h,v
retrieving revision 1.1
diff -u -p -r1.1 flsnprintf.h
--- lib/private/flsnprintf.h	17 Apr 2003 13:12:47 -0000	1.1
+++ lib/private/flsnprintf.h	17 Apr 2003 13:41:47 -0000
@@ -26,10 +26,28 @@
 #ifndef FL_SNPRINTF_H
 #define FL_SNPRINTF_H
 
-#include <stdarg.h>
-#include <sys/types.h>
+#include <stdio.h>
 
-int fl_snprintf(char *, size_t, const char *, ...);
-int fl_vsnprintf(char *, size_t, const char *, va_list);
+#ifdef HAVE_SNPRINTF
+
+#ifndef HAVE_DECL_SNPRINTF
+int snprintf(char *, size_t, const char *, ...);
+#endif
+#ifndef HAVE_DECL_VSNPRINTF
+int vsnprintf(char *, size_t, const char *, va_list);
+#endif
+
+#define fl_snprintf  snprintf
+#define fl_vsnprintf vsnprintf
+
+#else /* HAVE_SNPRINTF */
+
+int portable_snprintf(char *, size_t, const char *, ...);
+int portable_vsnprintf(char *, size_t, const char *, va_list);
+
+#define fl_snprintf  portable_snprintf
+#define fl_vsnprintf portable_vsnprintf
+
+#endif /* HAVE_SNPRINTF */
 
 #endif /* NOT FL_SNPRINTF_H */


