Patch for gnome-common/support/vsnprintf.c



Hi,

this is a short patch for DEC OSF/1 (and other systems that
define __STDC__).

Ok to commit?

Martin

-----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier

   baulig@castor.uni-trier.de, http://www.home-of-linux.org/
   Key: 1024-bit key with ID C8178435 created 1997/01/24 
   ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
   Finger me for public key or fetch finger.txt from the url above
------------------------------------------------------------------
? so_locations
? vsnprintf.diff
Index: vsnprintf.c
===================================================================
RCS file: /debian/home/gnomecvs/gnome-common/support/vsnprintf.c,v
retrieving revision 1.4
diff -u -r1.4 vsnprintf.c
--- vsnprintf.c	1998/03/11 22:36:12	1.4
+++ vsnprintf.c	1998/05/19 19:21:56
@@ -97,32 +97,14 @@
 
 int
 #if __STDC__
-snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-snprintf(str, n, fmt, va_alist)
-	char *str;
-	size_t n;
-	char *fmt;
-	va_dcl
-#endif
-{
-	va_list ap;
-#if __STDC__
-	va_start(ap, fmt);
+vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
 #else
-	va_start(ap);
-#endif
-
-	return (vsnprintf(str, n, fmt, ap));
-	va_end(ap);
-}
-
-int
 vsnprintf(str, n, fmt, ap)
 	char *str;
 	size_t n;
 	char *fmt;
 	char *ap;
+#endif
 {
 	struct sigaction osa, nsa;
 	char *p;
@@ -148,4 +130,28 @@
 	(void) sigaction(SIGSEGV, &osa, NULL);
 	return (ret);
 }
+
+int
+#if __STDC__
+snprintf(char *str, size_t n, char const *fmt, ...)
+#else
+snprintf(str, n, fmt, va_alist)
+	char *str;
+	size_t n;
+	char *fmt;
+	va_dcl
+#endif
+{
+	va_list ap;
+#if __STDC__
+	va_start(ap, fmt);
+#else
+	va_start(ap);
+#endif
+
+	return (vsnprintf(str, n, fmt, ap));
+	va_end(ap);
+}
+
+
 

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]