Skip Menu |

This queue is for tickets about the File-RsyncP CPAN distribution.

Report information
The Basics
Id: 20457
Status: open
Priority: 0/
Queue: File-RsyncP

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.62
  • 0.64
Fixed in: (no value)



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
On Fri Jul 14 07:17:23 2006, MAREKR wrote: Show quoted text
> 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).
This code is directly from the rsync distribution. The latest version (2.6.8) still has || rather than &&: #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 #define snprintf rsync_snprintf int snprintf(char *str,size_t count,const char *fmt,...); #endif Do you get a compile error on solaris8? Craig
From: MPREWITT [...] cpan.org
On Sat Jul 22 21:57:59 2006, CBARRATT wrote: Show quoted text
> On Fri Jul 14 07:17:23 2006, MAREKR wrote:
> > 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).
>
... Show quoted text
> Do you get a compile error on solaris8? > > Craig
I get the following compile error on solaris8. With the patch above, the compilation works: t/rsyncLoad....Can't load '/home/src/siteperl/.cpan/build/build/File-RsyncP-0.64/blib/arch/auto/File/RsyncP /FileList/FileList.so' for module File::RsyncP::FileList: ld.so.1: perl: fatal: relocation error: file /hom e/src/siteperl/.cpan/build/build/File-RsyncP-0.64/blib/arch/auto/File/RsyncP/FileList/FileList.so: symbol r sync_snprintf: referenced symbol not found at /opt/perl/5.8.2/lib/sun4-solaris-64int/DynaLoader.pm line 229. at /home/src/siteperl/.cpan/build/build/File-RsyncP-0.64/blib/lib/File/RsyncP.pm line 47 Compilation failed in require at /home/src/siteperl/.cpan/build/build/File-RsyncP-0.64/blib/lib/File/RsyncP.pm line 47. BEGIN failed--compilation aborted at /home/src/siteperl/.cpan/build/build/File-RsyncP-0.64/blib/lib/File/RsyncP.pm line 47. Compilation failed in require at t/rsyncLoad.t line 11. BEGIN failed--compilation aborted at t/rsyncLoad.t line 11. t/rsyncLoad....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed
With version 0.64 (as well as with 0.62) I get the same missing symbol error as reported by MPREWITT. This is - as far as I can tell - because the header file does not recognize correctly that a valid snprintf is present on Solaris, and the rsync_snprintf is not compiled. -Marek