Trying to compile for an older system:
Reading specs from /usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/220.127.116.11/specs
gcc version 18.104.22.168
Configure goes well, and reports successful.
Make dies quickly:
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o
In file included from rsync.h:672,
proto.h:24: parse error before `void'
proto.h:279: parse error before `void'
proto.h:280: parse error before `void'
rsync.c: In function `sig_int':
rsync.c:244: warning: implicit declaration of function `_exit_cleanup'
make: *** [rsync.o] Error 1
Looking at the lines complained about in proto.h, they all start with NORETURN.
I've no idea what I'm doing as I don't know C at all, but I removed the NORETURN , moving the 'void' part to the start of the lines.
Compile got a bit further, choking on another file with NORETURN. Removing those as they were found finally resulted in a complete compile, except for occasional warnings about 'implicit declaration of function' in several files.
The resulting rsync was subjected to 'make check' and passed 29 and skipped 2 (one about a temp dir not being on a different filesystem...which was correct) and the other about ssh not done because of some argument to include that. So it looks like it's working, but I don't know if the removed NORETURNs is leaving some problem lurking.
Hopefully the source can be configured so NORETURN isn't a problem with compilers that don't understand whatever it does.
Older versions of gcc have some trouble with NORETURN, which is why the CVS version of rsync defines it to an empty string for GCC <= 2. This eliminates its presence, which is fine as it is just there to make the compiler warnings more accurate during development.
I'll attach a patch that will enhance rsync.h in the same way that the CVS version did.
Created attachment 2382 [details]
Fix NORETURN glitch
This patch defines NORETURN to an empty value for GCC <= 2.