[PATCH] use builtin *printf if necessary

James Peach jpeach at sgi.com
Tue Jul 27 01:55:46 GMT 2004


Hi all,

This patch is (probably) needed for all systems that don't have a
C99/UNIX98 compliant vsnprintf by default. The builtin sm_*printf
were no being called, causing things like talloc_init to fail, with
predictable results.

Patch is against 3.0.5rc1 but is the same for top of tree.

-- 
James Peach | jpeach at sgi.com | SGI Australian Software Group
I don't speak for SGI.
-------------- next part --------------
diff -r -u reference/source/lib/snprintf.c work/source/lib/snprintf.c
--- reference/source/lib/snprintf.c	Fri Jul  9 03:06:13 2004
+++ work/source/lib/snprintf.c	Tue Jul 27 10:37:04 2004
@@ -821,6 +821,7 @@
 {
 	return dopr(str, count, fmt, args);
 }
+#define vsnprintf smb_vsnprintf
 #endif
 
 /* yes this really must be a ||. Don't muck with this (tridge)
@@ -840,6 +841,7 @@
 	va_end(ap);
 	return ret;
 }
+#define snprintf smb_snprintf
 #endif
 
 #endif 


More information about the samba-technical mailing list