added "log format" option to allow admins to choose the format for
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index c7b43bd..11af1f3 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -456,3 +456,13 @@ extern int errno;
 #ifndef ACCESSPERMS
 #define ACCESSPERMS 0777
 #endif
+
+/* handler for null strings in printf format */
+#define NS(s) ((s)?(s):"<NULL>")
+
+/* use magic gcc attributes to catch format errors */
+ void rprintf(int , const char *, ...)
+#ifdef __GNUC__
+     __attribute__ ((format (printf, 2, 3)))
+#endif
+;