svn commit: samba r18401 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at samba.org tridge at samba.org
Mon Sep 11 21:32:09 GMT 2006


Author: tridge
Date: 2006-09-11 21:32:08 +0000 (Mon, 11 Sep 2006)
New Revision: 18401

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18401

Log:

some of our code also relies on fprintf() handling C99
semantics. Easiest to just replace it if it doesn't.

Modified:
   branches/SAMBA_4_0/source/lib/replace/snprintf.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/snprintf.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/snprintf.c	2006-09-11 21:25:06 UTC (rev 18400)
+++ branches/SAMBA_4_0/source/lib/replace/snprintf.c	2006-09-11 21:32:08 UTC (rev 18401)
@@ -1230,6 +1230,27 @@
 }
 #endif
 
+#ifndef HAVE_C99_VSNPRINTF
+ int fprintf(FILE *stream, const char *fmt, ...)
+{
+	va_list ap;
+	int ret;
+	char *s;
+
+	s = NULL;
+	va_start(ap, fmt);
+	ret = vasprintf(&s, fmt, ap);
+	va_end(ap);
+
+	if (s) {
+		fwrite(s, 1, strlen(s), stream);
+	}
+	free(s);
+
+	return ret;
+}
+#endif
+
 #endif 
 
 #ifndef HAVE_VASPRINTF



More information about the samba-cvs mailing list