libreplace: fixed declaration of dprintf() on FreeBSD
authorAndrew Tridgell <tridge@freebsd.home.tridgell.net>
Tue, 23 Mar 2010 18:06:25 +0000 (05:06 +1100)
committerStefan Metzmacher <metze@samba.org>
Wed, 24 Mar 2010 06:11:38 +0000 (07:11 +0100)
lib/replace/replace.c
lib/replace/replace.h

index f2dcb10ddca14d332c6dcd8f42565be69858c429..e4b97a8913e9f23511b680095e8cc0569aa137f8 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 e7578cd60faba83c928711a913c6103ed5ed8182..cd73e65beac0d180e681a3bedbf2ae4a0d57300a 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