|
From: Wayne D. <wa...@us...> - 2003-06-11 21:21:51
|
Hi folks! As I mentioned long, long ago, the rsync.h that gets installed has autoconf macros in it, which means that any program that uses librsync but either (1) does not use autoconf or (2) does not define SIZEOF_LONG_LONG will get an incompatible typedef for the rs_long_t type, and thus the call-back hooks can cause the program to crash. I think that this is a serious enough problem that it should be fixed in the 0.9.6 release. I've created a patch that should handle this. The patch changes configure.in to add a compile check for LONG_LONG and uses that if found, otherwise it uses either "long long" if its size wasn't 0, or just "long". This duplicates the old #ifdefs in the rsync.h file. The rsync.h file would be removed from CVS, and an rsync.h.in file committed that has a @RS_LONG_T@ variable reference that gets substituted by configure. I also had to tweak autogen.sh. The only thing I'm not sure is correct is what include files are needed for the LONG_LONG compile test on WIN32. I currently have it just including sys/types.h, but I don't know if that is enough. In the process of changing configure.in, autoconf output an error that said we should be using AM_CONFIG_HEADER, not AC_CONFIG_HEADER, so I changed that as well. Does anyone know if this is something new to autoconf 2.57 (which I'm using)? I have all this ready to check in, if desired. ..wayne.. |