BUG/PATCH: Problem compile Samba with sfio

Mattias Gronlund Mattias.Gronlund at sa.erisoft.se
Thu Apr 13 12:34:34 GMT 2000


Hi,

In case someone tries to compile SAMBA with SFIO, to get more FILE:s on
som OS:es, there is a problem when using gcc, because SFIO declare:s printf
as a #define, and the format function get the wrong parameter.
This patch uses the other name that format accepts for printf namely __printf__
and enables compiling that way.

This might be useful for a lot of ClearCase users...

Shouldn't there be a check in the configure scritpt for SFIO, so that when compiling
on eg. Solaris configure prints a BIG warning against compiling without it?

/Mattias
-------------- next part --------------
diff -ru ./source/include/smb.h ../samba-2.0.7pre3-epl2/source/include/smb.h
--- ./source/include/smb.h	Thu Mar 16 23:59:13 2000
+++ ../samba-2.0.7pre3-epl2/source/include/smb.h	Tue Apr 11 12:55:53 2000
@@ -71,12 +71,12 @@
 #ifdef HAVE_STDARG_H
 int  Debug1( char *, ... )
 #ifdef __GNUC__
-     __attribute__ ((format (printf, 1, 2)))
+     __attribute__ ((format (__printf__, 1, 2)))
 #endif
 ;
 BOOL dbgtext( char *, ... )
 #ifdef __GNUC__
-     __attribute__ ((format (printf, 1, 2)))
+     __attribute__ ((format (__printf__, 1, 2)))
 #endif
 ;
 #else
@@ -1461,7 +1464,7 @@
 #ifdef HAVE_STDARG_H
 int slprintf(char *str, int n, char *format, ...)
 #ifdef __GNUC__
-     __attribute__ ((format (printf, 3, 4)))
+     __attribute__ ((format (__printf__, 3, 4)))
 #endif
 ;
 #else


More information about the samba-technical mailing list