libreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit...
authorAndrew Tridgell <tridge@freebsd.home.tridgell.net>
Tue, 23 Mar 2010 18:06:25 +0000 (05:06 +1100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Nov 2012 11:00:20 +0000 (12:00 +0100)
lib/replace/replace.c
lib/replace/replace.h

index 83966b1b1fedb4a9f8dea41f04ca086b89b15497..b8e4e46c529c0c524e32c18ee41c76e0f3a621ca 100644 (file)
@@ -705,7 +705,7 @@ void *rep_memmem(const void *haystack, size_t haystacklen,
 #endif
 
 #ifndef HAVE_VDPRINTF
-int vdprintf(int fd, const char *format, va_list ap)
+int rep_vdprintf(int fd, const char *format, va_list ap)
 {
        char *s = NULL;
        int ret;
@@ -722,7 +722,7 @@ int vdprintf(int fd, const char *format, va_list ap)
 #endif
 
 #ifndef HAVE_DPRINTF
-int dprintf(int fd, const char *format, ...)
+int rep_dprintf(int fd, const char *format, ...)
 {
        int ret;
        va_list ap;
index baf2368130c6342af2d164c0442a88e5d2d59199..519955294f906a8dc88e98cdd025764a8395f396 100644 (file)
@@ -336,6 +336,16 @@ int rep_dlclose(void *handle);
 /* prototype is in system/network.h */
 #endif
 
+#ifndef HAVE_VDPRINTF
+#define vdprintf rep_vdprintf
+int rep_vdprintf(int fd, const char *format, va_list ap);
+#endif
+
+#ifndef HAVE_DPRINTF
+#define dprintf rep_dprintf
+int rep_dprintf(int fd, const char *format, ...);
+#endif
+
 #ifndef PRINTF_ATTRIBUTE
 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of