Hello list, This is a patch to rsync 2.5.5, and it serves two purposes. The small patches to batch.c, flist.c and log.c simply add "void" to some function definitions so that all declarations in proto.h have full parameter lists. unsigned char read_batch_flags() OLD unsigned char read_batch_flags(void) NEW The SCO UNIXWare compiler correctly objected to these functions not having a prototype in scope. The fix seems to be innocuous and should not break anything. It does seem to require a "make proto" afterwards to rebuild proto.h The change in popt/popt.c is to work around a bug in the SCO UNIXWare 8 compiler: it doesn't properly deal with alloca() being called from the middle of another function call. The code dumps badly on this platform with all modes (debug, regular, optimized), and the workaround shown gets around the bug and likely obviates similar bugs on other platforms. Steve Friedl / steve@unixwiz.net / www.unixwiz.net 23 December 2002 --- Stephen J Friedl | Software Consultant | Tustin, CA | +1 714 544-6561 www.unixwiz.net | I speak for me only | KA8CMY | steve@unixwiz.net --- batch.c.orig Mon Dec 23 21:51:23 2002 +++ batch.c Mon Dec 23 21:51:28 2002 @@ -264,7 +264,7 @@ return bytes_read; } -unsigned char read_batch_flags() +unsigned char read_batch_flags(void) { int flags; --- flist.c.orig Mon Dec 23 21:51:31 2002 +++ flist.c Mon Dec 23 21:51:43 2002 @@ -1177,7 +1177,7 @@ /* * allocate a new file list */ -struct file_list *flist_new() +struct file_list *flist_new(void) { struct file_list *flist; --- log.c.orig Mon Dec 23 21:51:47 2002 +++ log.c Mon Dec 23 21:51:54 2002 @@ -183,7 +183,7 @@ #endif } -void log_open() +void log_open(void) { if (logfname && !logfile) { extern int orig_umask; @@ -193,7 +193,7 @@ } } -void log_close() +void log_close(void) { if (logfile) { fclose(logfile); --- popt/popt.c.orig Mon Dec 23 21:51:59 2002 +++ popt/popt.c Mon Dec 23 21:59:21 2002 @@ -443,9 +443,10 @@ } /* Make a copy we can hack at */ - localOptString = optString - strcpy(ALLOCA(strlen(origOptString) + 1), - origOptString); + { int n = strlen(origOptString) + 1; + localOptString = optString = ALLOCA(n); + strcpy(optString, origOptString); + } if (!optString[0]) return POPT_ERROR_BADOPT;
On Mon, Dec 23, 2002 at 02:13:51PM -0800, Stephen Friedl wrote:> This is a patch to rsync 2.5.5, and it serves two purposes. The small > patches to batch.c, flist.c and log.c simply add "void" to some function > definitions so that all declarations in proto.h have full parameter lists. > > unsigned char read_batch_flags() OLD > unsigned char read_batch_flags(void) NEW > > The SCO UNIXWare compiler correctly objected to these functions not > having a prototype in scope. The fix seems to be innocuous and should > not break anything. It does seem to require a "make proto" afterwards > to rebuild proto.hCommitted, thanks! I don't feel brave enough to commit the popt/popt.c change without input from others. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
> If the UNIXWare compiler > can't handle the construct Stephen could forward the patch > to the libpopt project and file a bug report with SCO.I have filed a bug report with SCO (with detail at the assembler level to help them track it down), and I'll look into the libpopt integration as well. I had misgiving about the "borrowed code factor" too, for the same reasons, but you folks - who know the bigger picture of rsync - are in a better place to judge this than I am. I am happy that I figured it out on my platform and presume that you'll do what's best for the project. Happy holidays, all. Steve --- Stephen J Friedl | Software Consultant | Tustin, CA | +1 714 544-6561 www.unixwiz.net | I speak for me only | KA8CMY | steve@unixwiz.net
On Wed, Dec 25, 2002 at 02:49:13PM -0800, Stephen J. Friedl wrote:> jw schultz wrote: > > >If the UNIXWare compiler > >can't handle the construct Stephen could forward the patch > >to the libpopt project > > > I have posted a comment in the popt area of freshmeat where I beleve the > popt project is located, but I'm not sure this is the right approach (I > have not dealt with popt or freshmeat before). Does this look like the > way to get this done? > > http://freshmeat.net/projects/poptI'm sure it isn't the right place. This is the first time i've noticed a project listing on freshmeat without a homepage. Freshmeat is a project index. The projects don't actually reside there. You could try emailing the author. Even Martin seems to have had trouble tracking down the source judging by his comment. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt