diff --git a/.gitignore b/.gitignore index 9e59c9c..a1f912b 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ aclocal.m4 /auto-build-save .deps /*.exe +*.dSYM/ diff --git a/Makefile.in b/Makefile.in index 7c75c26..c2fe775 100644 --- a/Makefile.in +++ b/Makefile.in @@ -49,7 +49,7 @@ OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \ usage.o fileio.o batch.o clientname.o chmod.o acls.o xattrs.o OBJS3=progress.o pipe.o @MD5_ASM@ @ROLL_SIMD@ @ROLL_ASM@ DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o -popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ +popt_OBJS= popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o popt/poptint.o OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@ @@ -57,7 +57,8 @@ TLS_OBJ = tls.o syscall.o util2.o t_stub.o lib/compat.o lib/snprintf.o lib/perms # Programs we must have to run the test cases CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \ - testrun$(EXEEXT) trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT) + testrun$(EXEEXT) trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT) \ + simdtest$(EXEEXT) CHECK_SYMLINKS = testsuite/chown-fake.test testsuite/devices-fake.test testsuite/xattrs-hlink.test @@ -312,20 +313,28 @@ test: check .PHONY: check check: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh + $(srcdir)/runtests.py --rsync-bin=`pwd`/rsync$(EXEEXT) .PHONY: check29 check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29 + $(srcdir)/runtests.py --rsync-bin=`pwd`/rsync$(EXEEXT) --protocol=29 .PHONY: check30 check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=30 + $(srcdir)/runtests.py --rsync-bin=`pwd`/rsync$(EXEEXT) --protocol=30 wildtest.o: wildtest.c t_stub.o lib/wildmatch.c rsync.h config.h wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ $(LIBS) +simdtest$(EXEEXT): simd-checksum-x86_64.cpp $(HEADERS) + @if test x"@ROLL_SIMD@" != x; then \ + $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -DTEST_SIMD_CHECKSUM1 \ + -o $@ $(srcdir)/simd-checksum-x86_64.cpp @ROLL_ASM@ $(LIBS); \ + else \ + touch $@; \ + fi + testsuite/chown-fake.test: ln -s chown.test $(srcdir)/testsuite/chown-fake.test @@ -341,7 +350,7 @@ testsuite/xattrs-hlink.test: .PHONY: installcheck installcheck: $(CHECK_PROGS) $(CHECK_SYMLINKS) - POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin="$(bindir)/rsync$(EXEEXT)" srcdir="$(srcdir)" $(srcdir)/runtests.sh + $(srcdir)/runtests.py --rsync-bin="$(bindir)/rsync$(EXEEXT)" --srcdir="$(srcdir)" --tooldir=`pwd` # TODO: Add 'dist' target; need to know which files will be included diff --git a/NEWS.md b/NEWS.md index c36b1f6..3c22ac5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,144 @@ +# NEWS for rsync 3.4.2 (28 Apr 2026) + +## Changes in this version: + +### SECURITY RELATED: + +Several security-relevant defects were reported and fixed since 3.4.1. +None were assigned a CVE — rsync's fork-per-connection design scopes +the impact of each of these to the attacker's own connection, which is +equivalent to the client closing the socket itself — but they are +fixed here as a matter of hygiene and to reduce the chances of a +future exploitable combination. Many thanks to the external +researchers who reported these issues. + +- Fixed a signed integer overflow in the PROXY protocol v2 header + parser: a negative `len` field could bypass the size check and cause + a stack buffer overflow in `read_buf()`. Reported by John Walker of + ZeroPath. + +- Fixed an invalid access to the files array. Reported by Calum + Hutton of Rapid7. + +- Reject negative token values in the compressed-stream token + decoder; a negative value could cause callers to misinterpret a + missing data pointer as literal data. Reported by Will Sergeant. + +- Fixed the element count passed to the xattr `qsort()` (see + https://www.openwall.com/lists/oss-security/2026/04/16/2). + +- Fixed a buffer underflow in `clean_fname()`, and added a regression + test. + +- Fixed an uninitialized `mul_one` in the AVX2 get_checksum1 path + (undefined behaviour), and added a SIMD-checksum self-test that + cross-checks SSE2, SSSE3 and AVX2 against the C reference on both + aligned and unaligned buffers. + +- Fixed an uninitialized `buf1` on the first call to + `get_checksum2()` in the MD4 path (fixes #673). + +- Zero all new memory from internal allocations: `my_alloc()` now uses + `calloc`, and `expand_item_list()` zeros the expanded portion after + `realloc`. This gives more predictable behaviour if stale or + uninitialised memory is ever accidentally read. + +### BUG FIXES: + +- Call `tzset()` before chroot so that log timestamps continue to + reflect the configured local timezone after the daemon chroots + (glibc needs `/etc/localtime`, which is unreachable post-chroot). + +- Use the correct time when writing to the log file. + +- Do not clear `DISPLAY` unconditionally. + +- Fixed a Y2038 bug in `syscall.c` by replacing the `Int32x32To64` + macro (which truncates its arguments to 32 bits) with a plain + 64-bit multiplication. + +- Fixed ACL ID mapping for non-root users (closes #618). + +- Fixed handling of objects with many xattrs on FreeBSD. + +- Fixed `--open-noatime` not taking effect when opening regular + files: `O_NOATIME` is now also passed to `do_open_nofollow()`, which + has been used for regular files since the CVE fix "fixed symlink + race condition in sender". + +- Ignore "directory has vanished" errors. + +- Fixed the removal of multiple leading slashes. + +- Added the missing `--dirs` long option. + +- Fixed a segfault if `poptGetContext()` returns NULL (e.g. under + OOM) by not passing NULL to `poptReadDefaultConfig()`. Reported by + Ronnie Sahlberg; found with `malloc-fail-tester`. + +- Fixed a build error on ia64 NonStop (which treats missing + prototypes as an error, not a warning). + +- Fixed a flaky hardlinks test (fixes #735). + +### ENHANCEMENTS: + +- Added multi-threaded `zstd` compression, gated by a new + `--compress-threads=N` option, with validation and man-page + coverage. + +- Documented the `temp dir` parameter in the rsyncd.conf man page + (fixes #820). + +- Improved rendering of interior dashes in long-option names in + `md-convert` (perhaps fixes #686). + +### PORTABILITY / BUILD: + +- Fixed glibc 2.43 const-preserving overloads of `strtok()`, + `strchr()` etc. by declaring the affected locals with the right + constness. Contributed by Holger Hoffstätte. + +- Converted the bundled zlib 1.2.8 from K&R-style function + definitions to ANSI prototypes, so it builds with clang 16+. + +- Avoid using `bool` as an identifier; it is a keyword in C23. + +- `configure.ac`: check for xattr functions in libc first and only + fall back to `-lattr`, avoiding spurious overlinking when `-lattr` + happens to be installed. Contributed by Eli Schwartz. + +- Made the build reproducible by honouring `SOURCE_DATE_EPOCH` for + the manpage date. + +- Removed obsolete `popt/findme.c` and `popt/findme.h` that upstream + popt 1.14 folded into `popt.c` (fixes #710). Contributed by Alan + Coopersmith. + +### INTERNAL: + +- Made many module-global variables `const` so they can live in + `.rodata` and enable additional compiler optimization. + +### DEVELOPER RELATED: + +- Replaced `runtests.sh` with `runtests.py`, a Python test runner + that supports `--valgrind` (with per-process log files so valgrind + output no longer interferes with output comparisons) and + `-j/--parallel` execution for roughly a 7× speed-up on typical + hardware. + +- Added a SIMD checksum self-test and a `clean-fname-underflow` + regression test. + +- Various CI fixes for macOS and Cygwin (including adding + `simd-checksum` to the expected-skipped lists on platforms without + SIMD), and tests now run on `ubuntu-latest`. + +- removed support for the unmaintained rsync-patches archive + +------------------------------------------------------------------------------ + # NEWS for rsync 3.4.1 (16 Jan 2025) Release 3.4.1 is a fix for regressions introduced in 3.4.0 @@ -19,6 +160,7 @@ Release 3.4.1 is a fix for regressions introduced in 3.4.0 - fix to permissions handling in the developer release script ------------------------------------------------------------------------------ + # NEWS for rsync 3.4.0 (15 Jan 2025) Release 3.4.0 is a security release that fixes a number of important vulnerabilities. @@ -73,6 +215,7 @@ to develop and test fixes. - added FreeBSD and Solaris CI builds ------------------------------------------------------------------------------ + # NEWS for rsync 3.3.0 (6 Apr 2024) ## Changes in this version: @@ -4837,8 +4980,9 @@ to develop and test fixes. | RELEASE DATE | VER. | DATE OF COMMIT\* | PROTOCOL | |--------------|--------|------------------|-------------| +| 28 Apr 2026 | 3.4.2 | | 32 | | 16 Jan 2025 | 3.4.1 | | 32 | -| 15 Jan 2025 | 3.4.0 | | 32 | +| 15 Jan 2025 | 3.4.0 | 15 Jan 2025 | 32 | | 06 Apr 2024 | 3.3.0 | | 31 | | 20 Oct 2022 | 3.2.7 | | 31 | | 09 Sep 2022 | 3.2.6 | | 31 | diff --git a/access.c b/access.c index b6afce3..b924e0a 100644 --- a/access.c +++ b/access.c @@ -99,7 +99,7 @@ static void make_mask(char *mask, int plen, int addrlen) return; } -static int match_address(const char *addr, const char *tok) +static int match_address(const char *addr, char *tok) { char *p; struct addrinfo hints, *resa, *rest; diff --git a/acls.c b/acls.c index bd119e8..4d67ff4 100644 --- a/acls.c +++ b/acls.c @@ -713,7 +713,7 @@ static uchar recv_ida_entries(int f, ida_entries *ent) else id = recv_group_name(f, id, NULL); } else if (access & NAME_IS_USER) { - if (inc_recurse && am_root && !numeric_ids) + if (inc_recurse && !numeric_ids) id = match_uid(id); } else { if (inc_recurse && (!am_root || !numeric_ids)) diff --git a/batch.c b/batch.c index accc4c6..878b6dd 100644 --- a/batch.c +++ b/batch.c @@ -75,7 +75,7 @@ static int *flag_ptr[] = { NULL }; -static char *flag_name[] = { +static const char *const flag_name[] = { "--recurse (-r)", "--owner (-o)", "--group (-g)", diff --git a/checksum.c b/checksum.c index 66e8089..24e46bf 100644 --- a/checksum.c +++ b/checksum.c @@ -176,7 +176,7 @@ void parse_checksum_choice(int final_call) if (valid_checksums.negotiated_nni) xfer_sum_nni = file_sum_nni = valid_checksums.negotiated_nni; else { - char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL; + const char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL; if (cp) { xfer_sum_nni = parse_csum_name(checksum_choice, cp - checksum_choice); file_sum_nni = parse_csum_name(cp+1, -1); @@ -366,9 +366,8 @@ void get_checksum2(char *buf, int32 len, char *sum) mdfour_begin(&m); - if (len > len1) { - if (buf1) - free(buf1); + if (len > len1 || !buf1) { + free(buf1); buf1 = new_array(char, len+4); len1 = len; } diff --git a/clientname.c b/clientname.c index ea94894..dbac38b 100644 --- a/clientname.c +++ b/clientname.c @@ -167,7 +167,7 @@ int read_proxy_protocol_header(int fd) char sig[PROXY_V2_SIG_SIZE]; char ver_cmd; char fam; - char len[2]; + unsigned char len[2]; union { struct { char src_addr[4]; diff --git a/clientserver.c b/clientserver.c index 7c897ab..3800f0d 100644 --- a/clientserver.c +++ b/clientserver.c @@ -976,6 +976,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char } if (use_chroot) { + /* Cache timezone data before chroot makes /etc/localtime inaccessible */ + tzset(); if (chroot(module_chdir)) { rsyserr(FLOG, errno, "chroot(\"%s\") failed", module_chdir); io_printf(f_out, "@ERROR: chroot failed\n"); @@ -1301,6 +1303,7 @@ int start_daemon(int f_in, int f_out) p = lp_daemon_chroot(); if (*p) { log_init(0); /* Make use we've initialized syslog before chrooting. */ + tzset(); if (chroot(p) < 0) { rsyserr(FLOG, errno, "daemon chroot(\"%s\") failed", p); return -1; diff --git a/compat.c b/compat.c index 4ce8c6d..d1ca316 100644 --- a/compat.c +++ b/compat.c @@ -52,6 +52,7 @@ extern int need_messages_from_generator; extern int delete_mode, delete_before, delete_during, delete_after; extern int do_compression; extern int do_compression_level; +extern int do_compression_threads; extern int saw_stderr_opt; extern int msgs2stderr; extern char *shell_cmd; @@ -131,7 +132,7 @@ static const char *client_info; * of that protocol for it to be advertised as available. */ static void check_sub_protocol(void) { - char *dot; + const char *dot; int their_protocol, their_sub; int our_sub = get_subprotocol_version(); @@ -414,7 +415,7 @@ static const char *getenv_nstr(int ntype) env_str = ntype == NSTR_COMPRESS ? "zlib" : protocol_version >= 30 ? "md5" : "md4"; if (am_server && env_str) { - char *cp = strchr(env_str, '&'); + const char *cp = strchr(env_str, '&'); if (cp) env_str = cp + 1; } diff --git a/config.h.in b/config.h.in index 7d73212..0b09642 100644 --- a/config.h.in +++ b/config.h.in @@ -28,10 +28,10 @@ this is either `int' or `gid_t'. */ #undef GETGROUPS_T -/* Define to 1 if the `getpgrp' function requires zero arguments. */ +/* Define to 1 if the 'getpgrp' function requires zero arguments. */ #undef GETPGRP_VOID -/* Define to 1 if you have the `aclsort' function. */ +/* Define to 1 if you have the 'aclsort' function. */ #undef HAVE_ACLSORT /* true if you have acl_get_perm_np */ @@ -55,10 +55,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_NAMESER_H -/* Define to 1 if you have the `asprintf' function. */ +/* Define to 1 if you have the 'asprintf' function. */ #undef HAVE_ASPRINTF -/* Define to 1 if you have the `attropen' function. */ +/* Define to 1 if you have the 'attropen' function. */ #undef HAVE_ATTROPEN /* Define to 1 if you have the header file. */ @@ -73,13 +73,13 @@ /* Define to 1 if vsprintf has a C99-compatible return value */ #undef HAVE_C99_VSNPRINTF -/* Define to 1 if you have the `chflags' function. */ +/* Define to 1 if you have the 'chflags' function. */ #undef HAVE_CHFLAGS -/* Define to 1 if you have the `chmod' function. */ +/* Define to 1 if you have the 'chmod' function. */ #undef HAVE_CHMOD -/* Define to 1 if you have the `chown' function. */ +/* Define to 1 if you have the 'chown' function. */ #undef HAVE_CHOWN /* Define to 1 if you have the header file. */ @@ -91,7 +91,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_DIRENT_H @@ -104,7 +104,7 @@ /* Define to 1 if errno is declared in errno.h */ #undef HAVE_ERRNO_DECL -/* Define to 1 if you have the `extattr_get_link' function. */ +/* Define to 1 if you have the 'extattr_get_link' function. */ #undef HAVE_EXTATTR_GET_LINK /* Define to 1 if you have the fallocate function and it compiles and links @@ -117,7 +117,7 @@ /* Define if FALLOC_FL_ZERO_RANGE is available. */ #undef HAVE_FALLOC_FL_ZERO_RANGE -/* Define to 1 if you have the `fchmod' function. */ +/* Define to 1 if you have the 'fchmod' function. */ #undef HAVE_FCHMOD /* Define to 1 if you have the header file. */ @@ -129,43 +129,43 @@ /* True if you have FreeBSD xattrs */ #undef HAVE_FREEBSD_XATTRS -/* Define to 1 if you have the `fstat' function. */ +/* Define to 1 if you have the 'fstat' function. */ #undef HAVE_FSTAT -/* Define to 1 if you have the `ftruncate' function. */ +/* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the "getaddrinfo" function and required types. */ #undef HAVE_GETADDRINFO -/* Define to 1 if you have the `getattrlist' function. */ +/* Define to 1 if you have the 'getattrlist' function. */ #undef HAVE_GETATTRLIST -/* Define to 1 if you have the `getcwd' function. */ +/* Define to 1 if you have the 'getcwd' function. */ #undef HAVE_GETCWD -/* Define to 1 if you have the `getegid' function. */ +/* Define to 1 if you have the 'getegid' function. */ #undef HAVE_GETEGID -/* Define to 1 if you have the `geteuid' function. */ +/* Define to 1 if you have the 'geteuid' function. */ #undef HAVE_GETEUID -/* Define to 1 if you have the `getgrouplist' function. */ +/* Define to 1 if you have the 'getgrouplist' function. */ #undef HAVE_GETGROUPLIST -/* Define to 1 if you have the `getgroups' function. */ +/* Define to 1 if you have the 'getgroups' function. */ #undef HAVE_GETGROUPS -/* Define to 1 if you have the `getpass' function. */ +/* Define to 1 if you have the 'getpass' function. */ #undef HAVE_GETPASS -/* Define to 1 if you have the `getpgrp' function. */ +/* Define to 1 if you have the 'getpgrp' function. */ #undef HAVE_GETPGRP /* Define to 1 if gettimeofday() takes a time-zone arg */ #undef HAVE_GETTIMEOFDAY_TZ -/* Define to 1 if you have the `getxattr' function. */ +/* Define to 1 if you have the 'getxattr' function. */ #undef HAVE_GETXATTR /* Define to 1 if you have the header file. */ @@ -177,22 +177,22 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ICONV_H -/* Define to 1 if you have the `iconv_open' function. */ +/* Define to 1 if you have the 'iconv_open' function. */ #undef HAVE_ICONV_OPEN -/* Define to 1 if the system has the type `id_t'. */ +/* Define to 1 if the system has the type 'id_t'. */ #undef HAVE_ID_T -/* Define to 1 if you have the `inet_ntop' function. */ +/* Define to 1 if you have the 'inet_ntop' function. */ #undef HAVE_INET_NTOP -/* Define to 1 if you have the `inet_pton' function. */ +/* Define to 1 if you have the 'inet_pton' function. */ #undef HAVE_INET_PTON -/* Define to 1 if you have the `initgroups' function. */ +/* Define to 1 if you have the 'initgroups' function. */ #undef HAVE_INITGROUPS -/* Define to 1 if you have the `innetgr' function. */ +/* Define to 1 if you have the 'innetgr' function. */ #undef HAVE_INNETGR /* Define to 1 if you have the header file. */ @@ -204,52 +204,49 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H -/* Define to 1 if you have the `lchmod' function. */ +/* Define to 1 if you have the 'lchmod' function. */ #undef HAVE_LCHMOD -/* Define to 1 if you have the `lchown' function. */ +/* Define to 1 if you have the 'lchown' function. */ #undef HAVE_LCHOWN -/* Define to 1 if you have the `acl' library (-lacl). */ +/* Define to 1 if you have the 'acl' library (-lacl). */ #undef HAVE_LIBACL -/* Define to 1 if you have the `attr' library (-lattr). */ -#undef HAVE_LIBATTR - /* Define to 1 if you have the header file. */ #undef HAVE_LIBCHARSET_H -/* Define to 1 if you have the `inet' library (-linet). */ +/* Define to 1 if you have the 'inet' library (-linet). */ #undef HAVE_LIBINET -/* Define to 1 if you have the `nsl' library (-lnsl). */ +/* Define to 1 if you have the 'nsl' library (-lnsl). */ #undef HAVE_LIBNSL -/* Define to 1 if you have the `nsl_s' library (-lnsl_s). */ +/* Define to 1 if you have the 'nsl_s' library (-lnsl_s). */ #undef HAVE_LIBNSL_S -/* Define to 1 if you have the `popt' library (-lpopt). */ +/* Define to 1 if you have the 'popt' library (-lpopt). */ #undef HAVE_LIBPOPT -/* Define to 1 if you have the `resolv' library (-lresolv). */ +/* Define to 1 if you have the 'resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV -/* Define to 1 if you have the `sec' library (-lsec). */ +/* Define to 1 if you have the 'sec' library (-lsec). */ #undef HAVE_LIBSEC -/* Define to 1 if you have the `socket' library (-lsocket). */ +/* Define to 1 if you have the 'socket' library (-lsocket). */ #undef HAVE_LIBSOCKET -/* Define to 1 if you have the `z' library (-lz). */ +/* Define to 1 if you have the 'z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H -/* Define to 1 if you have the `link' function. */ +/* Define to 1 if you have the 'link' function. */ #undef HAVE_LINK -/* Define to 1 if you have the `linkat' function. */ +/* Define to 1 if you have the 'linkat' function. */ #undef HAVE_LINKAT /* Define to 1 if you have the header file. */ @@ -258,7 +255,7 @@ /* True if you have Linux xattrs (or equivalent) */ #undef HAVE_LINUX_XATTRS -/* Define to 1 if you have the `locale_charset' function. */ +/* Define to 1 if you have the 'locale_charset' function. */ #undef HAVE_LOCALE_CHARSET /* Define to 1 if you have the header file. */ @@ -268,23 +265,23 @@ than `double'. */ #undef HAVE_LONG_DOUBLE -/* Define to 1 if the type `long double' works and has more range or precision - than `double'. */ +/* Define to 1 if the type 'long double' works and has more range or precision + than 'double'. */ #undef HAVE_LONG_DOUBLE_WIDER -/* Define to 1 if you have the `lseek64' function. */ +/* Define to 1 if you have the 'lseek64' function. */ #undef HAVE_LSEEK64 -/* Define to 1 if you have the `lutimes' function. */ +/* Define to 1 if you have the 'lutimes' function. */ #undef HAVE_LUTIMES /* Define to 1 if you have the header file. */ #undef HAVE_LZ4_H -/* Define to 1 if you have the `mallinfo' function. */ +/* Define to 1 if you have the 'mallinfo' function. */ #undef HAVE_MALLINFO -/* Define to 1 if you have the `mallinfo2' function. */ +/* Define to 1 if you have the 'mallinfo2' function. */ #undef HAVE_MALLINFO2 /* Define to 1 if you have the header file. */ @@ -293,31 +290,31 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MCHECK_H -/* Define to 1 if you have the `memmove' function. */ +/* Define to 1 if you have the 'memmove' function. */ #undef HAVE_MEMMOVE -/* Define to 1 if you have the `mkfifo' function. */ +/* Define to 1 if you have the 'mkfifo' function. */ #undef HAVE_MKFIFO -/* Define to 1 if you have the `mknod' function. */ +/* Define to 1 if you have the 'mknod' function. */ #undef HAVE_MKNOD -/* Define to 1 if you have the `mkstemp64' function. */ +/* Define to 1 if you have the 'mkstemp64' function. */ #undef HAVE_MKSTEMP64 -/* Define to 1 if you have the `mktime' function. */ +/* Define to 1 if you have the 'mktime' function. */ #undef HAVE_MKTIME -/* Define to 1 if the system has the type `mode_t'. */ +/* Define to 1 if the system has the type 'mode_t'. */ #undef HAVE_MODE_T -/* Define to 1 if you have the `mtrace' function. */ +/* Define to 1 if you have the 'mtrace' function. */ #undef HAVE_MTRACE -/* Define to 1 if you have the `nanosleep' function. */ +/* Define to 1 if you have the 'nanosleep' function. */ #undef HAVE_NANOSLEEP -/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ @@ -332,13 +329,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_H -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #undef HAVE_NL_LANGINFO -/* Define to 1 if the system has the type `off_t'. */ +/* Define to 1 if the system has the type 'off_t'. */ #undef HAVE_OFF_T -/* Define to 1 if you have the `open64' function. */ +/* Define to 1 if you have the 'open64' function. */ #undef HAVE_OPEN64 /* Define to 1 if you have the header file. */ @@ -353,7 +350,7 @@ /* True if you have Mac OS X xattrs */ #undef HAVE_OSX_XATTRS -/* Define to 1 if the system has the type `pid_t'. */ +/* Define to 1 if the system has the type 'pid_t'. */ #undef HAVE_PID_T /* Define to 1 if you have the header file. */ @@ -365,13 +362,13 @@ /* true if you have posix ACLs */ #undef HAVE_POSIX_ACLS -/* Define to 1 if you have the `posix_fallocate' function. */ +/* Define to 1 if you have the 'posix_fallocate' function. */ #undef HAVE_POSIX_FALLOCATE -/* Define to 1 if you have the `putenv' function. */ +/* Define to 1 if you have the 'putenv' function. */ #undef HAVE_PUTENV -/* Define to 1 if you have the `readlink' function. */ +/* Define to 1 if you have the 'readlink' function. */ #undef HAVE_READLINK /* Define to 1 if remote shell is remsh, not rsh */ @@ -380,40 +377,40 @@ /* Define to 1 if mkstemp() is available and works right */ #undef HAVE_SECURE_MKSTEMP -/* Define to 1 if you have the `setattrlist' function. */ +/* Define to 1 if you have the 'setattrlist' function. */ #undef HAVE_SETATTRLIST -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV -/* Define to 1 if you have the `seteuid' function. */ +/* Define to 1 if you have the 'seteuid' function. */ #undef HAVE_SETEUID -/* Define to 1 if you have the `setgroups' function. */ +/* Define to 1 if you have the 'setgroups' function. */ #undef HAVE_SETGROUPS -/* Define to 1 if you have the `setlocale' function. */ +/* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the `setmode' function. */ +/* Define to 1 if you have the 'setmode' function. */ #undef HAVE_SETMODE -/* Define to 1 if you have the `setsid' function. */ +/* Define to 1 if you have the 'setsid' function. */ #undef HAVE_SETSID -/* Define to 1 if you have the `setvbuf' function. */ +/* Define to 1 if you have the 'setvbuf' function. */ #undef HAVE_SETVBUF -/* Define to 1 if you have the `sigaction' function. */ +/* Define to 1 if you have the 'sigaction' function. */ #undef HAVE_SIGACTION -/* Define to 1 if you have the `sigprocmask' function. */ +/* Define to 1 if you have the 'sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define to 1 if the system has the type `size_t'. */ +/* Define to 1 if the system has the type 'size_t'. */ #undef HAVE_SIZE_T -/* Define to 1 if you have the `snprintf' function. */ +/* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF /* Do we have sockaddr_in6.sin6_scope_id? */ @@ -446,19 +443,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `stpcpy' function. */ +/* Define to 1 if you have the 'stpcpy' function. */ #undef HAVE_STPCPY -/* Define to 1 if you have the `strcasecmp' function. */ +/* Define to 1 if you have the 'strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define to 1 if you have the `strchr' function. */ +/* Define to 1 if you have the 'strchr' function. */ #undef HAVE_STRCHR -/* Define to 1 if you have the `strerror' function. */ +/* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR -/* Define to 1 if you have the `strftime' function. */ +/* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ @@ -467,37 +464,37 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strlcat' function. */ +/* Define to 1 if you have the 'strlcat' function. */ #undef HAVE_STRLCAT -/* Define to 1 if you have the `strlcpy' function. */ +/* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY -/* Define to 1 if you have the `strpbrk' function. */ +/* Define to 1 if you have the 'strpbrk' function. */ #undef HAVE_STRPBRK -/* Define to 1 if you have the `strtol' function. */ +/* Define to 1 if you have the 'strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if the system has the type `struct addrinfo'. */ +/* Define to 1 if the system has the type 'struct addrinfo'. */ #undef HAVE_STRUCT_ADDRINFO -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +/* Define to 1 if the system has the type 'struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE -/* Define to 1 if the system has the type `struct stat64'. */ +/* Define to 1 if the system has the type 'struct stat64'. */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtimensec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIMENSEC -/* Define to 1 if `st_mtimespec.tv_nsec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtimespec.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */ +/* Define to 1 if 'st_mtim.tv_nsec' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +/* Define to 1 if 'st_rdev' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV /* Define to 1 if you have the "struct utimbuf" type */ @@ -509,7 +506,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ATTR_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H @@ -534,7 +531,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MODE_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H @@ -568,7 +565,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_XATTR_H -/* Define to 1 if you have the `tcgetpgrp' function. */ +/* Define to 1 if you have the 'tcgetpgrp' function. */ #undef HAVE_TCGETPGRP /* true if you have Tru64 ACLs */ @@ -580,40 +577,40 @@ /* true if you have UnixWare ACLs */ #undef HAVE_UNIXWARE_ACLS -/* Define to 1 if you have the `unsetenv' function. */ +/* Define to 1 if you have the 'unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if you have the `usleep' function. */ +/* Define to 1 if you have the 'usleep' function. */ #undef HAVE_USLEEP -/* Define to 1 if you have the `utime' function. */ +/* Define to 1 if you have the 'utime' function. */ #undef HAVE_UTIME -/* Define to 1 if you have the `utimensat' function. */ +/* Define to 1 if you have the 'utimensat' function. */ #undef HAVE_UTIMENSAT -/* Define to 1 if you have the `utimes' function. */ +/* Define to 1 if you have the 'utimes' function. */ #undef HAVE_UTIMES /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H -/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ +/* Define to 1 if 'utime(file, NULL)' sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL -/* Define to 1 if you have the `vasprintf' function. */ +/* Define to 1 if you have the 'vasprintf' function. */ #undef HAVE_VASPRINTF -/* Define to 1 if you have the `va_copy' function. */ +/* Define to 1 if you have the 'va_copy' function. */ #undef HAVE_VA_COPY -/* Define to 1 if you have the `vsnprintf' function. */ +/* Define to 1 if you have the 'vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define to 1 if you have the `wait4' function. */ +/* Define to 1 if you have the 'wait4' function. */ #undef HAVE_WAIT4 -/* Define to 1 if you have the `waitpid' function. */ +/* Define to 1 if you have the 'waitpid' function. */ #undef HAVE_WAITPID /* Define to 1 if you have the header file. */ @@ -625,19 +622,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ZSTD_H -/* Define to 1 if you have the `_acl' function. */ +/* Define to 1 if you have the '_acl' function. */ #undef HAVE__ACL -/* Define to 1 if you have the `_facl' function. */ +/* Define to 1 if you have the '_facl' function. */ #undef HAVE__FACL -/* Define to 1 if you have the `__acl' function. */ +/* Define to 1 if you have the '__acl' function. */ #undef HAVE___ACL -/* Define to 1 if you have the `__facl' function. */ +/* Define to 1 if you have the '__facl' function. */ #undef HAVE___FACL -/* Define to 1 if you have the `__va_copy' function. */ +/* Define to 1 if you have the '__va_copy' function. */ #undef HAVE___VA_COPY /* Define as const if the declaration of iconv() needs const. */ @@ -727,43 +724,43 @@ /* Define to 1 if "signed char" is a valid type */ #undef SIGNED_CHAR_OK -/* The size of `char*', as computed by sizeof. */ +/* The size of 'char*', as computed by sizeof. */ #undef SIZEOF_CHARP -/* The size of `int', as computed by sizeof. */ +/* The size of 'int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of `int16_t', as computed by sizeof. */ +/* The size of 'int16_t', as computed by sizeof. */ #undef SIZEOF_INT16_T -/* The size of `int32_t', as computed by sizeof. */ +/* The size of 'int32_t', as computed by sizeof. */ #undef SIZEOF_INT32_T -/* The size of `int64_t', as computed by sizeof. */ +/* The size of 'int64_t', as computed by sizeof. */ #undef SIZEOF_INT64_T -/* The size of `long', as computed by sizeof. */ +/* The size of 'long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of `long long', as computed by sizeof. */ +/* The size of 'long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of `off64_t', as computed by sizeof. */ +/* The size of 'off64_t', as computed by sizeof. */ #undef SIZEOF_OFF64_T -/* The size of `off_t', as computed by sizeof. */ +/* The size of 'off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T -/* The size of `short', as computed by sizeof. */ +/* The size of 'short', as computed by sizeof. */ #undef SIZEOF_SHORT -/* The size of `time_t', as computed by sizeof. */ +/* The size of 'time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T -/* The size of `uint16_t', as computed by sizeof. */ +/* The size of 'uint16_t', as computed by sizeof. */ #undef SIZEOF_UINT16_T -/* The size of `uint32_t', as computed by sizeof. */ +/* The size of 'uint32_t', as computed by sizeof. */ #undef SIZEOF_UINT32_T /* If using the C implementation of alloca, define if you know the @@ -774,7 +771,7 @@ STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS @@ -834,23 +831,29 @@ /* Define _GNU_SOURCE so that we get all necessary prototypes */ #undef _GNU_SOURCE -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES -/* Define to `int' if doesn't define. */ +/* Number of bits in time_t, on hosts where this is settable. */ +#undef _TIME_BITS + +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +#undef __MINGW_USE_VC2005_COMPAT + +/* Define as 'int' if doesn't define. */ #undef gid_t -/* Define to `__inline__' or `__inline' if that's what the C compiler +/* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif -/* Define to `unsigned int' if does not define. */ +/* Define as 'unsigned int' if doesn't define. */ #undef size_t /* type to use in place of socklen_t if not defined */ #undef socklen_t -/* Define to `int' if doesn't define. */ +/* Define as 'int' if doesn't define. */ #undef uid_t diff --git a/configure.ac b/configure.ac index d2bcb47..4062651 100644 --- a/configure.ac +++ b/configure.ac @@ -1392,7 +1392,7 @@ else AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs (or equivalent)]) AC_DEFINE(SUPPORT_XATTRS, 1) AC_DEFINE(NO_SYMLINK_USER_XATTRS, 1, [True if symlinks do not support user xattrs]) - AC_CHECK_LIB(attr,getxattr) + AC_SEARCH_LIBS(getxattr,attr) ;; darwin*) AC_MSG_RESULT(Using OS X xattrs) diff --git a/configure.sh b/configure.sh index 413a455..53c9e34 100755 --- a/configure.sh +++ b/configure.sh @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for rsync. +# Generated by GNU Autoconf 2.72 for rsync. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -187,14 +188,15 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -227,12 +229,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -254,7 +257,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -274,7 +277,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -313,14 +317,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -389,11 +385,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -407,21 +404,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -495,6 +485,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -543,7 +535,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -555,9 +546,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -582,10 +573,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -915,7 +910,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1128,7 +1123,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1144,7 +1139,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1174,8 +1169,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1183,7 +1178,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1233,7 +1228,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1301,7 +1296,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1329,7 +1324,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rsync to adapt to many kinds of systems. +'configure' configures rsync to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1343,11 +1338,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1355,10 +1350,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1424,6 +1419,7 @@ Optional Features: --disable-iconv disable to omit the --iconv option --disable-acl-support disable to omit ACL support --disable-xattr-support disable to omit extended attributes + --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1455,7 +1451,7 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -1523,9 +1519,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF rsync configure -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1564,17 +1560,66 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -1605,12 +1650,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -1630,8 +1676,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1639,10 +1685,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1651,53 +1699,6 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1725,11 +1726,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1764,11 +1766,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1805,12 +1808,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -1863,18 +1867,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -1909,20 +1914,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -1945,8 +1953,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -1994,8 +2003,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2050,12 +2060,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2076,8 +2088,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2093,8 +2105,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2110,12 +2122,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2135,15 +2150,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -2154,7 +2169,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2173,11 +2188,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2210,7 +2227,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by rsync $as_me, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2456,10 +2473,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2495,9 +2512,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2511,6 +2526,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2538,16 +2568,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2597,7 +2630,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -2663,6 +2695,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -2684,7 +2718,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3093,8 +3127,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3122,12 +3157,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3136,18 +3171,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3163,11 +3198,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3204,8 +3239,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3227,7 +3262,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3249,8 +3285,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3272,7 +3308,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3307,8 +3344,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3330,7 +3367,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3352,8 +3390,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3392,7 +3430,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3416,8 +3455,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3439,7 +3478,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3465,8 +3505,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3488,7 +3528,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3526,8 +3567,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3549,7 +3590,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3571,8 +3613,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3594,7 +3636,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3623,10 +3666,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3698,8 +3741,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -3719,7 +3762,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -3730,8 +3773,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -3740,13 +3784,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -3770,10 +3815,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -3783,11 +3828,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3803,6 +3849,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -3842,26 +3890,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3893,16 +3942,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -3913,8 +3964,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3931,12 +3982,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -3954,8 +4007,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -3973,8 +4026,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3989,8 +4042,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4007,12 +4060,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -4039,8 +4095,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4057,25 +4113,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4085,8 +4144,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4103,25 +4162,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4131,8 +4193,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4149,25 +4211,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -4212,8 +4277,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_bigendian=unknown +else case e in #( + e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4259,8 +4324,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif @@ -4291,8 +4356,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -4336,8 +4402,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -4364,22 +4431,23 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - extern int foo; - -int -main (void) -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} + int + main (int argc, char **argv) + { + /* Intimidate the compiler so that it does not + optimize the arrays away. */ + char *p = argv[0]; + ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; + ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; + return use_ascii (argc) == use_ebcdic (*p); + } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -4388,9 +4456,10 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -4413,14 +4482,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else $as_nop - ac_cv_c_bigendian=yes +else case e in #( + e) ac_cv_c_bigendian=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -4442,14 +4514,14 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> @@ -4466,10 +4538,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" -else $as_nop - eval "$as_ac_Header=no" +else case e in #( + e) eval "$as_ac_Header=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -4477,7 +4551,7 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -4491,15 +4565,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -4530,11 +4610,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -4551,15 +4633,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -4590,11 +4678,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -4612,8 +4702,8 @@ printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test ${ac_cv_header_sys_wait_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4637,10 +4727,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_sys_wait_h=yes -else $as_nop - ac_cv_header_sys_wait_h=no +else case e in #( + e) ac_cv_header_sys_wait_h=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } @@ -4976,8 +5068,8 @@ printf %s "checking whether sys/types.h defines makedev... " >&6; } if test ${ac_cv_header_sys_types_h_makedev+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -4995,12 +5087,14 @@ then : else ac_cv_header_sys_types_h_makedev=yes fi -else $as_nop - ac_cv_header_sys_types_h_makedev=no +else case e in #( + e) ac_cv_header_sys_types_h_makedev=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 printf "%s\n" "$ac_cv_header_sys_types_h_makedev" >&6; } @@ -5053,15 +5147,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -5088,14 +5183,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -5157,8 +5253,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5180,7 +5276,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5202,8 +5299,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5225,7 +5322,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5260,8 +5358,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5283,7 +5381,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5305,8 +5404,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -5345,7 +5444,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5369,8 +5469,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5392,7 +5492,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5418,8 +5519,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5441,7 +5542,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5479,8 +5581,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5502,7 +5604,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5524,8 +5627,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5547,7 +5650,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5576,10 +5680,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -5611,8 +5715,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5629,12 +5733,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -5652,8 +5758,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -5671,8 +5777,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5687,8 +5793,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5705,12 +5811,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -5737,8 +5846,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5755,25 +5864,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -5783,8 +5895,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5801,25 +5913,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -5829,8 +5944,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5847,25 +5962,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -5890,8 +6008,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -5909,9 +6027,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5925,15 +6044,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -5942,7 +6062,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -5965,9 +6086,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5981,24 +6103,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -6032,8 +6156,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CXX"; then +else case e in #( + e) if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6055,7 +6179,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then @@ -6081,8 +6206,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CXX"; then +else case e in #( + e) if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6104,7 +6229,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then @@ -6164,8 +6290,8 @@ printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6182,12 +6308,14 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } @@ -6205,8 +6333,8 @@ printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cxx_werror_flag=$ac_cxx_werror_flag +else case e in #( + e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" @@ -6224,8 +6352,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes -else $as_nop - CXXFLAGS="" +else case e in #( + e) CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6240,8 +6368,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : -else $as_nop - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else case e in #( + e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6258,12 +6386,15 @@ if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag + ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } @@ -6287,11 +6418,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} +if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_11=no +else case e in #( + e) ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6308,36 +6439,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" + CXX="$CXX $ac_cv_prog_cxx_cxx11" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 + ac_prog_cxx_stdcxx=cxx11 ;; +esac fi fi if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} +if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_98=no +else case e in #( + e) ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6354,25 +6488,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" + CXX="$CXX $ac_cv_prog_cxx_cxx98" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 + ac_prog_cxx_stdcxx=cxx98 ;; +esac fi fi @@ -6391,8 +6528,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AWK"; then +else case e in #( + e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6414,7 +6551,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then @@ -6434,8 +6572,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then +else case e in #( + e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6454,9 +6592,10 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in +case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -6491,7 +6630,8 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -6503,8 +6643,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -6526,9 +6666,10 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in +case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -6564,12 +6705,15 @@ else ac_cv_path_EGREP=$EGREP fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP # Find a good install program. We prefer a C program (faster), @@ -6592,8 +6736,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -6647,7 +6791,8 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -6677,8 +6822,8 @@ if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS @@ -6692,7 +6837,7 @@ do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; @@ -6701,18 +6846,17 @@ do done done IFS=$as_save_IFS - + ;; +esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" + # As a last resort, use plain mkdir -p, + # in the hope it doesn't have the bugs of ancient mkdir. + MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 @@ -6726,8 +6870,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PERL+y} then : printf %s "(cached) " >&6 -else $as_nop - case $PERL in +else case e in #( + e) case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; @@ -6752,6 +6896,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi PERL=$ac_cv_path_PERL @@ -6771,8 +6916,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PYTHON3+y} then : printf %s "(cached) " >&6 -else $as_nop - case $PYTHON3 in +else case e in #( + e) case $PYTHON3 in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path. ;; @@ -6797,6 +6942,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi PYTHON3=$ac_cv_path_PYTHON3 @@ -6967,8 +7113,9 @@ fi if test ${with_rsync_path+y} then : withval=$with_rsync_path; RSYNC_PATH="$with_rsync_path" -else $as_nop - RSYNC_PATH="rsync" +else case e in #( + e) RSYNC_PATH="rsync" ;; +esac fi @@ -6995,8 +7142,9 @@ then : else RSYNCD_SYSCONF="/etc/rsyncd.conf" fi -else $as_nop - RSYNCD_SYSCONF="/etc/rsyncd.conf" +else case e in #( + e) RSYNCD_SYSCONF="/etc/rsyncd.conf" ;; +esac fi @@ -7019,8 +7167,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_HAVE_REMSH+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$HAVE_REMSH"; then +else case e in #( + e) if test -n "$HAVE_REMSH"; then ac_cv_prog_HAVE_REMSH="$HAVE_REMSH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7043,7 +7191,8 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_REMSH" && ac_cv_prog_HAVE_REMSH="0" -fi +fi ;; +esac fi HAVE_REMSH=$ac_cv_prog_HAVE_REMSH if test -n "$HAVE_REMSH"; then @@ -7078,8 +7227,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_SHELL_PATH+y} then : printf %s "(cached) " >&6 -else $as_nop - case $SHELL_PATH in +else case e in #( + e) case $SHELL_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_SHELL_PATH="$SHELL_PATH" # Let the user override the test with a path. ;; @@ -7105,6 +7254,7 @@ IFS=$as_save_IFS test -z "$ac_cv_path_SHELL_PATH" && ac_cv_path_SHELL_PATH="/bin/sh" ;; +esac ;; esac fi SHELL_PATH=$ac_cv_path_SHELL_PATH @@ -7124,8 +7274,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_FAKEROOT_PATH+y} then : printf %s "(cached) " >&6 -else $as_nop - case $FAKEROOT_PATH in +else case e in #( + e) case $FAKEROOT_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_FAKEROOT_PATH="$FAKEROOT_PATH" # Let the user override the test with a path. ;; @@ -7151,6 +7301,7 @@ IFS=$as_save_IFS test -z "$ac_cv_path_FAKEROOT_PATH" && ac_cv_path_FAKEROOT_PATH="/usr/bin/fakeroot" ;; +esac ;; esac fi FAKEROOT_PATH=$ac_cv_path_FAKEROOT_PATH @@ -7169,8 +7320,9 @@ fi if test ${with_nobody_user+y} then : withval=$with_nobody_user; NOBODY_USER="$with_nobody_user" -else $as_nop - NOBODY_USER="nobody" +else case e in #( + e) NOBODY_USER="nobody" ;; +esac fi @@ -7239,12 +7391,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_STDLIB_H @@ -7281,11 +7433,13 @@ _ACEOF if ac_fn_cxx_try_run "$LINENO" then : CXX_OK=yes -else $as_nop - CXX_OK=no +else case e in #( + e) CXX_OK=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi else @@ -7326,8 +7480,9 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : CXX_OK=yes -else $as_nop - CXX_OK=no +else case e in #( + e) CXX_OK=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -7394,9 +7549,10 @@ if ac_fn_c_try_compile "$LINENO" then : NOEXECSTACK='-Wa,--noexecstack' ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - NOEXECSTACK='' ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) NOEXECSTACK='' ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$OLD_CFLAGS" @@ -7409,13 +7565,13 @@ printf %s "checking for broken largefile support... " >&6; } if test ${rsync_cv_HAVE_BROKEN_LARGEFILE+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_HAVE_BROKEN_LARGEFILE=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 @@ -7459,13 +7615,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_HAVE_BROKEN_LARGEFILE=yes -else $as_nop - rsync_cv_HAVE_BROKEN_LARGEFILE=no +else case e in #( + e) rsync_cv_HAVE_BROKEN_LARGEFILE=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_BROKEN_LARGEFILE" >&5 printf "%s\n" "$rsync_cv_HAVE_BROKEN_LARGEFILE" >&6; } @@ -7475,31 +7634,34 @@ if test ${enable_largefile+y} then : enableval=$enable_largefile; fi - -if test "$enable_largefile" != no; then - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -printf %s "checking for special C compiler options needed for large files... " >&6; } -if test ${ac_cv_sys_largefile_CC+y} +if test "$enable_largefile,$enable_year2038" != no,no +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CPPFLAGS option for large files" >&5 +printf %s "checking for $CPPFLAGS option for large files... " >&6; } +if test ${ac_cv_sys_largefile_opts+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) ac_save_CPPFLAGS=$CPPFLAGS + ac_opt_found=no + for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1"; do + if test x"$ac_opt" != x"none needed" +then : + CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" +fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, +#ifndef FTYPE +# define FTYPE off_t +#endif + /* Check that FTYPE can represent 2**63 - 1 correctly. + We can't simply define LARGE_FTYPE to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) +#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) + int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 + && LARGE_FTYPE % 2147483647 == 1) ? 1 : -1]; int main (void) @@ -7509,142 +7671,86 @@ main (void) return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - CC="$CC -n32" + if test x"$ac_opt" = x"none needed" +then : + # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. + CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t" if ac_fn_c_try_compile "$LINENO" then : - ac_cv_sys_largefile_CC=' -n32'; break + +else case e in #( + e) CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" + if ac_fn_c_try_compile "$LINENO" +then : + ac_opt='-D_FILE_OFFSET_BITS=64' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test ${ac_cv_sys_file_offset_bits+y} -then : - printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=no; break + ac_cv_sys_largefile_opts=$ac_opt + ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ + test $ac_opt_found = no || break + done + CPPFLAGS=$ac_save_CPPFLAGS - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done + test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h -;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 +printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; } + +ac_have_largefile=yes +case $ac_cv_sys_largefile_opts in #( + "none needed") : + ;; #( + "supported through gnulib") : + ;; #( + "support not detected") : + ac_have_largefile=no ;; #( + "-D_FILE_OFFSET_BITS=64") : + +printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h + ;; #( + "-D_LARGE_FILES=1") : + +printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h + ;; #( + *) : + as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } -if test ${ac_cv_sys_large_files+y} + +if test "$enable_year2038" != no +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CPPFLAGS option for timestamps after 2038" >&5 +printf %s "checking for $CPPFLAGS option for timestamps after 2038... " >&6; } +if test ${ac_cv_sys_year2038_opts+y} then : printf %s "(cached) " >&6 -else $as_nop - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" +else case e in #( + e) ac_save_CPPFLAGS="$CPPFLAGS" + ac_opt_found=no + for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do + if test x"$ac_opt" != x"none needed" then : - ac_cv_sys_large_files=no; break + CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + + #include + /* Check that time_t can represent 2**32 - 1 correctly. */ + #define LARGE_TIME_T \\ + ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) + int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 + && LARGE_TIME_T % 65537 == 0) + ? 1 : -1]; + int main (void) { @@ -7655,25 +7761,47 @@ main (void) _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_sys_large_files=1; break + ac_cv_sys_year2038_opts="$ac_opt" + ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done + test $ac_opt_found = no || break + done + CPPFLAGS="$ac_save_CPPFLAGS" + test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -printf "%s\n" "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h -;; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 +printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; } + +ac_have_year2038=yes +case $ac_cv_sys_year2038_opts in #( + "none needed") : + ;; #( + "support not detected") : + ac_have_year2038=no ;; #( + "-D_TIME_BITS=64") : + +printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h + ;; #( + "-D__MINGW_USE_VC2005_COMPAT") : + +printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h + ;; #( + "-U_USE_32_BIT_TIME_T"*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It +will stop working after mid-January 2038. Remove +_USE_32BIT_TIME_T from the compiler flags. +See 'config.log' for more details" "$LINENO" 5; } ;; #( + *) : + as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; esac -rm -rf conftest* - fi + fi +fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5 @@ -7693,14 +7821,14 @@ printf "%s\n" "#define INET6 1" >>confdefs.h ;; esac -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* AF_INET6 availability check */ #include @@ -7722,14 +7850,17 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define INET6 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi @@ -7770,16 +7901,22 @@ printf %s "checking for deflateParams in -lz... " >&6; } if test ${ac_cv_lib_z_deflateParams+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char deflateParams (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char deflateParams (void); int main (void) { @@ -7791,12 +7928,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_deflateParams=yes -else $as_nop - ac_cv_lib_z_deflateParams=no +else case e in #( + e) ac_cv_lib_z_deflateParams=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflateParams" >&5 printf "%s\n" "$ac_cv_lib_z_deflateParams" >&6; } @@ -7806,8 +7945,9 @@ then : LIBS="-lz $LIBS" -else $as_nop - with_included_zlib=yes +else case e in #( + e) with_included_zlib=yes ;; +esac fi fi @@ -7845,15 +7985,21 @@ printf %s "checking for library containing EVP_MD_CTX_copy... " >&6; } if test ${ac_cv_search_EVP_MD_CTX_copy+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char EVP_MD_CTX_copy (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char EVP_MD_CTX_copy (void); int main (void) { @@ -7884,11 +8030,13 @@ done if test ${ac_cv_search_EVP_MD_CTX_copy+y} then : -else $as_nop - ac_cv_search_EVP_MD_CTX_copy=no +else case e in #( + e) ac_cv_search_EVP_MD_CTX_copy=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_MD_CTX_copy" >&5 printf "%s\n" "$ac_cv_search_EVP_MD_CTX_copy" >&6; } @@ -7899,9 +8047,10 @@ then : printf "%s\n" "#define USE_OPENSSL 1" >>confdefs.h enable_openssl=yes -else $as_nop - err_msg="$err_msg$nl- Failed to find EVP_MD_CTX_copy function in openssl crypto lib."; - no_lib="$no_lib openssl" +else case e in #( + e) err_msg="$err_msg$nl- Failed to find EVP_MD_CTX_copy function in openssl crypto lib."; + no_lib="$no_lib openssl" ;; +esac fi else @@ -8009,15 +8158,21 @@ printf %s "checking for library containing XXH64_createState... " >&6; } if test ${ac_cv_search_XXH64_createState+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char XXH64_createState (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char XXH64_createState (void); int main (void) { @@ -8048,11 +8203,13 @@ done if test ${ac_cv_search_XXH64_createState+y} then : -else $as_nop - ac_cv_search_XXH64_createState=no +else case e in #( + e) ac_cv_search_XXH64_createState=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_XXH64_createState" >&5 printf "%s\n" "$ac_cv_search_XXH64_createState" >&6; } @@ -8062,9 +8219,10 @@ then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf "%s\n" "#define SUPPORT_XXHASH 1" >>confdefs.h -else $as_nop - err_msg="$err_msg$nl- Failed to find XXH64_createState function in xxhash lib."; - no_lib="$no_lib xxhash" +else case e in #( + e) err_msg="$err_msg$nl- Failed to find XXH64_createState function in xxhash lib."; + no_lib="$no_lib xxhash" ;; +esac fi else @@ -8096,15 +8254,21 @@ printf %s "checking for library containing ZSTD_minCLevel... " >&6; } if test ${ac_cv_search_ZSTD_minCLevel+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ZSTD_minCLevel (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_minCLevel (void); int main (void) { @@ -8135,11 +8299,13 @@ done if test ${ac_cv_search_ZSTD_minCLevel+y} then : -else $as_nop - ac_cv_search_ZSTD_minCLevel=no +else case e in #( + e) ac_cv_search_ZSTD_minCLevel=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ZSTD_minCLevel" >&5 printf "%s\n" "$ac_cv_search_ZSTD_minCLevel" >&6; } @@ -8149,9 +8315,10 @@ then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf "%s\n" "#define SUPPORT_ZSTD 1" >>confdefs.h -else $as_nop - err_msg="$err_msg$nl- Failed to find ZSTD_minCLevel function in zstd lib."; - no_lib="$no_lib zstd" +else case e in #( + e) err_msg="$err_msg$nl- Failed to find ZSTD_minCLevel function in zstd lib."; + no_lib="$no_lib zstd" ;; +esac fi else @@ -8183,15 +8350,21 @@ printf %s "checking for library containing LZ4_compress_default... " >&6; } if test ${ac_cv_search_LZ4_compress_default+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char LZ4_compress_default (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char LZ4_compress_default (void); int main (void) { @@ -8222,11 +8395,13 @@ done if test ${ac_cv_search_LZ4_compress_default+y} then : -else $as_nop - ac_cv_search_LZ4_compress_default=no +else case e in #( + e) ac_cv_search_LZ4_compress_default=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_LZ4_compress_default" >&5 printf "%s\n" "$ac_cv_search_LZ4_compress_default" >&6; } @@ -8236,9 +8411,10 @@ then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" printf "%s\n" "#define SUPPORT_LZ4 1" >>confdefs.h -else $as_nop - err_msg="$err_msg$nl- Failed to find LZ4_compress_default function in lz4 lib."; - no_lib="$no_lib lz4" +else case e in #( + e) err_msg="$err_msg$nl- Failed to find LZ4_compress_default function in lz4 lib."; + no_lib="$no_lib lz4" ;; +esac fi else @@ -8274,13 +8450,13 @@ printf %s "checking if makedev takes 3 args... " >&6; } if test ${rsync_cv_MAKEDEV_TAKES_3_ARGS+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_MAKEDEV_TAKES_3_ARGS=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H @@ -8307,13 +8483,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_MAKEDEV_TAKES_3_ARGS=yes -else $as_nop - rsync_cv_MAKEDEV_TAKES_3_ARGS=no +else case e in #( + e) rsync_cv_MAKEDEV_TAKES_3_ARGS=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_MAKEDEV_TAKES_3_ARGS" >&5 printf "%s\n" "$rsync_cv_MAKEDEV_TAKES_3_ARGS" >&6; } @@ -8325,28 +8504,30 @@ fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } @@ -8358,28 +8539,30 @@ printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } @@ -8391,28 +8574,30 @@ printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } @@ -8424,28 +8609,30 @@ printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } @@ -8457,28 +8644,30 @@ printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int16_t" >&5 printf %s "checking size of int16_t... " >&6; } if test ${ac_cv_sizeof_int16_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int16_t))" "ac_cv_sizeof_int16_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int16_t))" "ac_cv_sizeof_int16_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_int16_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_int16_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int16_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int16_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int16_t" >&5 printf "%s\n" "$ac_cv_sizeof_int16_t" >&6; } @@ -8490,28 +8679,30 @@ printf "%s\n" "#define SIZEOF_INT16_T $ac_cv_sizeof_int16_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uint16_t" >&5 printf %s "checking size of uint16_t... " >&6; } if test ${ac_cv_sizeof_uint16_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint16_t))" "ac_cv_sizeof_uint16_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint16_t))" "ac_cv_sizeof_uint16_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_uint16_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_uint16_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (uint16_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_uint16_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint16_t" >&5 printf "%s\n" "$ac_cv_sizeof_uint16_t" >&6; } @@ -8523,28 +8714,30 @@ printf "%s\n" "#define SIZEOF_UINT16_T $ac_cv_sizeof_uint16_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int32_t" >&5 printf %s "checking size of int32_t... " >&6; } if test ${ac_cv_sizeof_int32_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int32_t))" "ac_cv_sizeof_int32_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int32_t))" "ac_cv_sizeof_int32_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_int32_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_int32_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int32_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int32_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int32_t" >&5 printf "%s\n" "$ac_cv_sizeof_int32_t" >&6; } @@ -8556,28 +8749,30 @@ printf "%s\n" "#define SIZEOF_INT32_T $ac_cv_sizeof_int32_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uint32_t" >&5 printf %s "checking size of uint32_t... " >&6; } if test ${ac_cv_sizeof_uint32_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint32_t))" "ac_cv_sizeof_uint32_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uint32_t))" "ac_cv_sizeof_uint32_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_uint32_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_uint32_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (uint32_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_uint32_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uint32_t" >&5 printf "%s\n" "$ac_cv_sizeof_uint32_t" >&6; } @@ -8589,28 +8784,30 @@ printf "%s\n" "#define SIZEOF_UINT32_T $ac_cv_sizeof_uint32_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int64_t" >&5 printf %s "checking size of int64_t... " >&6; } if test ${ac_cv_sizeof_int64_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_int64_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_int64_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int64_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int64_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int64_t" >&5 printf "%s\n" "$ac_cv_sizeof_int64_t" >&6; } @@ -8622,28 +8819,30 @@ printf "%s\n" "#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_off_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_off_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } @@ -8655,28 +8854,30 @@ printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5 printf %s "checking size of off64_t... " >&6; } if test ${ac_cv_sizeof_off64_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_off64_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_off64_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off64_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off64_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5 printf "%s\n" "$ac_cv_sizeof_off64_t" >&6; } @@ -8688,28 +8889,30 @@ printf "%s\n" "#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 printf %s "checking size of time_t... " >&6; } if test ${ac_cv_sizeof_time_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_time_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_time_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (time_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_time_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } @@ -8721,28 +8924,30 @@ printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5 printf %s "checking size of char*... " >&6; } if test ${ac_cv_sizeof_charp+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_charp" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_charp" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char*) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_charp=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5 printf "%s\n" "$ac_cv_sizeof_charp" >&6; } @@ -8758,8 +8963,8 @@ printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_inline=no +else case e in #( + e) ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8777,7 +8982,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf "%s\n" "$ac_cv_c_inline" >&6; } @@ -8804,8 +9010,8 @@ printf %s "checking for long double with more range or precision than double... if test ${ac_cv_type_long_double_wider+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include long double const a[] = @@ -8839,10 +9045,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_long_double_wider=yes -else $as_nop - ac_cv_type_long_double_wider=no +else case e in #( + e) ac_cv_type_long_double_wider=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5 printf "%s\n" "$ac_cv_type_long_double_wider" >&6; } @@ -8859,37 +9067,26 @@ printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -printf %s "checking for uid_t in sys/types.h... " >&6; } -if test ${ac_cv_type_uid_t+y} +ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" +if test "x$ac_cv_type_uid_t" = xyes then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1 -then : - ac_cv_type_uid_t=yes -else $as_nop - ac_cv_type_uid_t=no -fi -rm -rf conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -printf "%s\n" "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then +else case e in #( + e) printf "%s\n" "#define uid_t int" >>confdefs.h + ;; +esac +fi +ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" +if test "x$ac_cv_type_gid_t" = xyes +then : +else case e in #( + e) printf "%s\n" "#define gid_t int" >>confdefs.h - + ;; +esac fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" @@ -8939,67 +9136,118 @@ printf %s "checking type of array argument to getgroups... " >&6; } if test ${ac_cv_type_getgroups+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) # If AC_TYPE_UID_T says there isn't any gid_t typedef, then we can skip +# everything below. +if test $ac_cv_type_gid_t = no then : - ac_cv_type_getgroups=cross -else $as_nop + ac_cv_type_getgroups=int +else case e in #( + e) # Test programs below rely on strict type checking of extern declarations: + # 'extern int getgroups(int, int *); extern int getgroups(int, pid_t *);' + # is valid in C89 if and only if pid_t is a typedef for int. Unlike + # anything involving either an assignment or a function call, compilers + # tend to make this kind of type mismatch a hard error, not just an + # "incompatible pointer types" warning. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Thanks to Mike Rendell for this test. */ $ac_includes_default -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - +extern int getgroups(int, gid_t *); int main (void) { - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long int lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short int but getgroups modifies an array - of ints. */ - return n > 0 && gidset[n] != val.gval; +return !(getgroups(0, 0) >= 0); + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_type_getgroups=gid_t -else $as_nop - ac_cv_type_getgroups=int + ac_getgroups_gidarray=yes +else case e in #( + e) ac_getgroups_gidarray=no ;; +esac fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +extern int getgroups(int, int *); +int +main (void) +{ +return !(getgroups(0, 0) >= 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_getgroups_intarray=yes +else case e in #( + e) ac_getgroups_intarray=no ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -if test $ac_cv_type_getgroups = cross; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case int:$ac_getgroups_intarray,gid:$ac_getgroups_gidarray in #( + int:yes,gid:no) : + ac_cv_type_getgroups=int ;; #( + int:no,gid:yes) : + ac_cv_type_getgroups=gid_t ;; #( + int:yes,gid:yes) : + + # Both programs compiled - this means *either* that getgroups + # was declared with no prototype, in which case we should use int, + # or that it was declared prototyped but gid_t is a typedef for int, + # in which case we should use gid_t. Distinguish the two cases + # by testing if the compiler catches a blatantly incorrect function + # signature for getgroups. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +$ac_includes_default +extern int getgroups(int, float); +int +main (void) +{ +return !(getgroups(0, 0) >= 0); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1 +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_type_getgroups=gid_t -else $as_nop - ac_cv_type_getgroups=int + + # Compiler did not catch incorrect argument list; + # getgroups is unprototyped. + ac_cv_type_getgroups=int + +else case e in #( + e) + # Compiler caught incorrect argument list; + # gid_t is a typedef for int. + ac_cv_type_getgroups=gid_t + ;; +esac fi -rm -rf conftest* +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; #( + *) : + # Both programs failed to compile - this probably means getgroups + # wasn't declared at all. Use 'int', as this is probably a very + # old system where the type _would have been_ int. + ac_cv_type_getgroups=int + ;; +esac + ;; +esac fi + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 printf "%s\n" "$ac_cv_type_getgroups" >&6; } - printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h @@ -9089,15 +9337,15 @@ fi if test "x$ac_cv_type_socklen_t" = xyes then : -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 printf %s "checking for socklen_t equivalent... " >&6; } if test ${rsync_cv_socklen_t_equiv+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername rsync_cv_socklen_t_equiv= @@ -9136,14 +9384,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "x$rsync_cv_socklen_t_equiv" = x; then as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_socklen_t_equiv" >&5 printf "%s\n" "$rsync_cv_socklen_t_equiv" >&6; } printf "%s\n" "#define socklen_t $rsync_cv_socklen_t_equiv" >>confdefs.h - + ;; +esac fi @@ -9153,8 +9403,8 @@ printf %s "checking for errno in errno.h... " >&6; } if test ${rsync_cv_errno+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9169,10 +9419,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : rsync_cv_errno=yes -else $as_nop - rsync_cv_have_errno_decl=no +else case e in #( + e) rsync_cv_have_errno_decl=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_errno" >&5 printf "%s\n" "$rsync_cv_errno" >&6; } @@ -9205,16 +9457,22 @@ printf %s "checking for printf in -lnsl_s... " >&6; } if test ${ac_cv_lib_nsl_s_printf+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl_s $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char printf (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char printf (void); int main (void) { @@ -9226,12 +9484,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_s_printf=yes -else $as_nop - ac_cv_lib_nsl_s_printf=no +else case e in #( + e) ac_cv_lib_nsl_s_printf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_printf" >&5 printf "%s\n" "$ac_cv_lib_nsl_s_printf" >&6; } @@ -9251,16 +9511,22 @@ printf %s "checking for printf in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_printf+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char printf (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char printf (void); int main (void) { @@ -9272,12 +9538,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_printf=yes -else $as_nop - ac_cv_lib_nsl_printf=no +else case e in #( + e) ac_cv_lib_nsl_printf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_printf" >&5 printf "%s\n" "$ac_cv_lib_nsl_printf" >&6; } @@ -9297,16 +9565,22 @@ printf %s "checking for connect in -lsocket... " >&6; } if test ${ac_cv_lib_socket_connect+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char connect (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char connect (void); int main (void) { @@ -9318,12 +9592,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_connect=yes -else $as_nop - ac_cv_lib_socket_connect=no +else case e in #( + e) ac_cv_lib_socket_connect=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 printf "%s\n" "$ac_cv_lib_socket_connect" >&6; } @@ -9343,16 +9619,22 @@ printf %s "checking for connect in -linet... " >&6; } if test ${ac_cv_lib_inet_connect+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char connect (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char connect (void); int main (void) { @@ -9364,12 +9646,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_inet_connect=yes -else $as_nop - ac_cv_lib_inet_connect=no +else case e in #( + e) ac_cv_lib_inet_connect=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_connect" >&5 printf "%s\n" "$ac_cv_lib_inet_connect" >&6; } @@ -9397,15 +9681,21 @@ printf %s "checking for library containing inet_ntop... " >&6; } if test ${ac_cv_search_inet_ntop+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inet_ntop (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inet_ntop (void); int main (void) { @@ -9436,11 +9726,13 @@ done if test ${ac_cv_search_inet_ntop+y} then : -else $as_nop - ac_cv_search_inet_ntop=no +else case e in #( + e) ac_cv_search_inet_ntop=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 printf "%s\n" "$ac_cv_search_inet_ntop" >&6; } @@ -9460,15 +9752,21 @@ printf %s "checking for library containing iconv_open... " >&6; } if test ${ac_cv_search_iconv_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char iconv_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char iconv_open (void); int main (void) { @@ -9499,11 +9797,13 @@ done if test ${ac_cv_search_iconv_open+y} then : -else $as_nop - ac_cv_search_iconv_open=no +else case e in #( + e) ac_cv_search_iconv_open=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5 printf "%s\n" "$ac_cv_search_iconv_open" >&6; } @@ -9519,15 +9819,21 @@ printf %s "checking for library containing libiconv_open... " >&6; } if test ${ac_cv_search_libiconv_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char libiconv_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char libiconv_open (void); int main (void) { @@ -9558,11 +9864,13 @@ done if test ${ac_cv_search_libiconv_open+y} then : -else $as_nop - ac_cv_search_libiconv_open=no +else case e in #( + e) ac_cv_search_libiconv_open=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libiconv_open" >&5 printf "%s\n" "$ac_cv_search_libiconv_open" >&6; } @@ -9579,8 +9887,8 @@ printf %s "checking for iconv declaration... " >&6; } if test ${am_cv_proto_iconv+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9609,11 +9917,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : am_cv_proto_iconv_arg1="" -else $as_nop - am_cv_proto_iconv_arg1="const" +else case e in #( + e) am_cv_proto_iconv_arg1="const" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" ;; +esac fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed 's/( /(/'` @@ -9631,26 +9941,28 @@ if test "x$ac_cv_func_inet_ntop" = xyes then : printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h -else $as_nop - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" inet_ntop.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" ;; esac - + ;; +esac fi ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" if test "x$ac_cv_func_inet_pton" = xyes then : printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h -else $as_nop - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" inet_pton.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext" ;; esac - + ;; +esac fi @@ -9661,8 +9973,8 @@ printf %s "checking for struct addrinfo... " >&6; } if eval test \${ac_cv_type_$cv+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -9678,10 +9990,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "ac_cv_type_$cv=yes" -else $as_nop - eval "ac_cv_type_$cv=no" +else case e in #( + e) eval "ac_cv_type_$cv=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi ac_foo=`eval echo \\$ac_cv_type_$cv` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 @@ -9711,8 +10025,8 @@ printf %s "checking for struct sockaddr_storage... " >&6; } if eval test \${ac_cv_type_$cv+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -9734,10 +10048,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "ac_cv_type_$cv=yes" -else $as_nop - eval "ac_cv_type_$cv=no" +else case e in #( + e) eval "ac_cv_type_$cv=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi ac_foo=`eval echo \\$ac_cv_type_$cv` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 @@ -9755,21 +10071,156 @@ printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h fi fi - -printf "%s\n" "#define $ac_tr_hdr 1" >>confdefs.h - + +printf "%s\n" "#define $ac_tr_hdr 1" >>confdefs.h + +fi + + +# Irix 6.5 has getaddrinfo but not the corresponding defines, so use +# builtin getaddrinfo if one of the defines don't exist + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 +printf %s "checking for egrep -e... " >&6; } +if test ${ac_cv_path_EGREP_TRADITIONAL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + : + fi +else + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL +fi + + if test "$ac_cv_path_EGREP_TRADITIONAL" +then : + ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL +fi + ;; +esac +fi ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 +printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } + EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL - -# Irix 6.5 has getaddrinfo but not the corresponding defines, so use -# builtin getaddrinfo if one of the defines don't exist { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether defines needed by getaddrinfo exist" >&5 printf %s "checking whether defines needed by getaddrinfo exist... " >&6; } if test ${rsync_cv_HAVE_GETADDR_DEFINES+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9787,14 +10238,16 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : rsync_cv_HAVE_GETADDR_DEFINES=yes -else $as_nop - rsync_cv_HAVE_GETADDR_DEFINES=no +else case e in #( + e) rsync_cv_HAVE_GETADDR_DEFINES=no ;; +esac fi rm -rf conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_GETADDR_DEFINES" >&5 printf "%s\n" "$rsync_cv_HAVE_GETADDR_DEFINES" >&6; } @@ -9812,8 +10265,8 @@ if test "x$ac_cv_func_getaddrinfo" = xyes then : printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo by including " >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo by including " >&5 printf %s "checking for getaddrinfo by including ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9840,29 +10293,32 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } case " $LIBOBJS " in *" getaddrinfo.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;; esac - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi done -else $as_nop - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" getaddrinfo.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;; esac - + ;; +esac fi ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" " @@ -9943,8 +10399,8 @@ printf %s "checking for struct stat64... " >&6; } if eval test \${ac_cv_type_$cv+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -9975,10 +10431,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "ac_cv_type_$cv=yes" -else $as_nop - eval "ac_cv_type_$cv=no" +else case e in #( + e) eval "ac_cv_type_$cv=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi ac_foo=`eval echo \\$ac_cv_type_$cv` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 @@ -10017,16 +10475,22 @@ printf %s "checking for strcasecmp in -lresolv... " >&6; } if test ${ac_cv_lib_resolv_strcasecmp+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char strcasecmp (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char strcasecmp (void); int main (void) { @@ -10038,12 +10502,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_resolv_strcasecmp=yes -else $as_nop - ac_cv_lib_resolv_strcasecmp=no +else case e in #( + e) ac_cv_lib_resolv_strcasecmp=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5 printf "%s\n" "$ac_cv_lib_resolv_strcasecmp" >&6; } @@ -10070,16 +10536,22 @@ printf %s "checking for aclsort in -lsec... " >&6; } if test ${ac_cv_lib_sec_aclsort+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsec $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char aclsort (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char aclsort (void); int main (void) { @@ -10091,12 +10563,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sec_aclsort=yes -else $as_nop - ac_cv_lib_sec_aclsort=no +else case e in #( + e) ac_cv_lib_sec_aclsort=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_aclsort" >&5 printf "%s\n" "$ac_cv_lib_sec_aclsort" >&6; } @@ -10118,14 +10592,14 @@ printf %s "checking whether utime accepts a null argument... " >&6; } if test ${ac_cv_func_utime_null+y} then : printf %s "(cached) " >&6 -else $as_nop - rm -f conftest.data; >conftest.data +else case e in #( + e) rm -f conftest.data; >conftest.data # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. if test "$cross_compiling" = yes then : ac_cv_func_utime_null='guessing yes' -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_UTIME_H @@ -10147,13 +10621,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_utime_null=yes -else $as_nop - ac_cv_func_utime_null=no +else case e in #( + e) ac_cv_func_utime_null=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_utime_null" >&5 printf "%s\n" "$ac_cv_func_utime_null" >&6; } @@ -10169,10 +10646,11 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h - + ;; +esac fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works @@ -10182,8 +10660,8 @@ printf %s "checking for working alloca.h... " >&6; } if test ${ac_cv_working_alloca_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -10198,11 +10676,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_alloca_h=yes -else $as_nop - ac_cv_working_alloca_h=no +else case e in #( + e) ac_cv_working_alloca_h=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 printf "%s\n" "$ac_cv_working_alloca_h" >&6; } @@ -10217,10 +10697,10 @@ printf %s "checking for alloca... " >&6; } if test ${ac_cv_func_alloca_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes -else +else case e in #( + e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h +if test "$ac_cv_func_alloca_works" != yes +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10251,15 +10731,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_alloca_works=yes -else $as_nop - ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi if test $ac_cv_func_alloca_works = yes; then @@ -10281,12 +10760,12 @@ printf %s "checking stack direction for C alloca... " >&6; } if test ${ac_cv_c_stack_direction+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_c_stack_direction=0 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10309,13 +10788,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_stack_direction=1 -else $as_nop - ac_cv_c_stack_direction=-1 +else case e in #( + e) ac_cv_c_stack_direction=-1 ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 printf "%s\n" "$ac_cv_c_stack_direction" >&6; } @@ -10762,8 +11244,8 @@ printf %s "checking for useable fallocate... " >&6; } if test ${rsync_cv_have_fallocate+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10781,11 +11263,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : rsync_cv_have_fallocate=yes -else $as_nop - rsync_cv_have_fallocate=no +else case e in #( + e) rsync_cv_have_fallocate=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_have_fallocate" >&5 printf "%s\n" "$rsync_cv_have_fallocate" >&6; } @@ -10816,12 +11300,13 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_FALLOC_FL_PUNCH_HOLE 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -10846,12 +11331,13 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_FALLOC_FL_ZERO_RANGE 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -10860,8 +11346,8 @@ printf %s "checking for SYS_fallocate... " >&6; } if test ${rsync_cv_have_sys_fallocate+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10882,10 +11368,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : rsync_cv_have_sys_fallocate=yes -else $as_nop - rsync_cv_have_sys_fallocate=no +else case e in #( + e) rsync_cv_have_sys_fallocate=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_have_sys_fallocate" >&5 printf "%s\n" "$rsync_cv_have_sys_fallocate" >&6; } @@ -10933,8 +11421,8 @@ printf %s "checking whether getpgrp requires zero arguments... " >&6; } if test ${ac_cv_func_getpgrp_void+y} then : printf %s "(cached) " >&6 -else $as_nop - # Use it with a single arg. +else case e in #( + e) # Use it with a single arg. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -10949,11 +11437,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getpgrp_void=no -else $as_nop - ac_cv_func_getpgrp_void=yes +else case e in #( + e) ac_cv_func_getpgrp_void=yes ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; } @@ -10969,8 +11459,9 @@ fi if test ${enable_iconv_open+y} then : enableval=$enable_iconv_open; -else $as_nop - enable_iconv_open=$ac_cv_func_iconv_open +else case e in #( + e) enable_iconv_open=$ac_cv_func_iconv_open ;; +esac fi @@ -10984,8 +11475,9 @@ fi if test ${enable_iconv+y} then : enableval=$enable_iconv; -else $as_nop - enable_iconv=$enable_iconv_open +else case e in #( + e) enable_iconv=$enable_iconv_open ;; +esac fi @@ -11007,13 +11499,13 @@ printf %s "checking whether chown() modifies symlinks... " >&6; } if test ${rsync_cv_chown_modifies_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_chown_modifies_symlink=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_UNISTD_H @@ -11032,13 +11524,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_chown_modifies_symlink=yes -else $as_nop - rsync_cv_chown_modifies_symlink=no +else case e in #( + e) rsync_cv_chown_modifies_symlink=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_chown_modifies_symlink" >&5 printf "%s\n" "$rsync_cv_chown_modifies_symlink" >&6; } @@ -11053,13 +11548,13 @@ printf %s "checking whether link() can hard-link symlinks... " >&6; } if test ${rsync_cv_can_hardlink_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_can_hardlink_symlink=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_FCNTL_H @@ -11088,13 +11583,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_can_hardlink_symlink=yes -else $as_nop - rsync_cv_can_hardlink_symlink=no +else case e in #( + e) rsync_cv_can_hardlink_symlink=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_can_hardlink_symlink" >&5 printf "%s\n" "$rsync_cv_can_hardlink_symlink" >&6; } @@ -11109,13 +11607,13 @@ printf %s "checking whether link() can hard-link special files... " >&6; } if test ${rsync_cv_can_hardlink_special+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_can_hardlink_special=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_UNISTD_H @@ -11138,13 +11636,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_can_hardlink_special=yes -else $as_nop - rsync_cv_can_hardlink_special=no +else case e in #( + e) rsync_cv_can_hardlink_special=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_can_hardlink_special" >&5 printf "%s\n" "$rsync_cv_can_hardlink_special" >&6; } @@ -11159,13 +11660,13 @@ printf %s "checking for working socketpair... " >&6; } if test ${rsync_cv_HAVE_SOCKETPAIR+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_HAVE_SOCKETPAIR=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H @@ -11183,13 +11684,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_HAVE_SOCKETPAIR=yes -else $as_nop - rsync_cv_HAVE_SOCKETPAIR=no +else case e in #( + e) rsync_cv_HAVE_SOCKETPAIR=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_SOCKETPAIR" >&5 printf "%s\n" "$rsync_cv_HAVE_SOCKETPAIR" >&6; } @@ -11204,13 +11708,14 @@ if test "x$ac_cv_func_getpass" = xyes then : printf "%s\n" "#define HAVE_GETPASS 1" >>confdefs.h -else $as_nop - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" getpass.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getpass.$ac_objext" ;; esac - + ;; +esac fi @@ -11220,16 +11725,22 @@ printf %s "checking for poptGetContext in -lpopt... " >&6; } if test ${ac_cv_lib_popt_poptGetContext+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpopt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char poptGetContext (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char poptGetContext (void); int main (void) { @@ -11241,12 +11752,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_popt_poptGetContext=yes -else $as_nop - ac_cv_lib_popt_poptGetContext=no +else case e in #( + e) ac_cv_lib_popt_poptGetContext=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_popt_poptGetContext" >&5 printf "%s\n" "$ac_cv_lib_popt_poptGetContext" >&6; } @@ -11256,8 +11769,9 @@ then : LIBS="-lpopt $LIBS" -else $as_nop - with_included_popt=yes +else case e in #( + e) with_included_popt=yes ;; +esac fi fi @@ -11301,8 +11815,8 @@ printf %s "checking for unsigned char... " >&6; } if test ${rsync_cv_SIGNED_CHAR_OK+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11317,10 +11831,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : rsync_cv_SIGNED_CHAR_OK=yes -else $as_nop - rsync_cv_SIGNED_CHAR_OK=no +else case e in #( + e) rsync_cv_SIGNED_CHAR_OK=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_SIGNED_CHAR_OK" >&5 printf "%s\n" "$rsync_cv_SIGNED_CHAR_OK" >&6; } @@ -11335,13 +11851,13 @@ printf %s "checking for broken readdir... " >&6; } if test ${rsync_cv_HAVE_BROKEN_READDIR+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_HAVE_BROKEN_READDIR=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H @@ -11355,13 +11871,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_HAVE_BROKEN_READDIR=yes -else $as_nop - rsync_cv_HAVE_BROKEN_READDIR=no +else case e in #( + e) rsync_cv_HAVE_BROKEN_READDIR=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_BROKEN_READDIR" >&5 printf "%s\n" "$rsync_cv_HAVE_BROKEN_READDIR" >&6; } @@ -11376,8 +11895,8 @@ printf %s "checking for utimbuf... " >&6; } if test ${rsync_cv_HAVE_STRUCT_UTIMBUF+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11396,10 +11915,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : rsync_cv_HAVE_STRUCT_UTIMBUF=yes -else $as_nop - rsync_cv_HAVE_STRUCT_UTIMBUF=no +else case e in #( + e) rsync_cv_HAVE_STRUCT_UTIMBUF=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_STRUCT_UTIMBUF" >&5 printf "%s\n" "$rsync_cv_HAVE_STRUCT_UTIMBUF" >&6; } @@ -11414,8 +11935,8 @@ printf %s "checking if gettimeofday takes tz argument... " >&6; } if test ${rsync_cv_HAVE_GETTIMEOFDAY_TZ+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -11433,10 +11954,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes -else $as_nop - rsync_cv_HAVE_GETTIMEOFDAY_TZ=no +else case e in #( + e) rsync_cv_HAVE_GETTIMEOFDAY_TZ=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&5 printf "%s\n" "$rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&6; } @@ -11451,13 +11974,13 @@ printf %s "checking for C99 vsnprintf... " >&6; } if test ${rsync_cv_HAVE_C99_VSNPRINTF+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_HAVE_C99_VSNPRINTF=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H @@ -11487,13 +12010,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_HAVE_C99_VSNPRINTF=yes -else $as_nop - rsync_cv_HAVE_C99_VSNPRINTF=no +else case e in #( + e) rsync_cv_HAVE_C99_VSNPRINTF=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_C99_VSNPRINTF" >&5 printf "%s\n" "$rsync_cv_HAVE_C99_VSNPRINTF" >&6; } @@ -11509,13 +12035,13 @@ printf %s "checking for secure mkstemp... " >&6; } if test ${rsync_cv_HAVE_SECURE_MKSTEMP+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_HAVE_SECURE_MKSTEMP=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_SYS_TYPES_H @@ -11539,13 +12065,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_HAVE_SECURE_MKSTEMP=yes -else $as_nop - rsync_cv_HAVE_SECURE_MKSTEMP=no +else case e in #( + e) rsync_cv_HAVE_SECURE_MKSTEMP=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_HAVE_SECURE_MKSTEMP" >&5 printf "%s\n" "$rsync_cv_HAVE_SECURE_MKSTEMP" >&6; } @@ -11569,13 +12098,13 @@ printf %s "checking if mknod creates FIFOs... " >&6; } if test ${rsync_cv_MKNOD_CREATES_FIFOS+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_MKNOD_CREATES_FIFOS=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -11592,13 +12121,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_MKNOD_CREATES_FIFOS=yes -else $as_nop - rsync_cv_MKNOD_CREATES_FIFOS=no +else case e in #( + e) rsync_cv_MKNOD_CREATES_FIFOS=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_MKNOD_CREATES_FIFOS" >&5 printf "%s\n" "$rsync_cv_MKNOD_CREATES_FIFOS" >&6; } @@ -11613,13 +12145,13 @@ printf %s "checking if mknod creates sockets... " >&6; } if test ${rsync_cv_MKNOD_CREATES_SOCKETS+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : rsync_cv_MKNOD_CREATES_SOCKETS=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -11636,13 +12168,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : rsync_cv_MKNOD_CREATES_SOCKETS=yes -else $as_nop - rsync_cv_MKNOD_CREATES_SOCKETS=no +else case e in #( + e) rsync_cv_MKNOD_CREATES_SOCKETS=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rsync_cv_MKNOD_CREATES_SOCKETS" >&5 printf "%s\n" "$rsync_cv_MKNOD_CREATES_SOCKETS" >&6; } @@ -11660,8 +12195,8 @@ printf %s "checking whether -c -o works... " >&6; } if test ${rsync_cv_DASHC_WORKS_WITH_DASHO+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) rm -rf conftest* cat > conftest.$ac_ext <&5 printf "%s\n" "$rsync_cv_DASHC_WORKS_WITH_DASHO" >&6; } @@ -11812,16 +12348,22 @@ printf %s "checking for acl_get_file in -lacl... " >&6; } if test ${ac_cv_lib_acl_acl_get_file+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lacl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char acl_get_file (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char acl_get_file (void); int main (void) { @@ -11833,12 +12375,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_acl_acl_get_file=yes -else $as_nop - ac_cv_lib_acl_acl_get_file=no +else case e in #( + e) ac_cv_lib_acl_acl_get_file=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; } @@ -11855,8 +12399,8 @@ printf %s "checking for ACL support... " >&6; } if test ${samba_cv_HAVE_POSIX_ACLS+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11877,11 +12421,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : samba_cv_HAVE_POSIX_ACLS=yes -else $as_nop - samba_cv_HAVE_POSIX_ACLS=no +else case e in #( + e) samba_cv_HAVE_POSIX_ACLS=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_POSIX_ACLS" >&5 printf "%s\n" "$samba_cv_HAVE_POSIX_ACLS" >&6; } @@ -11900,8 +12446,8 @@ printf %s "checking for acl_get_perm_np... " >&6; } if test ${samba_cv_HAVE_ACL_GET_PERM_NP+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11922,11 +12468,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : samba_cv_HAVE_ACL_GET_PERM_NP=yes -else $as_nop - samba_cv_HAVE_ACL_GET_PERM_NP=no +else case e in #( + e) samba_cv_HAVE_ACL_GET_PERM_NP=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $samba_cv_HAVE_ACL_GET_PERM_NP" >&5 printf "%s\n" "$samba_cv_HAVE_ACL_GET_PERM_NP" >&6; } @@ -11955,11 +12503,12 @@ printf %s "checking whether to support extended attributes... " >&6; } if test ${enable_xattr_support+y} then : enableval=$enable_xattr_support; -else $as_nop - case "$ac_cv_func_getxattr$ac_cv_func_extattr_get_link$ac_cv_func_attropen" in +else case e in #( + e) case "$ac_cv_func_getxattr$ac_cv_func_extattr_get_link$ac_cv_func_attropen" in *yes*) enable_xattr_support=maybe ;; *) enable_xattr_support=no ;; - esac + esac ;; +esac fi @@ -11979,21 +12528,26 @@ printf "%s\n" "#define HAVE_LINUX_XATTRS 1" >>confdefs.h printf "%s\n" "#define NO_SYMLINK_USER_XATTRS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getxattr in -lattr" >&5 -printf %s "checking for getxattr in -lattr... " >&6; } -if test ${ac_cv_lib_attr_getxattr+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getxattr" >&5 +printf %s "checking for library containing getxattr... " >&6; } +if test ${ac_cv_search_getxattr+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lattr $LIBS" +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char getxattr (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getxattr (void); int main (void) { @@ -12002,23 +12556,42 @@ return getxattr (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +for ac_lib in '' attr +do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_attr_getxattr=yes -else $as_nop - ac_cv_lib_attr_getxattr=no + ac_cv_search_getxattr=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if test ${ac_cv_search_getxattr+y} +then : + break fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_getxattr" >&5 -printf "%s\n" "$ac_cv_lib_attr_getxattr" >&6; } -if test "x$ac_cv_lib_attr_getxattr" = xyes +done +if test ${ac_cv_search_getxattr+y} then : - printf "%s\n" "#define HAVE_LIBATTR 1" >>confdefs.h - LIBS="-lattr $LIBS" +else case e in #( + e) ac_cv_search_getxattr=no ;; +esac +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getxattr" >&5 +printf "%s\n" "$ac_cv_search_getxattr" >&6; } +ac_res=$ac_cv_search_getxattr +if test "$ac_res" != no +then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -12089,8 +12662,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : rsync_warn_flag=yes -else $as_nop - rsync_warn_flag=no +else case e in #( + e) rsync_warn_flag=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12121,8 +12695,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -12152,14 +12726,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -12221,6 +12795,12 @@ LTLIBOBJS=$ac_ltlibobjs +# Check whether --enable-year2038 was given. +if test ${enable_year2038+y} +then : + enableval=$enable_year2038; +fi + : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -12250,7 +12830,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -12259,12 +12838,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -12336,7 +12916,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -12365,7 +12945,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -12405,11 +12984,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -12423,11 +13003,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -12510,9 +13091,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -12593,10 +13174,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -12612,7 +13195,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by rsync $as_me, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12643,7 +13226,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -12676,10 +13259,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ rsync config.status -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -12741,8 +13324,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -12750,8 +13333,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -12806,7 +13389,7 @@ do "popt/dummy") CONFIG_FILES="$CONFIG_FILES popt/dummy" ;; "shconfig") CONFIG_FILES="$CONFIG_FILES shconfig" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -12825,7 +13408,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -12849,7 +13432,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -13007,13 +13590,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -13123,7 +13706,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13145,19 +13728,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -13290,7 +13873,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -13321,9 +13904,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/daemon-parm.awk b/daemon-parm.awk index ad52e9d..f803e43 100755 --- a/daemon-parm.awk +++ b/daemon-parm.awk @@ -6,7 +6,7 @@ BEGIN { heading = "/* DO NOT EDIT THIS FILE! It is auto-generated from a list of values in " ARGV[1] "! */\n\n" sect = psect = defines = accessors = prior_ptype = "" - parms = "\nstatic struct parm_struct parm_table[] = {" + parms = "\nstatic const struct parm_struct parm_table[] = {" comment_fmt = "\n/********** %s **********/\n" tdstruct = "typedef struct {" } diff --git a/debian/changelog b/debian/changelog index 424a67c..52b9936 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,27 @@ -rsync (3.4.1+ds1-7deepin1) unstable; urgency=medium +rsync (3.4.2+ds1-2) unstable; urgency=medium - * d/p/CVE-2026-41035.patch: Import upstream patch to fix CVE-2026-41035 + * d/p/syscall_use_openat2...: New patch to fix symlink handling on the + receiver (closes: #1093160) - In rsync 3.0.1 through 3.4.1, receive_xattr relies on an untrusted - length value during a qsort call, leading to a receiver use-after-free. - (Closes: #1134617) + -- Samuel Henrique Thu, 30 Apr 2026 09:50:10 -0300 - -- hudeng Sun, 11 May 2026 10:52:00 +0800 +rsync (3.4.2+ds1-1) unstable; urgency=medium + + [ Samuel Henrique ] + * New upstream version 3.4.2+ds1 + - Fix CVE-2026-41035 (closes: #1134617) + * Drop patches merged upstream. + - fix-flaky-hardlinks-test.patch + - reproducible-build.patch + - gcc_15.patch + - CVE-2025-10158.patch + * d/copyright: runtests.sh was refactored to runtests.py + * d/t/upstream-tests: runtests.sh was refactored to runtests.py + + [ Alexandre Detiste ] + * delete d/rules-pre-dh that shows up on Debian Code Search + + -- Samuel Henrique Wed, 29 Apr 2026 11:58:29 -0300 rsync (3.4.1+ds1-7) unstable; urgency=medium diff --git a/debian/copyright b/debian/copyright index 9e286b7..a557783 100644 --- a/debian/copyright +++ b/debian/copyright @@ -218,9 +218,10 @@ Files: testsuite/daemon-gzip-download.test Copyright: 2001, 2002 Martin Pool License: GPL-2+ -Files: runtests.sh +Files: runtests.py Copyright: 2001, 2002 Martin Pool - 2003-2022 Wayne Davison + 2003-2022 Wayne Davison + 2026 Andrew Tridgell License: GPL-2 Files: testsuite/rsync.fns diff --git a/debian/patches/CVE-2025-10158.patch b/debian/patches/CVE-2025-10158.patch deleted file mode 100644 index 7d9342f..0000000 --- a/debian/patches/CVE-2025-10158.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Andrew Tridgell -Date: Sat, 23 Aug 2025 17:26:53 +1000 -Subject: fixed an invalid access to files array -Origin: upstream, https://github.com/RsyncProject/rsync/commit/797e17fc4a6f15e3b1756538a9f812b63942686f -Bug: https://github.com/RsyncProject/rsync/pull/794 - -this was found by Calum Hutton from Rapid7. It is a real bug, but -analysis shows it can't be leverged into an exploit. Worth fixing -though. - -Many thanks to Calum and Rapid7 for finding and reporting this ---- - sender.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sender.c b/sender.c -index a4d46c3..b1588b7 100644 ---- a/sender.c -+++ b/sender.c -@@ -262,6 +262,8 @@ void send_files(int f_in, int f_out) - - if (ndx - cur_flist->ndx_start >= 0) - file = cur_flist->files[ndx - cur_flist->ndx_start]; -+ else if (cur_flist->parent_ndx < 0) -+ exit_cleanup(RERR_PROTOCOL); - else - file = dir_flist->files[cur_flist->parent_ndx]; - if (F_PATHNAME(file)) { diff --git a/debian/patches/CVE-2026-41035.patch b/debian/patches/CVE-2026-41035.patch deleted file mode 100644 index 7c3c697..0000000 --- a/debian/patches/CVE-2026-41035.patch +++ /dev/null @@ -1,34 +0,0 @@ -From bb0a8118c2d2ab01140bac5e4e327e5e1ef90c9c Mon Sep 17 00:00:00 2001 -From: Andrew Tridgell -Date: Wed, 22 Apr 2026 09:57:45 +1000 -Subject: [PATCH] xattrs: fixed count in qsort - -this fixes the count passed to the sort of the xattr list. This issue -was reported here: - -https://www.openwall.com/lists/oss-security/2026/04/16/2 - -the bug is not exploitable due to the fork-per-connection design of -rsync, the attack is the equivalent of the user closing the socket -themselves. ---- - xattrs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/xattrs.c b/xattrs.c -index 26e50a6f9..65166eed9 100644 ---- a/xattrs.c -+++ b/xattrs.c -@@ -860,8 +860,8 @@ void receive_xattr(int f, struct file_struct *file) - rxa->num = num; - } - -- if (need_sort && count > 1) -- qsort(temp_xattr.items, count, sizeof (rsync_xa), rsync_xal_compare_names); -+ if (need_sort && temp_xattr.count > 1) -+ qsort(temp_xattr.items, temp_xattr.count, sizeof (rsync_xa), rsync_xal_compare_names); - - ndx = rsync_xal_store(&temp_xattr); /* adds item to rsync_xal_l */ - --- -2.43.0 diff --git a/debian/patches/disable_reconfigure_req.diff b/debian/patches/disable_reconfigure_req.diff index 41f0740..279018b 100644 --- a/debian/patches/disable_reconfigure_req.diff +++ b/debian/patches/disable_reconfigure_req.diff @@ -10,10 +10,10 @@ Forwarded: not-needed 1 file changed, 20 deletions(-) diff --git a/Makefile.in b/Makefile.in -index 7c75c26..96d7d3a 100644 +index c2fe775..6d58abf 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -204,15 +204,6 @@ configure.sh config.h.in: configure.ac aclocal.m4 +@@ -205,15 +205,6 @@ configure.sh config.h.in: configure.ac aclocal.m4 else \ echo "config.h.in has CHANGED."; \ fi @@ -29,7 +29,7 @@ index 7c75c26..96d7d3a 100644 .PHONY: reconfigure reconfigure: configure.sh -@@ -226,17 +217,6 @@ restatus: +@@ -227,17 +218,6 @@ restatus: Makefile: Makefile.in config.status configure.sh config.h.in @if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi @./config.status diff --git a/debian/patches/env_shebang.patch b/debian/patches/env_shebang.patch index 9ab41f1..93a7474 100644 --- a/debian/patches/env_shebang.patch +++ b/debian/patches/env_shebang.patch @@ -82,7 +82,7 @@ index a47d7f8..bb5c3a8 100755 # directives that can be used by rsync to copy just the indicated files using # an --exclude-from=FILE or -f'. FILE' option. To be able to delete files on diff --git a/support/git-set-file-times b/support/git-set-file-times -index e06f073..56d4ba0 100755 +index 601248b..66a6fdf 100755 --- a/support/git-set-file-times +++ b/support/git-set-file-times @@ -1,4 +1,4 @@ @@ -90,7 +90,7 @@ index e06f073..56d4ba0 100755 +#!/usr/bin/python3 import os, re, argparse, subprocess - from datetime import datetime + from datetime import datetime, UTC diff --git a/support/logfilter b/support/logfilter index 29cfe69..282914a 100755 --- a/support/logfilter @@ -132,7 +132,7 @@ index e7a5474..cfb0c40 100755 # "/rsyncd-munged/" or remove that prefix. diff --git a/support/rrsync b/support/rrsync -index e8b0cc0..d3ccd48 100755 +index 56389c5..d6c9b1d 100755 --- a/support/rrsync +++ b/support/rrsync @@ -1,4 +1,4 @@ @@ -142,7 +142,7 @@ index e8b0cc0..d3ccd48 100755 # Restricts rsync to subdirectory declared in .ssh/authorized_keys. See # the rrsync man page for details of how to make use of this script. diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished -index b31a5d2..c85d488 100755 +index 892c90b..8da38e7 100755 --- a/support/rsync-no-vanished +++ b/support/rsync-no-vanished @@ -1,4 +1,4 @@ diff --git a/debian/patches/fix-flaky-hardlinks-test.patch b/debian/patches/fix-flaky-hardlinks-test.patch deleted file mode 100644 index 4f88d78..0000000 --- a/debian/patches/fix-flaky-hardlinks-test.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Arnaud Rebillout -Date: Thu, 6 Mar 2025 10:54:05 +0700 -Subject: Fix flaky hardlinks test - -The test was added in dc34990, it turns out that it's flaky. It failed -once on the Debian build infra, cf. [1]. - -The problem is that the command `rsync -aH '$fromdir/sym' '$todir'` -updates the mod time of `$todir`, so there might be a diff between the -output of `rsync_ls_lR $fromdir` and `rsync_ls_lR $todir`, if ever rsync -runs 1 second (or more) after the directories were created. - -To clarify: it's easy to make the test fails 100% of the times with this -change: - -``` - makepath "$fromdir/sym" "$todir" -+sleep 5 - checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" -``` - -With the fix proposed here, we don't use `checkit` anymore, instead we -just run the rsync command, then a simple `diff` to compare the two -directories. This is exactly what the other `-H` test just above does. - -In case there's some doubts, `diff` fails if `sym` is missing: - -``` -$ mkdir -p foo/sym bar -$ diff foo bar || echo KO! -Only in foo: sym -KO! -``` - -I tested that, after this commit, the test still catches the `-H` -regression in rsync 3.4.0. - -Fixes: https://github.com/RsyncProject/rsync/issues/735 - -[1]: https://buildd.debian.org/status/fetch.php?pkg=rsync&arch=ppc64el&ver=3.4.1%2Bds1-1&stamp=1741147156&raw=0 - -Forwarded: https://github.com/RsyncProject/rsync/pull/737 ---- - testsuite/hardlinks.test | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/testsuite/hardlinks.test b/testsuite/hardlinks.test -index 68fd270..c02db3f 100644 ---- a/testsuite/hardlinks.test -+++ b/testsuite/hardlinks.test -@@ -81,7 +81,8 @@ diff $diffopt "$name1" "$todir" || test_fail "solo copy of name1 failed" - # enabled (this has broken in 3.4.0 so far, so we need this test). - rm -rf "$fromdir" "$todir" - makepath "$fromdir/sym" "$todir" --checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" -+$RSYNC -aH "$fromdir/sym" "$todir" -+diff $diffopt "$fromdir" "$todir" || test_fail "solo copy of sym failed" - - # The script would have aborted on error, so getting here means we've won. - exit 0 diff --git a/debian/patches/gcc_15.patch b/debian/patches/gcc_15.patch deleted file mode 100644 index 5637ab9..0000000 --- a/debian/patches/gcc_15.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a4b926dcdce96b0f2cc0dc7744e95747b233500a Mon Sep 17 00:00:00 2001 -From: Michal Ruprich -Date: Fri, 17 Jan 2025 12:37:57 +0100 -Subject: [PATCH] bool is a keyword in C23 - ---- - wildtest.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/wildtest.c b/wildtest.c -index bea4cebbe..482cdf170 100644 ---- a/wildtest.c -+++ b/wildtest.c -@@ -32,7 +32,9 @@ int fnmatch_errors = 0; - - int wildmatch_errors = 0; - -+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L - typedef char bool; -+#endif - - int output_iterations = 0; - int explode_mod = 0; diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch deleted file mode 100644 index 1717bf5..0000000 --- a/debian/patches/reproducible-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Make the build reproducible -Author: Chris Lamb -Last-Update: 2025-01-16 -Forwarded: https://github.com/RsyncProject/rsync/pull/791 - ---- rsync-3.3.0+ds1.orig/md-convert -+++ rsync-3.3.0+ds1/md-convert -@@ -247,6 +247,9 @@ def find_man_substitutions(): - - env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(mtime + tz_offset)).lstrip('0') - -+ if 'SOURCE_DATE_EPOCH' in os.environ: -+ env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) -+ - - def html_via_commonmark(txt): - return commonmark.HtmlRenderer().render(commonmark.Parser().parse(txt)) diff --git a/debian/patches/series b/debian/patches/series index 52046eb..6902014 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,8 +2,4 @@ disable_reconfigure_req.diff skip_devices_test_non_linux.patch env_shebang.patch fix_rrsync_man_generation.patch -fix-flaky-hardlinks-test.patch -reproducible-build.patch -gcc_15.patch -CVE-2025-10158.patch -CVE-2026-41035.patch +syscall_use_openat2_RESOLVE_BENEATH_on_Linux_for_secure_relative_open.patch diff --git a/debian/patches/syscall_use_openat2_RESOLVE_BENEATH_on_Linux_for_secure_relative_open.patch b/debian/patches/syscall_use_openat2_RESOLVE_BENEATH_on_Linux_for_secure_relative_open.patch new file mode 100644 index 0000000..e514ba3 --- /dev/null +++ b/debian/patches/syscall_use_openat2_RESOLVE_BENEATH_on_Linux_for_secure_relative_open.patch @@ -0,0 +1,386 @@ +From 4fa7156ccdb2ad34b034d18fe2fd6cd79adef8a1 Mon Sep 17 00:00:00 2001 +From: Andrew Tridgell +Date: Thu, 30 Apr 2026 08:39:22 +1000 +Subject: [PATCH] syscall: use openat2(RESOLVE_BENEATH) on Linux for + secure_relative_open + +The CVE fix in commit c35e283 made secure_relative_open() walk every +component of relpath with O_NOFOLLOW. That blocks every symlink in the +path, which is stricter than the threat model required: legitimate +directory symlinks within the destination tree (e.g. when using -K / +--copy-dirlinks) are also rejected, breaking delta transfers with +"failed verification -- update discarded". See issue #715. + +On Linux 5.6+, openat2(RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS) gives +us exactly what we want: the kernel rejects any resolution that would +escape the starting directory (via "..", absolute paths, or symlinks +pointing outside dirfd) while still following symlinks that resolve +within it. /proc magic-links are blocked too. + +Use openat2 first; fall back to the existing per-component O_NOFOLLOW +walk on ENOSYS (kernel < 5.6). The lexical "../" checks at the head +of the function are kept as defense in depth. The Linux gate is +plain #ifdef __linux__: the runtime ENOSYS fallback covers the only +case that actually matters (header present + old kernel), and any +Linux build environment without linux/openat2.h will fail with a +clear "no such file" error rather than silently disabling the +protection. + +Verified manually that openat2(RESOLVE_BENEATH) blocks all four +escape patterns (absolute symlink, ../ symlink, lexical .., absolute +path) while allowing direct and within-tree symlinks. The new +testsuite/symlink-dirlink-basis.test (taken from PR #864 by Samuel +Henrique) exercises the issue #715 regression and passes; full +make check passes 47/47. + +Test: testsuite/symlink-dirlink-basis.test (8 scenarios) +Fixes: https://github.com/RsyncProject/rsync/issues/715 + +Co-Authored-By: Claude Opus 4.7 (1M context) +--- + syscall.c | 62 ++++++- + testsuite/symlink-dirlink-basis.test | 247 +++++++++++++++++++++++++++ + 2 files changed, 304 insertions(+), 5 deletions(-) + create mode 100755 testsuite/symlink-dirlink-basis.test + +diff --git a/syscall.c b/syscall.c +index ec0e0708a..66c6d29c7 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -33,6 +33,11 @@ + #include + #endif + ++#ifdef __linux__ ++#include ++#include ++#endif ++ + #include "ifuncs.h" + + extern int dry_run; +@@ -720,12 +725,49 @@ int do_open_nofollow(const char *pathname, int flags) + /* + open a file relative to a base directory. The basedir can be NULL, + in which case the current working directory is used. The relpath +- must be a relative path, and the relpath must not contain any +- elements in the path which follow symlinks (ie. like O_NOFOLLOW, but +- applies to all path components, not just the last component) +- +- The relpath must also not contain any ../ elements in the path ++ must be a relative path. The kernel must guarantee that resolution ++ cannot escape basedir (or the cwd, when basedir is NULL): no ".." ++ jumps above the start, no symlinks pointing outside, no absolute ++ paths, no /proc magic-link tricks. ++ ++ Symlinks *within* basedir are followed normally — earlier rsync ++ versions rejected every symlink with O_NOFOLLOW on each component, ++ which broke legitimate directory symlinks on the receiver side ++ (https://github.com/RsyncProject/rsync/issues/715). The escape ++ prevention is handled by the kernel via openat2(RESOLVE_BENEATH) ++ on Linux 5.6+; older systems fall back to the per-component ++ O_NOFOLLOW walk below. ++ ++ The relpath must also not contain any ../ elements in the path. + */ ++ ++#ifdef __linux__ ++static int secure_relative_open_linux(const char *basedir, const char *relpath, int flags, mode_t mode) ++{ ++ struct open_how how; ++ int dirfd, retfd; ++ ++ memset(&how, 0, sizeof how); ++ how.flags = flags; ++ how.mode = mode; ++ how.resolve = RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS; ++ ++ if (basedir == NULL) { ++ dirfd = AT_FDCWD; ++ } else { ++ dirfd = openat(AT_FDCWD, basedir, O_RDONLY | O_DIRECTORY); ++ if (dirfd == -1) ++ return -1; ++ } ++ ++ retfd = syscall(SYS_openat2, dirfd, relpath, &how, sizeof how); ++ ++ if (dirfd != AT_FDCWD) ++ close(dirfd); ++ return retfd; ++} ++#endif ++ + int secure_relative_open(const char *basedir, const char *relpath, int flags, mode_t mode) + { + if (!relpath || relpath[0] == '/') { +@@ -739,6 +781,16 @@ int secure_relative_open(const char *basedir, const char *relpath, int flags, mo + return -1; + } + ++#ifdef __linux__ ++ { ++ int fd = secure_relative_open_linux(basedir, relpath, flags, mode); ++ /* ENOSYS = kernel < 5.6 doesn't have the syscall even though ++ * glibc/kernel-headers do; fall through to the portable path. */ ++ if (fd != -1 || errno != ENOSYS) ++ return fd; ++ } ++#endif ++ + #if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY) || !defined(AT_FDCWD) + // really old system, all we can do is live with the risks + if (!basedir) { +diff --git a/testsuite/symlink-dirlink-basis.test b/testsuite/symlink-dirlink-basis.test +new file mode 100755 +index 000000000..9065dd814 +--- /dev/null ++++ b/testsuite/symlink-dirlink-basis.test +@@ -0,0 +1,247 @@ ++#!/bin/sh ++ ++# Test that updating a file through a directory symlink works when using ++# -K (--copy-dirlinks). This is a regression test for: ++# https://github.com/RsyncProject/rsync/issues/715 ++# ++# The CVE fix in commit c35e283 introduced secure_relative_open() which ++# uses O_NOFOLLOW on all path components, breaking legitimate directory ++# symlinks on the receiver side. The fix splits the path into basedir ++# (dirname, symlinks followed) and basename (O_NOFOLLOW) so that ++# directory symlinks are traversed while the final file component is ++# still protected. ++# ++# The regression only manifests when delta matching is triggered (i.e., ++# the sender finds matching blocks in the old file). Small files with ++# completely different content are transferred in full and don't trigger ++# the bug. We use a large file with a small modification to ensure ++# delta transfer is used. ++# ++# In addition to the original regression, this test covers edge cases ++# in the fix itself: ++# - --backup with directory symlinks (finish_transfer pointer identity) ++# - --partial-dir with protocol < 29 (fnamecmp != partialptr guard) ++# - --inplace with directory symlinks (updating_basis_or_equiv check) ++# - Files without a dirname (top-level files, no split needed) ++ ++. "$suitedir/rsync.fns" ++ ++RSYNC_RSH="$scratchdir/src/support/lsh.sh" ++export RSYNC_RSH ++ ++# $HOME is set to $scratchdir by rsync.fns ++# localhost: destination will cd to $HOME (i.e., $scratchdir) ++ ++# Helper: create a large file suitable for delta transfers. ++# ~32KB is large enough for rsync's block matching to find matches. ++make_testfile() { ++ dd if=/dev/urandom of="$1" bs=1024 count=32 2>/dev/null \ ++ || test_fail "failed to create test file $1" ++} ++ ++# Set up source tree ++srcbase="$tmpdir/src" ++ ++###################################################################### ++# Test 1: Basic directory symlink update (the original issue #715) ++###################################################################### ++ ++mkdir -p "$HOME/real-dir" ++ln -s real-dir "$HOME/dir" ++ ++mkdir -p "$srcbase/dir" ++make_testfile "$srcbase/dir/file" ++ ++# First transfer (initial): should create the file through the symlink ++(cd "$srcbase" && $RSYNC -KRlptv --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 1: initial transfer failed" ++ ++if [ ! -f "$HOME/real-dir/file" ]; then ++ test_fail "test 1: initial transfer did not create file through symlink" ++fi ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 1: initial transfer content mismatch" ++ ++# Small modification to trigger delta transfer ++echo "appended update" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++# Second transfer (update): was failing with "failed verification" ++(cd "$srcbase" && $RSYNC -KRlptv --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 1: update through directory symlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 1: update transfer content mismatch" ++ ++###################################################################### ++# Test 2: Compression (-z) as in the original reproducer ++###################################################################### ++ ++echo "another line" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptzv --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 2: compressed update through directory symlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 2: compressed update content mismatch" ++ ++###################################################################### ++# Test 3: Nested directory symlinks (nested/sub/data.txt where ++# "nested" is a symlink to "nested_real") ++###################################################################### ++ ++mkdir -p "$HOME/nested_real/sub" ++ln -s nested_real "$HOME/nested" ++ ++mkdir -p "$srcbase/nested/sub" ++make_testfile "$srcbase/nested/sub/data.txt" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --rsync-path="$RSYNC" nested/sub/data.txt localhost:) \ ++ || test_fail "test 3: initial nested transfer failed" ++ ++echo "appended nested" >> "$srcbase/nested/sub/data.txt" ++sleep 1 ++touch "$srcbase/nested/sub/data.txt" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --rsync-path="$RSYNC" nested/sub/data.txt localhost:) \ ++ || test_fail "test 3: update through nested directory symlink failed" ++ ++diff "$srcbase/nested/sub/data.txt" "$HOME/nested_real/sub/data.txt" >/dev/null \ ++ || test_fail "test 3: nested update content mismatch" ++ ++###################################################################### ++# Test 4: --backup with directory symlinks ++# ++# Exercises the finish_transfer() "fnamecmp == fname" pointer ++# comparison that determines whether to update fnamecmp to the ++# backup name. If broken, --backup would reference a renamed file ++# for xattr handling. ++###################################################################### ++ ++# Reset destination ++rm -f "$HOME/real-dir/file" "$HOME/real-dir/file~" ++ ++make_testfile "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 4: initial transfer for backup test failed" ++ ++echo "backup update" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --backup --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 4: update with --backup through directory symlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 4: backup update content mismatch" ++ ++if [ ! -f "$HOME/real-dir/file~" ]; then ++ test_fail "test 4: backup file was not created" ++fi ++ ++###################################################################### ++# Test 5: --inplace with directory symlinks ++# ++# Exercises the updating_basis_or_equiv check which uses ++# "fnamecmp == fname". With --inplace, rsync writes directly to ++# the destination file instead of a temp file. ++###################################################################### ++ ++rm -f "$HOME/real-dir/file" "$HOME/real-dir/file~" ++ ++make_testfile "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --inplace --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 5: initial inplace transfer failed" ++ ++echo "inplace update" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --inplace --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 5: inplace update through directory symlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 5: inplace update content mismatch" ++ ++###################################################################### ++# Test 6: Top-level file (no dirname, no split needed) ++# ++# Ensures the dirname/basename split is not attempted for files ++# at the top level (file->dirname is NULL). ++###################################################################### ++ ++make_testfile "$srcbase/topfile" ++mkdir -p "$HOME" ++ ++(cd "$srcbase" && $RSYNC -Rlptv --rsync-path="$RSYNC" topfile localhost:) \ ++ || test_fail "test 6: initial top-level transfer failed" ++ ++echo "toplevel update" >> "$srcbase/topfile" ++sleep 1 ++touch "$srcbase/topfile" ++ ++(cd "$srcbase" && $RSYNC -Rlptv --rsync-path="$RSYNC" topfile localhost:) \ ++ || test_fail "test 6: top-level update failed" ++ ++diff "$srcbase/topfile" "$HOME/topfile" >/dev/null \ ++ || test_fail "test 6: top-level update content mismatch" ++ ++###################################################################### ++# Test 7: --partial-dir with protocol < 29 ++# ++# For protocol < 29, fnamecmp_type stays FNAMECMP_FNAME even when ++# fnamecmp is set to partialptr. The dirname/basename split must ++# NOT trigger in this case (guarded by "fnamecmp == fname"). ++###################################################################### ++ ++rm -f "$HOME/real-dir/file" ++make_testfile "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --protocol=28 --partial-dir=.rsync-partial \ ++ --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 7: initial proto28 partial-dir transfer failed" ++ ++echo "partial-dir update" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --protocol=28 --partial-dir=.rsync-partial \ ++ --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 7: proto28 partial-dir update through dirlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 7: proto28 partial-dir update content mismatch" ++ ++###################################################################### ++# Test 8: Protocol < 29 basic directory symlink update ++# ++# Exercises the protocol < 29 code path and its fallback logic ++# (clearing basedir on retry). ++###################################################################### ++ ++rm -f "$HOME/real-dir/file" ++make_testfile "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --protocol=28 \ ++ --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 8: initial proto28 transfer failed" ++ ++echo "proto28 update" >> "$srcbase/dir/file" ++sleep 1 ++touch "$srcbase/dir/file" ++ ++(cd "$srcbase" && $RSYNC -KRlptv --protocol=28 \ ++ --rsync-path="$RSYNC" dir/file localhost:) \ ++ || test_fail "test 8: proto28 update through directory symlink failed" ++ ++diff "$srcbase/dir/file" "$HOME/real-dir/file" >/dev/null \ ++ || test_fail "test 8: proto28 update content mismatch" ++ ++# The script would have aborted on error, so getting here means we've won. ++exit 0 diff --git a/debian/rules-pre-dh b/debian/rules-pre-dh deleted file mode 100755 index 01db177..0000000 --- a/debian/rules-pre-dh +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/make -f -# debian.rules file for rsync -# Copyright 1996 by Philip Hands. -# Copyright 2001 Colin Walters -# Based on the sample debian.rules file - for GNU Hello (1.3). -# Copyright 1994,1995 by Ian Jackson. -# I hereby give you perpetual unlimited permission to copy, -# modify and relicense this file, provided that you do not remove -# my name from the file itself. (I assert my moral right of -# paternity under the Copyright, Designs and Patents Act 1988.) - - -SHELL = /bin/bash -BINS = rsync -INSTALL = install -INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 -INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 -INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 -INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags -CPPFLAGS := -Izlib $(shell $(dpkg_buildflags) --get CPPFLAGS) -CFLAGS := -Wall $(shell $(dpkg_buildflags) --get CFLAGS) -LDFLAGS := $(shell $(dpkg_buildflags) --get LDFLAGS) - -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) -INSTALL_CROSS := -else -INSTALL_CROSS := INSTALLCMD='$(INSTALL) --strip-program=$(DEB_HOST_GNU_TYPE)-strip' -endif - -# keep lintian happy: -build: build-arch build-indep -build-arch: build-stamp -build-indep: build-stamp - -build-stamp: - @echo building build tree - -rm -rf debian/buildtree - mkdir debian/buildtree - cp -p * debian/buildtree || true - cp -pr lib m4 popt support testsuite zlib packaging debian/buildtree - # update config.guess/sub - cp /usr/share/misc/config.guess /usr/share/misc/config.sub debian/buildtree - # work around newer autoconf stuff (runstatedir) - touch debian/buildtree/aclocal.m4 - @echo applying misc Debian patches - for i in debian/patches/*.patch debian/patches/*.diff; do if [ -s $$i ]; then echo " $$i ..."; cat $$i | (cd debian/buildtree; patch -p1) || exit 1; fi; done - # work around newer autoconf stuff (runstatedir) - touch debian/buildtree/configure.sh debian/buildtree/config.h.in - @echo configuring - (cd debian/buildtree; ./configure --with-included-zlib=yes --prefix=/usr --mandir='$${prefix}/share/man' --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) LDFLAGS="$(LDFLAGS)") - @echo building - $(MAKE) --directory=debian/buildtree CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" all - touch build-stamp - @echo done - -clean: checkdir - -rm -f build-stamp - -rm -rf debian/buildtree - -rm -rf *~ debian/tmp debian/*~ debian/*.bak debian/files* debian/substvars - -binary-indep: checkroot build -# nothing to do - -binary-arch: checkroot build - -rm -rf debian/tmp - $(INSTALL_DIR) debian/tmp \ - debian/tmp/DEBIAN \ - debian/tmp/usr/bin \ - debian/tmp/usr/share/doc/rsync/examples \ - debian/tmp/usr/share/doc/rsync/scripts \ - debian/tmp/usr/share/man/man1 \ - debian/tmp/usr/share/man/man5 \ - debian/tmp/usr/share/lintian/overrides \ - debian/tmp/lib/systemd/system \ - debian/tmp/etc \ - debian/tmp/etc/default \ - debian/tmp/etc/init.d - # debian/tmp/usr/lib/debian-test/tests -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - $(MAKE) --directory=debian/buildtree install-strip prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr $(INSTALL_CROSS) -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync -else - $(DEB_HOST_GNU_TYPE)-strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync -endif -else - $(MAKE) --directory=debian/buildtree install prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr -endif - $(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/rsync/changelog.Debian - $(INSTALL_FILE) README tech_report.tex debian/tmp/usr/share/doc/rsync/ - $(INSTALL_FILE) TODO debian/tmp/usr/share/doc/rsync/ - $(INSTALL_FILE) NEWS debian/tmp/usr/share/doc/rsync/changelog - $(INSTALL_FILE) packaging/cull_options debian/tmp/usr/share/doc/rsync/scripts/ - $(INSTALL_FILE) support/atomic-rsync support/cvs2includes support/file-attr-restore support/files-to-excludes support/git-set-file-times support/logfilter support/lsh support/mnt-excl support/munge-symlinks support/rrsync support/rsyncstats debian/tmp/usr/share/doc/rsync/scripts/ - $(INSTALL_FILE) debian/README.Debian debian/tmp/usr/share/doc/rsync/ - echo -e '\n\f' >> debian/tmp/usr/share/doc/rsync/changelog - cat OLDNEWS >> debian/tmp/usr/share/doc/rsync/changelog - find debian/tmp/usr/share/doc/ debian/tmp/usr/share/man/ -name scripts -prune -o -type f -exec gzip -9frn {} + - $(INSTALL_FILE) debian/rsyncd.conf debian/logrotate.conf.rsync debian/tmp/usr/share/doc/rsync/examples/ - $(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/rsync/ - # $(INSTALL_SCRIPT) test.sh debian/tmp/usr/lib/debian-test/tests/rsync - $(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/ - $(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN/ - $(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/ - $(INSTALL_FILE) debian/buildtree/packaging/systemd/rsync.service debian/tmp/lib/systemd/system/ - $(INSTALL_FILE) debian/default debian/tmp/etc/default/rsync - $(INSTALL_SCRIPT) debian/init.d debian/tmp/etc/init.d/rsync - $(INSTALL_FILE) debian/lintian.overrides debian/tmp/usr/share/lintian/overrides/rsync - (cd debian/tmp; find ./etc -type f | LC_ALL=C sort | sed s,.,,) > debian/tmp/DEBIAN/conffiles - (cd debian/tmp; find lib usr -type f -print0 | LC_ALL=C sort -z | xargs -0r md5sum) > debian/tmp/DEBIAN/md5sums - dpkg-shlibdeps debian/tmp/usr/bin/$(BINS) - dpkg-gencontrol -isp - chown -R root.root debian/tmp - chmod -R go=rX debian/tmp - dpkg --build debian/tmp .. - -# Below here is fairly generic really - -binary: binary-indep binary-arch - -checkdir: - @test -f rsync.c -a -f debian/rules - -checkroot: checkdir - @test 0 = `id -u` || { echo "Error: not super-user"; exit 1; } - -.PHONY: binary binary-arch binary-indep clean checkroot checkdir build build-arch build-indep diff --git a/debian/tests/upstream-tests b/debian/tests/upstream-tests index 89d281d..9fc184e 100644 --- a/debian/tests/upstream-tests +++ b/debian/tests/upstream-tests @@ -8,4 +8,4 @@ debian/rules override_dh_auto_configure make tls getgroups getfsdev trimslash t_unsafe wildtest testrun 2>/dev/null # Run tests -rsync_bin="/usr/bin/rsync" ./runtests.sh +rsync_bin="/usr/bin/rsync" ./runtests.py diff --git a/exclude.c b/exclude.c index 87edbcf..24de64f 100644 --- a/exclude.c +++ b/exclude.c @@ -904,7 +904,7 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_flags) { int slash_handling, str_cnt = 0, anchored_match = 0; int ret_match = ex->rflags & FILTRULE_NEGATE ? 0 : 1; - char *p, *pattern = ex->pattern; + const char *p, *pattern = ex->pattern; const char *strings[16]; /* more than enough */ const char *name = fname + (*fname == '/'); diff --git a/flist.c b/flist.c index 1783253..7bf3030 100644 --- a/flist.c +++ b/flist.c @@ -3167,8 +3167,8 @@ static void output_flist(struct file_list *flist) } else *uidbuf = '\0'; if (gid_ndx) { - static char parens[] = "(\0)\0\0\0"; - char *pp = parens + (file->flags & FLAG_SKIP_GROUP ? 0 : 3); + static const char parens[] = "(\0)\0\0\0"; + const char *pp = parens + (file->flags & FLAG_SKIP_GROUP ? 0 : 3); snprintf(gidbuf, sizeof gidbuf, " gid=%s%u%s", pp, F_GROUP(file), pp + 2); } else diff --git a/io.c b/io.c index bb60eec..ec34c4b 100644 --- a/io.c +++ b/io.c @@ -117,7 +117,7 @@ static int active_filecnt = 0; static OFF_T active_bytecnt = 0; static int first_message = 1; -static char int_byte_extra[64] = { +static const char int_byte_extra[64] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* (00 - 3F)/4 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* (40 - 7F)/4 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* (80 - BF)/4 */ @@ -1158,8 +1158,8 @@ void set_io_timeout(int secs) static void check_for_d_option_error(const char *msg) { - static char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz"; - char *colon; + static const char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz"; + const char *colon; int saw_d = 0; if (*msg != 'r' diff --git a/latest-year.h b/latest-year.h index f0f7d52..03f0028 100644 --- a/latest-year.h +++ b/latest-year.h @@ -1 +1 @@ -#define LATEST_YEAR "2025" +#define LATEST_YEAR "2026" diff --git a/lib/md5.c b/lib/md5.c index f36c5ba..1506d07 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -197,7 +197,7 @@ void md5_update(md_context *ctx, const uchar *input, uint32 length) memcpy(ctx->buffer + left, input, length); } -static uchar md5_padding[CSUM_CHUNK] = { 0x80 }; +static const uchar md5_padding[CSUM_CHUNK] = { 0x80 }; void md5_result(md_context *ctx, uchar digest[MD5_DIGEST_LEN]) { diff --git a/lib/sysxattrs.c b/lib/sysxattrs.c index ca08d13..5a6aeaa 100644 --- a/lib/sysxattrs.c +++ b/lib/sysxattrs.c @@ -126,9 +126,18 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size) unsigned char keylen; ssize_t off, len = extattr_list_link(path, EXTATTR_NAMESPACE_USER, list, size); - if (len <= 0 || (size_t)len > size) + if (len <= 0 || size == 0) return len; + if ((size_t)len >= size) { + /* FreeBSD extattr_list_xx() returns 'size' as 'len' in case there are + more data available, truncating the output, we solve this by signalling + ERANGE in case len == size so that the code in xattrs.c will retry with + a bigger buffer */ + errno = ERANGE; + return -1; + } + /* FreeBSD puts a single-byte length before each string, with no '\0' * terminator. We need to change this into a series of null-terminted * strings. Since the size is the same, we can simply transform the @@ -136,7 +145,7 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size) for (off = 0; off < len; off += keylen + 1) { keylen = ((unsigned char*)list)[off]; if (off + keylen >= len) { - /* Should be impossible, but kernel bugs happen! */ + /* Should be impossible, but bugs happen! */ errno = EINVAL; return -1; } diff --git a/loadparm.c b/loadparm.c index 3906bc0..82faa70 100644 --- a/loadparm.c +++ b/loadparm.c @@ -65,7 +65,7 @@ typedef enum { struct enum_list { int value; - char *name; + const char *name; }; struct parm_struct { @@ -73,7 +73,7 @@ struct parm_struct { parm_type type; parm_class class; void *ptr; - struct enum_list *enum_list; + const struct enum_list *enum_list; unsigned flags; }; @@ -95,7 +95,7 @@ static item_list section_list = EMPTY_ITEM_LIST; static int iSectionIndex = -1; static BOOL bInGlobalSection = True; -static struct enum_list enum_syslog_facility[] = { +static const struct enum_list enum_syslog_facility[] = { #ifdef LOG_AUTH { LOG_AUTH, "auth" }, #endif @@ -178,7 +178,7 @@ static char *expand_vars(const char *str) for (t = buf, f = str; bufsize && *f; ) { if (*f == '%' && isUpper(f+1)) { - char *percent = strchr(f+1, '%'); + const char *percent = strchr(f+1, '%'); if (percent && percent - f < bufsize) { char *val; strlcpy(t, f+1, percent - f); diff --git a/main.c b/main.c index 4f070ac..ccad28a 100644 --- a/main.c +++ b/main.c @@ -386,7 +386,7 @@ static void handle_stats(int f) static void output_itemized_counts(const char *prefix, int *counts) { - static char *labels[] = { "reg", "dir", "link", "dev", "special" }; + static char *const labels[] = { "reg", "dir", "link", "dev", "special" }; char buf[1024], *pre = " ("; int j, len = 0; int total = counts[0]; @@ -1743,7 +1743,9 @@ int main(int argc,char *argv[]) our_gid = MY_GID(); am_root = our_uid == ROOT_UID; - unset_env_var("DISPLAY"); + // DISPLAY should not be emptied unconditionally + if (!getenv("SSH_ASKPASS")) + unset_env_var("DISPLAY"); #if defined USE_OPENSSL && defined SET_OPENSSL_CONF #define TO_STR2(x) #x diff --git a/md-convert b/md-convert index 5fd63a7..06e5b1e 100755 --- a/md-convert +++ b/md-convert @@ -120,6 +120,7 @@ TZ_RE = re.compile(r'^#define\s+MAINTAINER_TZ_OFFSET\s+(-?\d+(\.\d+)?)', re.M) VAR_REF_RE = re.compile(r'\$\{(\w+)\}') VERSION_RE = re.compile(r' (\d[.\d]+)[, ]') BIN_CHARS_RE = re.compile(r'[\1-\7]+') +LONG_OPT_DASH_RE = re.compile(r'(--\w[-\w]+)') SPACE_DOUBLE_DASH_RE = re.compile(r'\s--(\s)') NON_SPACE_SINGLE_DASH_RE = re.compile(r'(^|\W)-') WHITESPACE_RE = re.compile(r'\s') @@ -247,6 +248,9 @@ def find_man_substitutions(): env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(mtime + tz_offset)).lstrip('0') + if 'SOURCE_DATE_EPOCH' in os.environ: + env_subs['date'] = time.strftime('%d %b %Y', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + def html_via_commonmark(txt): return commonmark.HtmlRenderer().render(commonmark.Parser().parse(txt)) @@ -540,6 +544,7 @@ class TransformHtml(HTMLParser): if st.in_pre: html = htmlify(txt) else: + txt = LONG_OPT_DASH_RE.sub(lambda x: x.group(1).replace('-', NBR_DASH[0]), txt) txt = SPACE_DOUBLE_DASH_RE.sub(NBR_SPACE[0] + r'--\1', txt).replace('--', NBR_DASH[0]*2) txt = NON_SPACE_SINGLE_DASH_RE.sub(r'\1' + NBR_DASH[0], txt) html = htmlify(txt) diff --git a/options.c b/options.c index 578507c..58ed035 100644 --- a/options.c +++ b/options.c @@ -86,6 +86,7 @@ int sparse_files = 0; int preallocate_files = 0; int do_compression = 0; int do_compression_level = CLVL_NOT_SPECIFIED; +int do_compression_threads = 0; /*n = 0 use rsync thread, n >= 1 spawn n threads for compression */ int am_root = 0; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */ int am_server = 0; int am_sender = 0; @@ -225,7 +226,7 @@ char *iconv_opt = struct chmod_mode_struct *chmod_modes = NULL; -static const char *debug_verbosity[] = { +static const char *const debug_verbosity[] = { /*0*/ NULL, /*1*/ NULL, /*2*/ "BIND,CMD,CONNECT,DEL,DELTASUM,DUP,FILTER,FLIST,ICONV", @@ -236,7 +237,7 @@ static const char *debug_verbosity[] = { #define MAX_VERBOSITY ((int)(sizeof debug_verbosity / sizeof debug_verbosity[0]) - 1) -static const char *info_verbosity[1+MAX_VERBOSITY] = { +static const char *const info_verbosity[1+MAX_VERBOSITY] = { /*0*/ "NONREG", /*1*/ "COPY,DEL,FLIST,MISC,NAME,STATS,SYMSAFE", /*2*/ "BACKUP,MISC2,MOUNT,NAME2,REMOVE,SKIP", @@ -474,7 +475,7 @@ static void parse_output_words(struct output_struct *words, short *levels, const static void output_item_help(struct output_struct *words) { short *levels = words == info_words ? info_levels : debug_levels; - const char **verbosity = words == info_words ? info_verbosity : debug_verbosity; + const char *const*verbosity = words == info_words ? info_verbosity : debug_verbosity; char buf[128], *opt, *fmt = "%-10s %s\n"; int j; @@ -756,6 +757,8 @@ static struct poptOption long_options[] = { {"skip-compress", 0, POPT_ARG_STRING, &skip_compress, 0, 0, 0 }, {"compress-level", 0, POPT_ARG_INT, &do_compression_level, 0, 0, 0 }, {"zl", 0, POPT_ARG_INT, &do_compression_level, 0, 0, 0 }, + {"compress-threads", 0, POPT_ARG_INT, &do_compression_threads, 0, 0, 0 }, + {"zt", 0, POPT_ARG_INT, &do_compression_threads, 0, 0, 0 }, {0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 }, {"progress", 0, POPT_ARG_VAL, &do_progress, 1, 0, 0 }, {"no-progress", 0, POPT_ARG_VAL, &do_progress, 0, 0, 0 }, @@ -844,7 +847,7 @@ static struct poptOption long_options[] = { {0,0,0,0, 0, 0, 0} }; -static struct poptOption long_daemon_options[] = { +static const struct poptOption long_daemon_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"address", 0, POPT_ARG_STRING, &bind_address, 0, 0, 0 }, {"bwlimit", 0, POPT_ARG_INT, &daemon_bwlimit, 0, 0, 0 }, @@ -1156,7 +1159,7 @@ static time_t parse_time(const char *arg) { const char *cp; time_t val, now = time(NULL); - struct tm t, *today = localtime(&now); + struct tm t, tmp, *today = localtime_r(&now, &tmp); int in_date, old_mday, n; memset(&t, 0, sizeof t); @@ -1369,6 +1372,10 @@ int parse_arguments(int *argc_p, const char ***argv_p) /* TODO: Call poptReadDefaultConfig; handle errors. */ pc = poptGetContext(RSYNC_NAME, argc, argv, long_options, 0); + if (pc == NULL) { + strlcpy(err_buf, "poptGetContext returned NULL\n", sizeof err_buf); + return 0; + } if (!am_server) { poptReadDefaultConfig(pc, 0); popt_unalias(pc, "--daemon"); @@ -2006,6 +2013,8 @@ int parse_arguments(int *argc_p, const char ***argv_p) create_refuse_error(refused_compress); goto cleanup; } + if (do_compression_threads < 0) + do_compression_threads = 0; } #ifdef HAVE_SETVBUF diff --git a/packaging/lsb/rsync.spec b/packaging/lsb/rsync.spec index 845b188..29d1ab5 100644 --- a/packaging/lsb/rsync.spec +++ b/packaging/lsb/rsync.spec @@ -1,6 +1,6 @@ Summary: A fast, versatile, remote (and local) file-copying tool Name: rsync -Version: 3.4.1 +Version: 3.4.2 %define fullversion %{version} Release: 1 %define srcdir src @@ -79,5 +79,5 @@ rm -rf $RPM_BUILD_ROOT %dir /etc/rsync-ssl/certs %changelog -* Thu Jan 16 2025 Rsync Project -Released 3.4.1. +* Tue Apr 28 2026 Rsync Project +Released 3.4.2. diff --git a/packaging/release-rsync b/packaging/release-rsync index 755a38a..3abecc2 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -38,12 +38,16 @@ def main(): if not os.path.isfile('packaging/release-rsync'): die('You must run this script from the top of your rsync checkout.') - now = datetime.now() + now = datetime.now().astimezone() # Requires python 3.6 or later cl_today = now.strftime('* %a %b %d %Y') year = now.strftime('%Y') ztoday = now.strftime('%d %b %Y') today = ztoday.lstrip('0') + # The MAINTAINER_TZ_OFFSET is a float number of hours vs UTC. It can start with '-' but not '+'. + tz_now = now.strftime('%z') + tz_num = tz_now[0:1].replace('+', '') + str(float(tz_now[1:3]) + float(tz_now[3:]) / 60) + curdir = os.getcwd() signal.signal(signal.SIGINT, signal_handler) @@ -81,10 +85,6 @@ def main(): die('"a" must not exist in the current directory.') if os.path.lexists('b'): die('"b" must not exist in the current directory.') - if os.path.lexists('patches.gen'): - die('"patches.gen" must not exist in the current directory.') - - check_git_state(args.master_branch, True, 'patches') curversion = get_rsync_version() @@ -120,8 +120,6 @@ def main(): if not re.match(r'^del', ans, flags=re.I): die("Aborted") cmd_chk(['git', 'tag', '-d', v_ver]) - if os.path.isdir('patches/.git'): - cmd_chk(f"cd patches && git tag -d '{v_ver}'") version = re.sub(r'[-.]*pre[-.]*', 'pre', version) if 'pre' in version and not curversion.endswith('dev'): @@ -213,6 +211,9 @@ About to: x_re = re.compile(r'^(#define RSYNC_VERSION).*', re.M) msg = f"Unable to update RSYNC_VERSION in {fn}" txt = replace_or_die(x_re, r'\1 "%s"' % version, txt, msg) + x_re = re.compile(r'^(#define MAINTAINER_TZ_OFFSET).*', re.M) + msg = f"Unable to update MAINTAINER_TZ_OFFSET in {fn}" + txt = replace_or_die(x_re, r'\1 ' + tz_num, txt, msg) elif '.spec' in fn: for var, val in specvars.items(): x_re = re.compile(r'^%s .*' % re.escape(var), re.M) @@ -220,7 +221,7 @@ About to: x_re = re.compile(r'^\* \w\w\w \w\w\w \d\d \d\d\d\d (.*)', re.M) txt = replace_or_die(x_re, r'%s \1' % cl_today, txt, f"Unable to update ChangeLog header in {fn}") elif fn == 'rsync.h': - x_re = re.compile('(#define\s+SUBPROTOCOL_VERSION)\s+(\d+)') + x_re = re.compile(r'(#define\s+SUBPROTOCOL_VERSION)\s+(\d+)') repl = lambda m: m[1] + ' ' + ('0' if not pre or not proto_changed else '1' if m[2] == '0' else m[2]) txt = replace_or_die(x_re, repl, txt, f"Unable to find SUBPROTOCOL_VERSION define in {fn}") elif fn == 'NEWS.md': @@ -252,7 +253,6 @@ About to: cmd_run("git diff".split()) srctar_name = f"{rsync_ver}.tar.gz" - pattar_name = f"rsync-patches-{version}.tar.gz" diff_name = f"{rsync_lastver}-{version}.diffs.gz" srctar_file = os.path.join(dest, srcdir, srctar_name) pattar_file = os.path.join(dest, srcdir, pattar_name) @@ -266,8 +266,6 @@ About to: - git commit all changes - run a full build, ensuring that the manpages & configure.sh are up-to-date - merge the {args.master_branch} branch into the patch/{args.master_branch}/* branches - - update the files in the "patches" dir and OPTIONALLY (if you type 'y') to - run patch-update with the --make option (which opens a shell on error) """) ans = input(" ") @@ -282,20 +280,10 @@ About to: if s.returncode: die('Aborting') - print('Updating files in "patches" dir ...') - s = cmd_run(f'packaging/patch-update --branch={args.master_branch}') - if s.returncode: - die('Aborting') - if re.match(r'^y', ans, re.I): print(f'\nRunning smart-make on all "patch/{args.master_branch}/*" branches ...') cmd_run(f"packaging/patch-update --branch={args.master_branch} --skip-check --make") - if os.path.isdir('patches/.git'): - s = cmd_run(f"cd patches && git commit -a -m 'The patches for {version}.'") - if s.returncode: - die('Aborting') - print(f"""\ {dash_line} @@ -303,8 +291,6 @@ About to: - create signed tag for this release: {v_ver} - create release diffs, "{diff_name}" - create release tar, "{srctar_name}" - - generate {rsync_ver}/patches/* files - - create patches tar, "{pattar_name}" - update top-level README.md, NEWS.md, TODO, and ChangeLog - update top-level rsync*.html manpages - gpg-sign the release files @@ -320,12 +306,6 @@ About to: if 'bad passphrase' in out or 'failed' in out: die('Aborting') - if os.path.isdir('patches/.git'): - out = cmd_txt(f"cd patches && git tag -s -m 'Version {version}.' {v_ver}", capture='combined').out - print(out, end='') - if 'bad passphrase' in out or 'failed' in out: - die('Aborting') - os.environ['PATH'] = ORIGINAL_PATH # Extract the generated files from the old tar. @@ -347,15 +327,6 @@ About to: cmd_chk(['fakeroot', 'tar', 'czf', srctar_file, '--exclude=.github', rsync_ver]) shutil.rmtree(rsync_ver) - print(f'Updating files in "{rsync_ver}/patches" dir ...') - os.mkdir(rsync_ver, 0o755) - os.mkdir(f"{rsync_ver}/patches", 0o755) - cmd_chk(f"packaging/patch-update --skip-check --branch={args.master_branch} --gen={rsync_ver}/patches".split()) - - print(f"Creating {pattar_file} ...") - cmd_chk(['fakeroot', 'tar', 'chzf', pattar_file, rsync_ver + '/patches']) - shutil.rmtree(rsync_ver) - print(f"Updating the other files in {dest} ...") md_files = 'README.md NEWS.md INSTALL.md'.split() html_files = [ fn for fn in gen_pathnames if fn.endswith('.html') ] diff --git a/packaging/release.py b/packaging/release.py new file mode 100755 index 0000000..dc9d1fc --- /dev/null +++ b/packaging/release.py @@ -0,0 +1,703 @@ +#!/usr/bin/env python3 + +# Step-based release script for rsync. Each step is a separate invocation +# selected by a --step-N-XX option, so the maintainer drives the release +# manually one piece at a time. +# +# All persistent state and working files live in ../release/ (a sibling of +# the rsync git checkout): +# +# ../release/rsync-ftp/ mirror of samba.org:/home/ftp/pub/rsync +# ../release/rsync-html/ git checkout of rsync-web (the html site) +# ../release/work/ scratch space for tarball / diff staging +# ../release/release-state.json info shared between steps +# +# The rsync-patches archive is no longer maintained and has been dropped. +# +# Run "packaging/release.py --list" to see the step list. + +import os, sys, re, argparse, glob, shutil, json, signal, subprocess +from datetime import datetime + +sys.path = ['packaging'] + sys.path + +from pkglib import ( + warn, die, cmd_run, cmd_chk, cmd_txt, cmd_txt_chk, cmd_pipe, + check_git_state, get_rsync_version, + get_NEWS_version_info, get_protocol_versions, +) + +# ---------- Paths ---------- + +RELEASE_DIR = os.path.realpath('../release') +FTP_DIR = os.path.join(RELEASE_DIR, 'rsync-ftp') +HTML_DIR = os.path.join(RELEASE_DIR, 'rsync-html') +WORK_DIR = os.path.join(RELEASE_DIR, 'work') +STATE_FILE = os.path.join(RELEASE_DIR, 'release-state.json') + +# Local rsync-web checkout (sibling of rsync-git) is the source-of-truth for +# the git-tracked html content. The maintainer pulls/commits/pushes there; +# step-1-fetch just snapshots it into HTML_DIR for the release flow. +HTML_SRC = os.path.realpath('../rsync-web') + +FTP_REMOTE_PATH = '/home/ftp/pub/rsync' +HTML_REMOTE_PATH = '/home/httpd/html/rsync' + +# Files that ./configure + make produce and that the release tarball / diff +# need to bundle alongside the git-tracked source. Mirrors the GENFILES +# definition in Makefile.in (with rrsync.1{,.html} since we always configure +# --with-rrsync in --step-4-build). +GEN_FILES = [ + 'configure.sh', + 'aclocal.m4', + 'config.h.in', + 'rsync.1', 'rsync.1.html', + 'rsync-ssl.1', 'rsync-ssl.1.html', + 'rsyncd.conf.5', 'rsyncd.conf.5.html', + 'rrsync.1', 'rrsync.1.html', +] + +# ---------- Step registry ---------- + +STEPS = [ + ('step-1-fetch', 'mirror ../release/rsync-ftp from samba.org and snapshot ../release/rsync-html from ../rsync-web'), + ('step-2-prepare', 'gather release info interactively and write release-state.json'), + ('step-3-tweak', 'update version.h, rsync.h, NEWS.md, and packaging/*.spec'), + ('step-4-build', 'run smart-make + make gen'), + ('step-5-commit', 'git commit -a (commit the prepared release changes)'), + ('step-6-tag', 'create the gpg-signed git tag'), + ('step-7-tarball', 'build the source tarball and diffs.gz against the previous release'), + ('step-8-update-ftp', 'refresh README/NEWS/INSTALL/html in the ftp dir, regen ChangeLog.gz, gpg-sign tarballs'), + ('step-9-toplinks', 'hard-link top-level release files (final releases only)'), + ('step-10-push-ftp', 'rsync ../release/rsync-ftp/ to samba.org'), + ('step-11-push-html', 'rsync ../release/rsync-html/ to samba.org (after any manual edits)'), + ('step-12-push-git', 'print the git push commands for you to run'), +] +STEP_FLAGS = [s[0] for s in STEPS] + +DASH_LINE = '=' * 74 + +# ---------- State helpers ---------- + +def load_state(): + if not os.path.isfile(STATE_FILE): + die(f"{STATE_FILE} not found. Run --step-2-prepare first.") + with open(STATE_FILE, 'r', encoding='utf-8') as fh: + return json.load(fh) + + +def save_state(state): + os.makedirs(RELEASE_DIR, exist_ok=True) + with open(STATE_FILE, 'w', encoding='utf-8') as fh: + json.dump(state, fh, indent=2, sort_keys=True) + fh.write('\n') + + +def require_samba_host(): + host = os.environ.get('RSYNC_SAMBA_HOST', '') + if not host.endswith('.samba.org'): + die("Set RSYNC_SAMBA_HOST in your environment to the samba hostname (e.g. hr3.samba.org).") + return host + + +def require_top_of_checkout(): + if not os.path.isfile('packaging/release.py'): + die("Run this script from the top of your rsync checkout.") + if not os.path.isdir('.git'): + die("There is no .git dir in the current directory.") + + +def replace_or_die(regex, repl, txt, die_msg): + m = regex.search(txt) + if not m: + die(die_msg) + return regex.sub(repl, txt, 1) + + +def section(title): + print(f"\n{DASH_LINE}\n== {title}\n{DASH_LINE}") + + +def confirm(prompt, default_no=True): + suffix = '[n] ' if default_no else '[y] ' + ans = input(f"{prompt} {suffix}").strip().lower() + if default_no: + return ans.startswith('y') + return ans == '' or ans.startswith('y') + + +# ---------- Step 1: fetch ftp + html ---------- + +def step_1_fetch(args): + host = require_samba_host() + os.makedirs(RELEASE_DIR, exist_ok=True) + os.makedirs(WORK_DIR, exist_ok=True) + + section(f"Fetching ftp dir into {FTP_DIR}") + if not os.path.isdir(FTP_DIR): + os.makedirs(FTP_DIR) + # The .filt file lives in the ftp dir on the server; mirror down using the + # transmitted filter, falling back to no filter on the very first pull. + filt = os.path.join(FTP_DIR, '.filt') + if os.path.exists(filt): + opts = ['-aivOHP', f'-f:_{filt}'] + else: + opts = ['-aivOHP'] + cmd_chk(['rsync', *opts, f'{host}:{FTP_REMOTE_PATH}/', f'{FTP_DIR}/']) + + section(f"Snapshotting html dir from {HTML_SRC} into {HTML_DIR}") + if not os.path.isdir(HTML_SRC): + die(f"{HTML_SRC} not found. Clone the rsync-web repo there first.") + if not os.path.isdir(os.path.join(HTML_SRC, '.git')): + die(f"{HTML_SRC} exists but is not a git checkout.") + print(f"(Make sure {HTML_SRC} is up to date — this script does not 'git pull' for you.)") + os.makedirs(HTML_DIR, exist_ok=True) + cmd_chk(['rsync', '-aiv', '--exclude=/.git', + f'{HTML_SRC}/', f'{HTML_DIR}/']) + + # Then mirror non-git html content from the server (mirroring samba-rsync's + # behavior: skip files that the html git already provides). + filt = os.path.join(HTML_DIR, 'filt') + if os.path.exists(filt): + tmp_filt = os.path.join(HTML_DIR, 'tmp-filt') + cmd_chk(f"sed -n -e 's/[-P]/H/p' '{filt}' >'{tmp_filt}'") + cmd_chk(['rsync', '-aivOHP', f'-f._{tmp_filt}', + f'{host}:{HTML_REMOTE_PATH}/', f'{HTML_DIR}/']) + os.unlink(tmp_filt) + + print(f"\nFetch complete. Local dirs are now in {RELEASE_DIR}.") + + +# ---------- Step 2: prepare ---------- + +def step_2_prepare(args): + require_top_of_checkout() + os.makedirs(RELEASE_DIR, exist_ok=True) + + if not os.path.isdir(FTP_DIR): + die(f"{FTP_DIR} does not exist. Run --step-1-fetch first.") + + now = datetime.now().astimezone() + cl_today = now.strftime('* %a %b %d %Y') + year = now.strftime('%Y') + ztoday = now.strftime('%d %b %Y') + today = ztoday.lstrip('0') + tz_now = now.strftime('%z') + tz_num = tz_now[0:1].replace('+', '') + str(float(tz_now[1:3]) + float(tz_now[3:]) / 60) + + curversion = get_rsync_version() + lastversion, last_protocol_version, pdate = get_NEWS_version_info() + protocol_version, subprotocol_version = get_protocol_versions() + + # Default next version: bump preN, or move dev -> pre1. + version = curversion + m = re.search(r'pre(\d+)', version) + if m: + version = re.sub(r'pre\d+', 'pre' + str(int(m[1]) + 1), version) + else: + version = version.replace('dev', 'pre1') + + print(f"\nCurrent version (version.h): {curversion}") + print(f"Last released version (NEWS.md): {lastversion}") + print(f"Current protocol version: {protocol_version} (last released: {last_protocol_version})") + + ans = input(f"\nVersion to release [{version}, '.' to drop the preN suffix]: ").strip() + if ans == '.': + version = re.sub(r'pre\d+', '', version) + elif ans: + version = ans + if not re.match(r'^[\d.]+(pre\d+)?$', version): + die(f'Invalid version: "{version}"') + version = re.sub(r'[-.]*pre[-.]*', 'pre', version) + + if 'pre' in version and not curversion.endswith('dev'): + lastversion = curversion + + ans = input(f"Previous version to diff against [{lastversion}]: ").strip() + if ans: + lastversion = ans + lastversion = re.sub(r'[-.]*pre[-.]*', 'pre', lastversion) + + m = re.search(r'(pre\d+)', version) + pre = m[1] if m else '' + finalversion = re.sub(r'pre\d+', '', version) + + release = '0.1' if pre else '1' + ans = input(f"RPM release number [{release}]: ").strip() + if ans: + release = ans + if pre: + release += '.' + pre + + proto_changed = protocol_version != last_protocol_version + if proto_changed: + if finalversion in pdate: + proto_change_date = pdate[finalversion] + else: + while True: + ans = input(f"Date the protocol changed to {protocol_version} (dd Mmm yyyy): ").strip() + if re.match(r'^\d\d \w\w\w \d\d\d\d$', ans): + break + proto_change_date = ans + else: + proto_change_date = ' ' * 11 + + if 'pre' in lastversion: + if not pre: + die("Refusing to diff a release version against a pre-release version.") + srcdir = srcdiffdir = lastsrcdir = 'src-previews' + elif pre: + srcdir = srcdiffdir = 'src-previews' + lastsrcdir = 'src' + else: + srcdir = lastsrcdir = 'src' + srcdiffdir = 'src-diffs' + + state = { + 'version': version, + 'lastversion': lastversion, + 'finalversion': finalversion, + 'pre': pre, + 'release': release, + 'protocol_version': protocol_version, + 'subprotocol_version': subprotocol_version, + 'proto_changed': proto_changed, + 'proto_change_date': proto_change_date, + 'srcdir': srcdir, + 'srcdiffdir': srcdiffdir, + 'lastsrcdir': lastsrcdir, + 'today': today, + 'ztoday': ztoday, + 'cl_today': cl_today, + 'year': year, + 'tz_num': tz_num, + 'master_branch': args.master_branch, + } + save_state(state) + + section("Release info") + for k in ('version', 'lastversion', 'release', 'srcdir', 'srcdiffdir', 'lastsrcdir', + 'protocol_version', 'proto_changed', 'proto_change_date'): + print(f" {k}: {state[k]}") + print(f"\nWrote {STATE_FILE}. Re-run --step-2-prepare to change anything.") + + +# ---------- Step 3: tweak version files ---------- + +def step_3_tweak(args): + require_top_of_checkout() + state = load_state() + + version = state['version'] + finalversion = state['finalversion'] + pre = state['pre'] + release = state['release'] + today = state['today'] + ztoday = state['ztoday'] + cl_today = state['cl_today'] + year = state['year'] + tz_num = state['tz_num'] + proto_changed = state['proto_changed'] + proto_change_date = state['proto_change_date'] + protocol_version = state['protocol_version'] + srcdir = state['srcdir'] + + specvars = { + 'Version:': finalversion, + 'Release:': release, + '%define fullversion': f'%{{version}}{pre}', + 'Released': version + '.', + '%define srcdir': srcdir, + } + + tweak_files = ['version.h', 'rsync.h', 'NEWS.md'] + tweak_files += glob.glob('packaging/*.spec') + tweak_files += glob.glob('packaging/*/*.spec') + + for fn in tweak_files: + with open(fn, 'r', encoding='utf-8') as fh: + old_txt = txt = fh.read() + if fn == 'version.h': + x_re = re.compile(r'^(#define RSYNC_VERSION).*', re.M) + txt = replace_or_die(x_re, r'\1 "%s"' % version, txt, + f"Unable to update RSYNC_VERSION in {fn}") + x_re = re.compile(r'^(#define MAINTAINER_TZ_OFFSET).*', re.M) + txt = replace_or_die(x_re, r'\1 ' + tz_num, txt, + f"Unable to update MAINTAINER_TZ_OFFSET in {fn}") + elif fn == 'rsync.h': + x_re = re.compile(r'(#define\s+SUBPROTOCOL_VERSION)\s+(\d+)') + repl = lambda m: m[1] + ' ' + ( + '0' if not pre or not proto_changed + else '1' if m[2] == '0' + else m[2]) + txt = replace_or_die(x_re, repl, txt, + f"Unable to find SUBPROTOCOL_VERSION in {fn}") + elif fn == 'NEWS.md': + efv = re.escape(finalversion) + x_re = re.compile( + r'^# NEWS for rsync %s \(UNRELEASED\)\s+## Changes in this version:\n' % efv + + r'(\n### PROTOCOL NUMBER:\s+- The protocol number was changed to \d+\.\n)?') + rel_day = 'UNRELEASED' if pre else today + repl = (f'# NEWS for rsync {finalversion} ({rel_day})\n\n' + + '## Changes in this version:\n') + if proto_changed: + repl += f'\n### PROTOCOL NUMBER:\n\n - The protocol number was changed to {protocol_version}.\n' + good_top = re.sub(r'\(.*?\)', '(UNRELEASED)', repl, 1) + msg = (f"The top of {fn} is not in the right format. It should be:\n" + good_top) + txt = replace_or_die(x_re, repl, txt, msg) + x_re = re.compile( + r'^(\| )(\S{2} \S{3} \d{4})(\s+\|\s+%s\s+\| ).{11}(\s+\| )\S{2}(\s+\|+)$' % efv, + re.M) + repl = lambda m: (m[1] + (m[2] if pre else ztoday) + m[3] + + proto_change_date + m[4] + protocol_version + m[5]) + txt = replace_or_die(x_re, repl, txt, + f'Unable to find "| ?? ??? {year} | {finalversion} | ... |" line in {fn}') + elif '.spec' in fn: + for var, val in specvars.items(): + x_re = re.compile(r'^%s .*' % re.escape(var), re.M) + txt = replace_or_die(x_re, var + ' ' + val, txt, + f"Unable to update {var} in {fn}") + x_re = re.compile(r'^\* \w\w\w \w\w\w \d\d \d\d\d\d (.*)', re.M) + txt = replace_or_die(x_re, r'%s \1' % cl_today, txt, + f"Unable to update ChangeLog header in {fn}") + else: + die(f"Unrecognized file in tweak_files: {fn}") + + if txt != old_txt: + print(f"Updating {fn}") + with open(fn, 'w', encoding='utf-8') as fh: + fh.write(txt) + + cmd_chk(['packaging/year-tweak']) + + section("git diff after tweaks") + cmd_run(['git', '--no-pager', 'diff']) + + +# ---------- Step 4: build ---------- + +def step_4_build(args): + require_top_of_checkout() + load_state() # just to ensure we've prepared + + section("Running prepare-source + configure --prefix=/usr --with-rrsync + make + make gen") + # Always re-prepare so configure.sh is current; we run configure ourselves + # with the release-required flags rather than relying on the cached + # config.status (which may have been produced with different options). + if os.path.isfile('.fetch'): + cmd_chk(['./prepare-source', 'fetch']) + else: + cmd_chk(['./prepare-source']) + + cmd_chk(['./configure', '--prefix=/usr', '--with-rrsync']) + cmd_chk(['make']) + cmd_chk(['make', 'gen']) + + +# ---------- Step 5: commit ---------- + +def step_5_commit(args): + require_top_of_checkout() + state = load_state() + version = state['version'] + + section("git status") + cmd_run(['git', 'status']) + if not confirm("Commit all current changes with the release message?"): + die("Aborted.") + cmd_chk(['git', 'commit', '-a', '-m', f'Preparing for release of {version} [buildall]']) + + +# ---------- Step 6: tag ---------- + +def step_6_tag(args): + require_top_of_checkout() + state = load_state() + version = state['version'] + v_ver = 'v' + version + + out = cmd_txt_chk(['git', 'tag', '-l', v_ver]).out + if out.strip(): + if not confirm(f"Tag {v_ver} already exists. Delete and recreate?"): + die("Aborted.") + cmd_chk(['git', 'tag', '-d', v_ver]) + + # Prime the gpg agent so the actual tag signing won't prompt. + section("Priming gpg agent") + cmd_run("touch TeMp; gpg --sign TeMp; rm -f TeMp TeMp.gpg") + + section(f"Creating signed tag {v_ver}") + out = cmd_txt(['git', 'tag', '-s', '-m', f'Version {version}.', v_ver], + capture='combined').out + print(out, end='') + if 'bad passphrase' in out.lower() or 'failed' in out.lower(): + die("Tag creation failed.") + + +# ---------- Step 7: tarball + diff ---------- + +def step_7_tarball(args): + require_top_of_checkout() + state = load_state() + + version = state['version'] + lastversion = state['lastversion'] + pre = state['pre'] + srcdir = state['srcdir'] + srcdiffdir = state['srcdiffdir'] + lastsrcdir = state['lastsrcdir'] + + rsync_ver = 'rsync-' + version + rsync_lastver = 'rsync-' + lastversion + v_ver = 'v' + version + + srctar_name = f"{rsync_ver}.tar.gz" + diff_name = f"{rsync_lastver}-{version}.diffs.gz" + + srctar_file = os.path.join(FTP_DIR, srcdir, srctar_name) + diff_file = os.path.join(FTP_DIR, srcdiffdir, diff_name) + lasttar_file = os.path.join(FTP_DIR, lastsrcdir, rsync_lastver + '.tar.gz') + + for d in (os.path.dirname(srctar_file), os.path.dirname(diff_file)): + os.makedirs(d, exist_ok=True) + if not os.path.isfile(lasttar_file): + die(f"Previous tarball not found: {lasttar_file}") + + # Stage in ../release/work to keep the source checkout clean. + if os.path.isdir(WORK_DIR): + shutil.rmtree(WORK_DIR) + os.makedirs(WORK_DIR) + + a_dir = os.path.join(WORK_DIR, 'a') + b_dir = os.path.join(WORK_DIR, 'b') + + # Extract gen files from the previous tarball into work/a/. + tweaked_gen_files = [os.path.join(rsync_lastver, fn) for fn in GEN_FILES] + cmd_chk(['tar', '-C', WORK_DIR, '-xzf', lasttar_file, *tweaked_gen_files]) + os.rename(os.path.join(WORK_DIR, rsync_lastver), a_dir) + + # Copy current gen files (built in the top-level checkout) into work/b/. + os.makedirs(b_dir) + cmd_chk(['rsync', '-a', *GEN_FILES, b_dir + '/']) + + section(f"Creating {diff_file}") + sed_script = r's:^((---|\+\+\+) [ab]/[^\t]+)\t.*:\1:' # no single quotes! + cmd_chk( + f"(git diff v{lastversion} {v_ver} -- ':!.github'; " + f"diff -upN {a_dir} {b_dir} | sed -r '{sed_script}') | gzip -9 >{diff_file}") + + section(f"Creating {srctar_file}") + # Reuse work/b/ (which already holds the fresh gen files) as the release + # staging dir, then let "git archive" overlay the git-tracked source files + # on top. That way the tarball ends up with both gen files and source. + rsync_ver_dir = os.path.join(WORK_DIR, rsync_ver) + shutil.rmtree(a_dir) + os.rename(b_dir, rsync_ver_dir) + cmd_chk(f"git archive --format=tar --prefix={rsync_ver}/ {v_ver} | " + f"tar -C {WORK_DIR} -xf -") + cmd_chk(f"support/git-set-file-times --quiet --prefix={rsync_ver_dir}/") + cmd_chk(['fakeroot', 'tar', '-C', WORK_DIR, '-czf', srctar_file, + '--exclude=.github', rsync_ver]) + + # Leave staging in place; --step-8-update-ftp does its own thing. + print(f"\nCreated:\n {srctar_file}\n {diff_file}") + + +# ---------- Step 8: update ftp ---------- + +def step_8_update_ftp(args): + require_top_of_checkout() + state = load_state() + + version = state['version'] + lastversion = state['lastversion'] + srcdir = state['srcdir'] + srcdiffdir = state['srcdiffdir'] + + rsync_ver = 'rsync-' + version + rsync_lastver = 'rsync-' + lastversion + srctar_file = os.path.join(FTP_DIR, srcdir, f"{rsync_ver}.tar.gz") + diff_file = os.path.join(FTP_DIR, srcdiffdir, + f"{rsync_lastver}-{version}.diffs.gz") + + section(f"Refreshing top-of-tree files in {FTP_DIR}") + md_files = ['README.md', 'NEWS.md', 'INSTALL.md'] + html_files = [fn for fn in GEN_FILES if fn.endswith('.html')] + cmd_chk(['rsync', '-a', *md_files, *html_files, FTP_DIR + '/']) + cmd_chk(['./md-convert', '--dest', FTP_DIR, *md_files]) + + section(f"Regenerating {FTP_DIR}/ChangeLog.gz") + cmd_chk(f"git log --name-status | gzip -9 >{FTP_DIR}/ChangeLog.gz") + + # Prime gpg agent and then sign the tar + diff. + section("Priming gpg agent") + cmd_run("touch TeMp; gpg --sign TeMp; rm -f TeMp TeMp.gpg") + + for fn in (srctar_file, diff_file): + if not os.path.isfile(fn): + die(f"Missing file to sign: {fn}. Did --step-7-tarball run successfully?") + asc_fn = fn + '.asc' + if os.path.lexists(asc_fn): + os.unlink(asc_fn) + section(f"GPG-signing {fn}") + res = cmd_run(['gpg', '--batch', '-ba', fn]) + if res.returncode not in (0, 2): + die("gpg signing failed.") + + +# ---------- Step 9: top-level hard links ---------- + +def step_9_toplinks(args): + require_top_of_checkout() + state = load_state() + + pre = state['pre'] + if pre: + print("Skipping: pre-releases do not get top-level hard links.") + return + + version = state['version'] + lastversion = state['lastversion'] + srcdir = state['srcdir'] + srcdiffdir = state['srcdiffdir'] + + rsync_ver = 'rsync-' + version + rsync_lastver = 'rsync-' + lastversion + srctar_file = os.path.join(FTP_DIR, srcdir, f"{rsync_ver}.tar.gz") + diff_file = os.path.join(FTP_DIR, srcdiffdir, + f"{rsync_lastver}-{version}.diffs.gz") + + section("Removing stale top-level rsync-* files") + for find in [f'{FTP_DIR}/rsync-*.gz', + f'{FTP_DIR}/rsync-*.asc', + f'{FTP_DIR}/src-previews/rsync-*diffs.gz*']: + for fn in glob.glob(find): + os.unlink(fn) + + top_link = [ + srctar_file, srctar_file + '.asc', + diff_file, diff_file + '.asc', + ] + for fn in top_link: + target = re.sub(r'/src(-\w+)?/', '/', fn) + if os.path.lexists(target): + os.unlink(target) + os.link(fn, target) + print(f" linked {target}") + + +# ---------- Step 10: push ftp ---------- + +def step_10_push_ftp(args): + host = require_samba_host() + if not os.path.isdir(FTP_DIR): + die(f"{FTP_DIR} does not exist. Run --step-1-fetch first.") + section(f"rsync ftp dir to {host}") + rsync_with_confirm(['-aivOHP', '--chown=:rsync', '--del', + f'-f._{os.path.join(FTP_DIR, ".filt")}', + f'{FTP_DIR}/', f'{host}:{FTP_REMOTE_PATH}/']) + + +# ---------- Step 11: push html ---------- + +def step_11_push_html(args): + host = require_samba_host() + if not os.path.isdir(HTML_DIR): + die(f"{HTML_DIR} does not exist. Run --step-1-fetch first.") + section(f"rsync html dir to {host}") + filt = os.path.join(HTML_DIR, 'filt') + rsync_with_confirm(['-aivOHP', '--chown=:rsync', '--del', + f'-f._{filt}', + f'{HTML_DIR}/', f'{host}:{HTML_REMOTE_PATH}/']) + + +# ---------- Step 12: print push-git instructions ---------- + +def step_12_push_git(args): + state = load_state() + version = state['version'] + master_branch = state['master_branch'] + v_ver = 'v' + version + + print(f"""\ +{DASH_LINE} +Run these from the rsync-git checkout (this script does not push for you): + + git push origin {master_branch} + git push origin {v_ver} + +If you have a 'samba' remote configured (git.samba.org:/data/git/rsync.git): + + git push samba {master_branch} + git push samba {v_ver} + +Then upload the tarball + .asc to the GitHub release for {v_ver}, run +packaging/send-news (when convenient), and announce on rsync-announce@, +rsync@, and Discord. +""") + + +# ---------- shared rsync-with-confirm ---------- + +def rsync_with_confirm(rsync_args): + """Run an rsync command in dry-run mode, then ask before running for real.""" + cmd_run(['rsync', '--dry-run', *rsync_args]) + if confirm("Run without --dry-run?"): + cmd_run(['rsync', *rsync_args]) + + +# ---------- dispatch ---------- + +STEP_FUNCS = { + 'step-1-fetch': step_1_fetch, + 'step-2-prepare': step_2_prepare, + 'step-3-tweak': step_3_tweak, + 'step-4-build': step_4_build, + 'step-5-commit': step_5_commit, + 'step-6-tag': step_6_tag, + 'step-7-tarball': step_7_tarball, + 'step-8-update-ftp': step_8_update_ftp, + 'step-9-toplinks': step_9_toplinks, + 'step-10-push-ftp': step_10_push_ftp, + 'step-11-push-html': step_11_push_html, + 'step-12-push-git': step_12_push_git, +} + + +def signal_handler(sig, frame): + die("\nAborting due to SIGINT.") + + +def main(): + parser = argparse.ArgumentParser( + description="Step-based release script for rsync.", + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog="Run --list to see the steps. Each invocation runs exactly one --step-* option.") + parser.add_argument('--branch', '-b', dest='master_branch', default='master', + help="The branch to release (default: master).") + parser.add_argument('--list', action='store_true', + help="List all release steps and exit.") + grp = parser.add_mutually_exclusive_group() + for flag, descr in STEPS: + grp.add_argument('--' + flag, dest='step', action='store_const', + const=flag, help=descr) + args = parser.parse_args() + + if args.list: + print("Release steps:") + for flag, descr in STEPS: + print(f" --{flag:18s} {descr}") + return + + if not args.step: + parser.error("pick one --step-N-XX option (or --list to see them).") + + signal.signal(signal.SIGINT, signal_handler) + os.environ['LESS'] = 'mqeiXR' + STEP_FUNCS[args.step](args) + + +if __name__ == '__main__': + main() + +# vim: sw=4 et ft=python diff --git a/packaging/year-tweak b/packaging/year-tweak index 69d2f2f..8a7fb98 100755 --- a/packaging/year-tweak +++ b/packaging/year-tweak @@ -7,9 +7,6 @@ import sys, os, re, argparse, subprocess from datetime import datetime -MAINTAINER_NAME = 'Wayne Davison' -MAINTAINER_SUF = ' ' + MAINTAINER_NAME + "\n" - def main(): latest_year = '2000' @@ -22,10 +19,6 @@ def main(): m = argparse.Namespace(**m.groupdict()) if m.year > latest_year: latest_year = m.year - if m.fn.startswith('zlib/') or m.fn.startswith('popt/'): - continue - if re.search(r'\.(c|h|sh|test)$', m.fn): - maybe_edit_copyright_year(m.fn, m.year) proc.communicate() fn = 'latest-year.h' @@ -39,55 +32,8 @@ def main(): fh.write(txt) -def maybe_edit_copyright_year(fn, year): - opening_lines = [ ] - copyright_line = None - - with open(fn, 'r', encoding='utf-8') as fh: - for lineno, line in enumerate(fh): - opening_lines.append(line) - if lineno > 3 and not re.search(r'\S', line): - break - m = re.match(r'^(?P
.*Copyright\s+\S+\s+)(?P\d\d\d\d(?:-\d\d\d\d)?(,\s+\d\d\d\d)*)(?P.+)', line)
-            if not m:
-                continue
-            copyright_line = argparse.Namespace(**m.groupdict())
-            copyright_line.lineno = len(opening_lines)
-            copyright_line.is_maintainer_line = MAINTAINER_NAME in copyright_line.suf
-            copyright_line.txt = line
-            if copyright_line.is_maintainer_line:
-                break
-
-        if not copyright_line:
-            return
-
-        if copyright_line.is_maintainer_line:
-            cyears = copyright_line.year.split('-')
-            if year == cyears[0]:
-                cyears = [ year ]
-            else:
-                cyears = [ cyears[0], year ]
-            txt = copyright_line.pre + '-'.join(cyears) + MAINTAINER_SUF
-            if txt == copyright_line.txt:
-                return
-            opening_lines[copyright_line.lineno - 1] = txt
-        else:
-            if fn.startswith('lib/') or fn.startswith('testsuite/'):
-                return
-            txt = copyright_line.pre + year + MAINTAINER_SUF
-            opening_lines[copyright_line.lineno - 1] += txt
-
-        remaining_txt = fh.read()
-
-    print(f"Updating {fn} with year {year}")
-
-    with open(fn, 'w', encoding='utf-8') as fh:
-        fh.write(''.join(opening_lines))
-        fh.write(remaining_txt)
-
-
 if __name__ == '__main__':
-    parser = argparse.ArgumentParser(description="Grab the year of last mod for our c & h files and make sure the Copyright comment is up-to-date.")
+    parser = argparse.ArgumentParser(description="Grab the year of the last mod for our c & h files and make sure the LATEST_YEAR value is accurate.")
     args = parser.parse_args()
     main()
 
diff --git a/rrsync.1 b/rrsync.1
index f463f61..dbabb51 100644
--- a/rrsync.1
+++ b/rrsync.1
@@ -1,4 +1,4 @@
-.TH "rrsync" "1" "15 Jan 2025" "rrsync from rsync 3.4.1" "User Commands"
+.TH "rrsync" "1" "28 Apr 2026" "rrsync from rsync 3.4.2" "User Commands"
 .\" prefix=/usr
 .P
 .SH "NAME"
@@ -81,13 +81,13 @@ Allow only reading from the DIR. Implies \fB\-no-del\fP and
 .IP "\fB\-wo\fP"
 Allow only writing to the DIR.
 .IP "\fB\-munge\fP"
-Enable rsync's \fB\-\-munge-links\fP on the server side.
+Enable rsync's \fB\-\-munge\-links\fP on the server side.
 .IP "\fB\-no-del\fP"
 Disable rsync's \fB\-\-delete*\fP and \fB\-\-remove*\fP options.
 .IP "\fB\-no-lock\fP"
 Avoid the single-run (per-user) lock check.  Useful with \fB\-munge\fP.
 .IP "\fB\-no-overwrite\fP"
-Enforce \fB\-\-ignore-existing\fP on the server. Prevents overwriting existing
+Enforce \fB\-\-ignore\-existing\fP on the server. Prevents overwriting existing
 files when the server is the receiver.
 .IP "\fB\-help\fP, \fB\-h\fP"
 Output this help message and exit.
@@ -97,13 +97,13 @@ Output this help message and exit.
 The rrsync script validates the path arguments it is sent to try to restrict
 them to staying within the specified DIR.
 .P
-The rrsync script rejects rsync's \fB\-\-copy-links\fP option (by
+The rrsync script rejects rsync's \fB\-\-copy\-links\fP option (by
 default) so that a copy cannot dereference a symlink within the DIR to get to a
 file outside the DIR.
 .P
-The rrsync script rejects rsync's \fB\-\-protect-args\fP (\fB\-s\fP) option
+The rrsync script rejects rsync's \fB\-\-protect\-args\fP (\fB\-s\fP) option
 because it would allow options to be sent to the server-side that the script
-cannot check.  If you want to support \fB\-\-protect-args\fP, use a daemon-over-ssh
+cannot check.  If you want to support \fB\-\-protect\-args\fP, use a daemon-over-ssh
 setup.
 .P
 The rrsync script accepts just a subset of rsync's options that the real rsync
@@ -155,7 +155,7 @@ command="rrsync -ro results" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAmk...
 .P
 .SH "VERSION"
 .P
-This manpage is current for version 3.4.1 of rsync.
+This manpage is current for version 3.4.2 of rsync.
 .P
 .SH "CREDITS"
 .P
diff --git a/rrsync.1.html b/rrsync.1.html
index f8faad1..b52652d 100644
--- a/rrsync.1.html
+++ b/rrsync.1.html
@@ -156,7 +156,7 @@ 

FILES

SEE ALSO

rsync(1), rsyncd.conf(5)

VERSION

-

This manpage is current for version 3.4.1 of rsync.

+

This manpage is current for version 3.4.2 of rsync.

CREDITS

rsync is distributed under the GNU General Public License. See the file COPYING for details.

@@ -165,5 +165,5 @@

CREDITS

AUTHOR

The original rrsync perl script was written by Joe Smith. Many people have later contributed to it. The python version was created by Wayne Davison.

-

15 Jan 2025

+

28 Apr 2026

diff --git a/rsync-ssl.1 b/rsync-ssl.1 index 1ed11cc..eedac46 100644 --- a/rsync-ssl.1 +++ b/rsync-ssl.1 @@ -1,4 +1,4 @@ -.TH "rsync-ssl" "1" "15 Jan 2025" "rsync-ssl from rsync 3.4.1" "User Commands" +.TH "rsync-ssl" "1" "28 Apr 2026" "rsync-ssl from rsync 3.4.2" "User Commands" .\" prefix=/usr .P .SH "NAME" @@ -130,7 +130,7 @@ Please report bugs! See the web site at .P .SH "VERSION" .P -This manpage is current for version 3.4.1 of rsync. +This manpage is current for version 3.4.2 of rsync. .P .SH "CREDITS" .P diff --git a/rsync-ssl.1.html b/rsync-ssl.1.html index d0b21be..236d564 100644 --- a/rsync-ssl.1.html +++ b/rsync-ssl.1.html @@ -140,7 +140,7 @@

CAVEATS

BUGS

Please report bugs! See the web site at https://rsync.samba.org/.

VERSION

-

This manpage is current for version 3.4.1 of rsync.

+

This manpage is current for version 3.4.2 of rsync.

CREDITS

Rsync is distributed under the GNU General Public License. See the file COPYING for details.

@@ -150,5 +150,5 @@

AUTHOR

This manpage was written by Wayne Davison.

Mailing lists for support and development are available at https://lists.samba.org/.

-

15 Jan 2025

+

28 Apr 2026

diff --git a/rsync.1 b/rsync.1 index c777862..43bc38f 100644 --- a/rsync.1 +++ b/rsync.1 @@ -1,4 +1,4 @@ -.TH "rsync" "1" "15 Jan 2025" "rsync 3.4.1" "User Commands" +.TH "rsync" "1" "28 Apr 2026" "rsync 3.4.2" "User Commands" .\" prefix=/usr .P .SH "NAME" @@ -88,7 +88,7 @@ As a special case, if a single source arg is specified without a destination, the files are listed in an output format similar to "\fBls\ \-l\fP". .P As expected, if neither the source or destination path specify a remote host, -the copy occurs locally (see also the \fB\-\-list-only\fP option). +the copy occurs locally (see also the \fB\-\-list\-only\fP option). .P Rsync refers to the local side as the client and the remote side as the server. Don't confuse server with an rsync daemon. A daemon is always a server, but a @@ -255,7 +255,7 @@ was given on the command-line. .P If you need a particular file to be transferred prior to another, either separate the files into different rsync calls, or consider using -\fB\-\-delay-updates\fP (which doesn't affect the sorted transfer order, but +\fB\-\-delay\-updates\fP (which doesn't affect the sorted transfer order, but does make the final file-updating phase happen much more rapidly). .P .SH "MULTI-HOST SECURITY" @@ -292,22 +292,22 @@ rsync -aiv host1:dir1 ~/host1-files .fi .RE .P -See the \fB\-\-trust-sender\fP option for additional details. +See the \fB\-\-trust\-sender\fP option for additional details. .P CAUTION: it is not particularly safe to use rsync to copy files from a case-preserving filesystem to a case-ignoring filesystem. If you must perform -such a copy, you should either disable symlinks via \fB\-\-no-links\fP or enable the -munging of symlinks via \fB\-\-munge-links\fP (and make sure you use the +such a copy, you should either disable symlinks via \fB\-\-no\-links\fP or enable the +munging of symlinks via \fB\-\-munge\-links\fP (and make sure you use the right local or remote option). This will prevent rsync from doing potentially dangerous things if a symlink name overlaps with a file or directory. It does not, however, ensure that you get a full copy of all the files (since that may not be possible when the names overlap). A potentially better solution is to list all the source files and create a safe list of filenames that you pass to -the \fB\-\-files-from\fP option. Any files that conflict in name would need +the \fB\-\-files\-from\fP option. Any files that conflict in name would need to be copied to different destination directories using more than one copy. .P While a copy of a case-ignoring filesystem to a case-ignoring filesystem can -work out fairly well, if no \fB\-\-delete-during\fP or \fB\-\-delete-before\fP option is +work out fairly well, if no \fB\-\-delete\-during\fP or \fB\-\-delete\-before\fP option is active, rsync can potentially update an existing file on the receiving side without noticing that the upper-/lower-case of the filename should be changed to match the sender. @@ -350,7 +350,7 @@ rsync -aiv host:'a simple file.pdf' /dest/ If you use scripts that have been written to manually apply extra quoting to the remote rsync args (or to require remote arg splitting), you can ask rsync to let your script handle the extra escaping. This is done by either adding -the \fB\-\-old-args\fP option to the rsync runs in the script (which requires +the \fB\-\-old\-args\fP option to the rsync runs in the script (which requires a new rsync) or exporting RSYNC_OLD_ARGS=1 and RSYNC_PROTECT_ARGS=0 (which works with old or new rsync versions). .P @@ -397,11 +397,11 @@ rsync -av host::src /dest Some modules on the remote daemon may require authentication. If so, you will receive a password prompt when you connect. You can avoid the password prompt by setting the environment variable \fBRSYNC_PASSWORD\fP to the password you -want to use or using the \fB\-\-password-file\fP option. This may be useful +want to use or using the \fB\-\-password\-file\fP option. This may be useful when scripting rsync. .P WARNING: On some systems environment variables are visible to all users. On -those systems using \fB\-\-password-file\fP is recommended. +those systems using \fB\-\-password\-file\fP is recommended. .P You may establish the connection via a web proxy by setting the environment variable \fBRSYNC_PROXY\fP to a hostname:port pair pointing to your web proxy. @@ -612,6 +612,7 @@ has its own detailed description later in this manpage. --compress, -z compress file data during the transfer --compress-choice=STR choose the compression algorithm (aka --zc) --compress-level=NUM explicitly set compression level (aka --zl) +--compress-threads=NUM explicitly set compression threads (aka --zt) --skip-compress=LIST skip compressing files with suffix in LIST --cvs-exclude, -C auto-ignore files in the same way CVS does --filter=RULE, -f add a file-filtering RULE @@ -703,7 +704,7 @@ expand it. .IP "\fB\-\-help\fP" Print a short help page describing the options available in rsync and exit. You can also use \fB\-h\fP for \fB\-\-help\fP when it is used without any other -options (since it normally means \fB\-\-human-readable\fP). +options (since it normally means \fB\-\-human\-readable\fP). .IP "\fB\-\-version\fP, \fB\-V\fP" Print the rsync version plus other info and exit. When repeated, the information is output is a JSON format that is still fairly readable @@ -730,8 +731,8 @@ file sizes that rsync considered transferring. It also shows a "speedup" value, which is a ratio of the total file size divided by the sum of the sent and received bytes (which is really just a feel-good bigger-is-better number). Note that these byte values can be made more (or less) -human-readable by using the \fB\-\-human-readable\fP (or -\fB\-\-no-human-readable\fP) options. +human-readable by using the \fB\-\-human\-readable\fP (or +\fB\-\-no\-human\-readable\fP) options. .IP In a modern rsync, the \fB\-v\fP option is equivalent to the setting of groups of \fB\-\-info\fP and \fB\-\-debug\fP options. You can choose to use @@ -761,8 +762,8 @@ rsync -avv --info=stats2,misc1,flist0 src/ dest/ .fi .RE .IP -Note that \fB\-\-info=name\fP's output is affected by the \fB\-\-out-format\fP -and \fB\-\-itemize-changes\fP (\fB\-i\fP) options. See those options for more +Note that \fB\-\-info=name\fP's output is affected by the \fB\-\-out\-format\fP +and \fB\-\-itemize\-changes\fP (\fB\-i\fP) options. See those options for more information on what is output and when. .IP This option was added to 3.1.0, so an older rsync on the server side might @@ -834,36 +835,36 @@ been around for several releases. .IP This option was added in rsync 3.2.3. This version also began the forwarding of a non-default setting to the remote side, though rsync uses -the backward-compatible options \fB\-\-msgs2stderr\fP and \fB\-\-no-msgs2stderr\fP to +the backward-compatible options \fB\-\-msgs2stderr\fP and \fB\-\-no\-msgs2stderr\fP to represent the \fBall\fP and \fBclient\fP settings, respectively. A newer rsync will continue to accept these older option names to maintain compatibility. .IP "\fB\-\-quiet\fP, \fB\-q\fP" This option decreases the amount of information you are given during the transfer, notably suppressing information messages from the remote server. This option is useful when invoking rsync from cron. -.IP "\fB\-\-no-motd\fP" +.IP "\fB\-\-no\-motd\fP" This option affects the information that is output by the client at the start of a daemon transfer. This suppresses the message-of-the-day (MOTD) text, but it also affects the list of modules that the daemon sends in response to the "rsync host::" request (due to a limitation in the rsync protocol), so omit this option if you want to request the list of modules from the daemon. -.IP "\fB\-\-ignore-times\fP, \fB\-I\fP" +.IP "\fB\-\-ignore\-times\fP, \fB\-I\fP" Normally rsync will skip any files that are already the same size and have the same modification timestamp. This option turns off this "quick check" behavior, causing all files to be updated. .IP -This option can be confusing compared to \fB\-\-ignore-existing\fP and -\fB\-\-ignore-non-existing\fP in that that they cause rsync to transfer +This option can be confusing compared to \fB\-\-ignore\-existing\fP and +\fB\-\-ignore\-non\-existing\fP in that that they cause rsync to transfer fewer files, while this option causes rsync to transfer more files. -.IP "\fB\-\-size-only\fP" +.IP "\fB\-\-size\-only\fP" This modifies rsync's "quick check" algorithm for finding files that need to be transferred, changing it from the default of transferring files with either a changed size or a changed last-modified time to just looking for files that have changed in size. This is useful when starting to use rsync after using another mirroring system which may not preserve timestamps exactly. -.IP "\fB\-\-modify-window=NUM\fP, \fB\-@\fP" +.IP "\fB\-\-modify\-window=NUM\fP, \fB\-@\fP" When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value. The default is 0, which matches just integer seconds. If you specify a negative value (and @@ -882,7 +883,7 @@ rsync alias -t -t@-1 .fi .RE .IP -With that as the default, you'd need to specify \fB\-\-modify-window=0\fP (aka +With that as the default, you'd need to specify \fB\-\-modify\-window=0\fP (aka \fB\-@0\fP) to override it and ignore nanoseconds, e.g. if you're copying between ext3 and ext4, or if the receiving rsync is older than 3.1.3. .IP "\fB\-\-checksum\fP, \fB\-c\fP" @@ -909,7 +910,7 @@ after-the-transfer verification has nothing to do with this option's before-the-transfer "Does this file need to be updated?" check. .IP The checksum used is auto-negotiated between the client and the server, but -can be overridden using either the \fB\-\-checksum-choice\fP (\fB\-\-cc\fP) +can be overridden using either the \fB\-\-checksum\-choice\fP (\fB\-\-cc\fP) option or an environment variable that is discussed in that option's section. .IP "\fB\-\-archive\fP, \fB\-a\fP" @@ -918,35 +919,35 @@ recursion and want to preserve almost everything. Be aware that it does \fBnot\fP include preserving ACLs (\fB\-A\fP), xattrs (\fB\-X\fP), atimes (\fB\-U\fP), crtimes (\fB\-N\fP), nor the finding and preserving of hardlinks (\fB\-H\fP). .IP -The only exception to the above equivalence is when \fB\-\-files-from\fP +The only exception to the above equivalence is when \fB\-\-files\-from\fP is specified, in which case \fB\-r\fP is not implied. -.IP "\fB\-\-no-OPTION\fP" +.IP "\fB\-\-no\-OPTION\fP" You may turn off one or more implied options by prefixing the option name with "no-". Not all positive options have a negated opposite, but a lot do, including those that can be used to disable an implied option (e.g. -\fB\-\-no-D\fP, \fB\-\-no-perms\fP) or have different defaults in various circumstances -(e.g. \fB\-\-no-whole-file\fP, \fB\-\-no-blocking-io\fP, \fB\-\-no-dirs\fP). Every +\fB\-\-no\-D\fP, \fB\-\-no\-perms\fP) or have different defaults in various circumstances +(e.g. \fB\-\-no\-whole\-file\fP, \fB\-\-no\-blocking\-io\fP, \fB\-\-no\-dirs\fP). Every valid negated option accepts both the short and the long option name after -the "no-" prefix (e.g. \fB\-\-no-R\fP is the same as \fB\-\-no-relative\fP). +the "no-" prefix (e.g. \fB\-\-no\-R\fP is the same as \fB\-\-no\-relative\fP). .IP As an example, if you want to use \fB\-\-archive\fP (\fB\-a\fP) but don't want \fB\-\-owner\fP (\fB\-o\fP), instead of converting \fB\-a\fP into \fB\-rlptgD\fP, you -can specify \fB\-a\ \-\-no-o\fP (aka \fB\-\-archive\ \-\-no-owner\fP). +can specify \fB\-a\ \-\-no\-o\fP (aka \fB\-\-archive\ \-\-no\-owner\fP). .IP -The order of the options is important: if you specify \fB\-\-no-r\ \-a\fP, the \fB\-r\fP -option would end up being turned on, the opposite of \fB\-a\ \-\-no-r\fP. Note -also that the side-effects of the \fB\-\-files-from\fP option are NOT +The order of the options is important: if you specify \fB\-\-no\-r\ \-a\fP, the \fB\-r\fP +option would end up being turned on, the opposite of \fB\-a\ \-\-no\-r\fP. Note +also that the side-effects of the \fB\-\-files\-from\fP option are NOT positional, as it affects the default state of several options and slightly -changes the meaning of \fB\-a\fP (see the \fB\-\-files-from\fP option +changes the meaning of \fB\-a\fP (see the \fB\-\-files\-from\fP option for more details). .IP "\fB\-\-recursive\fP, \fB\-r\fP" This tells rsync to copy directories recursively. See also \fB\-\-dirs\fP (\fB\-d\fP) for an option that allows the scanning of a single directory. .IP -See the \fB\-\-inc-recursive\fP option for a discussion of the +See the \fB\-\-inc\-recursive\fP option for a discussion of the incremental recursion for creating the list of files to transfer. -.IP "\fB\-\-inc-recursive\fP, \fB\-\-i-r\fP" +.IP "\fB\-\-inc\-recursive\fP, \fB\-\-i\-r\fP" This option explicitly enables on incremental recursion when scanning for files, which is enabled by default when using the \fB\-\-recursive\fP option and both sides of the transfer are running rsync 3.0.0 or newer. @@ -961,17 +962,17 @@ disable the incremental recursion mode. These include: .IP .RS .IP o -\fB\-\-delete-before\fP (the old default of \fB\-\-delete\fP) +\fB\-\-delete\-before\fP (the old default of \fB\-\-delete\fP) .IP o -\fB\-\-delete-after\fP +\fB\-\-delete\-after\fP .IP o -\fB\-\-prune-empty-dirs\fP +\fB\-\-prune\-empty\-dirs\fP .IP o -\fB\-\-delay-updates\fP +\fB\-\-delay\-updates\fP .RE .IP In order to make \fB\-\-delete\fP compatible with incremental recursion, -rsync 3.0.0 made \fB\-\-delete-during\fP the default delete mode (which +rsync 3.0.0 made \fB\-\-delete\-during\fP the default delete mode (which was first added in 2.6.4). .IP One side-effect of incremental recursion is that any missing @@ -983,14 +984,14 @@ that until a bunch of recursive copying has finished). However, these early directories don't yet have their completed mode, mtime, or ownership set\ \-\- they have more restrictive rights until the subdirectory's copying actually begins. This early-creation idiom can be avoided by using the -\fB\-\-omit-dir-times\fP option. +\fB\-\-omit\-dir\-times\fP option. .IP Incremental recursion can be disabled using the -\fB\-\-no-inc-recursive\fP (\fB\-\-no-i-r\fP) option. -.IP "\fB\-\-no-inc-recursive\fP, \fB\-\-no-i-r\fP" +\fB\-\-no\-inc\-recursive\fP (\fB\-\-no\-i\-r\fP) option. +.IP "\fB\-\-no\-inc\-recursive\fP, \fB\-\-no\-i\-r\fP" Disables the new incremental recursion algorithm of the \fB\-\-recursive\fP option. This makes rsync scan the full file list -before it begins to transfer files. See \fB\-\-inc-recursive\fP for more +before it begins to transfer files. See \fB\-\-inc\-recursive\fP for more info. .IP "\fB\-\-relative\fP, \fB\-R\fP" Use relative paths. This means that the full path names specified on the @@ -1026,7 +1027,7 @@ when copying the full path of a file that you didn't realize had a symlink in its path. If you want to duplicate a server-side symlink, include both the symlink via its path, and referent directory via its real path. If you're dealing with an older rsync on the sending side, you may need to use -the \fB\-\-no-implied-dirs\fP option. +the \fB\-\-no\-implied\-dirs\fP option. .IP It is also possible to limit the amount of path information that is sent as implied directories for each path you specify. With a modern rsync on the @@ -1061,7 +1062,7 @@ rsync -avR --rsync-path="cd /foo; rsync" \\ remote:bar/baz.c /tmp/ .fi .RE -.IP "\fB\-\-no-implied-dirs\fP" +.IP "\fB\-\-no\-implied\-dirs\fP" This option affects the default behavior of the \fB\-\-relative\fP option. When it is specified, the attributes of the implied directories from the source names are not included in the transfer. This means that the corresponding @@ -1075,10 +1076,10 @@ transfer the file "path/foo/file", the directories "path" and "path/foo" are implied when \fB\-\-relative\fP is used. If "path/foo" is a symlink to "bar" on the destination system, the receiving rsync would ordinarily delete "path/foo", recreate it as a directory, and receive the file into the new -directory. With \fB\-\-no-implied-dirs\fP, the receiving rsync updates +directory. With \fB\-\-no\-implied\-dirs\fP, the receiving rsync updates "path/foo/file" using the existing path elements, which means that the file ends up being created in "path/bar". Another way to accomplish this link -preservation is to use the \fB\-\-keep-dirlinks\fP option (which will also affect +preservation is to use the \fB\-\-keep\-dirlinks\fP option (which will also affect symlinks to directories in the rest of the transfer). .IP When pulling files from an rsync older than 3.0.0, you may need to use this @@ -1087,16 +1088,16 @@ wish the implied directories to be transferred as normal directories. .IP "\fB\-\-backup\fP, \fB\-b\fP" With this option, preexisting destination files are renamed as each file is transferred or deleted. You can control where the backup file goes and -what (if any) suffix gets appended using the \fB\-\-backup-dir\fP and +what (if any) suffix gets appended using the \fB\-\-backup\-dir\fP and \fB\-\-suffix\fP options. .IP -If you don't specify \fB\-\-backup-dir\fP: +If you don't specify \fB\-\-backup\-dir\fP: .RS .IP .IP 1. -the \fB\-\-omit-dir-times\fP option will be forced on +the \fB\-\-omit\-dir\-times\fP option will be forced on .IP 2. -the use of \fB\-\-delete\fP (without \fB\-\-delete-excluded\fP), +the use of \fB\-\-delete\fP (without \fB\-\-delete\-excluded\fP), causes rsync to add a "protect" filter-rule for the backup suffix to the end of all your existing filters that looks like this: \fB\-f\ "P\ *~"\fP. This rule prevents previously backed-up files from @@ -1108,7 +1109,7 @@ manually insert your own exclude/protect rule somewhere higher up in the list so that it has a high enough priority to be effective (e.g. if your rules specify a trailing inclusion/exclusion of \fB*\fP, the auto-added rule would never be reached). -.IP "\fB\-\-backup-dir=DIR\fP" +.IP "\fB\-\-backup\-dir=DIR\fP" This implies the \fB\-\-backup\fP option, and tells rsync to store all backups in the specified directory on the receiving side. This can be used for incremental backups. You can additionally specify a backup suffix @@ -1123,7 +1124,7 @@ hierarchy, so take extra care not to delete it or copy into it. .IP "\fB\-\-suffix=SUFFIX\fP" This option allows you to override the default backup suffix used with the \fB\-\-backup\fP (\fB\-b\fP) option. The default suffix is a \fB~\fP if no -\fB\-\-backup-dir\fP was specified, otherwise it is an empty string. +\fB\-\-backup\-dir\fP was specified, otherwise it is an empty string. .IP "\fB\-\-update\fP, \fB\-u\fP" This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file. (If an existing @@ -1190,9 +1191,9 @@ bound. It can also help keep a copy-on-write filesystem snapshot from diverging the entire contents of a file that only has minor changes. .IP The option implies \fB\-\-partial\fP (since an interrupted transfer does -not delete the file), but conflicts with \fB\-\-partial-dir\fP and -\fB\-\-delay-updates\fP. Prior to rsync 2.6.4 \fB\-\-inplace\fP was also -incompatible with \fB\-\-compare-dest\fP and \fB\-\-link-dest\fP. +not delete the file), but conflicts with \fB\-\-partial\-dir\fP and +\fB\-\-delay\-updates\fP. Prior to rsync 2.6.4 \fB\-\-inplace\fP was also +incompatible with \fB\-\-compare\-dest\fP and \fB\-\-link\-dest\fP. .IP "\fB\-\-append\fP" This special copy mode only works to efficiently update files that are known to be growing larger where any existing content on the receiving side @@ -1213,7 +1214,7 @@ This does not interfere with the updating of a file's non-content attributes (e.g. permissions, ownership, etc.) when the file does not need to be transferred, nor does it affect the updating of any directories or non-regular files. -.IP "\fB\-\-append-verify\fP" +.IP "\fB\-\-append\-verify\fP" This special copy mode works like \fB\-\-append\fP except that all the data in the file is included in the checksum verification (making it less efficient but also potentially safer). This option \fBcan be dangerous\fP if @@ -1221,9 +1222,9 @@ you aren't 100% sure that all the files in the transfer are shared, growing files. See the \fB\-\-append\fP option for more details. .IP Note: prior to rsync 3.0.0, the \fB\-\-append\fP option worked like -\fB\-\-append-verify\fP, so if you are interacting with an older rsync (or the +\fB\-\-append\-verify\fP, so if you are interacting with an older rsync (or the transfer is using a protocol prior to 30), specifying either append option -will initiate an \fB\-\-append-verify\fP transfer. +will initiate an \fB\-\-append\-verify\fP transfer. .IP "\fB\-\-dirs\fP, \fB\-d\fP" Tell the sending side to include any directories that are encountered. Unlike \fB\-\-recursive\fP, a directory's contents are not copied unless @@ -1233,14 +1234,14 @@ the directory name specified is "." or ends with a trailing slash (e.g. (and output a message to that effect for each one). If you specify both \fB\-\-dirs\fP and \fB\-\-recursive\fP, \fB\-\-recursive\fP takes precedence. .IP -The \fB\-\-dirs\fP option is implied by the \fB\-\-files-from\fP option or the -\fB\-\-list-only\fP option (including an implied \fB\-\-list-only\fP +The \fB\-\-dirs\fP option is implied by the \fB\-\-files\-from\fP option or the +\fB\-\-list\-only\fP option (including an implied \fB\-\-list\-only\fP usage) if \fB\-\-recursive\fP wasn't specified (so that directories are -seen in the listing). Specify \fB\-\-no-dirs\fP (or \fB\-\-no-d\fP) if you want to +seen in the listing). Specify \fB\-\-no\-dirs\fP (or \fB\-\-no\-d\fP) if you want to turn this off. .IP -There is also a backward-compatibility helper option, \fB\-\-old-dirs\fP -(\fB\-\-old-d\fP) that tells rsync to use a hack of \fB\-r\ \-\-exclude='/*/*'\fP to get +There is also a backward-compatibility helper option, \fB\-\-old\-dirs\fP +(\fB\-\-old\-d\fP) that tells rsync to use a hack of \fB\-r\ \-\-exclude='/*/*'\fP to get an older rsync to list a single directory without recursing. .IP "\fB\-\-mkpath\fP" Create all missing path components of the destination path. @@ -1278,7 +1279,7 @@ The default handling of symlinks is to recreate each symlink's unchanged value on the receiving side. .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-copy-links\fP, \fB\-L\fP" +.IP "\fB\-\-copy\-links\fP, \fB\-L\fP" The sender transforms each symlink encountered in the transfer into the referent item, following the symlink chain to the file or directory that it references. If a symlink chain is broken, an error is output and the file @@ -1295,11 +1296,11 @@ sender needs to know about it), so this caveat should only affect someone using an rsync client older than 2.6.7 (which is when \fB\-L\fP stopped being forwarded to the receiver). .IP -See the \fB\-\-keep-dirlinks\fP (\fB\-K\fP) if you need a symlink to a +See the \fB\-\-keep\-dirlinks\fP (\fB\-K\fP) if you need a symlink to a directory to be treated as a real directory on the receiving side. .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-copy-unsafe-links\fP" +.IP "\fB\-\-copy\-unsafe\-links\fP" This tells rsync to copy the referent of symbolic links that point outside the copied tree. Absolute symlinks are also treated like ordinary files, and so are any symlinks in the source path itself when \fB\-\-relative\fP @@ -1315,30 +1316,30 @@ slash) to "/dest/subdir" that would not allow symlinks to any files outside of "subdir". .IP Note that safe symlinks are only copied if \fB\-\-links\fP was also -specified or implied. The \fB\-\-copy-unsafe-links\fP option has no extra effect -when combined with \fB\-\-copy-links\fP. +specified or implied. The \fB\-\-copy\-unsafe\-links\fP option has no extra effect +when combined with \fB\-\-copy\-links\fP. .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-safe-links\fP" +.IP "\fB\-\-safe\-links\fP" This tells the receiving rsync to ignore any symbolic links in the transfer which point outside the copied tree. All absolute symlinks are also ignored. .IP Since this ignoring is happening on the receiving side, it will still be effective even when the sending side has munged symlinks (when it is using -\fB\-\-munge-links\fP). It also affects deletions, since the file being +\fB\-\-munge\-links\fP). It also affects deletions, since the file being present in the transfer prevents any matching file on the receiver from being deleted when the symlink is deemed to be unsafe and is skipped. .IP This option must be combined with \fB\-\-links\fP (or \fB\-\-archive\fP) to have any symlinks in the transfer to conditionally -ignore. Its effect is superseded by \fB\-\-copy-unsafe-links\fP. +ignore. Its effect is superseded by \fB\-\-copy\-unsafe\-links\fP. .IP Using this option in conjunction with \fB\-\-relative\fP may give unexpected results. .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-munge-links\fP" +.IP "\fB\-\-munge\-links\fP" This option affects just one side of the transfer and tells rsync to munge symlink values when it is receiving files or unmunge symlink values when it is sending files. The munged values make the symlinks unusable on disk but @@ -1348,21 +1349,21 @@ The server-side rsync often enables this option without the client's knowledge, such as in an rsync daemon's configuration file or by an option given to the rrsync (restricted rsync) script. When specified on the client side, specify the option normally if it is the client side that -has/needs the munged symlinks, or use \fB\-M\-\-munge-links\fP to give the option +has/needs the munged symlinks, or use \fB\-M\-\-munge\-links\fP to give the option to the server when it has/needs the munged symlinks. Note that on a local transfer, the client is the sender, so specifying the option directly unmunges symlinks while specifying it as a remote option munges symlinks. .IP -This option has no effect when sent to a daemon via \fB\-\-remote-option\fP +This option has no effect when sent to a daemon via \fB\-\-remote\-option\fP because the daemon configures whether it wants munged symlinks via its "\fBmunge\ symlinks\fP" parameter. .IP The symlink value is munged/unmunged once it is in the transfer, so any option that transforms symlinks into non-symlinks occurs prior to the -munging/unmunging \fBexcept\fP for \fB\-\-safe-links\fP, which is a choice +munging/unmunging \fBexcept\fP for \fB\-\-safe\-links\fP, which is a choice that the receiver makes, so it bases its decision on the munged/unmunged value. This does mean that if a receiver has munging enabled, that using -\fB\-\-safe-links\fP will cause all symlinks to be ignored (since they +\fB\-\-safe\-links\fP will cause all symlinks to be ignored (since they are all absolute). .IP The method that rsync uses to munge the symlinks is to prefix each one's @@ -1372,21 +1373,21 @@ enabled, rsync will refuse to run if that path is a directory or a symlink to a directory (though it only checks at startup). See also the "munge-symlinks" python script in the support directory of the source code for a way to munge/unmunge one or more symlinks in-place. -.IP "\fB\-\-copy-dirlinks\fP, \fB\-k\fP" +.IP "\fB\-\-copy\-dirlinks\fP, \fB\-k\fP" This option causes the sending side to treat a symlink to a directory as though it were a real directory. This is useful if you don't want symlinks to non-directories to be affected, as they would be using -\fB\-\-copy-links\fP. +\fB\-\-copy\-links\fP. .IP Without this option, if the sending side has replaced a directory with a symlink to a directory, the receiving side will delete anything that is in the way of the new symlink, including a directory hierarchy (as long as \fB\-\-force\fP or \fB\-\-delete\fP is in effect). .IP -See also \fB\-\-keep-dirlinks\fP for an analogous option for the +See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving side. .IP -\fB\-\-copy-dirlinks\fP applies to all symlinks to directories in the source. If +\fB\-\-copy\-dirlinks\fP applies to all symlinks to directories in the source. If you want to follow only a few specified symlinks, a trick you can use is to pass them as additional source args with a trailing slash, using \fB\-\-relative\fP to make the paths match up right. For example: @@ -1403,7 +1404,7 @@ directory in the file-list which overrides the symlink found during the scan of "src/./". .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-keep-dirlinks\fP, \fB\-K\fP" +.IP "\fB\-\-keep\-dirlinks\fP, \fB\-K\fP" This option causes the receiving side to treat a symlink to a directory as though it were a real directory, but only if it matches a real directory from the sender. Without this option, the receiver's symlink would be @@ -1411,13 +1412,13 @@ deleted and replaced with a real directory. .IP For example, suppose you transfer a directory "foo" that contains a file "file", but "foo" is a symlink to directory "bar" on the receiver. Without -\fB\-\-keep-dirlinks\fP, the receiver deletes symlink "foo", recreates it as a +\fB\-\-keep\-dirlinks\fP, the receiver deletes symlink "foo", recreates it as a directory, and receives the file into the new directory. With -\fB\-\-keep-dirlinks\fP, the receiver keeps the symlink and "file" ends up in +\fB\-\-keep\-dirlinks\fP, the receiver keeps the symlink and "file" ends up in "bar". .IP -One note of caution: if you use \fB\-\-keep-dirlinks\fP, you must trust all the -symlinks in the copy or enable the \fB\-\-munge-links\fP option on the +One note of caution: if you use \fB\-\-keep\-dirlinks\fP, you must trust all the +symlinks in the copy or enable the \fB\-\-munge\-links\fP option on the receiving side! If it is possible for an untrusted user to create their own symlink to any real directory, the user could then (on a subsequent copy) replace the symlink with a real directory and affect the content of @@ -1425,11 +1426,11 @@ whatever directory the symlink references. For backup copies, you are better off using something like a bind mount instead of a symlink to modify your receiving hierarchy. .IP -See also \fB\-\-copy-dirlinks\fP for an analogous option for the sending +See also \fB\-\-copy\-dirlinks\fP for an analogous option for the sending side. .IP See the SYMBOLIC LINKS section for multi-option info. -.IP "\fB\-\-hard-links\fP, \fB\-H\fP" +.IP "\fB\-\-hard\-links\fP, \fB\-H\fP" This tells rsync to look for hard-linked files in the source and link together the corresponding files on the destination. Without this option, hard-linked files in the source are treated as though they were separate @@ -1447,10 +1448,10 @@ them explicitly. However, if one or more of the paths have content differences, the normal file-update process will break those extra links (unless you are using the \fB\-\-inplace\fP option). .IP o -If you specify a \fB\-\-link-dest\fP directory that contains hard +If you specify a \fB\-\-link\-dest\fP directory that contains hard links, the linking of the destination files against the -\fB\-\-link-dest\fP files can cause some paths in the destination to -become linked together due to the \fB\-\-link-dest\fP associations. +\fB\-\-link\-dest\fP files can cause some paths in the destination to +become linked together due to the \fB\-\-link\-dest\fP associations. .RE .IP Note that rsync can only detect hard links between files that are inside @@ -1461,7 +1462,7 @@ very careful that you know how your files are being updated so that you are certain that no unintended changes happen due to lingering hard links (and see the \fB\-\-inplace\fP option for more caveats). .IP -If incremental recursion is active (see \fB\-\-inc-recursive\fP), rsync +If incremental recursion is active (see \fB\-\-inc\-recursive\fP), rsync may transfer a missing hard-linked file before it finds that another link for that contents exists elsewhere in the hierarchy. This does not affect the accuracy of the transfer (i.e. which files are hard-linked together), @@ -1469,7 +1470,7 @@ just its efficiency (i.e. copying the data for a new, early copy of a hard-linked file that could have been found later in the transfer in another member of the hard-linked set of files). One way to avoid this inefficiency is to disable incremental recursion using the -\fB\-\-no-inc-recursive\fP option. +\fB\-\-no\-inc\-recursive\fP option. .IP "\fB\-\-perms\fP, \fB\-p\fP" This option causes the receiving rsync to set the destination permissions to be the same as the source permissions. (See also the \fB\-\-chmod\fP @@ -1503,7 +1504,7 @@ permissions (while leaving existing files unchanged), make sure that the that all non-masked bits get enabled). If you'd care to make this latter behavior easier to type, you could define a popt alias for it, such as putting this line in the file \fB~/.popt\fP (the following defines the \fB\-Z\fP -option, and includes \fB\-\-no-g\fP to use the default group of the destination +option, and includes \fB\-\-no\-g\fP to use the default group of the destination dir): .RS 4 .IP @@ -1521,7 +1522,7 @@ rsync -avZ src/ dest/ .RE .IP (Caveat: make sure that \fB\-a\fP does not follow \fB\-Z\fP, or it will re-enable the -two \fB\-\-no-*\fP options mentioned above.) +two \fB\-\-no\-*\fP options mentioned above.) .IP The preservation of the destination's setgid bit on newly-created directories when \fB\-\-perms\fP is off was added in rsync 2.6.7. Older rsync @@ -1554,7 +1555,7 @@ This option causes rsync to update the destination ACLs to be the same as the source ACLs. The option also implies \fB\-\-perms\fP. .IP The source and destination systems must have compatible ACL entries for -this option to work properly. See the \fB\-\-fake-super\fP option for a +this option to work properly. See the \fB\-\-fake\-super\fP option for a way to backup and restore ACLs that are not compatible. .IP "\fB\-\-xattrs\fP, \fB\-X\fP" This option causes rsync to update the destination extended attributes to @@ -1563,7 +1564,7 @@ be the same as the source ones. For systems that support extended-attribute namespaces, a copy being done by a super-user copies all namespaces except system.*. A normal user only copies the user.* namespace. To be able to backup and restore non-user -namespaces as a normal user, see the \fB\-\-fake-super\fP option. +namespaces as a normal user, see the \fB\-\-fake\-super\fP option. .IP The above name filtering can be overridden by using one or more filter options with the \fBx\fP modifier. When you specify an xattr-affecting @@ -1597,8 +1598,8 @@ receiver-only rule that excludes all names: .RE .IP Note that the \fB\-X\fP option does not copy rsync's special xattr values (e.g. -those used by \fB\-\-fake-super\fP) unless you repeat the option (e.g. \fB\-XX\fP). -This "copy all xattrs" mode cannot be used with \fB\-\-fake-super\fP. +those used by \fB\-\-fake\-super\fP) unless you repeat the option (e.g. \fB\-XX\fP). +This "copy all xattrs" mode cannot be used with \fB\-\-fake\-super\fP. .IP "\fB\-\-chmod=CHMOD\fP" This option tells rsync to apply one or more comma-separated "chmod" modes to the permission of the files in the transfer. The resulting value is @@ -1636,29 +1637,29 @@ resulting permission value can be applied to the files in the transfer. .IP "\fB\-\-owner\fP, \fB\-o\fP" This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as -the super-user (see also the \fB\-\-super\fP and \fB\-\-fake-super\fP +the super-user (see also the \fB\-\-super\fP and \fB\-\-fake\-super\fP options). Without this option, the owner of new and/or transferred files are set to the invoking user on the receiving side. .IP The preservation of ownership will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the -\fB\-\-numeric-ids\fP option for a full discussion). +\fB\-\-numeric\-ids\fP option for a full discussion). .IP "\fB\-\-group\fP, \fB\-g\fP" This option causes rsync to set the group of the destination file to be the same as the source file. If the receiving program is not running as the -super-user (or if \fB\-\-no-super\fP was specified), only groups that the +super-user (or if \fB\-\-no\-super\fP was specified), only groups that the invoking user on the receiving side is a member of will be preserved. Without this option, the group is set to the default group of the invoking user on the receiving side. .IP The preservation of group information will associate matching names by default, but may fall back to using the ID number in some circumstances -(see also the \fB\-\-numeric-ids\fP option for a full discussion). +(see also the \fB\-\-numeric\-ids\fP option for a full discussion). .IP "\fB\-\-devices\fP" This option causes rsync to transfer character and block device files to the remote system to recreate these devices. If the receiving rsync is not being run as the super-user, rsync silently skips creating the device files -(see also the \fB\-\-super\fP and \fB\-\-fake-super\fP options). +(see also the \fB\-\-super\fP and \fB\-\-fake\-super\fP options). .IP By default, rsync generates a "non-regular file" warning for each device file encountered when this option is not set. You can silence the warning @@ -1667,7 +1668,7 @@ by specifying \fB\-\-info=nonreg0\fP. This option causes rsync to transfer special files, such as named sockets and fifos. If the receiving rsync is not being run as the super-user, rsync silently skips creating the special files (see also the -\fB\-\-super\fP and \fB\-\-fake-super\fP options). +\fB\-\-super\fP and \fB\-\-fake\-super\fP options). .IP By default, rsync generates a "non-regular file" warning for each special file encountered when this option is not set. You can silence the warning @@ -1675,13 +1676,13 @@ by specifying \fB\-\-info=nonreg0\fP. .IP "\fB\-D\fP" The \fB\-D\fP option is equivalent to "\fB\-\-devices\fP \fB\-\-specials\fP". -.IP "\fB\-\-copy-devices\fP" +.IP "\fB\-\-copy\-devices\fP" This tells rsync to treat a device on the sending side as a regular file, allowing it to be copied to a normal destination file (or another device -if \fB\-\-write-devices\fP was also specified). +if \fB\-\-write\-devices\fP was also specified). .IP This option is refused by default by an rsync daemon. -.IP "\fB\-\-write-devices\fP" +.IP "\fB\-\-write\-devices\fP" This tells rsync to treat a device on the receiving side as a regular file, allowing the writing of file data into a device. .IP @@ -1696,7 +1697,7 @@ This tells rsync to transfer modification times along with the files and update them on the remote system. Note that if this option is not used, the optimization that excludes files that have not been modified cannot be effective; in other words, a missing \fB\-t\fP (or \fB\-a\fP) will cause the -next transfer to behave as if it used \fB\-\-ignore-times\fP (\fB\-I\fP), +next transfer to behave as if it used \fB\-\-ignore\-times\fP (\fB\-I\fP), causing all files to be updated (though rsync's delta-transfer algorithm will make the update fairly efficient if the files haven't actually changed, you're much better off using \fB\-t\fP). @@ -1713,15 +1714,15 @@ upgraded so that the full range of dates can be conveyed. This tells rsync to set the access (use) times of the destination files to the same value as the source files. .IP -If repeated, it also sets the \fB\-\-open-noatime\fP option, which can help you +If repeated, it also sets the \fB\-\-open\-noatime\fP option, which can help you to make the sending and receiving systems have the same access times on the transferred files without needing to run rsync an extra time after a file is transferred. .IP Note that some older rsync versions (prior to 3.2.0) may have been built with a pre-release \fB\-\-atimes\fP patch that does not imply -\fB\-\-open-noatime\fP when this option is repeated. -.IP "\fB\-\-open-noatime\fP" +\fB\-\-open\-noatime\fP when this option is repeated. +.IP "\fB\-\-open\-noatime\fP" This tells rsync to open files with the O_NOATIME flag (on systems that support it) to avoid changing the access time of the files that are being transferred. If your OS does not support the O_NOATIME flag then rsync @@ -1733,16 +1734,16 @@ This tells rsync to set the create times (newness) of the destination files to the same value as the source files. Your OS & filesystem must support the setting of arbitrary creation (birth) times for this option to be supported. -.IP "\fB\-\-omit-dir-times\fP, \fB\-O\fP" +.IP "\fB\-\-omit\-dir\-times\fP, \fB\-O\fP" This tells rsync to omit directories when it is preserving modification, access, and create times. If NFS is sharing the directories on the receiving side, it is a good idea to use \fB\-O\fP. This option is inferred if you use -\fB\-\-backup\fP without \fB\-\-backup-dir\fP. +\fB\-\-backup\fP without \fB\-\-backup\-dir\fP. .IP This option also has the side-effect of avoiding early creation of missing sub-directories when incremental recursion is enabled, as discussed in the -\fB\-\-inc-recursive\fP section. -.IP "\fB\-\-omit-link-times\fP, \fB\-J\fP" +\fB\-\-inc\-recursive\fP section. +.IP "\fB\-\-omit\-link\-times\fP, \fB\-J\fP" This tells rsync to omit symlinks when it is preserving modification, access, and create times. .IP "\fB\-\-super\fP" @@ -1754,8 +1755,8 @@ copying devices via the \fB\-\-devices\fP option. This is useful for systems that allow such activities without being the super-user, and also for ensuring that you will get errors if the receiving side isn't being run as the super-user. To turn off super-user activities, the super-user can -use \fB\-\-no-super\fP. -.IP "\fB\-\-fake-super\fP" +use \fB\-\-no\-super\fP. +.IP "\fB\-\-fake\-super\fP" When this option is enabled, rsync simulates super-user activities by saving/restoring the privileged attributes via special extended attributes that are attached to each file (as needed). This includes the file's owner @@ -1771,9 +1772,9 @@ ACLs (if \fB\-\-acls\fP was specified) and non-user extended attributes This is a good way to backup data without using a super-user, and to store ACLs from incompatible systems. .IP -The \fB\-\-fake-super\fP option only affects the side where the option is used. +The \fB\-\-fake\-super\fP option only affects the side where the option is used. To affect the remote side of a remote-shell connection, use the -\fB\-\-remote-option\fP (\fB\-M\fP) option: +\fB\-\-remote\-option\fP (\fB\-M\fP) option: .RS 4 .IP .nf @@ -1783,10 +1784,10 @@ rsync -av -M--fake-super /src/ host:/dest/ .IP For a local copy, this option affects both the source and the destination. If you wish a local copy to enable this option just for the destination -files, specify \fB\-M\-\-fake-super\fP. If you wish a local copy to enable this -option just for the source files, combine \fB\-\-fake-super\fP with \fB\-M\-\-super\fP. +files, specify \fB\-M\-\-fake\-super\fP. If you wish a local copy to enable this +option just for the source files, combine \fB\-\-fake\-super\fP with \fB\-M\-\-super\fP. .IP -This option is overridden by both \fB\-\-super\fP and \fB\-\-no-super\fP. +This option is overridden by both \fB\-\-super\fP and \fB\-\-no\-super\fP. .IP See also the \fBfake\ super\fP setting in the daemon's rsyncd.conf file. @@ -1794,7 +1795,7 @@ daemon's rsyncd.conf file. Try to handle sparse files efficiently so they take up less space on the destination. If combined with \fB\-\-inplace\fP the file created might not end up with sparse blocks with some combinations of kernel version -and/or filesystem type. If \fB\-\-whole-file\fP is in effect (e.g. for a +and/or filesystem type. If \fB\-\-whole\-file\fP is in effect (e.g. for a local copy) then it will always work because rsync truncates the file prior to writing out the updated version. .IP @@ -1815,14 +1816,14 @@ NTFS, etc.), this option may have no positive effect at all. If combined with \fB\-\-sparse\fP, the file will only have sparse blocks (as opposed to allocated sequences of null bytes) if the kernel version and filesystem type support creating holes in the allocated data. -.IP "\fB\-\-dry-run\fP, \fB\-n\fP" +.IP "\fB\-\-dry\-run\fP, \fB\-n\fP" This makes rsync perform a trial run that doesn't make any changes (and produces mostly the same output as a real run). It is most commonly used in combination with the \fB\-\-verbose\fP (\fB\-v\fP) and/or -\fB\-\-itemize-changes\fP (\fB\-i\fP) options to see what an rsync command is +\fB\-\-itemize\-changes\fP (\fB\-i\fP) options to see what an rsync command is going to do before one actually runs it. .IP -The output of \fB\-\-itemize-changes\fP is supposed to be exactly the +The output of \fB\-\-itemize\-changes\fP is supposed to be exactly the same on a dry run and a subsequent real run (barring intentional trickery and system call failures); if it isn't, that's a bug. Other output should be mostly unchanged, but may differ in some areas. Notably, a dry run does @@ -1830,7 +1831,7 @@ not send the actual data for file transfers, so \fB\-\-progress\fP has no effect, the "bytes sent", "bytes received", "literal data", and "matched data" statistics are too small, and the "speedup" value is equivalent to a run where no file transfers were needed. -.IP "\fB\-\-whole-file\fP, \fB\-W\fP" +.IP "\fB\-\-whole\-file\fP, \fB\-W\fP" This option disables rsync's delta-transfer algorithm, which causes all transferred files to be sent whole. The transfer may be faster if this option is used when the bandwidth between the source and destination @@ -1838,14 +1839,14 @@ machines is higher than the bandwidth to disk (especially when the "disk" is actually a networked filesystem). This is the default when both the source and destination are specified as local paths, but only if no batch-writing option is in effect. -.IP "\fB\-\-no-whole-file\fP, \fB\-\-no-W\fP" +.IP "\fB\-\-no\-whole\-file\fP, \fB\-\-no\-W\fP" Disable whole-file updating when it is enabled by default for a local transfer. This usually slows rsync down, but it can be useful if you are trying to minimize the writes to the destination file (if combined with \fB\-\-inplace\fP) or for testing the checksum-based update algorithm. .IP -See also the \fB\-\-whole-file\fP option. -.IP "\fB\-\-checksum-choice=STR\fP, \fB\-\-cc=STR\fP" +See also the \fB\-\-whole\-file\fP option. +.IP "\fB\-\-checksum\-choice=STR\fP, \fB\-\-cc=STR\fP" This option overrides the checksum algorithms. If one algorithm name is specified, it is used for both the transfer checksums and (assuming \fB\-\-checksum\fP is specified) the pre-transfer checksums. If two @@ -1876,7 +1877,7 @@ The checksum options that you may be able to use are: Run \fBrsync\ \-\-version\fP to see the default checksum list compiled into your version (which may differ from the list above). .IP -If "none" is specified for the first (or only) name, the \fB\-\-whole-file\fP +If "none" is specified for the first (or only) name, the \fB\-\-whole\-file\fP option is forced on and no checksum verification is performed on the transferred data. If "none" is specified for the second (or only) name, the \fB\-\-checksum\fP option cannot be used. @@ -1901,8 +1902,8 @@ specify the transfer checksum separately from the pre-transfer checksum, and it discards "auto" and all unknown checksum names. A list with only invalid names results in a failed negotiation. .IP -The use of the \fB\-\-checksum-choice\fP option overrides this environment list. -.IP "\fB\-\-one-file-system\fP, \fB\-x\fP" +The use of the \fB\-\-checksum\-choice\fP option overrides this environment list. +.IP "\fB\-\-one\-file\-system\fP, \fB\-x\fP" This tells rsync to avoid crossing a filesystem boundary when recursing. This does not limit the user's ability to specify items to copy from multiple filesystems, just rsync's recursion through the hierarchy of each @@ -1915,30 +1916,30 @@ the copy. Otherwise, it includes an empty directory at each mount-point it encounters (using the attributes of the mounted directory because those of the underlying mount-point directory are inaccessible). .IP -If rsync has been told to collapse symlinks (via \fB\-\-copy-links\fP or -\fB\-\-copy-unsafe-links\fP), a symlink to a directory on another device +If rsync has been told to collapse symlinks (via \fB\-\-copy\-links\fP or +\fB\-\-copy\-unsafe\-links\fP), a symlink to a directory on another device is treated like a mount-point. Symlinks to non-directories are unaffected by this option. -.IP "\fB\-\-ignore-non-existing\fP, \fB\-\-existing\fP" +.IP "\fB\-\-ignore\-non\-existing\fP, \fB\-\-existing\fP" This tells rsync to skip creating files (including directories) that do not exist yet on the destination. If this option is combined with the -\fB\-\-ignore-existing\fP option, no files will be updated (which can be +\fB\-\-ignore\-existing\fP option, no files will be updated (which can be useful if all you want to do is delete extraneous files). .IP This option is a TRANSFER RULE, so don't expect any exclude side effects. -.IP "\fB\-\-ignore-existing\fP" +.IP "\fB\-\-ignore\-existing\fP" This tells rsync to skip updating files that already exist on the destination (this does \fInot\fP ignore existing directories, or nothing would -get done). See also \fB\-\-ignore-non-existing\fP. +get done). See also \fB\-\-ignore\-non\-existing\fP. .IP This option is a TRANSFER RULE, so don't expect any exclude side effects. .IP This option can be useful for those doing backups using the -\fB\-\-link-dest\fP option when they need to continue a backup run that -got interrupted. Since a \fB\-\-link-dest\fP run is copied into a new -directory hierarchy (when it is used properly), using [\fB\-\-ignore-existing\fP +\fB\-\-link\-dest\fP option when they need to continue a backup run that +got interrupted. Since a \fB\-\-link\-dest\fP run is copied into a new +directory hierarchy (when it is used properly), using [\fB\-\-ignore\-existing\fP will ensure that the already-handled files don't get tweaked (which avoids a change in permissions on the hard-linked files). This does mean that this option is only looking at the existing files in the destination @@ -1950,7 +1951,7 @@ change" (requires \fB\-c\fP), "file change" (based on the quick check), "attr change", or "uptodate". Using \fB\-\-info=skip1\fP (which is also implied by 2 \fB\-v\fP options) outputs the exists message without the INFO suffix. -.IP "\fB\-\-remove-source-files\fP" +.IP "\fB\-\-remove\-source\-files\fP" This tells rsync to remove from the sending side the files (meaning non-directories) that are a part of the transfer and have been successfully duplicated on the receiving side. @@ -1980,7 +1981,7 @@ being synchronized. You must have asked rsync to send the whole directory contents (e.g. "\fBdir/*\fP") since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not the files' parent directory. Files that are excluded from the transfer are also -excluded from being deleted unless you use the \fB\-\-delete-excluded\fP +excluded from being deleted unless you use the \fB\-\-delete\-excluded\fP option or mark the rules as only matching on the sending side (see the include/exclude modifiers in the FILTER RULES section). .IP @@ -1990,22 +1991,22 @@ also occur when \fB\-\-dirs\fP (\fB\-d\fP) is enabled, but only for directories whose contents are being copied. .IP This option can be dangerous if used incorrectly! It is a very good idea to -first try a run using the \fB\-\-dry-run\fP (\fB\-n\fP) option to see what +first try a run using the \fB\-\-dry\-run\fP (\fB\-n\fP) option to see what files are going to be deleted. .IP If the sending side detects any I/O errors, then the deletion of any files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side from causing a massive deletion of files on the destination. You can override -this with the \fB\-\-ignore-errors\fP option. -.IP -The \fB\-\-delete\fP option may be combined with one of the \-\-delete-WHEN options -without conflict, as well as \fB\-\-delete-excluded\fP. However, if none -of the \fB\-\-delete-WHEN\fP options are specified, rsync will choose the -\fB\-\-delete-during\fP algorithm when talking to rsync 3.0.0 or newer, -or the \fB\-\-delete-before\fP algorithm when talking to an older rsync. -See also \fB\-\-delete-delay\fP and \fB\-\-delete-after\fP. -.IP "\fB\-\-delete-before\fP" +this with the \fB\-\-ignore\-errors\fP option. +.IP +The \fB\-\-delete\fP option may be combined with one of the \-\-delete\-WHEN options +without conflict, as well as \fB\-\-delete\-excluded\fP. However, if none +of the \fB\-\-delete\-WHEN\fP options are specified, rsync will choose the +\fB\-\-delete\-during\fP algorithm when talking to rsync 3.0.0 or newer, +or the \fB\-\-delete\-before\fP algorithm when talking to an older rsync. +See also \fB\-\-delete\-delay\fP and \fB\-\-delete\-after\fP. +.IP "\fB\-\-delete\-before\fP" Request that the file-deletions on the receiving side be done before the transfer starts. See \fB\-\-delete\fP (which is implied) for more details on file-deletion. @@ -2017,29 +2018,29 @@ transfer, and this delay might cause the transfer to timeout (if \fB\-\-timeout\fP was specified). It also forces rsync to use the old, non-incremental recursion algorithm that requires rsync to scan all the files in the transfer into memory at once (see \fB\-\-recursive\fP). -.IP "\fB\-\-delete-during\fP, \fB\-\-del\fP" +.IP "\fB\-\-delete\-during\fP, \fB\-\-del\fP" Request that the file-deletions on the receiving side be done incrementally as the transfer happens. The per-directory delete scan is done right before each directory is checked for updates, so it behaves like a more -efficient \fB\-\-delete-before\fP, including doing the deletions prior to +efficient \fB\-\-delete\-before\fP, including doing the deletions prior to any per-directory filter files being updated. This option was first added in rsync version 2.6.4. See \fB\-\-delete\fP (which is implied) for more details on file-deletion. -.IP "\fB\-\-delete-delay\fP" +.IP "\fB\-\-delete\-delay\fP" Request that the file-deletions on the receiving side be computed during -the transfer (like \fB\-\-delete-during\fP), and then removed after the +the transfer (like \fB\-\-delete\-during\fP), and then removed after the transfer completes. This is useful when combined with -\fB\-\-delay-updates\fP and/or \fB\-\-fuzzy\fP, and is more efficient -than using \fB\-\-delete-after\fP (but can behave differently, since -\fB\-\-delete-after\fP computes the deletions in a separate pass after +\fB\-\-delay\-updates\fP and/or \fB\-\-fuzzy\fP, and is more efficient +than using \fB\-\-delete\-after\fP (but can behave differently, since +\fB\-\-delete\-after\fP computes the deletions in a separate pass after all updates are done). If the number of removed files overflows an internal buffer, a temporary file will be created on the receiving side to hold the names (it is removed while open, so you shouldn't see it during the transfer). If the creation of the temporary file fails, rsync will try -to fall back to using \fB\-\-delete-after\fP (which it cannot do if +to fall back to using \fB\-\-delete\-after\fP (which it cannot do if \fB\-\-recursive\fP is doing an incremental scan). See \fB\-\-delete\fP (which is implied) for more details on file-deletion. -.IP "\fB\-\-delete-after\fP" +.IP "\fB\-\-delete\-after\fP" Request that the file-deletions on the receiving side be done after the transfer has completed. This is useful if you are sending new per-directory merge files as a part of the transfer and you want their @@ -2049,9 +2050,9 @@ requires rsync to scan all the files in the transfer into memory at once (see \fB\-\-recursive\fP). See \fB\-\-delete\fP (which is implied) for more details on file-deletion. .IP -See also the \fB\-\-delete-delay\fP option that might be a faster choice +See also the \fB\-\-delete\-delay\fP option that might be a faster choice for those that just want the deletions to occur at the end of the transfer. -.IP "\fB\-\-delete-excluded\fP" +.IP "\fB\-\-delete\-excluded\fP" This option turns any unqualified exclude/include rules into server-side rules that do not affect the receiver's deletions. .IP @@ -2070,16 +2071,16 @@ the corresponding includes). .IP See the FILTER RULES section for more information. See \fB\-\-delete\fP (which is implied) for more details on deletion. -.IP "\fB\-\-ignore-missing-args\fP" +.IP "\fB\-\-ignore\-missing\-args\fP" When rsync is first processing the explicitly requested source files (e.g. -command-line arguments or \fB\-\-files-from\fP entries), it is normally +command-line arguments or \fB\-\-files\-from\fP entries), it is normally an error if the file cannot be found. This option suppresses that error, and does not try to transfer the file. This does not affect subsequent vanished-file errors if a file was initially found to be present and later is no longer there. -.IP "\fB\-\-delete-missing-args\fP" +.IP "\fB\-\-delete\-missing\-args\fP" This option takes the behavior of the (implied) -\fB\-\-ignore-missing-args\fP option a step farther: each missing arg +\fB\-\-ignore\-missing\-args\fP option a step farther: each missing arg will become a deletion request of the corresponding destination file on the receiving side (should it exist). If the destination file is a non-empty directory, it will only be successfully deleted if \fB\-\-force\fP or @@ -2087,8 +2088,8 @@ directory, it will only be successfully deleted if \fB\-\-force\fP or independent of any other type of delete processing. .IP The missing source files are represented by special file-list entries which -display as a "\fB*missing\fP" entry in the \fB\-\-list-only\fP output. -.IP "\fB\-\-ignore-errors\fP" +display as a "\fB*missing\fP" entry in the \fB\-\-list\-only\fP output. +.IP "\fB\-\-ignore\-errors\fP" Tells \fB\-\-delete\fP to go ahead and delete files even when there are I/O errors. .IP "\fB\-\-force\fP" @@ -2097,26 +2098,26 @@ replaced by a non-directory. This is only relevant if deletions are not active (see \fB\-\-delete\fP for details). .IP Note for older rsync versions: \fB\-\-force\fP used to still be required when -using \fB\-\-delete-after\fP, and it used to be non-functional unless the +using \fB\-\-delete\-after\fP, and it used to be non-functional unless the \fB\-\-recursive\fP option was also enabled. -.IP "\fB\-\-max-delete=NUM\fP" +.IP "\fB\-\-max\-delete=NUM\fP" This tells rsync not to delete more than NUM files or directories. If that limit is exceeded, all further deletions are skipped through the end of the transfer. At the end, rsync outputs a warning (including a count of the skipped deletions) and exits with an error code of 25 (unless some more important error condition also occurred). .IP -Beginning with version 3.0.0, you may specify \fB\-\-max-delete=0\fP to be warned +Beginning with version 3.0.0, you may specify \fB\-\-max\-delete=0\fP to be warned about any extraneous files in the destination without removing any of them. Older clients interpreted this as "unlimited", so if you don't know what -version the client is, you can use the less obvious \fB\-\-max-delete=\-1\fP as a +version the client is, you can use the less obvious \fB\-\-max\-delete=\-1\fP as a backward-compatible way to specify that no deletions be allowed (though really old versions didn't warn when the limit was exceeded). -.IP "\fB\-\-max-size=SIZE\fP" +.IP "\fB\-\-max\-size=SIZE\fP" This tells rsync to avoid transferring any file that is larger than the specified SIZE. A numeric value can be suffixed with a string to indicate the numeric units or left unqualified to specify bytes. Feel free to use a -fractional value along with the units, such as \fB\-\-max-size=1.5m\fP. +fractional value along with the units, such as \fB\-\-max\-size=1.5m\fP. .IP This option is a TRANSFER RULE, so don't expect any exclude side effects. @@ -2132,17 +2133,17 @@ Finally, if the string ends with either "+1" or "\-1", it is offset by one byte in the indicated direction. The largest possible value is usually \fB8192P-1\fP. .IP -Examples: \fB\-\-max-size=1.5mb-1\fP is 1499999 bytes, and \fB\-\-max-size=2g+1\fP is +Examples: \fB\-\-max\-size=1.5mb-1\fP is 1499999 bytes, and \fB\-\-max\-size=2g+1\fP is 2147483649 bytes. .IP -Note that rsync versions prior to 3.1.0 did not allow \fB\-\-max-size=0\fP. -.IP "\fB\-\-min-size=SIZE\fP" +Note that rsync versions prior to 3.1.0 did not allow \fB\-\-max\-size=0\fP. +.IP "\fB\-\-min\-size=SIZE\fP" This tells rsync to avoid transferring any file that is smaller than the specified SIZE, which can help in not transferring small, junk files. See -the \fB\-\-max-size\fP option for a description of SIZE and other info. +the \fB\-\-max\-size\fP option for a description of SIZE and other info. .IP -Note that rsync versions prior to 3.1.0 did not allow \fB\-\-min-size=0\fP. -.IP "\fB\-\-max-alloc=SIZE\fP" +Note that rsync versions prior to 3.1.0 did not allow \fB\-\-min\-size=0\fP. +.IP "\fB\-\-max\-alloc=SIZE\fP" By default rsync limits an individual malloc/realloc to about 1GB in size. For most people this limit works just fine and prevents a protocol error causing rsync to request massive amounts of memory. However, if you have @@ -2154,7 +2155,7 @@ consume more memory. Keep in mind that this is not a limit on the total size of allocated memory. It is a sanity-check value for each individual allocation. .IP -See the \fB\-\-max-size\fP option for a description of how SIZE can be +See the \fB\-\-max\-size\fP option for a description of how SIZE can be specified. The default suffix if none is given is bytes. .IP Beginning in 3.2.7, a value of 0 is an easy way to specify SIZE_MAX (the @@ -2162,17 +2163,17 @@ largest limit possible). .IP You can set a default value using the environment variable \fBRSYNC_MAX_ALLOC\fP using the same SIZE values as supported by this -option. If the remote rsync doesn't understand the \fB\-\-max-alloc\fP option, -you can override an environmental value by specifying \fB\-\-max-alloc=1g\fP, +option. If the remote rsync doesn't understand the \fB\-\-max\-alloc\fP option, +you can override an environmental value by specifying \fB\-\-max\-alloc=1g\fP, which will make rsync avoid sending the option to the remote side (because "1G" is the default). -.IP "\fB\-\-block-size=SIZE\fP, \fB\-B\fP" +.IP "\fB\-\-block\-size=SIZE\fP, \fB\-B\fP" This forces the block size used in rsync's delta-transfer algorithm to a fixed value. It is normally selected based on the size of each file being updated. See the technical report for details. .IP Beginning in 3.2.3 the SIZE can be specified with a suffix as detailed in -the \fB\-\-max-size\fP option. Older versions only accepted a byte count. +the \fB\-\-max\-size\fP option. Older versions only accepted a byte count. .IP "\fB\-\-rsh=COMMAND\fP, \fB\-e\fP" This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, @@ -2217,12 +2218,12 @@ options in their .ssh/config file.) You can also choose the remote shell program using the \fBRSYNC_RSH\fP environment variable, which accepts the same range of values as \fB\-e\fP. .IP -See also the \fB\-\-blocking-io\fP option which is affected by this +See also the \fB\-\-blocking\-io\fP option which is affected by this option. -.IP "\fB\-\-rsync-path=PROGRAM\fP" +.IP "\fB\-\-rsync\-path=PROGRAM\fP" Use this to specify what program is to be run on the remote machine to start-up rsync. Often used when rsync is not in the default remote-shell's -path (e.g. \fB\-\-rsync-path=/usr/local/bin/rsync\fP). Note that PROGRAM is run +path (e.g. \fB\-\-rsync\-path=/usr/local/bin/rsync\fP). Note that PROGRAM is run with the help of a shell, so it can be any program, script, or command sequence you'd care to run, so long as it does not corrupt the standard-in & standard-out that rsync is using to communicate. @@ -2235,10 +2236,10 @@ machine for use with the \fB\-\-relative\fP option. For instance: rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/ .fi .RE -.IP "\fB\-\-remote-option=OPTION\fP, \fB\-M\fP" +.IP "\fB\-\-remote\-option=OPTION\fP, \fB\-M\fP" This option is used for more advanced situations where you want certain effects to be limited to one side of the transfer only. For instance, if -you want to pass \fB\-\-log-file=FILE\fP and \fB\-\-fake-super\fP to +you want to pass \fB\-\-log\-file=FILE\fP and \fB\-\-fake\-super\fP to the remote system, specify it like this: .RS 4 .IP @@ -2264,17 +2265,17 @@ the socket, and that will make it fail in a cryptic fashion. Note that you should use a separate \fB\-M\fP option for each remote option you want to pass. On older rsync versions, the presence of any spaces in the remote-option arg could cause it to be split into separate remote args, but -this requires the use of \fB\-\-old-args\fP in a modern rsync. +this requires the use of \fB\-\-old\-args\fP in a modern rsync. .IP When performing a local transfer, the "local" side is the sender and the "remote" side is the receiver. .IP Note some versions of the popt option-parsing library have a bug in them that prevents you from using an adjacent arg with an equal in it next to a -short option letter (e.g. \fB\-M\-\-log-file=/tmp/foo\fP). If this bug affects +short option letter (e.g. \fB\-M\-\-log\-file=/tmp/foo\fP). If this bug affects your version of popt, you can use the version of popt that is included with rsync. -.IP "\fB\-\-cvs-exclude\fP, \fB\-C\fP" +.IP "\fB\-\-cvs\-exclude\fP, \fB\-C\fP" This is a useful shorthand for excluding a broad range of files that you often don't want to transfer between systems. It uses a similar algorithm to CVS to determine if a file should be ignored. @@ -2385,7 +2386,7 @@ specifies an exclude rule and does not allow the full rule-parsing syntax of normal filter rules. This is equivalent to specifying \fB\-f'\-\ PATTERN'\fP. .IP See the FILTER RULES section for detailed information on this option. -.IP "\fB\-\-exclude-from=FILE\fP" +.IP "\fB\-\-exclude\-from=FILE\fP" This option is related to the \fB\-\-exclude\fP option, but it specifies a FILE that contains exclude patterns (one per line). Blank lines in the file are ignored, as are whole-line comments that start with '\fB;\fP' or '\fB#\fP' @@ -2405,7 +2406,7 @@ specifies an include rule and does not allow the full rule-parsing syntax of normal filter rules. This is equivalent to specifying \fB\-f'+\ PATTERN'\fP. .IP See the FILTER RULES section for detailed information on this option. -.IP "\fB\-\-include-from=FILE\fP" +.IP "\fB\-\-include\-from=FILE\fP" This option is related to the \fB\-\-include\fP option, but it specifies a FILE that contains include patterns (one per line). Blank lines in the file are ignored, as are whole-line comments that start with '\fB;\fP' or '\fB#\fP' @@ -2419,7 +2420,7 @@ If a line consists of just "\fB!\fP", then the current filter rules are cleared before adding any further rules. .IP If \fIFILE\fP is '\fB\-\fP', the list will be read from standard input. -.IP "\fB\-\-files-from=FILE\fP" +.IP "\fB\-\-files\-from=FILE\fP" Using this option allows you to specify the exact list of files to transfer (as read from the specified FILE or '\fB\-\fP' for standard input). It also tweaks the default behavior of rsync to make transferring just the @@ -2429,19 +2430,19 @@ specified files and directories easier: .IP o The \fB\-\-relative\fP (\fB\-R\fP) option is implied, which preserves the path information that is specified for each item in the file (use -\fB\-\-no-relative\fP or \fB\-\-no-R\fP if you want to turn that off). +\fB\-\-no\-relative\fP or \fB\-\-no\-R\fP if you want to turn that off). .IP o The \fB\-\-dirs\fP (\fB\-d\fP) option is implied, which will create directories specified in the list on the destination rather than noisily -skipping them (use \fB\-\-no-dirs\fP or \fB\-\-no-d\fP if you want to turn that off). +skipping them (use \fB\-\-no\-dirs\fP or \fB\-\-no\-d\fP if you want to turn that off). .IP o The \fB\-\-archive\fP (\fB\-a\fP) option's behavior does not imply \fB\-\-recursive\fP (\fB\-r\fP), so specify it explicitly, if you want it. .IP o These side-effects change the default state of rsync, so the position of -the \fB\-\-files-from\fP option on the command-line has no bearing on how other +the \fB\-\-files\-from\fP option on the command-line has no bearing on how other options are parsed (e.g. \fB\-a\fP works the same before or after -\fB\-\-files-from\fP, as does \fB\-\-no-R\fP and all other options). +\fB\-\-files\-from\fP, as does \fB\-\-no\-R\fP and all other options). .RE .IP The filenames that are read from the FILE are all relative to the source @@ -2461,12 +2462,12 @@ directory would also be sent (without needing to be explicitly mentioned in the file\ \-\- this began in version 2.6.4). In both cases, if the \fB\-r\fP option was enabled, that dir's entire hierarchy would also be transferred (keep in mind that \fB\-r\fP needs to be specified -explicitly with \fB\-\-files-from\fP, since it is not implied by \fB\-a\fP. +explicitly with \fB\-\-files\-from\fP, since it is not implied by \fB\-a\fP. Also note that the effect of the (enabled by default) \fB\-r\fP option is to duplicate only the path info that is read from the file\ \-\- it does not force the duplication of the source-spec path (/usr in this case). .IP -In addition, the \fB\-\-files-from\fP file can be read from the remote host +In addition, the \fB\-\-files\-from\fP file can be read from the remote host instead of the local host if you specify a "host:" in front of the file (the host must match one end of the transfer). As a short-cut, you can specify just a prefix of ":" to mean "use the remote end of the transfer". @@ -2481,12 +2482,12 @@ rsync -a --files-from=:/path/file-list src:/ /tmp/copy This would copy all the files specified in the /path/file-list file that was located on the remote "src" host. .IP -If the \fB\-\-iconv\fP and \fB\-\-secluded-args\fP options are specified -and the \fB\-\-files-from\fP filenames are being sent from one host to another, +If the \fB\-\-iconv\fP and \fB\-\-secluded\-args\fP options are specified +and the \fB\-\-files\-from\fP filenames are being sent from one host to another, the filenames will be translated from the sending host's charset to the receiving host's charset. .IP -NOTE: sorting the list of files in the \fB\-\-files-from\fP input helps rsync to +NOTE: sorting the list of files in the \fB\-\-files\-from\fP input helps rsync to be more efficient, as it will avoid re-visiting the path elements that are shared between adjacent entries. If the input is not sorted, some path elements (implied directories) may end up being scanned multiple times, and @@ -2495,11 +2496,11 @@ elements. .IP "\fB\-\-from0\fP, \fB\-0\fP" This tells rsync that the rules/filenames it reads from a file are terminated by a null ('\\0') character, not a NL, CR, or CR+LF. This -affects \fB\-\-exclude-from\fP, \fB\-\-include-from\fP, -\fB\-\-files-from\fP, and any merged files specified in a -\fB\-\-filter\fP rule. It does not affect \fB\-\-cvs-exclude\fP (since +affects \fB\-\-exclude\-from\fP, \fB\-\-include\-from\fP, +\fB\-\-files\-from\fP, and any merged files specified in a +\fB\-\-filter\fP rule. It does not affect \fB\-\-cvs\-exclude\fP (since all names read from a .cvsignore file are split on whitespace). -.IP "\fB\-\-old-args\fP" +.IP "\fB\-\-old\-args\fP" This option tells rsync to stop trying to protect the arg values on the remote side from unintended word-splitting or other misinterpretation. It also allows the client to treat an empty arg as a "." instead of @@ -2520,7 +2521,7 @@ variable. If it has the value "1", rsync will default to a single-option setting. If it has the value "2" (or more), rsync will default to a repeated-option setting. If it is "0", you'll get the default escaping behavior. The environment is always overridden by manually specified -positive or negative options (the negative is \fB\-\-no-old-args\fP). +positive or negative options (the negative is \fB\-\-no\-old\-args\fP). .IP Note that this option also disables the extra safety check added in 3.2.5 that ensures that a remote sender isn't including extra top-level items in @@ -2528,15 +2529,15 @@ the file-list that you didn't request. This side-effect is necessary because we can't know for sure what names to expect when the remote shell is interpreting the args. .IP -This option conflicts with the \fB\-\-secluded-args\fP option. -.IP "\fB\-\-secluded-args\fP, \fB\-s\fP" +This option conflicts with the \fB\-\-secluded\-args\fP option. +.IP "\fB\-\-secluded\-args\fP, \fB\-s\fP" This option sends all filenames and most options to the remote rsync via the protocol (not the remote shell command line) which avoids letting the remote shell modify them. Wildcards are expanded on the remote host by rsync instead of a shell. .IP This is similar to the default backslash-escaping of args that was added -in 3.2.4 (see \fB\-\-old-args\fP) in that it prevents things like space +in 3.2.4 (see \fB\-\-old\-args\fP) in that it prevents things like space splitting and unwanted special-character side-effects. However, it has the drawbacks of being incompatible with older rsync versions (prior to 3.0.0) and of being refused by restricted shells that want to be able to inspect @@ -2551,22 +2552,22 @@ bypass the command-line of the remote shell. If you combine this option with \fB\-\-iconv\fP, the args related to the remote side will be translated from the local to the remote character-set. The translation happens before wild-cards are expanded. See also the -\fB\-\-files-from\fP option. +\fB\-\-files\-from\fP option. .IP You may also control this setting via the \fBRSYNC_PROTECT_ARGS\fP environment variable. If it has a non-zero value, this setting will be enabled by default, otherwise it will be disabled by default. Either state is overridden by a manually specified positive or negative version of this -option (note that \fB\-\-no-s\fP and \fB\-\-no-secluded-args\fP are the negative +option (note that \fB\-\-no\-s\fP and \fB\-\-no\-secluded\-args\fP are the negative versions). This environment variable is also superseded by a non-zero \fBRSYNC_OLD_ARGS\fP export. .IP -This option conflicts with the \fB\-\-old-args\fP option. +This option conflicts with the \fB\-\-old\-args\fP option. .IP -This option used to be called \fB\-\-protect-args\fP (before 3.2.6) and that +This option used to be called \fB\-\-protect\-args\fP (before 3.2.6) and that older name can still be used (though specifying it as \fB\-s\fP is always the easiest and most compatible choice). -.IP "\fB\-\-trust-sender\fP" +.IP "\fB\-\-trust\-sender\fP" This option disables two extra validation checks that a local client performs on the file list generated by a remote sender. This option should only be used if you trust the sender to not put something malicious in the @@ -2593,13 +2594,13 @@ option interferes with the validation. For instance: Using a per-directory filter file reads filter rules that only the server knows about, so the filter checking is disabled. .IP o -Using the \fB\-\-old-args\fP option allows the sender to manipulate the +Using the \fB\-\-old\-args\fP option allows the sender to manipulate the requested args, so the arg checking is disabled. .IP o Reading the files-from list from the server side means that the client doesn't know the arg list, so the arg checking is disabled. .IP o -Using \fB\-\-read-batch\fP disables both checks since the batch file's +Using \fB\-\-read\-batch\fP disables both checks since the batch file's contents will have been verified when it was created. .RE .IP @@ -2610,7 +2611,7 @@ from a trusted sender. .IP When using this option it is a good idea to specify a dedicated destination directory, as discussed in the MULTI-HOST SECURITY section. -.IP "\fB\-\-copy-as=USER[:GROUP]\fP" +.IP "\fB\-\-copy\-as=USER[:GROUP]\fP" This option instructs rsync to use the USER and (if specified after a colon) the GROUP for the copy operations. This only works if the user that is running rsync has the ability to change users. If the group is not @@ -2626,8 +2627,8 @@ operation after the remote-shell or daemon connection is established. .IP The option only affects one side of the transfer unless the transfer is local, in which case it affects both sides. Use the -\fB\-\-remote-option\fP to affect the remote side, such as -\fB\-M\-\-copy-as=joe\fP. For a local transfer, the lsh (or lsh.sh) support file +\fB\-\-remote\-option\fP to affect the remote side, such as +\fB\-M\-\-copy\-as=joe\fP. For a local transfer, the lsh (or lsh.sh) support file provides a local-shell helper script that can be used to allow a "localhost:" or "lh:" host-spec to be specified without needing to setup any remote shells, allowing you to specify remote options that affect the @@ -2655,7 +2656,7 @@ The following command does a local copy into the "dest/" dir as user "joe" sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/ .fi .RE -.IP "\fB\-\-temp-dir=DIR\fP, \fB\-T\fP" +.IP "\fB\-\-temp\-dir=DIR\fP, \fB\-T\fP" This option instructs rsync to use DIR as a scratch directory when creating temporary copies of the files transferred on the receiving side. The default behavior is to create each temporary file in the same directory as @@ -2678,16 +2679,16 @@ someone had it open), and thus there might not be enough room to fit the new version on the disk at the same time. .IP If you are using this option for reasons other than a shortage of disk -space, you may wish to combine it with the \fB\-\-delay-updates\fP +space, you may wish to combine it with the \fB\-\-delay\-updates\fP option, which will ensure that all copied files get put into subdirectories in the destination hierarchy, awaiting the end of the transfer. If you don't have enough room to duplicate all the arriving files on the destination partition, another way to tell rsync that you aren't overly -concerned about disk space is to use the \fB\-\-partial-dir\fP option +concerned about disk space is to use the \fB\-\-partial\-dir\fP option with a relative path; because this tells rsync that it is OK to stash off a copy of a single file in a subdir in the destination hierarchy, rsync will use the partial-dir as a staging area to bring over the copied file, and -then rename it into place from there. (Specifying a \fB\-\-partial-dir\fP +then rename it into place from there. (Specifying a \fB\-\-partial\-dir\fP with an absolute path does not have this side-effect.) .IP "\fB\-\-fuzzy\fP, \fB\-y\fP" This option tells rsync that it should look for a basis file for any @@ -2698,12 +2699,12 @@ the fuzzy basis file to try to speed up the transfer. .IP If the option is repeated, the fuzzy scan will also be done in any matching alternate destination directories that are specified via -\fB\-\-compare-dest\fP, \fB\-\-copy-dest\fP, or \fB\-\-link-dest\fP. +\fB\-\-compare\-dest\fP, \fB\-\-copy\-dest\fP, or \fB\-\-link\-dest\fP. .IP Note that the use of the \fB\-\-delete\fP option might get rid of any -potential fuzzy-match files, so either use \fB\-\-delete-after\fP or +potential fuzzy-match files, so either use \fB\-\-delete\-after\fP or specify some filename exclusions if you need to prevent this. -.IP "\fB\-\-compare-dest=DIR\fP" +.IP "\fB\-\-compare\-dest=DIR\fP" This option instructs rsync to use \fIDIR\fP on the destination machine as an additional hierarchy to compare destination files against doing transfers (if the files are missing in the destination directory). If a file is @@ -2713,7 +2714,7 @@ sparse backup of just files that have changed from an earlier backup. This option is typically used to copy into an empty (or newly created) directory. .IP -Beginning in version 2.6.4, multiple \fB\-\-compare-dest\fP directories may be +Beginning in version 2.6.4, multiple \fB\-\-compare\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an exact match. If a match is found that differs only in attributes, a local copy is made and the attributes updated. If a match is not found, a @@ -2721,28 +2722,28 @@ basis file from one of the \fIDIRs\fP will be selected to try to speed up the transfer. .IP If \fIDIR\fP is a relative path, it is relative to the destination directory. -See also \fB\-\-copy-dest\fP and \fB\-\-link-dest\fP. +See also \fB\-\-copy\-dest\fP and \fB\-\-link\-dest\fP. .IP NOTE: beginning with version 3.1.0, rsync will remove a file from a non-empty destination hierarchy if an exact match is found in one of the compare-dest hierarchies (making the end result more closely match a fresh copy). -.IP "\fB\-\-copy-dest=DIR\fP" -This option behaves like \fB\-\-compare-dest\fP, but rsync will also copy +.IP "\fB\-\-copy\-dest=DIR\fP" +This option behaves like \fB\-\-compare\-dest\fP, but rsync will also copy unchanged files found in \fIDIR\fP to the destination directory using a local copy. This is useful for doing transfers to a new destination while leaving existing files intact, and then doing a flash-cutover when all files have been successfully transferred. .IP -Multiple \fB\-\-copy-dest\fP directories may be provided, which will cause rsync +Multiple \fB\-\-copy\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an unchanged file. If a match is not found, a basis file from one of the \fIDIRs\fP will be selected to try to speed up the transfer. .IP If \fIDIR\fP is a relative path, it is relative to the destination directory. -See also \fB\-\-compare-dest\fP and \fB\-\-link-dest\fP. -.IP "\fB\-\-link-dest=DIR\fP" -This option behaves like \fB\-\-copy-dest\fP, but unchanged files are +See also \fB\-\-compare\-dest\fP and \fB\-\-link\-dest\fP. +.IP "\fB\-\-link\-dest=DIR\fP" +This option behaves like \fB\-\-copy\-dest\fP, but unchanged files are hard linked from \fIDIR\fP to the destination directory. The files must be identical in all preserved attributes (e.g. permissions, possibly ownership) in order for the files to be linked together. An example: @@ -2759,7 +2760,7 @@ option that squishes root to a single user, or mounts a removable drive with generic ownership (such as OS X's "Ignore ownership on this volume" option). .IP -Beginning in version 2.6.4, multiple \fB\-\-link-dest\fP directories may be +Beginning in version 2.6.4, multiple \fB\-\-link\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an exact match (there is a limit of 20 such directories). If a match is found that differs only in attributes, a local copy is made and the @@ -2773,18 +2774,18 @@ get a bit muddled. Note that prior to version 3.1.0, an alternate-directory exact match would never be found (nor linked into the destination) when a destination file already exists. .IP -Note that if you combine this option with \fB\-\-ignore-times\fP, rsync will not +Note that if you combine this option with \fB\-\-ignore\-times\fP, rsync will not link any files together because it only links identical files together as a substitute for transferring the file, never as an additional check after the file is updated. .IP If \fIDIR\fP is a relative path, it is relative to the destination directory. -See also \fB\-\-compare-dest\fP and \fB\-\-copy-dest\fP. +See also \fB\-\-compare\-dest\fP and \fB\-\-copy\-dest\fP. .IP Note that rsync versions prior to 2.6.1 had a bug that could prevent -\fB\-\-link-dest\fP from working properly for a non-super-user when +\fB\-\-link\-dest\fP from working properly for a non-super-user when \fB\-\-owner\fP (\fB\-o\fP) was specified (or implied). You can work-around -this bug by avoiding the \fB\-o\fP option (or using \fB\-\-no-o\fP) when sending to an +this bug by avoiding the \fB\-o\fP option (or using \fB\-\-no\-o\fP) when sending to an old rsync. .IP "\fB\-\-compress\fP, \fB\-z\fP" With this option, rsync compresses the file data as it is sent to the @@ -2792,7 +2793,7 @@ destination machine, which reduces the amount of data being transmitted\ \-\- something that is useful over a slow connection. .IP Rsync supports multiple compression methods and will choose one for you -unless you force the choice using the \fB\-\-compress-choice\fP (\fB\-\-zc\fP) +unless you force the choice using the \fB\-\-compress\-choice\fP (\fB\-\-zc\fP) option. .IP Run \fBrsync\ \-\-version\fP to see the default compress list compiled into your @@ -2818,11 +2819,11 @@ option and require the use of \fB\-zz\fP because their compression library was not compatible with the default zlib compression method. You can usually ignore this weirdness unless the rsync server complains and tells you to specify \fB\-zz\fP. -.IP "\fB\-\-compress-choice=STR\fP, \fB\-\-zc=STR\fP" +.IP "\fB\-\-compress\-choice=STR\fP, \fB\-\-zc=STR\fP" This option can be used to override the automatic negotiation of the compression algorithm that occurs when \fB\-\-compress\fP is used. The option implies \fB\-\-compress\fP unless "none" was specified, which -instead implies \fB\-\-no-compress\fP. +instead implies \fB\-\-no\-compress\fP. .IP The compression options that you may be able to use are: .IP @@ -2842,16 +2843,16 @@ The compression options that you may be able to use are: Run \fBrsync\ \-\-version\fP to see the default compress list compiled into your version (which may differ from the list above). .IP -Note that if you see an error about an option named \fB\-\-old-compress\fP or -\fB\-\-new-compress\fP, this is rsync trying to send the \fB\-\-compress-choice=zlib\fP -or \fB\-\-compress-choice=zlibx\fP option in a backward-compatible manner that +Note that if you see an error about an option named \fB\-\-old\-compress\fP or +\fB\-\-new\-compress\fP, this is rsync trying to send the \fB\-\-compress\-choice=zlib\fP +or \fB\-\-compress\-choice=zlibx\fP option in a backward-compatible manner that more rsync versions understand. This error indicates that the older rsync version on the server will not allow you to force the compression type. .IP Note that the "zlibx" compression algorithm is just the "zlib" algorithm with matched data excluded from the compression stream (to try to make it more compatible with an external zlib implementation). -.IP "\fB\-\-compress-level=NUM\fP, \fB\-\-zl=NUM\fP" +.IP "\fB\-\-compress\-level=NUM\fP, \fB\-\-zl=NUM\fP" Explicitly set the compression level to use (see \fB\-\-compress\fP, \fB\-z\fP) instead of letting it default. The \fB\-\-compress\fP option is implied as long as the level chosen is not a "don't compress" level for the @@ -2861,7 +2862,7 @@ compression algorithm that is in effect (e.g. zlib compression treats level The level values vary depending on the checksum in effect. Because rsync will negotiate a checksum choice by default (when the remote rsync is new enough), it can be good to combine this option with a -\fB\-\-compress-choice\fP (\fB\-\-zc\fP) option unless you're sure of the +\fB\-\-compress\-choice\fP (\fB\-\-zc\fP) option unless you're sure of the choice in effect. For example: .RS 4 .IP @@ -2888,7 +2889,24 @@ If you want to know the compression level that is in effect, specify \fB\-\-debug=nstr\fP to see the "negotiated string" results. This will report something like "\fBClient\ compress:\ zstd\ (level\ 3)\fP" (along with the checksum choice in effect). -.IP "\fB\-\-skip-compress=LIST\fP" +.IP "\fB\-\-compress\-threads=NUM\fP, \fB\-\-zt=NUM\fP" +Set the number of threads to spawn when compressing data. Setting this +option to 1 or more will instruct the compression library to spawn 1 or +more threads for compression. Ideally, increasing the number of threads +will increase transfer speed if the transfer is CPU bound on the sender. +.IP +This option does not affect decompression. +.IP +Compression algorithms that allow threading: +.IP +.RS +.IP o +\fBzstd\fP (only when libzstd is compiled with threading support) +.RE +.IP +This option is ignored if one of the above alogithms is not selected as the +\fB\-\-compression\-choice\fP or if compression not enabled. +.IP "\fB\-\-skip\-compress=LIST\fP" \fBNOTE:\fP no compression method currently supports per-file compression changes, so this option has no effect. .IP @@ -3020,17 +3038,17 @@ zip zst .RE .IP -This list will be replaced by your \fB\-\-skip-compress\fP list in all but one +This list will be replaced by your \fB\-\-skip\-compress\fP list in all but one situation: a copy from a daemon rsync will add your skipped suffixes to its list of non-compressing files (and its list may be configured to a different default). -.IP "\fB\-\-numeric-ids\fP" +.IP "\fB\-\-numeric\-ids\fP" With this option rsync will transfer numeric group and user IDs rather than using user and group names and mapping them at both ends. .IP By default rsync will use the username and groupname to determine what ownership to give files. The special uid 0 and the special group 0 are -never mapped via user/group names even if the \fB\-\-numeric-ids\fP option is not +never mapped via user/group names even if the \fB\-\-numeric\-ids\fP option is not specified. .IP If a user or group has no name on the source system or it has no match on @@ -3077,13 +3095,13 @@ via a "\fB*\fP" or using an empty name. For instance: .fi .RE .IP -When the \fB\-\-numeric-ids\fP option is used, the sender does not send any +When the \fB\-\-numeric\-ids\fP option is used, the sender does not send any names, so all the IDs are treated as having an empty name. This means that you will need to specify numeric \fBFROM\fP values if you want to map these nameless IDs to different values. .IP For the \fB\-\-usermap\fP option to work, the receiver will need to be running as -a super-user (see also the \fB\-\-super\fP and \fB\-\-fake-super\fP +a super-user (see also the \fB\-\-super\fP and \fB\-\-fake\-super\fP options). For the \fB\-\-groupmap\fP option to work, the receiver will need to have permissions to set that group. .IP @@ -3138,7 +3156,7 @@ able to set. By default no special socket options are set. This only affects direct socket connections to a remote rsync daemon. .IP See also the daemon version of the \fB\-\-sockopts\fP option. -.IP "\fB\-\-blocking-io\fP" +.IP "\fB\-\-blocking\-io\fP" This tells rsync to use blocking I/O when launching a remote shell transport. If the remote shell is either rsh or remsh, rsync defaults to using blocking I/O, otherwise it defaults to using non-blocking I/O. (Note @@ -3150,10 +3168,10 @@ single letter for the mode, and use upper or lower case. .IP The main use of this option is to change Full buffering to Line buffering when rsync's output is going to a file or pipe. -.IP "\fB\-\-itemize-changes\fP, \fB\-i\fP" +.IP "\fB\-\-itemize\-changes\fP, \fB\-i\fP" Requests a simple itemized list of the changes that are being made to each file, including attribute changes. This is exactly the same as specifying -\fB\-\-out-format='%i\ %n%L'\fP. If you repeat the option, unchanged +\fB\-\-out\-format='%i\ %n%L'\fP. If you repeat the option, unchanged files will also be output, but only if the receiving rsync is at least version 2.6.7 (you can use \fB\-vv\fP with older versions of rsync, but that also turns on the output of other verbose messages). @@ -3176,7 +3194,7 @@ A \fBc\fP means that a local change/creation is occurring for the item (such as the creation of a directory or the changing of a symlink, etc.). .IP o A \fBh\fP means that the item is a hard link to another item (requires -\fB\-\-hard-links\fP). +\fB\-\-hard\-links\fP). .IP o A \fB.\fP means that the item is not being updated (though it might have attributes that are being modified). @@ -3259,7 +3277,7 @@ One other output is possible: when deleting files, the "%i" will output the string "\fB*deleting\fP" for each item that is being removed (assuming that you are talking to a recent enough rsync that it logs deletions instead of outputting them as a verbose message). -.IP "\fB\-\-out-format=FORMAT\fP" +.IP "\fB\-\-out\-format=FORMAT\fP" This allows you to specify exactly what the rsync client outputs to the user on a per-update basis. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) @@ -3268,14 +3286,14 @@ character. A default format of "%n%L" is assumed if either name of the file and, if the item is a link, where it points). For a full list of the possible escape characters, see the \fBlog\ format\fP setting in the rsyncd.conf manpage. .IP -Specifying the \fB\-\-out-format\fP option implies the \fB\-\-info=name\fP +Specifying the \fB\-\-out\-format\fP option implies the \fB\-\-info=name\fP option, which will mention each file, dir, etc. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a touched directory). In addition, if the itemize-changes escape (%i) is -included in the string (e.g. if the \fB\-\-itemize-changes\fP option was +included in the string (e.g. if the \fB\-\-itemize\-changes\fP option was used), the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least 2.6.4). See the -\fB\-\-itemize-changes\fP option for a description of the output of "%i". +\fB\-\-itemize\-changes\fP option for a description of the output of "%i". .IP Rsync will output the out-format string prior to a file's transfer unless one of the transfer-statistic escapes is requested, in which case the @@ -3283,12 +3301,12 @@ logging is done at the end of the file's transfer. When this late logging is in effect and \fB\-\-progress\fP is also specified, rsync will also output the name of the file being transferred prior to its progress information (followed, of course, by the out-format output). -.IP "\fB\-\-log-file=FILE\fP" +.IP "\fB\-\-log\-file=FILE\fP" This option causes rsync to log what it is doing to a file. This is similar to the logging that a daemon does, but can be requested for the client side and/or the server side of a non-daemon transfer. If specified as a client option, transfer logging will be enabled with a default format -of "%i %n%L". See the \fB\-\-log-file-format\fP option if you wish to +of "%i %n%L". See the \fB\-\-log\-file\-format\fP option if you wish to override this. .IP Here's an example command that requests the remote side to log what is @@ -3303,19 +3321,19 @@ rsync -av --remote-option=--log-file=/tmp/rlog src/ dest/ This is very useful if you need to debug why a connection is closing unexpectedly. .IP -See also the daemon version of the \fB\-\-log-file\fP option. -.IP "\fB\-\-log-file-format=FORMAT\fP" +See also the daemon version of the \fB\-\-log\-file\fP option. +.IP "\fB\-\-log\-file\-format=FORMAT\fP" This allows you to specify exactly what per-update logging is put into the -file specified by the \fB\-\-log-file\fP option (which must also be +file specified by the \fB\-\-log\-file\fP option (which must also be specified for this option to have any effect). If you specify an empty string, updated files will not be mentioned in the log file. For a list of the possible escape characters, see the \fBlog\ format\fP setting in the rsyncd.conf manpage. .IP -The default FORMAT used if \fB\-\-log-file\fP is specified and this +The default FORMAT used if \fB\-\-log\-file\fP is specified and this option is not is '%i %n%L'. .IP -See also the daemon version of the \fB\-\-log-file-format\fP +See also the daemon version of the \fB\-\-log\-file\-format\fP option. .IP "\fB\-\-stats\fP" This tells rsync to print a verbose set of statistics on the file transfer, @@ -3383,7 +3401,7 @@ received by the client side from the server side. "Non-message" bytes means that we don't count the bytes for a verbose message that the server sent to us, which makes the stats more consistent. .RE -.IP "\fB\-\-8-bit-output\fP, \fB\-8\fP" +.IP "\fB\-\-8\-bit\-output\fP, \fB\-8\fP" This tells rsync to leave all high-bit characters unescaped in the output instead of trying to test them to see if they're valid in the current locale and escaping the invalid ones. All control characters (but never @@ -3393,7 +3411,7 @@ The escape idiom that started in 2.6.7 is to output a literal backslash (\fB\\\fP) and a hash (\fB#\fP), followed by exactly 3 octal digits. For example, a newline would output as "\fB\\#012\fP". A literal backslash that is in a filename is not escaped unless it is followed by a hash and 3 digits (0-9). -.IP "\fB\-\-human-readable\fP, \fB\-h\fP" +.IP "\fB\-\-human\-readable\fP, \fB\-h\fP" Output numbers in a more human-readable format. There are 3 possible levels: .RS .IP @@ -3410,7 +3428,7 @@ output numbers in units of 1024. .IP The default is human-readable level 1. Each \fB\-h\fP option increases the level by one. You can take the level down to 0 (to output numbers as pure -digits) by specifying the \fB\-\-no-human-readable\fP (\fB\-\-no-h\fP) option. +digits) by specifying the \fB\-\-no\-human\-readable\fP (\fB\-\-no\-h\fP) option. .IP The unit letters that are appended in levels 2 and 3 are: \fBK\fP (kilo), \fBM\fP (mega), \fBG\fP (giga), \fBT\fP (tera), or \fBP\fP (peta). For example, a 1234567-byte @@ -3420,8 +3438,8 @@ decimal point). Backward compatibility note: versions of rsync prior to 3.1.0 do not support human-readable level 1, and they default to level 0. Thus, specifying one or two \fB\-h\fP options will behave in a comparable manner in -old and new versions as long as you didn't specify a \fB\-\-no-h\fP option prior -to one or more \fB\-h\fP options. See the \fB\-\-list-only\fP option for one +old and new versions as long as you didn't specify a \fB\-\-no\-h\fP option prior +to one or more \fB\-h\fP options. See the \fB\-\-list\-only\fP option for one difference. .IP "\fB\-\-partial\fP" By default, rsync will delete any partially transferred file if the @@ -3429,7 +3447,7 @@ transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the \fB\-\-partial\fP option tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster. -.IP "\fB\-\-partial-dir=DIR\fP" +.IP "\fB\-\-partial\-dir=DIR\fP" This option modifies the behavior of the \fB\-\-partial\fP option while also implying that it be enabled. This enhanced partial-file method puts any partially transferred files into the specified \fIDIR\fP instead of writing @@ -3437,14 +3455,14 @@ the partial file out to the destination file. On the next transfer, rsync will use a file found in this dir as data to speed up the resumption of the transfer and then delete it after it has served its purpose. .IP -Note that if \fB\-\-whole-file\fP is specified (or implied), any +Note that if \fB\-\-whole\-file\fP is specified (or implied), any partial-dir files that are found for a file that is being updated will simply be removed (since rsync is sending files without using rsync's delta-transfer algorithm). .IP Rsync will create the \fIDIR\fP if it is missing, but just the last dir\ \-\- not the whole path. This makes it easy to use a relative path (such as -"\fB\-\-partial-dir=.rsync-partial\fP") to have rsync create the +"\fB\-\-partial\-dir=.rsync-partial\fP") to have rsync create the partial-directory in the destination file's directory when it is needed, and then remove it again when the partial file is deleted. Note that this directory removal is only done for a relative pathname, as it is expected @@ -3455,7 +3473,7 @@ If the partial-dir value is not an absolute path, rsync will add an exclude rule at the end of all your existing excludes. This will prevent the sending of any partial-dir files that may exist on the sending side, and will also prevent the untimely deletion of partial-dir items on the -receiving side. An example: the above \fB\-\-partial-dir\fP option would add the +receiving side. An example: the above \fB\-\-partial\-dir\fP option would add the equivalent of this "perishable" exclude at the end of any other filter rules: \fB\-f\ '\-p\ .rsync-partial/'\fP .IP @@ -3470,20 +3488,20 @@ you may wish to override rsync's exclude choice. .RE .IP For instance, if you want to make rsync clean-up any left-over partial-dirs -that may be lying around, you should specify \fB\-\-delete-after\fP and +that may be lying around, you should specify \fB\-\-delete\-after\fP and add a "risk" filter rule, e.g. \fB\-f\ 'R\ .rsync-partial/'\fP. Avoid using -\fB\-\-delete-before\fP or \fB\-\-delete-during\fP unless you don't +\fB\-\-delete\-before\fP or \fB\-\-delete\-during\fP unless you don't need rsync to use any of the left-over partial-dir data during the current run. .IP -IMPORTANT: the \fB\-\-partial-dir\fP should not be writable by other users or it +IMPORTANT: the \fB\-\-partial\-dir\fP should not be writable by other users or it is a security risk! E.g. AVOID "/tmp"! .IP You can also set the partial-dir value the \fBRSYNC_PARTIAL_DIR\fP environment variable. Setting this in the environment does not force \fB\-\-partial\fP to be enabled, but rather it affects where partial files go when \fB\-\-partial\fP is specified. For instance, instead of -using \fB\-\-partial-dir=.rsync-tmp\fP along with \fB\-\-progress\fP, you could +using \fB\-\-partial\-dir=.rsync-tmp\fP along with \fB\-\-progress\fP, you could set \fBRSYNC_PARTIAL_DIR=.rsync-tmp\fP in your environment and then use the \fB\-P\fP option to turn on the use of the .rsync-tmp dir for partial transfers. The only times that the \fB\-\-partial\fP option does @@ -3492,9 +3510,9 @@ not look for this environment value are: .IP .IP 1. when \fB\-\-inplace\fP was specified (since \fB\-\-inplace\fP -conflicts with \fB\-\-partial-dir\fP), and +conflicts with \fB\-\-partial\-dir\fP), and .IP 2. -when \fB\-\-delay-updates\fP was specified (see below). +when \fB\-\-delay\-updates\fP was specified (see below). .RE .IP When a modern rsync resumes the transfer of a file in the partial-dir, that @@ -3504,30 +3522,30 @@ tmp). This requires both ends of the transfer to be at least version 3.2.0. .IP For the purposes of the daemon-config's "\fBrefuse\ options\fP" setting, -\fB\-\-partial-dir\fP does \fInot\fP imply \fB\-\-partial\fP. This is so that a +\fB\-\-partial\-dir\fP does \fInot\fP imply \fB\-\-partial\fP. This is so that a refusal of the \fB\-\-partial\fP option can be used to disallow the overwriting of destination files with a partial transfer, while still -allowing the safer idiom provided by \fB\-\-partial-dir\fP. -.IP "\fB\-\-delay-updates\fP" +allowing the safer idiom provided by \fB\-\-partial\-dir\fP. +.IP "\fB\-\-delay\-updates\fP" This option puts the temporary file from each updated file into a holding directory until the end of the transfer, at which time all the files are renamed into place in rapid succession. This attempts to make the updating of the files a little more atomic. By default the files are placed into a directory named \fB.~tmp~\fP in each file's destination directory, but if -you've specified the \fB\-\-partial-dir\fP option, that directory will be -used instead. See the comments in the \fB\-\-partial-dir\fP section for +you've specified the \fB\-\-partial\-dir\fP option, that directory will be +used instead. See the comments in the \fB\-\-partial\-dir\fP section for a discussion of how this \fB.~tmp~\fP dir will be excluded from the transfer, and what you can do if you want rsync to cleanup old \fB.~tmp~\fP dirs that might be lying around. Conflicts with \fB\-\-inplace\fP and \fB\-\-append\fP. .IP -This option implies \fB\-\-no-inc-recursive\fP since it needs the full +This option implies \fB\-\-no\-inc\-recursive\fP since it needs the full file list in memory in order to be able to iterate over it at the end. .IP This option uses more memory on the receiving side (one bit per file transferred) and also requires enough free disk space on the receiving side to hold an additional copy of all the updated files. Note also that you -should not use an absolute path to \fB\-\-partial-dir\fP unless: +should not use an absolute path to \fB\-\-partial\-dir\fP unless: .RS .IP .IP 1. @@ -3540,9 +3558,9 @@ will fail if they can't be renamed into place). .RE .IP See also the "atomic-rsync" python script in the "support" subdir for an -update algorithm that is even more atomic (it uses \fB\-\-link-dest\fP +update algorithm that is even more atomic (it uses \fB\-\-link\-dest\fP and a parallel hierarchy of files). -.IP "\fB\-\-prune-empty-dirs\fP, \fB\-m\fP" +.IP "\fB\-\-prune\-empty\-dirs\fP, \fB\-m\fP" This option tells the receiving rsync to get rid of empty directories from the file-list, including nested directories that have no non-directory children. This is useful for avoiding the creation of a bunch of useless @@ -3661,7 +3679,7 @@ don't know which of the 3 rsync processes is the client process, it's OK to signal all of them (since the non-client processes ignore the signal). .IP CAUTION: sending SIGVTALRM to an older rsync (pre-3.2.0) will kill it. -.IP "\fB\-\-password-file=FILE\fP" +.IP "\fB\-\-password\-file=FILE\fP" This option allows you to provide a password for accessing an rsync daemon via a file or via standard input if \fBFILE\fP is \fB\-\fP. The file should contain just the password on the first line (all other lines are ignored). @@ -3674,14 +3692,14 @@ When accessing an rsync daemon using a remote shell as the transport, this option only comes into effect after the remote shell finishes its authentication (i.e. if you have also specified a password in the daemon's config file). -.IP "\fB\-\-early-input=FILE\fP" +.IP "\fB\-\-early\-input=FILE\fP" This option allows rsync to send up to 5K of data to the "early exec" script on its stdin. One possible use of this data is to give the script a secret that can be used to mount an encrypted filesystem (which you should unmount in the the "post-xfer exec" script). .IP The daemon must be at least version 3.2.1. -.IP "\fB\-\-list-only\fP" +.IP "\fB\-\-list\-only\fP" This option will cause the source files to be listed instead of transferred. This option is inferred if there is a single source arg and no destination specified, so its main uses are: @@ -3715,17 +3733,17 @@ drwxrwxr-x 4,096 2022/09/30 12:53:11 support .RE .IP The only option that affects this output style is (as of 3.1.0) the -\fB\-\-human-readable\fP (\fB\-h\fP) option. The default is to output sizes +\fB\-\-human\-readable\fP (\fB\-h\fP) option. The default is to output sizes as byte counts with digit separators (in a 14-character-width column). Specifying at least one \fB\-h\fP option makes the sizes output with unit suffixes. If you want old-style bytecount sizes without digit separators -(and an 11-character-width column) use \fB\-\-no-h\fP. +(and an 11-character-width column) use \fB\-\-no\-h\fP. .IP Compatibility note: when requesting a remote listing of files from an rsync that is version 2.6.3 or older, you may encounter an error if you ask for a non-recursive listing. This is because a file listing implies the \fB\-\-dirs\fP option w/o \fB\-\-recursive\fP, and older rsyncs don't -have that option. To avoid this problem, either specify the \fB\-\-no-dirs\fP +have that option. To avoid this problem, either specify the \fB\-\-no\-dirs\fP option (if you don't need to expand a directory's content), or turn on recursion and exclude the content of subdirectories: \fB\-r\ \-\-exclude='/*/*'\fP. .IP "\fB\-\-bwlimit=RATE\fP" @@ -3734,7 +3752,7 @@ sent over the socket, specified in units per second. The RATE value can be suffixed with a string to indicate a size multiplier, and may be a fractional value (e.g. \fB\-\-bwlimit=1.5m\fP). If no suffix is specified, the value will be assumed to be in units of 1024 bytes (as if "K" or "KiB" had -been appended). See the \fB\-\-max-size\fP option for a description of +been appended). See the \fB\-\-max\-size\fP option for a description of all the available suffixes. A value of 0 specifies no limit. .IP For backward-compatibility reasons, the rate limit will be rounded to the @@ -3754,7 +3772,7 @@ quickly buffered, while other can show up as very slow when the flushing of the output buffer occurs. This may be fixed in a future version. .IP See also the daemon version of the \fB\-\-bwlimit\fP option. -.IP "\fB\-\-stop-after=MINS\fP, (\fB\-\-time-limit=MINS\fP)" +.IP "\fB\-\-stop\-after=MINS\fP, (\fB\-\-time\-limit=MINS\fP)" This option tells rsync to stop copying when the specified number of minutes has elapsed. .IP @@ -3762,10 +3780,10 @@ For maximal flexibility, rsync does not communicate this option to the remote rsync since it is usually enough that one side of the connection quits as specified. This allows the option's use even when only one side of the connection supports it. You can tell the remote side about the time -limit using \fB\-\-remote-option\fP (\fB\-M\fP), should the need arise. +limit using \fB\-\-remote\-option\fP (\fB\-M\fP), should the need arise. .IP -The \fB\-\-time-limit\fP version of this option is deprecated. -.IP "\fB\-\-stop-at=y-m-dTh:m\fP" +The \fB\-\-time\-limit\fP version of this option is deprecated. +.IP "\fB\-\-stop\-at=y-m-dTh:m\fP" This option tells rsync to stop copying when the specified point in time has been reached. The date & time can be fully specified in a numeric format of year-month-dayThour:minute (e.g. 2000-12-31T23:59) in the local @@ -3787,27 +3805,27 @@ For maximal flexibility, rsync does not communicate this option to the remote rsync since it is usually enough that one side of the connection quits as specified. This allows the option's use even when only one side of the connection supports it. You can tell the remote side about the time -limit using \fB\-\-remote-option\fP (\fB\-M\fP), should the need arise. Do +limit using \fB\-\-remote\-option\fP (\fB\-M\fP), should the need arise. Do keep in mind that the remote host may have a different default timezone than your local host. .IP "\fB\-\-fsync\fP" Cause the receiving side to fsync each finished file. This may slow down the transfer, but can help to provide peace of mind when updating critical files. -.IP "\fB\-\-write-batch=FILE\fP" +.IP "\fB\-\-write\-batch=FILE\fP" Record a file that can later be applied to another identical destination -with \fB\-\-read-batch\fP. See the "BATCH MODE" section for details, and -also the \fB\-\-only-write-batch\fP option. +with \fB\-\-read\-batch\fP. See the "BATCH MODE" section for details, and +also the \fB\-\-only\-write\-batch\fP option. .IP This option overrides the negotiated checksum & compress lists and always negotiates a choice based on old-school md5/md4/zlib choices. If you want -a more modern choice, use the \fB\-\-checksum-choice\fP (\fB\-\-cc\fP) and/or -\fB\-\-compress-choice\fP (\fB\-\-zc\fP) options. -.IP "\fB\-\-only-write-batch=FILE\fP" -Works like \fB\-\-write-batch\fP, except that no updates are made on the +a more modern choice, use the \fB\-\-checksum\-choice\fP (\fB\-\-cc\fP) and/or +\fB\-\-compress\-choice\fP (\fB\-\-zc\fP) options. +.IP "\fB\-\-only\-write\-batch=FILE\fP" +Works like \fB\-\-write\-batch\fP, except that no updates are made on the destination system when creating the batch. This lets you transport the changes to the destination system via some other means and then apply the -changes via \fB\-\-read-batch\fP. +changes via \fB\-\-read\-batch\fP. .IP Note that you can feel free to write the batch directly to some portable media: if this media fills to capacity before the end of the transfer, you @@ -3820,16 +3838,16 @@ Also note that you only save bandwidth when pushing changes to a remote system because this allows the batched data to be diverted from the sender into the batch file without having to flow over the wire to the receiver (when pulling, the sender is remote, and thus can't write the batch). -.IP "\fB\-\-read-batch=FILE\fP" +.IP "\fB\-\-read\-batch=FILE\fP" Apply all of the changes stored in FILE, a file previously generated by -\fB\-\-write-batch\fP. If \fIFILE\fP is \fB\-\fP, the batch data will be read +\fB\-\-write\-batch\fP. If \fIFILE\fP is \fB\-\fP, the batch data will be read from standard input. See the "BATCH MODE" section for details. .IP "\fB\-\-protocol=NUM\fP" Force an older protocol version to be used. This is useful for creating a batch file that is compatible with an older version of rsync. For -instance, if rsync 2.6.4 is being used with the \fB\-\-write-batch\fP +instance, if rsync 2.6.4 is being used with the \fB\-\-write\-batch\fP option, but rsync 2.6.3 is what will be used to run the -\fB\-\-read-batch\fP option, you should use "\-\-protocol=28" when creating +\fB\-\-read\-batch\fP option, you should use "\-\-protocol=28" when creating the batch file to force the older protocol version to be used in the batch file (assuming you can't upgrade the rsync on the reading system). .IP "\fB\-\-iconv=CONVERT_SPEC\fP" @@ -3839,7 +3857,7 @@ character-set via the locale setting. Alternately, you can fully specify what conversion to do by giving a local and a remote charset separated by a comma in the order \fB\-\-iconv=LOCAL,REMOTE\fP, e.g. \fB\-\-iconv=utf8,iso88591\fP. This order ensures that the option will stay the same whether you're -pushing or pulling files. Finally, you can specify either \fB\-\-no-iconv\fP or +pushing or pulling files. Finally, you can specify either \fB\-\-no\-iconv\fP or a CONVERT_SPEC of "\-" to turn off any conversion. The default setting of this option is site-specific, and can also be affected via the \fBRSYNC_ICONV\fP environment variable. @@ -3847,9 +3865,9 @@ this option is site-specific, and can also be affected via the For a list of what charset names your local iconv library supports, you can run "\fBiconv\ \-\-list\fP". .IP -If you specify the \fB\-\-secluded-args\fP (\fB\-s\fP) option, rsync will +If you specify the \fB\-\-secluded\-args\fP (\fB\-s\fP) option, rsync will translate the filenames you specify on the command-line that are being sent -to the remote host. See also the \fB\-\-files-from\fP option. +to the remote host. See also the \fB\-\-files\-from\fP option. .IP Note that rsync does not do any conversion of names in filter files (including include/exclude files). It is up to you to ensure that you're @@ -3876,7 +3894,7 @@ See also the daemon version of these options. If rsync was compiled without support for IPv6, the \fB\-\-ipv6\fP option will have no effect. The \fBrsync\ \-\-version\fP output will contain "\fBno\ IPv6\fP" if is the case. -.IP "\fB\-\-checksum-seed=NUM\fP" +.IP "\fB\-\-checksum\-seed=NUM\fP" Set the checksum seed to the integer NUM. This 4 byte checksum seed is included in each block and MD4 file checksum calculation (the more modern MD5 file checksums don't use a seed). By default the checksum seed is @@ -3935,12 +3953,12 @@ instance: rsync --daemon -M pidfile=/path/rsync.pid .fi .RE -.IP "\fB\-\-no-detach\fP" +.IP "\fB\-\-no\-detach\fP" When running as a daemon, this option instructs rsync to not detach itself and become a background process. This option is required when running as a service on Cygwin, and may also be useful when rsync is supervised by a program such as \fBdaemontools\fP or AIX's \fBSystem\ Resource\ Controller\fP. -\fB\-\-no-detach\fP is also recommended when rsync is run under a debugger. This +\fB\-\-no\-detach\fP is also recommended when rsync is run under a debugger. This option has no effect if rsync is run from inetd or sshd. .IP "\fB\-\-port=PORT\fP" This specifies an alternate TCP port number for the daemon to listen on @@ -3948,18 +3966,18 @@ rather than the default of 873. .IP See also the client version of the \fB\-\-port\fP option and the port global setting in the rsyncd.conf manpage. -.IP "\fB\-\-log-file=FILE\fP" +.IP "\fB\-\-log\-file=FILE\fP" This option tells the rsync daemon to use the given log-file name instead of using the "\fBlog\ file\fP" setting in the config file. .IP -See also the client version of the \fB\-\-log-file\fP option. -.IP "\fB\-\-log-file-format=FORMAT\fP" +See also the client version of the \fB\-\-log\-file\fP option. +.IP "\fB\-\-log\-file\-format=FORMAT\fP" This option tells the rsync daemon to use the given FORMAT string instead of using the "\fBlog\ format\fP" setting in the config file. It also enables "\fBtransfer\ logging\fP" unless the string is empty, in which case transfer logging is turned off. .IP -See also the client version of the \fB\-\-log-file-format\fP +See also the client version of the \fB\-\-log\-file\-format\fP option. .IP "\fB\-\-sockopts\fP" This overrides the \fBsocket\ options\fP @@ -4151,7 +4169,7 @@ similar) could be used instead of the filter options above. .P Rsync supports old-style include/exclude rules and new-style filter rules. The older rules are specified using \fB\-\-include\fP and \fB\-\-exclude\fP as -well as the \fB\-\-include-from\fP and \fB\-\-exclude-from\fP. These are +well as the \fB\-\-include\-from\fP and \fB\-\-exclude\-from\fP. These are limited in behavior but they don't require a "\-" or "+" prefix. An old-style exclude rule is turned into a "\fB\-\ name\fP" filter rule (with no modifiers) and an old-style include rule is turned into a "\fB+\ name\fP" filter rule (with no @@ -4186,7 +4204,7 @@ rules. .IP "\fBdir-merge,\ ':'\fP" specifies a per-directory merge-file. Using this kind of filter rule requires that you trust the sending side's filter checking, so -it has the side-effect mentioned under the \fB\-\-trust-sender\fP option. +it has the side-effect mentioned under the \fB\-\-trust\-sender\fP option. .IP "\fBhide,\ 'H'\fP" specifies a pattern for hiding files from the transfer. Equivalent to a sender-only exclude, so \fB\-f'H\ foo'\fP could also be specified @@ -4211,8 +4229,8 @@ that contain a hash character are unaffected). Note also that the \fB\-\-filter\fP, \fB\-\-include\fP, and \fB\-\-exclude\fP options take one rule/pattern each. To add multiple ones, you can repeat the options on the command-line, use the merge-file syntax of -the \fB\-\-filter\fP option, or the \fB\-\-include-from\fP / -\fB\-\-exclude-from\fP options. +the \fB\-\-filter\fP option, or the \fB\-\-include\-from\fP / +\fB\-\-exclude\-from\fP options. .P .SS "PATTERN MATCHING RULES" .P @@ -4315,7 +4333,7 @@ inserted as excludes in place of the "\-C". No arg should follow. An \fBs\fP is used to indicate that the rule applies to the sending side. When a rule affects the sending side, it affects what files are put into the sender's file list. The default is for a rule to affect both sides unless -\fB\-\-delete-excluded\fP was specified, in which case default rules become +\fB\-\-delete\-excluded\fP was specified, in which case default rules become sender-side only. See also the hide (H) and show (S) rules, which are an alternate way to specify sending-side includes/excludes. .IP o @@ -4326,7 +4344,7 @@ which are an alternate way to specify receiver-side includes/excludes. .IP o A \fBp\fP indicates that a rule is perishable, meaning that it is ignored in directories that are being deleted. For instance, the -\fB\-\-cvs-exclude\fP (\fB\-C\fP) option's default rules that exclude things +\fB\-\-cvs\-exclude\fP (\fB\-C\fP) option's default rules that exclude things like "CVS" and "\fB*.o\fP" are marked as perishable, and will not prevent a directory that was removed on the source from being deleted on the destination. @@ -4469,7 +4487,7 @@ the ".rsync-filter" files in each directory that is a part of the transfer. If you want to include the contents of a ".cvsignore" in your patterns, you should use the rule ":C", which creates a dir-merge of the .cvsignore file, but parsed in a CVS-compatible manner. You can use this to affect where the -\fB\-\-cvs-exclude\fP (\fB\-C\fP) option's inclusion of the per-directory +\fB\-\-cvs\-exclude\fP (\fB\-C\fP) option's inclusion of the per-directory \&.cvsignore file gets placed into your rules by putting the ":C" wherever you like in your filter rules. Without this, rsync would add the dir-merge rule for the .cvsignore file at the end of all your other rules (giving it a lower @@ -4564,7 +4582,7 @@ Target file: /dest/you/bar/baz .P The easiest way to see what name you should filter is to just look at the output when using \fB\-\-verbose\fP and put a / in front of the name (use the -\fB\-\-dry-run\fP option if you're not yet ready to copy any files). +\fB\-\-dry\-run\fP option if you're not yet ready to copy any files). .P .SS "PER-DIRECTORY RULES AND DELETE" .P @@ -4583,7 +4601,7 @@ rsync -av --filter=':e .excl' host:src/dir /dest However, if you want to do a delete on the receiving side AND you want some files to be excluded from being deleted, you'll need to be sure that the receiving side knows what files to exclude. The easiest way is to include the -per-directory merge files in the transfer and use \fB\-\-delete-after\fP, +per-directory merge files in the transfer and use \fB\-\-delete\-after\fP, because this ensures that the receiving side gets all the same exclude rules as the sending side before it tries to delete anything: .RS 4 @@ -4646,7 +4664,7 @@ receiver-side exclude (protect) the receiver will remove a matching file named "foo" if deletions are requested. .P Given that the files are still in the sender's file list, the -\fB\-\-prune-empty-dirs\fP option will not judge a directory as being empty +\fB\-\-prune\-empty\-dirs\fP option will not judge a directory as being empty even if it contains only files that the transfer rules omitted. .P Similarly, a transfer rule does not have any extra effect on which files are @@ -4655,7 +4673,7 @@ does not prevent big files from being deleted. .P Examples of transfer rules include the default "quick check" algorithm (which compares size & modify time), the \fB\-\-update\fP option, the -\fB\-\-max-size\fP option, the \fB\-\-ignore-non-existing\fP option, and a +\fB\-\-max\-size\fP option, the \fB\-\-ignore\-non\-existing\fP option, and a few others. .P .SH "BATCH MODE" @@ -4723,9 +4741,9 @@ options when running the read-batch command on the remote host. The second example reads the batch data via standard input so that the batch file doesn't need to be copied to the remote machine first. This example avoids the foo.sh script because it needed to use a modified -\fB\-\-read-batch\fP option, but you could edit the script file if you +\fB\-\-read\-batch\fP option, but you could edit the script file if you wished to make use of it (just be sure that no other option is trying to use -standard input, such as the \fB\-\-exclude-from=\-\fP option). +standard input, such as the \fB\-\-exclude\-from=\-\fP option). .P Caveats: .P @@ -4753,8 +4771,8 @@ newer versions will not work.) When reading a batch file, rsync will force the value of certain options to match the data in the batch file if you didn't set them to the same as the batch-writing command. Other options can (and should) be changed. For -instance \fB\-\-write-batch\fP changes to \fB\-\-read-batch\fP, -\fB\-\-files-from\fP is dropped, and the \fB\-\-filter\fP / +instance \fB\-\-write\-batch\fP changes to \fB\-\-read\-batch\fP, +\fB\-\-files\-from\fP is dropped, and the \fB\-\-filter\fP / \fB\-\-include\fP / \fB\-\-exclude\fP options are not needed unless one of the \fB\-\-delete\fP options is specified. .P @@ -4763,7 +4781,7 @@ options into a single list that is appended as a "here" document to the shell script file. An advanced user can use this to modify the exclude list if a change in what gets deleted by \fB\-\-delete\fP is desired. A normal user can ignore this detail and just use the shell script as an easy way to run the -appropriate \fB\-\-read-batch\fP command for the batched data. +appropriate \fB\-\-read\-batch\fP command for the batched data. .P The original batch mode in rsync was based on "rsync+", but the latest version uses a new implementation. @@ -4781,17 +4799,17 @@ If \fB\-\-links\fP is specified, then symlinks are added to the transfer them with the same target on the destination. Note that \fB\-\-archive\fP implies \fB\-\-links\fP. .P -If \fB\-\-copy-links\fP is specified, then symlinks are "collapsed" by +If \fB\-\-copy\-links\fP is specified, then symlinks are "collapsed" by copying their referent, rather than the symlink. .P Rsync can also distinguish "safe" and "unsafe" symbolic links. An example where this might be used is a web site mirror that wishes to ensure that the rsync module that is copied does not include symbolic links to \fB/etc/passwd\fP in -the public section of the site. Using \fB\-\-copy-unsafe-links\fP will cause +the public section of the site. Using \fB\-\-copy\-unsafe\-links\fP will cause any links to be copied as the file they point to on the destination. Using -\fB\-\-safe-links\fP will cause unsafe links to be omitted by the receiver. +\fB\-\-safe\-links\fP will cause unsafe links to be omitted by the receiver. (Note that you must specify or imply \fB\-\-links\fP for -\fB\-\-safe-links\fP to have any effect.) +\fB\-\-safe\-links\fP to have any effect.) .P Symbolic links are considered unsafe if they are absolute symlinks (start with \fB/\fP), empty, or if they contain enough ".." components to ascend from the top @@ -4801,28 +4819,28 @@ Here's a summary of how the symlink options are interpreted. The list is in order of precedence, so if your combination of options isn't mentioned, use the first line that is a complete subset of your options: .P -.IP "\fB\-\-copy-links\fP" +.IP "\fB\-\-copy\-links\fP" Turn all symlinks into normal files and directories (leaving no symlinks in the transfer for any other options to affect). -.IP "\fB\-\-copy-dirlinks\fP" +.IP "\fB\-\-copy\-dirlinks\fP" Turn just symlinks to directories into real directories, leaving all other symlinks to be handled as described below. -.IP "\fB\-\-links\ \-\-copy-unsafe-links\fP" +.IP "\fB\-\-links\ \-\-copy\-unsafe\-links\fP" Turn all unsafe symlinks into files and create all safe symlinks. -.IP "\fB\-\-copy-unsafe-links\fP" +.IP "\fB\-\-copy\-unsafe\-links\fP" Turn all unsafe symlinks into files, noisily skip all safe symlinks. -.IP "\fB\-\-links\ \-\-safe-links\fP" +.IP "\fB\-\-links\ \-\-safe\-links\fP" The receiver skips creating unsafe symlinks found in the transfer and creates the safe ones. .IP "\fB\-\-links\fP" Create all symlinks. .P -For the effect of \fB\-\-munge-links\fP, see the discussion in that option's +For the effect of \fB\-\-munge\-links\fP, see the discussion in that option's section. .P -Note that the \fB\-\-keep-dirlinks\fP option does not effect symlinks in the +Note that the \fB\-\-keep\-dirlinks\fP option does not effect symlinks in the transfer but instead affects how rsync treats a symlink to a directory that already exists on the receiving side. See that option's section for a warning. .P @@ -4898,7 +4916,7 @@ an option was specified that is supported by the client and not by the server .IP o \fB24\fP \- Partial transfer due to vanished source files .IP o -\fB25\fP \- The \-\-max-delete limit stopped deletions +\fB25\fP \- The \-\-max\-delete limit stopped deletions .IP o \fB30\fP \- Timeout in data send/receive .IP o @@ -4908,28 +4926,28 @@ an option was specified that is supported by the client and not by the server .P .IP "\fBCVSIGNORE\fP" The CVSIGNORE environment variable supplements any ignore patterns in -\&.cvsignore files. See the \fB\-\-cvs-exclude\fP option for more details. +\&.cvsignore files. See the \fB\-\-cvs\-exclude\fP option for more details. .IP "\fBRSYNC_ICONV\fP" Specify a default \fB\-\-iconv\fP setting using this environment variable. First supported in 3.0.0. .IP "\fBRSYNC_OLD_ARGS\fP" -Specify a "1" if you want the \fB\-\-old-args\fP option to be enabled by +Specify a "1" if you want the \fB\-\-old\-args\fP option to be enabled by default, a "2" (or more) if you want it to be enabled in the repeated-option state, or a "0" to make sure that it is disabled by default. When this environment variable is set to a non-zero value, it supersedes the \fBRSYNC_PROTECT_ARGS\fP variable. .IP -This variable is ignored if \fB\-\-old-args\fP, \fB\-\-no-old-args\fP, or -\fB\-\-secluded-args\fP is specified on the command line. +This variable is ignored if \fB\-\-old\-args\fP, \fB\-\-no\-old\-args\fP, or +\fB\-\-secluded\-args\fP is specified on the command line. .IP First supported in 3.2.4. .IP "\fBRSYNC_PROTECT_ARGS\fP" -Specify a non-zero numeric value if you want the \fB\-\-secluded-args\fP +Specify a non-zero numeric value if you want the \fB\-\-secluded\-args\fP option to be enabled by default, or a zero value to make sure that it is disabled by default. .IP -This variable is ignored if \fB\-\-secluded-args\fP, \fB\-\-no-secluded-args\fP, -or \fB\-\-old-args\fP is specified on the command line. +This variable is ignored if \fB\-\-secluded\-args\fP, \fB\-\-no\-secluded\-args\fP, +or \fB\-\-old\-args\fP is specified on the command line. .IP First supported in 3.1.0. Starting in 3.2.4, this variable is ignored if \fBRSYNC_OLD_ARGS\fP is set to a non-zero value. @@ -4953,7 +4971,7 @@ to "nobody". If both are set, \fBUSER\fP takes precedence. .IP "\fBRSYNC_PARTIAL_DIR\fP" This environment variable specifies the directory to use for a \fB\-\-partial\fP transfer without implying that partial transfers be -enabled. See the \fB\-\-partial-dir\fP option for full details. +enabled. See the \fB\-\-partial\-dir\fP option for full details. .IP "\fBRSYNC_COMPRESS_LIST\fP" This environment variable allows you to customize the negotiation of the compression algorithm by specifying an alternate order or a reduced list of @@ -4963,10 +4981,10 @@ names. See the \fB\-\-compress\fP option for full details. This environment variable allows you to customize the negotiation of the checksum algorithm by specifying an alternate order or a reduced list of names. Use the command \fBrsync\ \-\-version\fP to see the available checksum -names. See the \fB\-\-checksum-choice\fP option for full details. +names. See the \fB\-\-checksum\-choice\fP option for full details. .IP "\fBRSYNC_MAX_ALLOC\fP" This environment variable sets an allocation maximum as if you had used the -\fB\-\-max-alloc\fP option. +\fB\-\-max\-alloc\fP option. .IP "\fBRSYNC_PORT\fP" This environment variable is not read by rsync, but is instead set in its sub-environment when rsync is running the remote shell in combination @@ -4999,7 +5017,7 @@ CONNECTING TO AN RSYNC DAEMON for full details. Times are transferred as *nix time_t values. .IP o When transferring to FAT filesystems rsync may re-sync unmodified files. See -the comments on the \fB\-\-modify-window\fP option. +the comments on the \fB\-\-modify\-window\fP option. .IP o File permissions, devices, etc. are transferred as native numerical values. .IP o @@ -5011,7 +5029,7 @@ Please report bugs! See the web site at .P .SH "VERSION" .P -This manpage is current for version 3.4.1 of rsync. +This manpage is current for version 3.4.2 of rsync. .P .SH "INTERNAL OPTIONS" .P diff --git a/rsync.1.html b/rsync.1.html index eac7dcd..c4096e7 100644 --- a/rsync.1.html +++ b/rsync.1.html @@ -505,6 +505,7 @@

OPTION SUMMARY --compress, -z compress file data during the transfer --compress-choice=STR choose the compression algorithm (aka --zc) --compress-level=NUM explicitly set compression level (aka --zl) +--compress-threads=NUM explicitly set compression threads (aka --zt) --skip-compress=LIST skip compressing files with suffix in LIST --cvs-exclude, -C auto-ignore files in the same way CVS does --filter=RULE, -f add a file-filtering RULE @@ -1812,7 +1813,7 @@

OPTIONS

temporary filesystem failures (such as NFS errors) on the sending side from causing a massive deletion of files on the destination. You can override this with the --ignore-errors option.

-

The --delete option may be combined with one of the -⁠-⁠delete-WHEN options +

The --delete option may be combined with one of the -⁠-⁠delete-⁠WHEN options without conflict, as well as --delete-excluded. However, if none of the --delete-WHEN options are specified, rsync will choose the --delete-during algorithm when talking to rsync 3.0.0 or newer, @@ -2631,6 +2632,20 @@

OPTIONS

checksum choice in effect).

+
--compress-threads=NUM, --zt=NUM
+

Set the number of threads to spawn when compressing data. Setting this +option to 1 or more will instruct the compression library to spawn 1 or +more threads for compression. Ideally, increasing the number of threads +will increase transfer speed if the transfer is CPU bound on the sender.

+

This option does not affect decompression.

+

Compression algorithms that allow threading:

+
    +
  • zstd (only when libzstd is compiled with threading support)
  • +
+

This option is ignored if one of the above alogithms is not selected as the +--compression-choice or if compression not enabled.

+
+
--skip-compress=LIST

NOTE: no compression method currently supports per-file compression changes, so this option has no effect.

@@ -4352,7 +4367,7 @@

EXIT VALUES

  • 22 -⁠ Error allocating core memory buffers
  • 23 -⁠ Partial transfer due to error
  • 24 -⁠ Partial transfer due to vanished source files
  • -
  • 25 -⁠ The -⁠-⁠max-delete limit stopped deletions
  • +
  • 25 -⁠ The -⁠-⁠max-⁠delete limit stopped deletions
  • 30 -⁠ Timeout in data send/receive
  • 35 -⁠ Timeout waiting for daemon connection
  • @@ -4479,7 +4494,7 @@

    BUGS

    Please report bugs! See the web site at https://rsync.samba.org/.

    VERSION

    -

    This manpage is current for version 3.4.1 of rsync.

    +

    This manpage is current for version 3.4.2 of rsync.

    INTERNAL OPTIONS

    The options --server and --sender are used internally by rsync, and should never be typed by a user under normal circumstances. Some awareness of these @@ -4509,5 +4524,5 @@

    AUTHOR

    people from around the world have helped to maintain and improve it.

    Mailing lists for support and development are available at https://lists.samba.org/.

    -

    15 Jan 2025

    +

    28 Apr 2026

    diff --git a/rsync.1.md b/rsync.1.md index 7e40e36..2b4b750 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -513,6 +513,7 @@ has its own detailed description later in this manpage. --compress, -z compress file data during the transfer --compress-choice=STR choose the compression algorithm (aka --zc) --compress-level=NUM explicitly set compression level (aka --zl) +--compress-threads=NUM explicitly set compression threads (aka --zt) --skip-compress=LIST skip compressing files with suffix in LIST --cvs-exclude, -C auto-ignore files in the same way CVS does --filter=RULE, -f add a file-filtering RULE @@ -2817,6 +2818,22 @@ expand it. report something like "`Client compress: zstd (level 3)`" (along with the checksum choice in effect). +0. `--compress-threads=NUM`, `--zt=NUM` + + Set the number of threads to spawn when compressing data. Setting this + option to 1 or more will instruct the compression library to spawn 1 or + more threads for compression. Ideally, increasing the number of threads + will increase transfer speed if the transfer is CPU bound on the sender. + + This option does not affect decompression. + + Compression algorithms that allow threading: + + - `zstd` (only when libzstd is compiled with threading support) + + This option is ignored if one of the above alogithms is not selected as the + `--compression-choice` or if compression not enabled. + 0. `--skip-compress=LIST` **NOTE:** no compression method currently supports per-file compression diff --git a/rsyncd.conf.5 b/rsyncd.conf.5 index c2e6dae..ddd6b63 100644 --- a/rsyncd.conf.5 +++ b/rsyncd.conf.5 @@ -1,4 +1,4 @@ -.TH "rsyncd.conf" "5" "15 Jan 2025" "rsyncd.conf from rsync 3.4.1" "User Commands" +.TH "rsyncd.conf" "5" "28 Apr 2026" "rsyncd.conf from rsync 3.4.2" "User Commands" .\" prefix=/usr .P .SH "NAME" @@ -241,7 +241,7 @@ parameter. When rsync is sanitizing paths, it trims ".." path elements from args that it believes would escape the module hierarchy. It also substitutes leading slashes in absolute paths with the module's path (so that options such as -\fB\-\-backup-dir\fP & \fB\-\-compare-dest\fP interpret an absolute path as rooted in +\fB\-\-backup\-dir\fP & \fB\-\-compare\-dest\fP interpret an absolute path as rooted in the module's "path" dir). .IP When a chroot is in effect \fIand\fP the "name converter" parameter is @@ -310,7 +310,7 @@ just use it as documentation to implement your own. Enabling this parameter disables the mapping of users and groups by name for the current daemon module. This prevents the daemon from trying to load any user/group-related files or libraries. This enabling makes the -transfer behave as if the client had passed the \fB\-\-numeric-ids\fP +transfer behave as if the client had passed the \fB\-\-numeric\-ids\fP command-line option. By default, this parameter is enabled for chroot modules and disabled for non-chroot modules. Also keep in mind that uid/gid preservation requires the module to be running as root (see "uid") @@ -322,7 +322,7 @@ that the module has the necessary resources it needs to translate names and that it is not possible for a user to change those resources. .IP "\fBmunge\ symlinks\fP" This parameter tells rsync to modify all symlinks in the same way as the -(non-daemon-affecting) \fB\-\-munge-links\fP command-line option (using a method +(non-daemon-affecting) \fB\-\-munge\-links\fP command-line option (using a method described below). This should help protect your files from user trickery when your daemon module is writable. The default is disabled when "use chroot" is on with an inside-chroot path of "/", OR if "daemon chroot" @@ -389,7 +389,7 @@ If the daemon fails to open the specified file, it will fall back to using syslog and output an error about the failure. (Note that the failure to open the specified log file used to be a fatal error.) .IP -This setting can be overridden by using the \fB\-\-log-file=FILE\fP or +This setting can be overridden by using the \fB\-\-log\-file=FILE\fP or \fB\-\-dparam=logfile=FILE\fP command-line options. The former overrides all the log-file parameters of the daemon and all module settings. The latter sets the daemon's log file and the default for all the modules, which still @@ -464,7 +464,7 @@ When set to False, this parameters ensures that files on the server are not opened with O_NOATIME. .IP When set to Unset (the default) the user controls the setting via -\fB\-\-open-noatime\fP. +\fB\-\-open\-noatime\fP. .IP "\fBlist\fP" This parameter determines whether this module is listed when the client asks for a listing of available modules. In addition, if this is false, @@ -519,7 +519,7 @@ usually runs as group root, and when this is left unset, the group is left unchanged. See also the "gid" parameter. .IP "\fBfake\ super\fP" Setting "fake super = yes" for a module causes the daemon side to behave as -if the \fB\-\-fake-super\fP command-line option had been specified. This allows +if the \fB\-\-fake\-super\fP command-line option had been specified. This allows the full attributes of a file to be stored without having to have the daemon actually running as root. .IP "\fBfilter\fP" @@ -793,7 +793,7 @@ specified between the percent and the escape letter (e.g. "\fB%\-50n\ %8l\ %07p\fP"). In addition, one or more apostrophes may be specified prior to a numerical escape to indicate that the numerical value should be made more human-readable. The 3 supported levels are the same as for the -\fB\-\-human-readable\fP command-line option, though the default is for +\fB\-\-human\-readable\fP command-line option, though the default is for human-readability to be off. Each added apostrophe increases the level (e.g. "\fB%''l\ %'b\ %f\fP"). .IP @@ -820,7 +820,7 @@ protocols/versions, the checksum was salted, and is thus not a useful value (and is not displayed when that is the case). For the checksum to output for a file, either the \fB\-\-checksum\fP option must be in-effect or the file must have been transferred without a salted checksum being used. -See the \fB\-\-checksum-choice\fP option for a way to choose the algorithm. +See the \fB\-\-checksum\-choice\fP option for a way to choose the algorithm. .IP o %f the filename (long form on sender; no trailing "/") .IP o @@ -856,7 +856,7 @@ the trailing period) .RE .IP For a list of what the characters mean that are output by "%i", see the -\fB\-\-itemize-changes\fP option in the rsync manpage. +\fB\-\-itemize\-changes\fP option in the rsync manpage. .IP Note that some of the logged output changes when talking with older rsync versions. For instance, deleted files were only output as verbose messages @@ -909,7 +909,7 @@ refuse options = * !a !v !compress* .RE .IP Don't worry that the "\fB*\fP" will refuse certain vital options such as -\fB\-\-dry-run\fP, \fB\-\-server\fP, \fB\-\-no-iconv\fP, \fB\-\-seclude-args\fP, etc. These +\fB\-\-dry\-run\fP, \fB\-\-server\fP, \fB\-\-no\-iconv\fP, \fB\-\-seclude\-args\fP, etc. These important options are not matched by wild-card, so they must be overridden by their exact name. For instance, if you're forcing iconv transfers you could use something like this: @@ -930,8 +930,8 @@ rsync client ever sends the actual archive option to the server. As an additional safety feature, the refusal of "delete" also refuses \fBremove-source-files\fP when the daemon is the sender; if you want the latter without the former, instead refuse "\fBdelete-*\fP" as that refuses all the -delete modes without affecting \fB\-\-remove-source-files\fP. (Keep in mind that -the client's \fB\-\-delete\fP option typically results in \fB\-\-delete-during\fP.) +delete modes without affecting \fB\-\-remove\-source\-files\fP. (Keep in mind that +the client's \fB\-\-delete\fP option typically results in \fB\-\-delete\-during\fP.) .IP When un-refusing delete options, you should either specify "\fB!delete*\fP" (to accept all delete options) or specify a limited set that includes "delete", @@ -943,7 +943,7 @@ refuse options = * !a !delete !delete-during .fi .RE .IP -\&... whereas this accepts any delete option except \fB\-\-delete-after\fP: +\&... whereas this accepts any delete option except \fB\-\-delete\-after\fP: .RS 4 .IP .nf @@ -958,7 +958,7 @@ instead of returning an error that forces the client to remove the \fB\-z\fP option. .IP If you are un-refusing the compress option, you may want to match -"\fB!compress*\fP" if you also want to allow the \fB\-\-compress-level\fP option. +"\fB!compress*\fP" if you also want to allow the \fB\-\-compress\-level\fP option. .IP Note that the "copy-devices" & "write-devices" options are refused by default, but they can be explicitly accepted with "\fB!copy-devices\fP" and/or @@ -973,27 +973,27 @@ Here are all the options that are not matched by wild-cards: .IP o \fB\-\-rsh\fP, \fB\-e\fP: Required to convey compatibility flags to the server. .IP o -\fB\-\-out-format\fP: This is required to convey output behavior to a remote -receiver. While rsync passes the older alias \fB\-\-log-format\fP for +\fB\-\-out\-format\fP: This is required to convey output behavior to a remote +receiver. While rsync passes the older alias \fB\-\-log\-format\fP for compatibility reasons, this options should not be confused with -\fB\-\-log-file-format\fP. +\fB\-\-log\-file\-format\fP. .IP o \fB\-\-sender\fP: Use "write only" parameter instead of refusing this. .IP o -\fB\-\-dry-run\fP, \fB\-n\fP: Who would want to disable this? +\fB\-\-dry\-run\fP, \fB\-n\fP: Who would want to disable this? .IP o -\fB\-\-seclude-args\fP, \fB\-s\fP: Is the oldest arg-protection method. +\fB\-\-seclude\-args\fP, \fB\-s\fP: Is the oldest arg-protection method. .IP o -\fB\-\-from0\fP, \fB\-0\fP: Makes it easier to accept/refuse \fB\-\-files-from\fP without +\fB\-\-from0\fP, \fB\-0\fP: Makes it easier to accept/refuse \fB\-\-files\-from\fP without affecting this helpful modifier. .IP o \fB\-\-iconv\fP: This is auto-disabled based on "charset" parameter. .IP o -\fB\-\-no-iconv\fP: Most transfers use this option. +\fB\-\-no\-iconv\fP: Most transfers use this option. .IP o -\fB\-\-checksum-seed\fP: Is a fairly rare, safe option. +\fB\-\-checksum\-seed\fP: Is a fairly rare, safe option. .IP o -\fB\-\-write-devices\fP: Is non-wild but also auto-disabled. +\fB\-\-write\-devices\fP: Is non-wild but also auto-disabled. .RE .IP "\fBdont\ compress\fP" \fBNOTE:\fP This parameter currently has no effect except in one instance: if @@ -1015,7 +1015,7 @@ for those files. If an algorithms has the ability to change the level in mid-stream, it will be minimized to reduce the CPU usage as much as possible. .IP -See the \fB\-\-skip-compress\fP parameter in the \fBrsync\fP(1) manpage for the +See the \fB\-\-skip\-compress\fP parameter in the \fBrsync\fP(1) manpage for the list of file suffixes that are skipped by default if this parameter is not set. .IP "\fBearly\ exec\fP, \fBpre-xfer\ exec\fP, \fBpost-xfer\ exec\fP" @@ -1027,14 +1027,14 @@ before it begins. Any output from the \fBpre-xfer\ exec\fP command on stdout \fInot\fP displayed if the script returns success. The other programs cannot send any text to the user. All output except for the \fBpre-xfer\ exec\fP stdout goes to the corresponding daemon's stdout/stderr, which is typically -discarded. See the \fB\-\-no-detach\fP option for a way to see the daemon's +discarded. See the \fB\-\-no\-detach\fP option for a way to see the daemon's output, which can assist with debugging. .IP Note that the \fBearly\ exec\fP command runs before any part of the transfer request is known except for the module name. This helper script can be used to setup a disk mount or decrypt some data into a module dir, but you may need to use \fBlock\ file\fP and \fBmax\ connections\fP to avoid concurrency -issues. If the client rsync specified the \fB\-\-early-input=FILE\fP option, it +issues. If the client rsync specified the \fB\-\-early\-input=FILE\fP option, it can send up to about 5K of data to the stdin of the early script. The stdin will otherwise be empty. .IP @@ -1088,6 +1088,13 @@ These settings honor 2 environment variables: use RSYNC_SHELL to set a shell to use when running the command (which otherwise uses your \fBsystem()\fP call's default shell), and use RSYNC_NO_XFER_EXEC to disable both options completely. +.IP "\fBtemp\ dir\fP" +Specifies a directory that rsync should use for temporary files created +during the transfer of updated files. If that directory is on a different +partition, after transfer file is being copied instead of unlinked. +.IP +This parameter equals with \fB\-\-temp\-dir\fP option, so please consult rsync +manpage for further information. .P .SH "CONFIG DIRECTIVES" .P @@ -1298,7 +1305,7 @@ Please report bugs! The rsync bug tracking system is online at .P .SH "VERSION" .P -This manpage is current for version 3.4.1 of rsync. +This manpage is current for version 3.4.2 of rsync. .P .SH "CREDITS" .P diff --git a/rsyncd.conf.5.html b/rsyncd.conf.5.html index 7f90a88..e70650e 100644 --- a/rsyncd.conf.5.html +++ b/rsyncd.conf.5.html @@ -1030,6 +1030,14 @@

    MODULE PARAMETERStemp dir
    +

    Specifies a directory that rsync should use for temporary files created +during the transfer of updated files. If that directory is on a different +partition, after transfer file is being copied instead of unlinked.

    +

    This parameter equals with --temp-dir option, so please consult rsync +manpage for further information.

    +

    CONFIG DIRECTIVES

    There are currently two config directives available that allow a config file to @@ -1191,7 +1199,7 @@

    BUGS

    Please report bugs! The rsync bug tracking system is online at https://rsync.samba.org/.

    VERSION

    -

    This manpage is current for version 3.4.1 of rsync.

    +

    This manpage is current for version 3.4.2 of rsync.

    CREDITS

    Rsync is distributed under the GNU General Public License. See the file COPYING for details.

    @@ -1205,5 +1213,5 @@

    AUTHOR

    people from around the world have helped to maintain and improve it.

    Mailing lists for support and development are available at https://lists.samba.org/.

    -

    15 Jan 2025

    +

    28 Apr 2026

    diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md index 2f25765..816687e 100644 --- a/rsyncd.conf.5.md +++ b/rsyncd.conf.5.md @@ -1073,6 +1073,16 @@ in the values of parameters. See that section for details. **system()** call's default shell), and use RSYNC_NO_XFER_EXEC to disable both options completely. +0. `temp dir` + + Specifies a directory that rsync should use for temporary files created + during the transfer of updated files. If that directory is on a different + partition, after transfer file is being copied instead of unlinked. + + This parameter equals with `--temp-dir` option, so please consult rsync + manpage for further information. + + ## CONFIG DIRECTIVES There are currently two config directives available that allow a config file to diff --git a/runtests.py b/runtests.py new file mode 100755 index 0000000..54ca0a0 --- /dev/null +++ b/runtests.py @@ -0,0 +1,468 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2001, 2002 by Martin Pool +# Copyright (C) 2003-2022 Wayne Davison +# Copyright (C) 2026 Andrew Tridgell +# +# Rewrite of runtests.sh in Python (runtests.sh is now deprecated). +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version +# 2 as published by the Free Software Foundation. + +"""rsync test runner. + +Invokes test scripts from testsuite/ and reports results. +Can be called by 'make check' or directly. + +Usage: + ./runtests.py [options] [TEST ...] + +Each TEST is a test name (e.g. 'delete') or glob pattern (e.g. 'xattr*'). +If no tests are specified, all tests are run. +""" + +import argparse +import concurrent.futures +import glob +import os +import subprocess +import sys +import threading + + +def parse_args(): + p = argparse.ArgumentParser(description='Run rsync test suite') + p.add_argument('tests', nargs='*', metavar='TEST', + help='Test names or patterns to run (default: all)') + p.add_argument('-j', '--parallel', type=int, default=1, metavar='N', + help='Run up to N tests in parallel (default: 1)') + p.add_argument('--valgrind', action='store_true', + help='Run rsync under valgrind (logs to per-process files)') + p.add_argument('--valgrind-opts', default='', metavar='OPTS', + help='Extra valgrind options (e.g. "--leak-check=full")') + p.add_argument('--preserve-scratch', action='store_true', + help='Keep scratch directories after tests complete') + p.add_argument('--log-level', type=int, default=1, metavar='N', + help='Verbosity level 1-10 (default: 1)') + p.add_argument('--always-log', action='store_true', + help='Show test logs even for passing tests') + p.add_argument('--stop-on-fail', action='store_true', + help='Stop after first test failure') + p.add_argument('--timeout', type=int, default=300, metavar='SECS', + help='Per-test timeout in seconds (default: 300)') + p.add_argument('--rsync-bin', default=None, metavar='PATH', + help='Path to rsync binary (default: ./rsync)') + p.add_argument('--tooldir', default=None, metavar='DIR', + help='Tool/build directory (default: cwd)') + p.add_argument('--srcdir', default=None, metavar='DIR', + help='Source directory (default: script directory)') + p.add_argument('--protocol', type=int, default=None, metavar='VER', + help='Force protocol version (adds --protocol=VER to rsync)') + p.add_argument('--expect-skipped', default=None, metavar='LIST', + help='Comma-separated list of expected-skipped tests') + return p.parse_args() + + +def find_setfacl_nodef(scratchbase): + """Determine the setfacl command to remove default ACLs.""" + for cmd in [ + ['setacl', '-k', 'u::7,g::5,o:5', scratchbase], + ['setfacl', '-k', scratchbase], + ['setfacl', '-s', 'u::7,g::5,o:5', scratchbase], + ]: + try: + subprocess.run(cmd, capture_output=True, timeout=5) + return cmd[:2] if cmd[0] == 'setacl' else cmd[:2] + except (FileNotFoundError, subprocess.TimeoutExpired): + continue + try: + r = subprocess.run(['setfacl', '--help'], capture_output=True, text=True, timeout=5) + if '-k,' in r.stdout or '-k,' in r.stderr: + return ['setfacl', '-k'] + except (FileNotFoundError, subprocess.TimeoutExpired): + pass + return None + + +def get_tls_args(config_h): + """Determine TLS_ARGS from config.h.""" + args = '' + try: + with open(config_h) as f: + text = f.read() + if '#define HAVE_LUTIMES 1' in text: + args += ' -l' + if '#undef CHOWN_MODIFIES_SYMLINK' in text: + args += ' -L' + except FileNotFoundError: + pass + return args.strip() + + +def read_shconfig(path): + """Read shell config variables from shconfig.""" + env = {} + try: + with open(path) as f: + for line in f: + line = line.strip() + if line.startswith('#') or line.startswith('export') or not line: + continue + if '=' in line: + k, _, v = line.partition('=') + env[k.strip()] = v.strip().strip('"') + except FileNotFoundError: + pass + return env + + +def get_testuser(): + """Determine the current test user.""" + for cmd in ['/usr/bin/whoami', '/usr/ucb/whoami', '/bin/whoami']: + if os.path.isfile(cmd): + try: + return subprocess.check_output([cmd], text=True).strip() + except subprocess.CalledProcessError: + pass + try: + return subprocess.check_output(['id', '-un'], text=True).strip() + except (FileNotFoundError, subprocess.CalledProcessError): + return os.environ.get('LOGNAME', os.environ.get('USER', 'UNKNOWN')) + + +def prep_scratch(scratchdir, srcdir, tooldir, setfacl_nodef): + """Prepare a scratch directory for a test.""" + if os.path.isdir(scratchdir): + subprocess.run(['chmod', '-R', 'u+rwX', scratchdir], capture_output=True) + subprocess.run(['rm', '-rf', scratchdir], capture_output=True) + os.makedirs(scratchdir, exist_ok=True) + if setfacl_nodef: + subprocess.run(setfacl_nodef + [scratchdir], capture_output=True) + try: + os.chmod(scratchdir, os.stat(scratchdir).st_mode & ~0o2000) # clear setgid + except OSError: + pass + src_link = os.path.join(scratchdir, 'src') + if not os.path.exists(src_link): + if os.path.isabs(srcdir): + os.symlink(srcdir, src_link) + else: + os.symlink(os.path.join(tooldir, srcdir), src_link) + + +def collect_tests(suitedir, patterns): + """Collect test scripts matching the given patterns.""" + if not patterns: + tests = sorted(glob.glob(os.path.join(suitedir, '*.test'))) + else: + tests = [] + for pat in patterns: + if not pat.endswith('.test'): + pat = pat + '.test' + matches = sorted(glob.glob(os.path.join(suitedir, pat))) + tests.extend(matches) + return tests + + +def build_rsync_cmd(rsync_bin, args, scratchbase): + """Build the RSYNC command string for tests.""" + parts = [] + if args.valgrind: + vlog = os.path.join(scratchbase, 'valgrind.%p.log') + vopts = f'--log-file={vlog}' + if args.valgrind_opts: + vopts += ' ' + args.valgrind_opts + parts.append(f'valgrind {vopts}') + parts.append(rsync_bin) + if args.protocol is not None: + parts.append(f'--protocol={args.protocol}') + return ' '.join(parts) + + +class TestResult: + """Result of a single test execution.""" + __slots__ = ('testbase', 'result', 'output', 'skipped_reason') + + def __init__(self, testbase, result, output='', skipped_reason=''): + self.testbase = testbase + self.result = result + self.output = output + self.skipped_reason = skipped_reason + + +def run_one_test(testscript, testbase, scratchdir, base_env, timeout, + srcdir, tooldir, setfacl_nodef, always_log): + """Run a single test. Returns a TestResult. + + This function is safe to call from multiple threads — it uses only + per-test state (unique scratchdir, copy of env). + """ + prep_scratch(scratchdir, srcdir, tooldir, setfacl_nodef) + + env = base_env.copy() + env['scratchdir'] = scratchdir + + logfile = os.path.join(scratchdir, 'test.log') + try: + with open(logfile, 'w') as log: + proc = subprocess.run( + ['sh', '-e', testscript], + stdout=log, stderr=subprocess.STDOUT, + env=env, timeout=timeout, + cwd=env.get('TOOLDIR', '.') + ) + result = proc.returncode + except subprocess.TimeoutExpired: + result = 1 + with open(logfile, 'a') as log: + log.write(f"\nTIMEOUT: test took over {timeout} seconds\n") + + # Build output text + output_parts = [] + + show_log = always_log or (result not in (0, 77, 78)) + if show_log: + output_parts.append(f'----- {testbase} log follows') + try: + with open(logfile) as f: + output_parts.append(f.read().rstrip()) + except FileNotFoundError: + pass + output_parts.append(f'----- {testbase} log ends') + rsyncd_log = os.path.join(scratchdir, 'rsyncd.log') + if os.path.isfile(rsyncd_log): + output_parts.append(f'----- {testbase} rsyncd.log follows') + with open(rsyncd_log) as f: + output_parts.append(f.read().rstrip()) + output_parts.append(f'----- {testbase} rsyncd.log ends') + + skipped_reason = '' + if result == 0: + output_parts.append(f'PASS {testbase}') + elif result == 77: + whyfile = os.path.join(scratchdir, 'whyskipped') + try: + with open(whyfile) as f: + skipped_reason = f.read().strip() + except FileNotFoundError: + pass + output_parts.append(f'SKIP {testbase} ({skipped_reason})') + elif result == 78: + output_parts.append(f'XFAIL {testbase}') + else: + output_parts.append(f'FAIL {testbase}') + + return TestResult(testbase, result, '\n'.join(output_parts), skipped_reason) + + +# Lock for serializing output in parallel mode +_print_lock = threading.Lock() + + +def main(): + args = parse_args() + + # Also accept legacy environment variables + if args.preserve_scratch or os.environ.get('preserve_scratch') == 'yes': + args.preserve_scratch = True + if args.log_level == 1: + args.log_level = int(os.environ.get('loglevel', '1')) + if args.expect_skipped is None: + args.expect_skipped = os.environ.get('RSYNC_EXPECT_SKIPPED', 'IGNORE') + if os.environ.get('whichtests'): + args.tests = [os.environ['whichtests']] + + # Determine directories + tooldir = args.tooldir or os.environ.get('TOOLDIR') or os.getcwd() + script_path = os.path.dirname(os.path.abspath(__file__)) + srcdir = args.srcdir or script_path + if not srcdir or srcdir == '.': + srcdir = tooldir + rsync_bin = args.rsync_bin or os.environ.get('rsync_bin') or os.path.join(tooldir, 'rsync') + + suitedir = os.path.join(srcdir, 'testsuite') + scratchbase = os.path.join(os.environ.get('scratchbase', tooldir), 'testtmp') + os.makedirs(scratchbase, exist_ok=True) + + shconfig = read_shconfig(os.path.join(tooldir, 'shconfig')) + tls_args = get_tls_args(os.path.join(tooldir, 'config.h')) + setfacl_nodef = find_setfacl_nodef(scratchbase) + rsync_cmd = build_rsync_cmd(rsync_bin, args, scratchbase) + + if not os.path.isfile(rsync_bin): + sys.stderr.write(f"rsync_bin {rsync_bin} is not a file\n") + sys.exit(2) + if not os.path.isdir(srcdir): + sys.stderr.write(f"srcdir {srcdir} is not a directory\n") + sys.exit(2) + + testuser = get_testuser() + + # Print header + print('=' * 60) + print(f'{sys.argv[0]} running in {tooldir}') + print(f' rsync_bin={rsync_cmd}') + print(f' srcdir={srcdir}') + print(f' TLS_ARGS={tls_args}') + print(f' testuser={testuser}') + print(f' os={subprocess.check_output(["uname", "-a"], text=True).strip()}') + print(f' preserve_scratch={"yes" if args.preserve_scratch else "no"}') + if args.valgrind: + print(f' valgrind=enabled (logs in valgrind.*.log)') + if args.parallel > 1: + print(f' parallel={args.parallel}') + print(f' scratchbase={scratchbase}') + + # Build base environment for test scripts + path = os.environ.get('PATH', '') + if os.path.isdir('/usr/xpg4/bin'): + path = '/usr/xpg4/bin:' + path + + base_env = os.environ.copy() + base_env.update({ + 'PATH': path, + 'POSIXLY_CORRECT': '1', + 'TOOLDIR': tooldir, + 'srcdir': srcdir, + 'RSYNC': rsync_cmd, + 'TLS_ARGS': tls_args, + 'RUNSHFLAGS': '-e', + 'scratchbase': scratchbase, + 'suitedir': suitedir, + 'TESTRUN_TIMEOUT': str(args.timeout), + 'HOME': scratchbase, + }) + for k, v in shconfig.items(): + if v: + base_env[k] = v + if setfacl_nodef: + base_env['setfacl_nodef'] = ' '.join(setfacl_nodef) + else: + base_env['setfacl_nodef'] = 'true' + if args.log_level > 8: + base_env['RUNSHFLAGS'] = '-e -x' + + # Collect tests + tests = collect_tests(suitedir, args.tests) + full_run = len(args.tests) == 0 + + # Record test order for consistent skipped-list output + test_order = {os.path.basename(t).replace('.test', ''): i for i, t in enumerate(tests)} + + passed = 0 + failed = 0 + skipped = 0 + skipped_list = [] + + def process_result(tr): + """Process a TestResult and update counters. Returns True if test failed.""" + nonlocal passed, failed, skipped + with _print_lock: + if tr.output: + print(tr.output) + scratchdir = os.path.join(scratchbase, tr.testbase) + if tr.result == 0: + passed += 1 + if not args.preserve_scratch and os.path.isdir(scratchdir): + subprocess.run(['rm', '-rf', scratchdir], capture_output=True) + return False + elif tr.result == 77: + skipped_list.append(tr.testbase) + skipped += 1 + if not args.preserve_scratch and os.path.isdir(scratchdir): + subprocess.run(['rm', '-rf', scratchdir], capture_output=True) + return False + elif tr.result == 78: + failed += 1 + return True + else: + failed += 1 + return True + + if args.parallel > 1: + # Parallel execution + with concurrent.futures.ThreadPoolExecutor(max_workers=args.parallel) as executor: + futures = {} + for testscript in tests: + testbase = os.path.basename(testscript).replace('.test', '') + scratchdir = os.path.join(scratchbase, testbase) + timeout = 600 if 'hardlinks' in testbase else args.timeout + f = executor.submit( + run_one_test, testscript, testbase, scratchdir, + base_env, timeout, srcdir, tooldir, setfacl_nodef, + args.always_log + ) + futures[f] = testbase + + for f in concurrent.futures.as_completed(futures): + tr = f.result() + is_fail = process_result(tr) + if is_fail and args.stop_on_fail: + # Cancel pending futures + for pending in futures: + pending.cancel() + break + else: + # Sequential execution + for testscript in tests: + testbase = os.path.basename(testscript).replace('.test', '') + scratchdir = os.path.join(scratchbase, testbase) + timeout = 600 if 'hardlinks' in testbase else args.timeout + tr = run_one_test( + testscript, testbase, scratchdir, + base_env, timeout, srcdir, tooldir, setfacl_nodef, + args.always_log + ) + is_fail = process_result(tr) + if is_fail and args.stop_on_fail: + break + + # Check valgrind logs for errors + vg_errors = 0 + if args.valgrind: + for vlog in sorted(glob.glob(os.path.join(scratchbase, 'valgrind.*.log'))): + try: + with open(vlog) as f: + content = f.read() + for line in content.splitlines(): + if 'ERROR SUMMARY:' in line and 'ERROR SUMMARY: 0 errors' not in line: + vg_errors += 1 + print(f'----- valgrind errors in {os.path.basename(vlog)}:') + print(content) + break + except FileNotFoundError: + pass + + # Summary + print('-' * 60) + print('----- overall results:') + print(f' {passed} passed') + if failed > 0: + print(f' {failed} failed') + if skipped > 0: + print(f' {skipped} skipped') + if vg_errors > 0: + print(f' {vg_errors} valgrind error(s) found (see logs in {scratchbase})') + + skipped_str = ','.join(sorted(skipped_list, key=lambda x: test_order.get(x, 0))) + if full_run and args.expect_skipped != 'IGNORE': + print('----- skipped results:') + print(f' expected: {args.expect_skipped}') + print(f' got: {skipped_str}') + else: + skipped_str = '' + args.expect_skipped = '' + + print('-' * 60) + + exit_code = failed + vg_errors + if exit_code == 0 and skipped_str != args.expect_skipped: + exit_code = 1 + + print(f'overall result is {exit_code}') + sys.exit(exit_code) + + +if __name__ == '__main__': + main() diff --git a/runtests.sh b/runtests.sh deleted file mode 100755 index 0c463be..0000000 --- a/runtests.sh +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2001, 2002 by Martin Pool -# Copyright (C) 2003-2022 Wayne Davison - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version -# 2 as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# ------------------------------------------------------------------------- - -# rsync top-level test script -- this invokes all the other more -# detailed tests in order. This script can either be called by `make -# check' or `make installcheck'. `check' runs against the copies of -# the program and other files in the build directory, and -# `installcheck' against the installed copy of the program. - -# It can also be called on a single test file using a run like this: -# -# preserve_scratch=yes whichtests=itemize.test ./runtests.sh - -# In either case we need to also be able to find the source directory, -# since we read test scripts and possibly other information from -# there. - -# Whenever possible, informational messages are written to stdout and -# error messages to stderr. They're separated out by the build farm -# display scripts. - -# According to the GNU autoconf manual, the only valid place to set up -# directory locations is through Make, since users are allowed to (try -# to) change their mind on the Make command line. So, Make has to -# pass in all the values we need. - -# For other configured settings we read ./config.sh, which tells us -# about shell commands on this machine and similar things. - -# rsync_bin gives the location of the rsync binary. This is either -# builddir/rsync if we're testing an uninstalled copy, or -# install_prefix/bin/rsync if we're testing an installed copy. On the -# build farm rsync will be installed, but into a scratch /usr. - -# srcdir gives the location of the source tree, which lets us find the -# build scripts. At the moment we assume we are invoked from the -# source directory. - -# This script must be invoked from the build directory. - -# A scratch directory, 'testtmp', is used in the build directory to -# hold per-test subdirectories. - -# This script also uses the $loglevel environment variable. 1 is the -# default value, and 10 the most verbose. You can set this from the -# Make command line. It's also set by the build farm to give more -# detail for failing builds. - -# ------------------------------------------------------------------------- - -# NOTES FOR TEST CASES: - -# Each test case runs in its own shell. - -# Exit codes from tests: - -# 1 tests failed -# 2 error in starting tests -# 77 this test skipped (random value unlikely to happen by chance, same as -# automake) - -# HOWEVER, the overall exit code to the farm is different: we return -# the *number of tests that failed*, so that it will show up nicely in -# the overall summary. - -# rsync.fns contains some general setup functions and definitions. - -# ------------------------------------------------------------------------- - -# NOTES ON PORTABILITY: - -# Both this script and the Makefile have to be pretty conservative -# about which Unix features they use. - -# We cannot count on Make exporting variables to commands, unless -# they're explicitly given on the command line. - -# Also, we can't count on 'cp -a' or 'mkdir -p', although they're -# pretty handy (see function makepath for the latter). - -# I think some of the GNU documentation suggests that we shouldn't -# rely on shell functions. However, the Bash manual seems to say that -# they're in POSIX 1003.2, and since the build farm relies on them -# they're probably working on most machines we really care about. - -# You cannot use "function foo {" syntax, but must instead say "foo() -# {", or it breaks on FreeBSD. - -# BSD machines tend not to have "head" or "seq". - -# You cannot do "export VAR=VALUE" all on one line; the export must be -# separate from the assignment. (SCO SysV) - -# Don't rely on grep -q, as that doesn't work everywhere -- just redirect -# stdout to /dev/null to keep it quiet. - -# ------------------------------------------------------------------------- - -# STILL TO DO: - -# We need a good protection against tests that hang indefinitely. -# Perhaps some combination of starting them in the background, wait, -# and kill? - -# Perhaps we need a common way to cleanup tests. At the moment just -# clobbering the directory when we're done should be enough. - -# If any of the targets fail, then (GNU?) Make returns 2, instead of -# the return code from the failing command. This is fine, but it -# means that the build farm just shows "2" for failed tests, not the -# number of tests that actually failed. For more details we might -# need to grovel through the log files to find a line saying how many -# failed. - - -set -e - -. "./shconfig" - -RUNSHFLAGS='-e' -export RUNSHFLAGS - -# for Solaris -if [ -d /usr/xpg4/bin ]; then - PATH="/usr/xpg4/bin/:$PATH" - export PATH -fi - -if [ "x$loglevel" != x ] && [ "$loglevel" -gt 8 ]; then - if set -x; then - # If it doesn't work the first time, don't keep trying. - RUNSHFLAGS="$RUNSHFLAGS -x" - fi -fi - -POSIXLY_CORRECT=1 -if test x"$TOOLDIR" = x; then - TOOLDIR=`pwd` -fi -srcdir=`dirname $0` -if test x"$srcdir" = x || test x"$srcdir" = x.; then - srcdir="$TOOLDIR" -fi -if test x"$rsync_bin" = x; then - rsync_bin="$TOOLDIR/rsync" -fi - -# This allows the user to specify extra rsync options -- use carefully! -RSYNC="$rsync_bin $*" -#RSYNC="valgrind $rsync_bin $*" - -TLS_ARGS='' -if grep -E '^#define HAVE_LUTIMES 1' config.h >/dev/null; then - TLS_ARGS="$TLS_ARGS -l" -fi -if grep -E '#undef CHOWN_MODIFIES_SYMLINK' config.h >/dev/null; then - TLS_ARGS="$TLS_ARGS -L" -fi - -export POSIXLY_CORRECT TOOLDIR srcdir RSYNC TLS_ARGS - -echo "============================================================" -echo "$0 running in $TOOLDIR" -echo " rsync_bin=$RSYNC" -echo " srcdir=$srcdir" -echo " TLS_ARGS=$TLS_ARGS" - -if [ -f /usr/bin/whoami ]; then - testuser=`/usr/bin/whoami` -elif [ -f /usr/ucb/whoami ]; then - testuser=`/usr/ucb/whoami` -elif [ -f /bin/whoami ]; then - testuser=`/bin/whoami` -else - testuser=`id -un 2>/dev/null || echo ${LOGNAME:-${USERNAME:-${USER:-'UNKNOWN'}}}` -fi - -echo " testuser=$testuser" -echo " os=`uname -a`" - -# It must be "yes", not just nonnull -if [ "x$preserve_scratch" = xyes ]; then - echo " preserve_scratch=yes" -else - echo " preserve_scratch=no" -fi - -# Check if setacl/setfacl is around and if it supports the -k or -s option. -if setacl -k u::7,g::5,o:5 testsuite 2>/dev/null; then - setfacl_nodef='setacl -k' -elif setfacl --help 2>&1 | grep ' -k,\|\[-[a-z]*k' >/dev/null; then - setfacl_nodef='setfacl -k' -elif setfacl -s u::7,g::5,o:5 testsuite 2>/dev/null; then - setfacl_nodef='setfacl -s u::7,g::5,o:5' -else - # The "true" command runs successfully, but does nothing. - setfacl_nodef=true -fi - -export setfacl_nodef - -if [ ! -f "$rsync_bin" ]; then - echo "rsync_bin $rsync_bin is not a file" >&2 - exit 2 -fi - -if [ ! -d "$srcdir" ]; then - echo "srcdir $srcdir is not a directory" >&2 - exit 2 -fi - -expect_skipped="${RSYNC_EXPECT_SKIPPED-IGNORE}" -skipped_list='' -skipped=0 -missing=0 -passed=0 -failed=0 - -# Directory that holds the other test subdirs. We create separate dirs -# inside for each test case, so that they can be left behind in case of -# failure to aid investigation. We don't remove the testtmp subdir at -# the end so that it can be configured as a symlink to a filesystem that -# has ACLs and xattr support enabled (if desired). -scratchbase="${scratchbase:-$TOOLDIR}"/testtmp -echo " scratchbase=$scratchbase" -[ -d "$scratchbase" ] || mkdir "$scratchbase" - -suitedir="$srcdir/testsuite" -TESTRUN_TIMEOUT=300 - -export scratchdir suitedir TESTRUN_TIMEOUT - -prep_scratch() { - [ -d "$scratchdir" ] && chmod -R u+rwX "$scratchdir" && rm -rf "$scratchdir" - mkdir "$scratchdir" - # Get rid of default ACLs and dir-setgid to avoid confusing some tests. - $setfacl_nodef "$scratchdir" 2>/dev/null || true - chmod g-s "$scratchdir" - case "$srcdir" in - /*) ln -s "$srcdir" "$scratchdir/src" ;; - *) ln -s "$TOOLDIR/$srcdir" "$scratchdir/src" ;; - esac - return 0 -} - -maybe_discard_scratch() { - [ x"$preserve_scratch" != xyes ] && [ -d "$scratchdir" ] && rm -rf "$scratchdir" - return 0 -} - -if [ "x$whichtests" = x ]; then - whichtests="*.test" - full_run=yes -else - full_run=no -fi - -for testscript in $suitedir/$whichtests; do - testbase=`echo $testscript | sed -e 's!.*/!!' -e 's/.test\$//'` - scratchdir="$scratchbase/$testbase" - - prep_scratch - - case "$testscript" in - *hardlinks*) TESTRUN_TIMEOUT=600 ;; - *) TESTRUN_TIMEOUT=300 ;; - esac - - set +e - "$TOOLDIR/"testrun $RUNSHFLAGS "$testscript" >"$scratchdir/test.log" 2>&1 - result=$? - set -e - - if [ "x$always_log" = xyes ] || ( [ $result != 0 ] && [ $result != 77 ] && [ $result != 78 ] ) - then - echo "----- $testbase log follows" - cat "$scratchdir/test.log" - echo "----- $testbase log ends" - if [ -f "$scratchdir/rsyncd.log" ]; then - echo "----- $testbase rsyncd.log follows" - cat "$scratchdir/rsyncd.log" - echo "----- $testbase rsyncd.log ends" - fi - fi - - case $result in - 0) - echo "PASS $testbase" - passed=`expr $passed + 1` - maybe_discard_scratch - ;; - 77) - # backticks will fill the whole file onto one line, which is a feature - whyskipped=`cat "$scratchdir/whyskipped"` - echo "SKIP $testbase ($whyskipped)" - skipped_list="$skipped_list,$testbase" - skipped=`expr $skipped + 1` - maybe_discard_scratch - ;; - 78) - # It failed, but we expected that. don't dump out error logs, - # because most users won't want to see them. But do leave - # the working directory around. - echo "XFAIL $testbase" - failed=`expr $failed + 1` - ;; - *) - echo "FAIL $testbase" - failed=`expr $failed + 1` - if [ "x$nopersist" = xyes ]; then - exit 1 - fi - esac -done - -echo '------------------------------------------------------------' -echo "----- overall results:" -echo " $passed passed" -[ "$failed" -gt 0 ] && echo " $failed failed" -[ "$skipped" -gt 0 ] && echo " $skipped skipped" -[ "$missing" -gt 0 ] && echo " $missing missing" -if [ "$full_run" = yes ] && [ "$expect_skipped" != IGNORE ]; then - skipped_list=`echo "$skipped_list" | sed 's/^,//'` - echo "----- skipped results:" - echo " expected: $expect_skipped" - echo " got: $skipped_list" -else - skipped_list='' - expect_skipped='' -fi -echo '------------------------------------------------------------' - -# OK, so expr exits with 0 if the result is neither null nor zero; and -# 1 if the expression is null or zero. This is the opposite of what -# we want, and if we just call expr then this script will always fail, -# because -e is set. - -result=`expr $failed + $missing || true` -if [ "$result" = 0 ] && [ "$skipped_list" != "$expect_skipped" ]; then - result=1 -fi -echo "overall result is $result" -exit $result diff --git a/sender.c b/sender.c index a4d46c3..b1588b7 100644 --- a/sender.c +++ b/sender.c @@ -262,6 +262,8 @@ void send_files(int f_in, int f_out) if (ndx - cur_flist->ndx_start >= 0) file = cur_flist->files[ndx - cur_flist->ndx_start]; + else if (cur_flist->parent_ndx < 0) + exit_cleanup(RERR_PROTOCOL); else file = dir_flist->files[cur_flist->parent_ndx]; if (F_PATHNAME(file)) { diff --git a/simd-checksum-x86_64.cpp b/simd-checksum-x86_64.cpp index d649091..99391cb 100644 --- a/simd-checksum-x86_64.cpp +++ b/simd-checksum-x86_64.cpp @@ -347,8 +347,7 @@ __attribute__ ((target("avx2"))) MVSTATIC int32 get_checksum1_avx2_64(schar* buf __m128i tmp = _mm_load_si128((__m128i*) mul_t1_buf); __m256i mul_t1 = _mm256_cvtepu8_epi16(tmp); __m256i mul_const = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(4 | (3 << 8) | (2 << 16) | (1 << 24))); - __m256i mul_one; - mul_one = _mm256_abs_epi8(_mm256_cmpeq_epi16(mul_one,mul_one)); // set all vector elements to 1 + __m256i mul_one = _mm256_set1_epi8(1); for (; i < (len-64); i+=64) { // Load ... 4*[int8*16] @@ -548,6 +547,118 @@ int main() { #pragma clang optimize on #endif /* BENCHMARK_SIMD_CHECKSUM1 */ +#ifdef TEST_SIMD_CHECKSUM1 + +static uint32 checksum_via_default(char *buf, int32 len) +{ + uint32 s1 = 0, s2 = 0; + get_checksum1_default_1((schar*)buf, len, 0, &s1, &s2); + return (s1 & 0xffff) + (s2 << 16); +} + +static uint32 checksum_via_sse2(char *buf, int32 len) +{ + int32 i; + uint32 s1 = 0, s2 = 0; + i = get_checksum1_sse2_32((schar*)buf, len, 0, &s1, &s2); + get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); + return (s1 & 0xffff) + (s2 << 16); +} + +static uint32 checksum_via_ssse3(char *buf, int32 len) +{ + int32 i; + uint32 s1 = 0, s2 = 0; + i = get_checksum1_ssse3_32((schar*)buf, len, 0, &s1, &s2); + get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); + return (s1 & 0xffff) + (s2 << 16); +} + +static uint32 checksum_via_avx2(char *buf, int32 len) +{ + int32 i; + uint32 s1 = 0, s2 = 0; +#ifdef USE_ROLL_ASM + i = get_checksum1_avx2_asm((schar*)buf, len, 0, &s1, &s2); +#else + i = get_checksum1_avx2_64((schar*)buf, len, 0, &s1, &s2); +#endif + get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); + return (s1 & 0xffff) + (s2 << 16); +} + +int main() +{ + static const int sizes[] = {1, 4, 31, 32, 33, 63, 64, 65, 128, 129, 256, 700, 1024, 4096, 65536}; + int num_sizes = sizeof(sizes) / sizeof(sizes[0]); + int max_size = sizes[num_sizes - 1]; + int failures = 0; + + /* Allocate with extra bytes for unaligned test */ + unsigned char *raw = (unsigned char *)malloc(max_size + 64 + 1); + if (!raw) { + fprintf(stderr, "malloc failed\n"); + return 1; + } + + /* Fill with deterministic data */ + for (int i = 0; i < max_size + 64 + 1; i++) + raw[i] = (i + (i % 3) + (i % 11)) % 256; + + /* Test with aligned buffer (64-byte aligned) */ + unsigned char *aligned = raw + (64 - ((uintptr_t)raw % 64)); + + /* Test with unaligned buffer (+1 byte offset) */ + unsigned char *unaligned = aligned + 1; + + struct { const char *name; unsigned char *buf; } buffers[] = { + {"aligned", aligned}, + {"unaligned", unaligned}, + }; + + for (int b = 0; b < 2; b++) { + char *buf = (char *)buffers[b].buf; + const char *bname = buffers[b].name; + + for (int s = 0; s < num_sizes; s++) { + int32 len = sizes[s]; + uint32 ref = checksum_via_default(buf, len); + uint32 cs_sse2 = checksum_via_sse2(buf, len); + uint32 cs_ssse3 = checksum_via_ssse3(buf, len); + uint32 cs_avx2 = checksum_via_avx2(buf, len); + uint32 cs_auto = get_checksum1(buf, len); + + if (cs_sse2 != ref) { + printf("FAIL %-9s size=%5d: SSE2=%08x ref=%08x\n", bname, len, cs_sse2, ref); + failures++; + } + if (cs_ssse3 != ref) { + printf("FAIL %-9s size=%5d: SSSE3=%08x ref=%08x\n", bname, len, cs_ssse3, ref); + failures++; + } + if (cs_avx2 != ref) { + printf("FAIL %-9s size=%5d: AVX2=%08x ref=%08x\n", bname, len, cs_avx2, ref); + failures++; + } + if (cs_auto != ref) { + printf("FAIL %-9s size=%5d: auto=%08x ref=%08x\n", bname, len, cs_auto, ref); + failures++; + } + } + } + + free(raw); + + if (failures) { + printf("%d checksum mismatches!\n", failures); + return 1; + } + printf("All SIMD checksum tests passed.\n"); + return 0; +} + +#endif /* TEST_SIMD_CHECKSUM1 */ + #endif /* } USE_ROLL_SIMD */ #endif /* } __cplusplus */ #endif /* } __x86_64__ */ diff --git a/support/git-set-file-times b/support/git-set-file-times index e06f073..601248b 100755 --- a/support/git-set-file-times +++ b/support/git-set-file-times @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os, re, argparse, subprocess -from datetime import datetime +from datetime import datetime, UTC NULL_COMMIT_RE = re.compile(r'\0\0commit [a-f0-9]{40}$|\0$') @@ -74,7 +74,7 @@ def print_line(fn, mtime, commit_time): if args.list > 1: ts = str(commit_time).rjust(10) else: - ts = datetime.utcfromtimestamp(commit_time).strftime("%Y-%m-%d %H:%M:%S") + ts = datetime.fromtimestamp(commit_time, UTC).strftime("%Y-%m-%d %H:%M:%S") chg = '.' if mtime == commit_time else '*' print(chg, ts, fn) diff --git a/support/rrsync b/support/rrsync index e8b0cc0..56389c5 100755 --- a/support/rrsync +++ b/support/rrsync @@ -46,6 +46,7 @@ long_opts = { 'compare-dest': 2, 'compress-choice': 1, 'compress-level': 1, + 'compress-threads': 1, 'copy-dest': 2, 'copy-devices': -1, 'copy-unsafe-links': 0, @@ -59,6 +60,7 @@ long_opts = { 'delete-during': 0, 'delete-excluded': 0, 'delete-missing-args': 0, + 'dirs': 0, 'existing': 0, 'fake-super': 0, 'files-from': 3, @@ -300,6 +302,7 @@ def validated_arg(opt, arg, typ=3, wild=False): if arg.startswith('./'): arg = arg[1:] arg = arg.replace('//', '/') + arg = arg.lstrip('/') if args.dir != '/': if HAS_DOT_DOT_RE.search(arg): die("do not use .. in", opt, "(anchor the path at the root of your restricted dir)") diff --git a/support/rsync-no-vanished b/support/rsync-no-vanished index b31a5d2..892c90b 100755 --- a/support/rsync-no-vanished +++ b/support/rsync-no-vanished @@ -2,7 +2,7 @@ REAL_RSYNC=/usr/bin/rsync IGNOREEXIT=24 -IGNOREOUT='^(file has vanished: |rsync warning: some files vanished before they could be transferred)' +IGNOREOUT='^((file|directory) has vanished: |rsync warning: some files vanished before they could be transferred)' # If someone installs this as "rsync", make sure we don't affect a server run. for arg in "${@}"; do diff --git a/syscall.c b/syscall.c index 34a9bba..ec0e070 100644 --- a/syscall.c +++ b/syscall.c @@ -480,7 +480,7 @@ int do_SetFileTime(const char *path, time_t crtime) free(pathw); if (handle == INVALID_HANDLE_VALUE) return -1; - int64 temp_time = Int32x32To64(crtime, 10000000) + 116444736000000000LL; + int64 temp_time = (crtime * 10000000LL) + 116444736000000000LL; FILETIME birth_time; birth_time.dwLowDateTime = (DWORD)temp_time; birth_time.dwHighDateTime = (DWORD)(temp_time >> 32); @@ -683,6 +683,11 @@ int do_open_nofollow(const char *pathname, int flags) #endif } +#ifdef O_NOATIME + if (open_noatime) + flags |= O_NOATIME; +#endif + #ifdef O_NOFOLLOW fd = open(pathname, flags|O_NOFOLLOW); #else diff --git a/testsuite/clean-fname-underflow.test b/testsuite/clean-fname-underflow.test new file mode 100644 index 0000000..24625a8 --- /dev/null +++ b/testsuite/clean-fname-underflow.test @@ -0,0 +1,27 @@ +#!/bin/sh +# clean-fname-underflow.test +# Ensure clean_fname() does not read-before-buffer when collapsing "..". +# This exercises the --server path where a crafted merge filename hits clean_fname(). + +. "$suitedir/rsync.fns" + +workdir="$scratchdir/workdir" +mkdir -p "$workdir/mod" +cd "$workdir" + +rsync_bin=`echo $RSYNC | sed 's/ .*//'` + +# Invoke the server-side path. We don't need a real transfer; we just want to +# ensure clean_fname() doesn't crash when given "a/../test" via --filter=merge. +if $rsync_bin --server --sender -vlr --filter='merge a/../test' . mod/ >/dev/null 2>&1; then + : # success +else + status=$? + # Non-zero exit is expected for bogus input; ensure it wasn't a signal/crash. + if [ $status -ge 128 ]; then + test_fail "rsync exited due to a signal (status=$status)" + fi +fi + +echo "OK: clean_fname() handled 'a/../test' without crashing" +exit 0 diff --git a/testsuite/hardlinks.test b/testsuite/hardlinks.test index 68fd270..c02db3f 100644 --- a/testsuite/hardlinks.test +++ b/testsuite/hardlinks.test @@ -81,7 +81,8 @@ diff $diffopt "$name1" "$todir" || test_fail "solo copy of name1 failed" # enabled (this has broken in 3.4.0 so far, so we need this test). rm -rf "$fromdir" "$todir" makepath "$fromdir/sym" "$todir" -checkit "$RSYNC -aH '$fromdir/sym' '$todir'" "$fromdir" "$todir" +$RSYNC -aH "$fromdir/sym" "$todir" +diff $diffopt "$fromdir" "$todir" || test_fail "solo copy of sym failed" # The script would have aborted on error, so getting here means we've won. exit 0 diff --git a/testsuite/longdir.test b/testsuite/longdir.test index 8d66bb5..2674729 100644 --- a/testsuite/longdir.test +++ b/testsuite/longdir.test @@ -16,9 +16,9 @@ makepath "$longdir" || test_skipped "unable to create long directory" touch "$longdir/1" || test_skipped "unable to create files in long directory" date > "$longdir/1" if [ -r /etc ]; then - ls -la /etc >"$longdir/2" + ls -la /etc >"$longdir/2" || [ $? -eq 1 ] else - ls -la / >"$longdir/2" + ls -la / >"$longdir/2" || [ $? -eq 1 ] fi checkit "$RSYNC --delete -avH '$fromdir/' '$todir'" "$fromdir/" "$todir" diff --git a/testsuite/open-noatime.test b/testsuite/open-noatime.test new file mode 100644 index 0000000..096a2c6 --- /dev/null +++ b/testsuite/open-noatime.test @@ -0,0 +1,32 @@ +#!/bin/sh + +# Test rsync --open-noatime option keeps source atimes intact + +. "$suitedir/rsync.fns" + +$RSYNC -VV | grep '"atimes": true' >/dev/null || test_skipped "Rsync is configured without atimes support" + +# O_NOATIME is Linux-specific; skip on other platforms +case `uname` in +Linux) ;; +*) test_skipped "O_NOATIME is only supported on Linux" ;; +esac + +mkdir "$fromdir" + +# --open-noatime did not work properly on files with size > 0 +echo content > "$fromdir/foo" +touch -a -t 200102031717.42 "$fromdir/foo" + +TLS_ARGS=--atimes + +"$TOOLDIR/tls" $TLS_ARGS "$fromdir/foo" > "$tmpdir/atime-from-before" + +# Do not use checkit because it uses "diff" which breaks atimes +$RSYNC --open-noatime --archive --recursive --times --atimes -vvv "$fromdir/" "$todir/" + +"$TOOLDIR/tls" $TLS_ARGS "$fromdir/foo" > "$tmpdir/atime-from-after" +diff "$tmpdir/atime-from-before" "$tmpdir/atime-from-after" + +# The script would have aborted on error, so getting here means we've won. +exit 0 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 2ab97b6..4caec58 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -97,7 +97,7 @@ printmsg() { } rsync_ls_lR() { - find "$@" -name .git -prune -o -name auto-build-save -prune -o -print | \ + find "$@" -name .git -prune -o -name auto-build-save -prune -o -name testtmp -prune -o -print | \ sort | sed 's/ /\\ /g' | xargs "$TOOLDIR/tls" $TLS_ARGS } @@ -195,15 +195,15 @@ hands_setup() { echo some data > "$fromdir/dir/subdir/foobar.baz" mkdir "$fromdir/dir/subdir/subsubdir" if [ -r /etc ]; then - ls -ltr /etc > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" + ls -ltr /etc > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" || [ $? -eq 1 ] else - ls -ltr / > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" + ls -ltr / > "$fromdir/dir/subdir/subsubdir/etc-ltr-list" || [ $? -eq 1 ] fi mkdir "$fromdir/dir/subdir/subsubdir2" if [ -r /bin ]; then - ls -lt /bin > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" + ls -lt /bin > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" || [ $? -eq 1 ] else - ls -lt / > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" + ls -lt / > "$fromdir/dir/subdir/subsubdir2/bin-lt-list" || [ $? -eq 1 ] fi # echo testing head: diff --git a/testsuite/simd-checksum.test b/testsuite/simd-checksum.test new file mode 100755 index 0000000..cf7dba2 --- /dev/null +++ b/testsuite/simd-checksum.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Test SIMD checksum implementations against the C reference + +. "$suitedir/rsync.fns" + +if ! test -x "$TOOLDIR/simdtest"; then + test_skipped "simdtest not built (SIMD not available)" +fi + +"$TOOLDIR/simdtest" diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test index 1559ca2..83f7180 100644 --- a/testsuite/ssh-basic.test +++ b/testsuite/ssh-basic.test @@ -6,7 +6,7 @@ # This program is distributable under the terms of the GNU GPL (see # COPYING) -# This script tests ssh, if possible. It's called by runtests.sh +# This script tests ssh, if possible. It's called by runtests.py . "$suitedir/rsync.fns" diff --git a/tls.c b/tls.c index 858f8f1..e05f7ec 100644 --- a/tls.c +++ b/tls.c @@ -127,7 +127,7 @@ static void storetime(char *dest, size_t destsize, time_t t, int nsecs) { if (t) { int len; - struct tm *mt = gmtime(&t); + struct tm tmp, *mt = gmtime_r(&t, &tmp); len = snprintf(dest, destsize, " %04d-%02d-%02d %02d:%02d:%02d", @@ -230,7 +230,7 @@ static void list_file(const char *fname) mtimebuf, atimebuf, crtimebuf, fname, linkbuf); } -static struct poptOption long_options[] = { +static const struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"atimes", 'U', POPT_ARG_NONE, &display_atimes, 0, 0, 0}, #ifdef SUPPORT_CRTIMES diff --git a/token.c b/token.c index c108b3a..773f14a 100644 --- a/token.c +++ b/token.c @@ -33,6 +33,7 @@ extern int do_compression; extern int protocol_version; extern int module_id; extern int do_compression_level; +extern int do_compression_threads; extern char *skip_compress; #ifndef Z_INSERT_ONLY @@ -589,8 +590,13 @@ static int32 recv_deflated_token(int f, char **data) if (flag & TOKEN_REL) { rx_token += flag & 0x3f; flag >>= 6; - } else + } else { rx_token = read_int(f); + if (rx_token < 0) { + rprintf(FERROR, "invalid token number in compressed stream\n"); + exit_cleanup(RERR_PROTOCOL); + } + } if (flag & 1) { rx_run = read_byte(f); rx_run += read_byte(f) << 8; @@ -692,6 +698,8 @@ static void send_zstd_token(int f, int32 token, struct map_struct *buf, OFF_T of obuf = new_array(char, OBUF_SIZE); ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, do_compression_level); + ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_nbWorkers, do_compression_threads); + zstd_out_buff.dst = obuf + 2; comp_init_done = 1; @@ -729,12 +737,11 @@ static void send_zstd_token(int f, int32 token, struct map_struct *buf, OFF_T of zstd_in_buff.src = map_ptr(buf, offset, nb); zstd_in_buff.size = nb; zstd_in_buff.pos = 0; - + + int finished; do { - if (zstd_out_buff.size == 0) { - zstd_out_buff.size = MAX_DATA_COUNT; - zstd_out_buff.pos = 0; - } + zstd_out_buff.size = MAX_DATA_COUNT; + zstd_out_buff.pos = 0; /* File ended, flush */ if (token != -2) @@ -752,20 +759,21 @@ static void send_zstd_token(int f, int32 token, struct map_struct *buf, OFF_T of * state and send a smaller buffer so that the remote side can * finish the file. */ - if (zstd_out_buff.pos == zstd_out_buff.size || flush == ZSTD_e_flush) { + finished = (flush == ZSTD_e_flush) ? (r == 0) : (zstd_in_buff.pos == zstd_in_buff.size); + + if (zstd_out_buff.pos != 0) { n = zstd_out_buff.pos; obuf[0] = DEFLATED_DATA + (n >> 8); obuf[1] = n; write_buf(f, obuf, n+2); - - zstd_out_buff.size = 0; } /* * Loop while the input buffer isn't full consumed or the * internal state isn't fully flushed. */ - } while (zstd_in_buff.pos < zstd_in_buff.size || r > 0); + } while (!finished); + flush_pending = token == -2; } @@ -831,8 +839,13 @@ static int32 recv_zstd_token(int f, char **data) if (flag & TOKEN_REL) { rx_token += flag & 0x3f; flag >>= 6; - } else + } else { rx_token = read_int(f); + if (rx_token < 0) { + rprintf(FERROR, "invalid token number in compressed stream\n"); + exit_cleanup(RERR_PROTOCOL); + } + } if (flag & 1) { rx_run = read_byte(f); rx_run += read_byte(f) << 8; @@ -995,8 +1008,13 @@ static int32 recv_compressed_token(int f, char **data) if (flag & TOKEN_REL) { rx_token += flag & 0x3f; flag >>= 6; - } else + } else { rx_token = read_int(f); + if (rx_token < 0) { + rprintf(FERROR, "invalid token number in compressed stream\n"); + exit_cleanup(RERR_PROTOCOL); + } + } if (flag & 1) { rx_run = read_byte(f); rx_run += read_byte(f) << 8; diff --git a/util1.c b/util1.c index d84bc41..25ac7c9 100644 --- a/util1.c +++ b/util1.c @@ -942,7 +942,7 @@ int count_dir_elements(const char *p) * resulting name would be empty, returns ".". */ int clean_fname(char *name, int flags) { - char *limit = name - 1, *t = name, *f = name; + char *limit = name, *t = name, *f = name; int anchored; if (!name) @@ -987,9 +987,13 @@ int clean_fname(char *name, int flags) f += 2; continue; } - while (s > limit && *--s != '/') {} - if (s != t - 1 && (s < name || *s == '/')) { - t = s + 1; + /* backing up for ".." — avoid reading before 'name' */ + while (s > limit && s[-1] != '/') + s--; + + /* If found prior '/', or we reached the start, adjust t. */ + if (s != t - 1 && (s <= name || *s == '/')) { + t = (s == name) ? name : s + 1; f += 2; continue; } @@ -1389,7 +1393,7 @@ char *timestring(time_t t) static int ndx = 0; static char buffers[4][20]; /* We support 4 simultaneous timestring results. */ char *TimeBuf = buffers[ndx = (ndx + 1) % 4]; - struct tm *tm = localtime(&t); + struct tm tmp, *tm = localtime_r(&t, &tmp); int len = snprintf(TimeBuf, sizeof buffers[0], "%4d/%02d/%02d %02d:%02d:%02d", (int)tm->tm_year + 1900, (int)tm->tm_mon + 1, (int)tm->tm_mday, (int)tm->tm_hour, (int)tm->tm_min, (int)tm->tm_sec); @@ -1714,6 +1718,8 @@ void *expand_item_list(item_list *lp, size_t item_size, const char *desc, int in new_ptr == lp->items ? " not" : ""); } + memset((char *)new_ptr + lp->malloced * item_size, 0, + (expand_size - lp->malloced) * item_size); lp->items = new_ptr; lp->malloced = expand_size; } diff --git a/util2.c b/util2.c index b59bff0..ce6f7de 100644 --- a/util2.c +++ b/util2.c @@ -79,9 +79,7 @@ void *my_alloc(void *ptr, size_t num, size_t size, const char *file, int line) who_am_i(), do_big_num(max_alloc, 0, NULL), src_file(file), line); exit_cleanup(RERR_MALLOC); } - if (!ptr) - ptr = malloc(num * size); - else if (ptr == do_calloc) + if (!ptr || ptr == do_calloc) ptr = calloc(num, size); else ptr = realloc(ptr, num * size); diff --git a/version.h b/version.h index e54a4ad..dcea322 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -#define RSYNC_VERSION "3.4.1" -#define MAINTAINER_TZ_OFFSET -7.0 +#define RSYNC_VERSION "3.4.2" +#define MAINTAINER_TZ_OFFSET 10.0 diff --git a/wildtest.c b/wildtest.c index bea4ceb..381ac59 100644 --- a/wildtest.c +++ b/wildtest.c @@ -32,7 +32,9 @@ int fnmatch_errors = 0; int wildmatch_errors = 0; +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L typedef char bool; +#endif int output_iterations = 0; int explode_mod = 0; @@ -40,7 +42,7 @@ int empties_mod = 0; int empty_at_start = 0; int empty_at_end = 0; -static struct poptOption long_options[] = { +static const struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"iterations", 'i', POPT_ARG_NONE, &output_iterations, 0, 0, 0}, {"empties", 'e', POPT_ARG_STRING, 0, 'e', 0, 0}, diff --git a/xattrs.c b/xattrs.c index 26e50a6..65166ee 100644 --- a/xattrs.c +++ b/xattrs.c @@ -860,8 +860,8 @@ void receive_xattr(int f, struct file_struct *file) rxa->num = num; } - if (need_sort && count > 1) - qsort(temp_xattr.items, count, sizeof (rsync_xa), rsync_xal_compare_names); + if (need_sort && temp_xattr.count > 1) + qsort(temp_xattr.items, temp_xattr.count, sizeof (rsync_xa), rsync_xal_compare_names); ndx = rsync_xal_store(&temp_xattr); /* adds item to rsync_xal_l */