Subject: | rsync.h has presumably wrong logic |
I think I have found some wrong preprocessor logic in rsync.h, which
causes snprintf unneccessarily redefined to rsync_snprintf. The patch
below fixes this problem here (perl-5.8.8, gcc-4.0.3, Solaris 8 Sparc).
--- FileList/rsync.h.orig 2006-07-14 11:40:25.411298000 +0200
+++ FileList/rsync.h 2006-07-14 12:07:08.233244000 +0200
@@ -607,12 +608,12 @@
int vasprintf(char **ptr, const char *format, va_list ap);
#endif
-#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
+#if !defined(HAVE_VSNPRINTF) && !defined(HAVE_C99_VSNPRINTF)
#define vsnprintf rsync_vsnprintf
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
#endif
-#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
+#if !defined(HAVE_SNPRINTF) && !defined(HAVE_C99_SNPRINTF)
#define snprintf rsync_snprintf
int snprintf(char *str,size_t count,const char *fmt,...);
#endif