diff -u -r --new-file --exclude=CVS rsync-2.4.6/.cvsignore rsync-2.5.0/.cvsignore --- rsync-2.4.6/.cvsignore Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/.cvsignore Thu Nov 29 16:21:06 2001 @@ -0,0 +1,13 @@ +ID +Makefile +config.cache +config.h +config.log +config.status +rsync +shconfig +testdir +tests-dont-exist +testtmp +tls +zlib/dummy diff -u -r --new-file --exclude=CVS rsync-2.4.6/.ignore rsync-2.5.0/.ignore --- rsync-2.4.6/.ignore Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/.ignore Fri Jun 21 22:04:22 1996 @@ -0,0 +1,19 @@ +.#* +*.log +Makefile +config.h +*.o +CVS +.ignore +.cvsignore +*~ +rsync +config.status +config.cache +TAGS +config.log +test +*.gz +rsync-* +*.dvi +*.aux diff -u -r --new-file --exclude=CVS rsync-2.4.6/INSTALL rsync-2.5.0/INSTALL --- rsync-2.4.6/INSTALL Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/INSTALL Tue Nov 27 23:12:09 2001 @@ -0,0 +1,42 @@ +To build and install rsync + + $ ./configure + $ make + # make install + +You may set the installation directory and other parameters by options +to ./configure. To see them, use: + + $ ./configure --help + +As of 2.4.7, rsync uses Eric Troan's popt option-parsing library. A +cut-down copy of release 1.5 is included in the rsync distribution, +and will be used it there is no popt library on your build host, or if +the --with-included-popt option is passed to ./configure. + + + +HP-UX NOTES +----------- + +The HP-UX 10.10 "bundled" C compiler seems not to be able to cope with +ANSI C. You may see this error message in config.log if ./configure +fails: + + (Bundled) cc: "configure", line 2162: error 1705: Function prototypes are an ANSI feature. + +Install gcc or HP's "ANSI/C Compiler". + + + +MAC OSX NOTES +------------- + +Mac OS X (Darwin) seems to have an IPv6 stack, but it does not +completely implement the "New Sockets" API. + + says that Apple do not support +IPv6 yet. If your build fails, try again with --disable-ipv6. + + + diff -u -r --new-file --exclude=CVS rsync-2.4.6/Makefile.in rsync-2.5.0/Makefile.in --- rsync-2.4.6/Makefile.in Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/Makefile.in Thu Nov 29 16:21:07 2001 @@ -17,18 +17,28 @@ VPATH=$(srcdir) SHELL=/bin/sh +VERSION=@VERSION@ .SUFFIXES: .SUFFIXES: .c .o -LIBOBJ=lib/getopt.o lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o +LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \ + lib/permstring.o \ + @LIBOBJS@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \ zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \ zlib/zutil.o zlib/adler32.o OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o main.o checksum.o match.o syscall.o log.o backup.o -OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o +OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o fileio.o batch.o DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o -OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) +popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ + popt/popthelp.o popt/poptparse.o +OBJS=$(OBJS1) $(OBJS2) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@ + +tls_OBJ = tls.o syscall.o lib/permstring.o + +# Programs we must have to run the test cases +CHECK_PROGS = rsync tls # note that the -I. is needed to handle config.h when using VPATH .c.o: @@ -54,6 +64,16 @@ rsync: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o rsync $(OBJS) $(LIBS) +tls: $(tls_OBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(tls_OBJ) $(LIBS) + +Makefile: Makefile.in configure config.status + echo "WARNING: You need to run ./config.status --recheck" + +# don't actually run autoconf, just issue a warning +configure: configure.in + echo "WARNING: you need to rerun autoconf" + rsync.1: rsync.yo yodl2man -o rsync.1 rsync.yo @@ -64,11 +84,12 @@ cat *.c lib/compat.c | awk -f mkproto.awk > proto.h clean: - rm -f *~ $(OBJS) rsync + rm -f *~ $(OBJS) rsync $(TLS_OBJ) tls + rm -rf ./testtmp + rm -f config.cache distclean: clean - rm -f config.h config.cache config.status Makefile - + rm -f Makefile config.h config.status # this target is really just for my use. It only works on a limited # range of machines and is used to produce a list of potentially @@ -77,3 +98,34 @@ nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt comm -13 nmused.txt nmfns.txt + +# 'check' is the GNU name, 'test' is the name for everybody else :-) +.PHONY: check test + +test: check + + +# There seems to be no standard way to specify some variables as +# exported from a Makefile apart from listing them like this. + +# TODO: Tests that depend on built test aide programs like tls need to +# know where the build directory is. + +# This depends on building rsync; if we need any helper programs it +# should depend on them too. + +# We try to run the scripts with POSIX mode on, in the hope that will +# catch Bash-isms earlier even if we're running on GNU. Of course, we +# might lose in the future where POSIX diverges from old sh. + +check: all $(CHECK_PROGS) + POSIXLY_CORRECT=1 TLS=`pwd`/tls rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/runtests.sh + +# This does *not* depend on building or installing: you can use it to +# check a version installed from a binary or some other source tree, +# if you want. + +installcheck: $(CHECK_PROGS) + POSIXLY_CORRECT=1 TLS=`pwd`/tls rsync_bin="$(bindir)/rsync" srcdir="$(srcdir)" $(srcdir)/runtests.sh + +# TODO: Add 'dist' target; need to know which files will be included diff -u -r --new-file --exclude=CVS rsync-2.4.6/NEWS rsync-2.5.0/NEWS --- rsync-2.4.6/NEWS Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/NEWS Thu Nov 29 16:15:32 2001 @@ -0,0 +1,114 @@ +rsync 2.5.0 (2001-11-30) -*- indented-text -*- + + ANNOUNCEMENTS + + * Martin Pool is now a co-maintainer. + + NEW FEATURES + + * Support for LSB-compliant packaging + + * Shell wildcards are allowed in "auth users" lines. + + * Merged UNC rsync+ patch to support creation of standalone patch + sets. By Bert J. Dempsey and Debra Weiss, updated by Jos + Backus. + + * IPv6 support based on a patch from KAME.net, on systems + including modern versions of Linux, Solaris, and HP-UX. Also + includes IPv6 compatibility functions for old OSs by the + Internet Software Consortium, Paul Vixie, the OpenSSH + portability project, and OpenBSD. + + ENHANCEMENTS + + * Include/exclude cluestick: with -vv, print out whether files are + included or excluded and why. + + * Many error messages have more friendly explanations and more + details. + + * Manual page improvements plus scanty protocol documentation. + + * When running as --daemon in the background and using a "log + file" rsyncd.conf directive, close the log file every time it is + open when going to sleep on the socket. This allows the log + file to get cleaned out by another process. + + * Change to using libpopt rather than getopt for processing + options. This makes the code cleaner and the behaviour more + consistent across platforms. popt is included and built if not + installed on the platform. + + * More details in --version, including note about whether 64-bit + files, symlinks and hardlinks are supported. + + * MD4 code may use less CPU cycles. + + * Use mkstemp on systems where it is secure. If we use mktemp, + explain that we do it in a secure way. + + * --whole-file is the default when source and target are on the + local machine. + + BUG FIXES: + + * Fix for various bugs causing rsync to hang. + + * Attempt to fix Large File Summit support on AIX. + + * Attempt to fix error handling lockup bug. + + * Give a non-0 exit code if *any* of the files we have been asked + to transfer fail to transfer + + * For log messages containing ridiculously long strings that might + overflow a buffer rsync no longer aborts, but rather prints an + ellipsis at the end of the string. (Patch from Ed Santiago.) + + PLATFORMS: + + * Improved support for UNICOS (tested on Cray T3E and Cray SV1) + + * autoconf2.52 (or later) is now required to rebuild the autoconf + scripts. It is not required to simply build rsync. + + * Platforms thought to work in this release: + + Cray SV1 UNICOS 10.0.0.8 cc + Debian Linux 2.2 UltraSparc gcc + Debian Linux testing/unstable ARM gcc + FreeBSD 3.3-RELEASE i386 cc + FreeBSD 4.1.1-RELEASE i386 cc + FreeBSD 4.3-STABLE i386 cc + HP PA-RISC HP-UX 10.20 gcc + HP PA-RISC HP-UX 11.11 cc + IRIX 6.5 MIPS cc + IRIX 6.5 MIPS gcc + Mac OS X PPC (--disable-ipv6) cc + NetBSD 1.5 i386 gcc + NetBSD Current i386 cc + OpenBSD 2.5 Sparc gcc + OpenBSD 2.9 i386 cc + OpenBSD Current i386 cc + RedHat 6.2 i386 gcc + RedHat 6.2 i386 insure++ + RedHat 7.0 i386 gcc + RedHat 7.1 i386 (Kernel 2.4.10) gcc + Slackware 8.0 i686 (Kernel 2.4.10) + Solaris 8 UltraSparc cc + Solaris 8 UltraSparc gcc + Solaris 8 i386 gcc + SuSE 7.1 i386 gcc2.95.2 + SuSE 7.1 ppc gcc2.95.2 + i386-pc-sco3.2v5.0.5 cc + i386-pc-sco3.2v5.0.5 gcc + powerpc-ibm-aix4.3.3.0 cc + i686-unknown-sysv5UnixWare7.1.0 gcc + i686-unknown-sysv5UnixWare7.1.0 cc + + TESTING: + + * The existing test.sh script by Phil Hands has been merged into a + test framework that works from both "make check" and the Samba + build farm. diff -u -r --new-file --exclude=CVS rsync-2.4.6/README rsync-2.5.0/README --- rsync-2.4.6/README Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/README Thu Nov 29 16:21:07 2001 @@ -90,11 +90,14 @@ SETUP ----- -Rsync uses rsh or ssh for communication. It does not need to be setuid -and requires no special privileges for installation. It does not -require a inetd entry or a daemon. You must, however, have a working -rsh or ssh system. Using ssh is recommended for its security -features. +Rsync normally uses rsh or ssh for communication. It does not need to +be setuid and requires no special privileges for installation. You +must, however, have a working rsh or ssh system. Using ssh is +recommended for its security features. + +Alternatively, rsync can run in `daemon' mode, listening on a socket. +This is generally used for public file distribution, although +authentication and access control are available. To install rsync, first run the "configure" script. This will create a Makefile and config.h appropriate for your system. Then type @@ -152,19 +155,20 @@ source code repository then you can use anonymous cvs. You will need a recent version of cvs then use the following commands: - cvs -d :pserver:cvs@cvs.samba.org:/cvsroot login + cvs -d :pserver:cvs@pserver.samba.org:/cvsroot login Password: cvs - cvs -d :pserver:cvs@cvs.samba.org:/cvsroot co rsync + cvs -d :pserver:cvs@pserver.samba.org:/cvsroot co rsync -Look at the cvs documentation for more details. +Look at the cvs documentation, or http://samba.org/cvs.html, for more +details. COPYRIGHT --------- Rsync was written by Andrew Tridgell and Paul Mackerras, and is -available under the Gnu Public License. +available under the GNU General Public License. tridge@samba.org paulus@cs.anu.edu.au diff -u -r --new-file --exclude=CVS rsync-2.4.6/TODO rsync-2.5.0/TODO --- rsync-2.4.6/TODO Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/TODO Thu Nov 29 16:16:14 2001 @@ -0,0 +1,120 @@ +-*- indented-text -*- + +URGENT --------------------------------------------------------------- + + +IMPORTANT ------------------------------------------------------------ + +Cross-test versions + + Part of the regression suite should be making sure that we don't + break backwards compatibility: old clients vs new servers and so + on. Ideally we would test the cross product of versions. + + It might be sufficient to test downloads from well-known public + rsync servers running different versions of rsync. This will give + some testing and also be the most common case for having different + versions and not being able to upgrade. + +use chroot + + If the platform doesn't support it, then don't even try. + + If running as non-root, then don't fail, just give a warning. + (There was a thread about this a while ago?) + + http://lists.samba.org/pipermail/rsync/2001-August/thread.html + http://lists.samba.org/pipermail/rsync/2001-September/thread.html + +--files-from + + Avoids traversal. Better option than a pile of --include statements + for people who want to generate the file list using a find(1) + command or a script. + +Performance + + Traverse just one directory at a time. Tridge says it's possible. + + Can possibly also be smarter about memory use while looking for hard + links by reducing the refcount as we find alternative names. + +IPv6 + + Define a syntax for IPv6 literal addresses. Since they include + colons, they tend to break most naming systems, including ours. + Based on the HTTP IPv6 syntax, I think we should use + + rsync://[::1]/foo/bar + [::1]::bar + + which should just take a small change to the parser code. + +Errors + + If we hang or get SIGINT, then explain where we were up to. Perhaps + have a static buffer that contains the current function name, or + some kind of description of what we were trying to do. This is a + little easier on people than needing to run strace/truss. + + "The dungeon collapses! You are killed." Rather than "unexpected + eof" give a message that is more detailed if possible and also more + helpful. + + +PLATFORMS ------------------------------------------------------------ + +Win32 + + Don't detach, because this messes up --srvany. + + http://sources.redhat.com/ml/cygwin/2001-08/msg00234.html + + According to "Effective TCP/IP Programming" (??) close() on a socket + has incorrect behaviour on Windows -- it sends a RST packet to the + other side, which gives a "connection reset by peer" error. On that + platform we should probably do shutdown() instead. However, on Unix + we are correct to call close(), because shutdown() discards + untransmitted data. + +BUILD FARM ----------------------------------------------------------- + +Add machines + + AMDAHL UTS (Dave Dykstra) + + Cygwin (on different versions of Win32?) + + HP-UX variants (via HP?) + + SCO + +NICE ----------------------------------------------------------------- + +--no-detach and --no-fork options + + Very useful for debugging. Also good when running under a + daemon-monitoring process that tries to restart the service when the + parent exits. + +hang/timeout friendliness + + On + +internationalization + + Change to using gettext(). Probably need to ship this for platforms + that don't have it. + + Solicit translations. + + Does anyone care? + +rsyncsh + + Write a small emulation of interactive ftp as a Pythonn program + that calls rsync. Commands such as "cd", "ls", "ls *.c" etc map + fairly directly into rsync commands: it just needs to remember the + current host, directory and so on. We can probably even do + completion of remote filenames. + diff -u -r --new-file --exclude=CVS rsync-2.4.6/acconfig.h rsync-2.5.0/acconfig.h --- rsync-2.4.6/acconfig.h Fri Jul 28 22:05:08 2000 +++ rsync-2.5.0/acconfig.h Thu Nov 29 16:21:07 2001 @@ -1,10 +1,3 @@ -#undef HAVE_BROKEN_READDIR -#undef HAVE_ERRNO_DECL -#undef HAVE_LONGLONG -#undef HAVE_OFF64_T -#undef HAVE_REMSH -#undef HAVE_UNSIGNED_CHAR -#undef HAVE_UTIMBUF #undef ino_t #undef HAVE_CONNECT #undef HAVE_SHORT_INO_T @@ -12,4 +5,6 @@ #undef REPLACE_INET_NTOA #undef REPLACE_INET_ATON #undef HAVE_GETTIMEOFDAY_TZ +#undef ENABLE_IPV6 +#undef HAVE_SOCKADDR_LEN #undef HAVE_SOCKETPAIR diff -u -r --new-file --exclude=CVS rsync-2.4.6/aclocal.m4 rsync-2.5.0/aclocal.m4 --- rsync-2.4.6/aclocal.m4 Wed Oct 28 21:01:47 1998 +++ rsync-2.5.0/aclocal.m4 Thu Nov 29 16:21:07 2001 @@ -21,3 +21,51 @@ ac_cv_build_system_type="$build" ac_cv_target_system_type="$target" ]) + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc. So we +dnl have to test to find something that will work. + +dnl This is no good, because passing the wrong pointer on C compilers is +dnl likely to only generate a warning, not an error. We don't call this at +dnl the moment. + +AC_DEFUN([TYPE_SOCKLEN_T], +[ + AC_CHECK_TYPE([socklen_t], ,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([rsync_cv_socklen_t_equiv], + [ + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + rsync_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + AC_TRY_COMPILE([ +#include +#include + + int getpeername (int, $arg2 *, $t *); + ],[ + $t len; + getpeername(0,0,&len); + ],[ + rsync_cv_socklen_t_equiv="$t" + break + ]) + done + done + + if test "x$rsync_cv_socklen_t_equiv" = x; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + ]) + AC_MSG_RESULT($rsync_cv_socklen_t_equiv) + AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include +#include ]) +]) + + diff -u -r --new-file --exclude=CVS rsync-2.4.6/authenticate.c rsync-2.5.0/authenticate.c --- rsync-2.4.6/authenticate.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/authenticate.c Thu Nov 29 16:21:07 2001 @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux"; -*- + + Copyright (C) 1998-2000 by Andrew Tridgell This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -85,7 +86,7 @@ if (fd == -1) return 0; if (do_stat(fname, &st) == -1) { - rprintf(FERROR,"stat(%s) : %s\n", fname, strerror(errno)); + rsyserr(FERROR, errno, "stat(%s)", fname); ok = 0; } else if (lp_strict_modes(module)) { if ((st.st_mode & 06) != 0) { @@ -144,13 +145,13 @@ if (!filename) return NULL; if ( (fd=open(filename,O_RDONLY)) == -1) { - rprintf(FERROR,"could not open password file \"%s\"\n",filename); + rsyserr(FERROR, errno, "could not open password file \"%s\"",filename); if (envpw) rprintf(FERROR,"falling back to RSYNC_PASSWORD environment variable.\n"); return NULL; } if (do_stat(filename, &st) == -1) { - rprintf(FERROR,"stat(%s) : %s\n", filename, strerror(errno)); + rsyserr(FERROR, errno, "stat(%s)", filename); ok = 0; } else if ((st.st_mode & 06) != 0) { rprintf(FERROR,"password file must not be other-accessible\n"); @@ -233,12 +234,12 @@ if (sscanf(line,"%99s %29s", user, pass) != 2) { return NULL; } - + users = strdup(users); if (!users) return NULL; for (tok=strtok(users," ,\t"); tok; tok = strtok(NULL," ,\t")) { - if (strcmp(tok, user) == 0) break; + if (fnmatch(tok, user, 0) == 0) break; } free(users); @@ -271,6 +272,9 @@ if (!user || !*user) return; if (!(pass=getpassf(password_file)) && !(pass=getenv("RSYNC_PASSWORD"))) { + /* XXX: cyeoh says that getpass is deprecated, because + it may return a truncated password on some systems, + and it is not in the LSB. */ pass = getpass("Password: "); } diff -u -r --new-file --exclude=CVS rsync-2.4.6/backup.c rsync-2.5.0/backup.c --- rsync-2.4.6/backup.c Sat Aug 19 06:10:39 2000 +++ rsync-2.5.0/backup.c Thu Nov 29 16:21:07 2001 @@ -39,11 +39,11 @@ return 0; } - slprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix); + snprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix); if (do_rename(fname,fnamebak) != 0) { /* cygwin (at least version b19) reports EINVAL */ if (errno != ENOENT && errno != EINVAL) { - rprintf(FERROR,"rename %s %s : %s\n",fname,fnamebak,strerror(errno)); + rsyserr(FERROR, errno, "rename %s to backup %s", fname, fnamebak); return 0; } } else if (verbose > 1) { @@ -92,9 +92,9 @@ while(strncmp(bak_path,"./",2)==0) bak_path += 2; if(bak_path[strlen(bak_path)-1]!='/') { - slprintf(fullpath,sizeof(fullpath),"%s/",bak_path); + snprintf(fullpath,sizeof(fullpath),"%s/",bak_path); } else { - slprintf(fullpath,sizeof(fullpath),"%s",bak_path); + snprintf(fullpath,sizeof(fullpath),"%s",bak_path); } p=fullpath; q=&fullpath[strlen(fullpath)]; /* End of bak_path string */ @@ -208,7 +208,7 @@ return 0; } - slprintf(keep_name, sizeof (keep_name), "%s/%s", backup_dir, fname); + snprintf(keep_name, sizeof (keep_name), "%s/%s", backup_dir, fname); #ifdef HAVE_MKNOD diff -u -r --new-file --exclude=CVS rsync-2.4.6/batch.c rsync-2.5.0/batch.c --- rsync-2.4.6/batch.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/batch.c Tue Aug 14 23:50:46 2001 @@ -0,0 +1,573 @@ +/* -*- c-file-style: "linux" -*- + + Weiss 1/1999 + Batch utilities for rsync. + +*/ + +#include "rsync.h" +#include + +char rsync_flist_file[27] = "rsync_flist."; +char rsync_csums_file[27] = "rsync_csums."; +char rsync_delta_file[27] = "rsync_delta."; +char rsync_argvs_file[27] = "rsync_argvs."; + +char batch_file_ext[15]; + +int fdb; +int fdb_delta; +int fdb_open; +int fdb_close; + +struct file_list *batch_flist; + +void create_batch_file_ext() +{ + struct tm *timeptr; + time_t elapsed_seconds; + + /* Save run date and time to use for batch file extensions */ + time(&elapsed_seconds); + timeptr = localtime(&elapsed_seconds); + + sprintf(batch_file_ext, "%4d%02d%02d%02d%02d%02d", + timeptr->tm_year+1900, timeptr->tm_mon+1, timeptr->tm_mday, + timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec); +} + +void set_batch_file_ext(char *ext) +{ + strcpy(batch_file_ext, ext); +} + +void write_batch_flist_file(char *buff, int bytes_to_write) +{ + + if (fdb_open) { + /* Set up file extension */ + strcat(rsync_flist_file, batch_file_ext); + + /* Open batch flist file for writing; create it if it doesn't exist */ + fdb = do_open(rsync_flist_file, O_WRONLY|O_CREAT|O_TRUNC, + S_IREAD|S_IWRITE); + if (fdb == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", + rsync_flist_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } + fdb_open = 0; + } + + /* Write buffer to batch flist file */ + + if ( write(fdb, buff, bytes_to_write) == -1 ) { + rprintf(FERROR, "Batch file %s write error: %s\n", + rsync_flist_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } + + + if (fdb_close) { + close(fdb); + } +} + +void write_batch_flist_info(int flist_count, struct file_struct **fptr) +{ + int i; + int bytes_to_write; + + /* Write flist info to batch file */ + + bytes_to_write = sizeof(unsigned) + + sizeof(time_t) + + sizeof(OFF_T) + + sizeof(mode_t) + + sizeof(INO_T) + + (2 * sizeof(dev_t)) + + sizeof(uid_t) + + sizeof(gid_t); + + fdb_open = 1; + fdb_close = 0; + + for (i=0; ibasename); + write_char_bufs(fptr[i]->dirname); + write_char_bufs(fptr[i]->basedir); + write_char_bufs(fptr[i]->link); + if (i==flist_count - 1) { + fdb_close = 1; + } + write_char_bufs(fptr[i]->sum); + } + +} + +void write_char_bufs(char *buf) +{ + /* Write the size of the string which will follow */ + + char b[4]; + if (buf != NULL) + SIVAL(b,0,strlen(buf)); + else { + SIVAL(b,0,0); + } + + write_batch_flist_file(b, sizeof(int)); + + /* Write the string if there is one */ + + if (buf != NULL) { + write_batch_flist_file(buf, strlen(buf)); + } +} + +void write_batch_argvs_file(int orig_argc, int argc, char **argv) +{ + int fdb; + int i; + char buff[256]; + + strcat(rsync_argvs_file, batch_file_ext); + + + /* Open batch argvs file for writing; create it if it doesn't exist */ + fdb = do_open(rsync_argvs_file, O_WRONLY|O_CREAT|O_TRUNC, + S_IREAD|S_IWRITE|S_IEXEC); + if (fdb == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", rsync_argvs_file, + strerror(errno)); + close(fdb); + exit_cleanup(1); + } + buff[0] = '\0'; + /* Write argvs info to batch file */ + + for (i=argc - orig_argc;icount=0; + batch_flist->malloced=1000; + batch_flist->files = (struct file_struct **)malloc(sizeof(batch_flist->files[0])* batch_flist->malloced); + if (!batch_flist->files) { + out_of_memory("create_flist_from_batch"); /* dw -- will exit */ + } + + for ( flags=read_batch_flags() ; flags; flags=read_batch_flags() ) { + + int i = batch_flist->count; + + if (i >= batch_flist->malloced) { + if (batch_flist->malloced < 1000) + batch_flist->malloced += 1000; + else + batch_flist->malloced *= 2; + batch_flist->files =(struct file_struct **)realloc(batch_flist->files, + sizeof(batch_flist->files[0])* + batch_flist->malloced); + if (!batch_flist->files) + out_of_memory("create_flist_from_batch"); + } + read_batch_flist_info(&batch_flist->files[i]); + batch_flist->files[i]->flags = flags; + + batch_flist->count++; + } + + return batch_flist; + +} + +int read_batch_flist_file(char *buff, int len) +{ + int bytes_read; + + if (fdb_open) { + + /* Set up file extension */ + strcat(rsync_flist_file, batch_file_ext); + + /* Open batch flist file for reading */ + fdb = do_open(rsync_flist_file, O_RDONLY, 0); + if (fdb == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", rsync_flist_file, + strerror(errno)); + close(fdb); + exit_cleanup(1); + } + fdb_open = 0; + } + + /* Read flist batch file */ + + bytes_read = read(fdb, buff, len); + + if (bytes_read == -1) { + rprintf(FERROR, "Batch file %s read error: %s\n", + rsync_flist_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } + if (bytes_read == 0) { /* EOF */ + close(fdb); + } + return bytes_read; +} + +unsigned char read_batch_flags() +{ + int flags; + + if (read_batch_flist_file((char *)&flags, 4) ) { + return 1; + } + else { + return 0; + } +} + +void read_batch_flist_info(struct file_struct **fptr) +{ + int int_str_len; + char char_str_len[4]; + char buff[256]; + struct file_struct *file; + + file = (struct file_struct *)malloc(sizeof(*file)); + if (!file) out_of_memory("read_batch_flist_info"); + memset((char *)file, 0, sizeof(*file)); + + (*fptr) = file; + + read_batch_flist_file((char *)&file->modtime, sizeof(time_t)); + read_batch_flist_file((char *)&file->length, sizeof(OFF_T)); + read_batch_flist_file((char *)&file->mode, sizeof(mode_t)); + read_batch_flist_file((char *)&file->inode, sizeof(INO_T)); + read_batch_flist_file((char *)&file->dev, sizeof(dev_t)); + read_batch_flist_file((char *)&file->rdev, sizeof(dev_t)); + read_batch_flist_file((char *)&file->uid, sizeof(uid_t)); + read_batch_flist_file((char *)&file->gid, sizeof(gid_t)); + read_batch_flist_file(char_str_len, sizeof(char_str_len)); + int_str_len = IVAL(char_str_len,0); + if (int_str_len > 0) { + read_batch_flist_file(buff, int_str_len); + buff[int_str_len] = '\0'; + file->basename = strdup(buff); + } + else { + file->basename = NULL; + } + + read_batch_flist_file(char_str_len, sizeof(char_str_len)); + int_str_len = IVAL(char_str_len,0); + if (int_str_len > 0) { + read_batch_flist_file(buff, int_str_len); + buff[int_str_len] = '\0'; + file[0].dirname = strdup(buff); + } + else { + file[0].dirname = NULL; + } + + read_batch_flist_file(char_str_len, sizeof(char_str_len)); + int_str_len = IVAL(char_str_len,0); + if (int_str_len > 0) { + read_batch_flist_file(buff, int_str_len); + buff[int_str_len] = '\0'; + file[0].basedir = strdup(buff); + } + else { + file[0].basedir = NULL; + } + + read_batch_flist_file(char_str_len, sizeof(char_str_len)); + int_str_len = IVAL(char_str_len,0); + if (int_str_len > 0) { + read_batch_flist_file(buff, int_str_len); + buff[int_str_len] = '\0'; + file[0].link = strdup(buff); + } + else { + file[0].link = NULL; + } + + read_batch_flist_file(char_str_len, sizeof(char_str_len)); + int_str_len = IVAL(char_str_len,0); + if (int_str_len > 0) { + read_batch_flist_file(buff, int_str_len); + buff[int_str_len] = '\0'; + file[0].sum = strdup(buff); + } + else { + file[0].sum = NULL; + } +} + +void write_batch_csums_file(char *buff, int bytes_to_write) +{ + + static int fdb_open = 1; + + if (fdb_open) { + /* Set up file extension */ + strcat(rsync_csums_file, batch_file_ext); + + /* Open batch csums file for writing; create it if it doesn't exist */ + fdb = do_open(rsync_csums_file, O_WRONLY|O_CREAT|O_TRUNC, + S_IREAD|S_IWRITE); + if (fdb == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", + rsync_csums_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } + fdb_open = 0; + } + + /* Write buffer to batch csums file */ + + if ( write(fdb, buff, bytes_to_write) == -1 ) { + rprintf(FERROR, "Batch file %s write error: %s\n", + rsync_csums_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } +} + +void close_batch_csums_file() +{ + close(fdb); + +} + +void write_batch_csum_info(int *flist_entry, int flist_count, struct sum_struct *s) +{ + int i; + int int_zero = 0; + extern int csum_length; + + fdb_open = 1; + + /* Write csum info to batch file */ + + write_batch_csums_file ( (char *) flist_entry, sizeof(int) ); + write_batch_csums_file ( (char *) (s?&s->count:&int_zero), sizeof(int) ); + if (s) { + for (i=0; i < s->count; i++) { + write_batch_csums_file( (char *) &s->sums[i].sum1, sizeof(uint32)); + if ( (*flist_entry == flist_count - 1) && (i == s->count - 1) ) { + fdb_close = 1; + } + write_batch_csums_file( s->sums[i].sum2, csum_length); + } + } +} + +int read_batch_csums_file(char *buff, int len) +{ + static int fdb_open = 1; + int bytes_read; + + if (fdb_open) { + + /* Set up file extension */ + strcat(rsync_csums_file, batch_file_ext); + + /* Open batch flist file for reading */ + fdb = do_open(rsync_csums_file, O_RDONLY, 0); + if (fdb == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", rsync_csums_file, + strerror(errno)); + close(fdb); + exit_cleanup(1); + } + fdb_open = 0; + } + + /* Read csums batch file */ + + bytes_read = read(fdb, buff, len); + + if (bytes_read == -1) { + rprintf(FERROR, "Batch file %s read error: %s\n", + rsync_csums_file, strerror(errno)); + close(fdb); + exit_cleanup(1); + } + return bytes_read; +} + + +void read_batch_csum_info(int flist_entry, struct sum_struct *s, int *checksums_match) +{ + int i; + int file_flist_entry; + int file_chunk_ct; + uint32 file_sum1; + char file_sum2[SUM_LENGTH]; + extern int csum_length; + + + read_batch_csums_file((char *)&file_flist_entry, sizeof(int)); + if (file_flist_entry != flist_entry) { + rprintf(FINFO,"file_list_entry NE flist_entry\n"); + rprintf(FINFO,"file_flist_entry = %d flist_entry = %d\n", file_flist_entry, flist_entry); + close(fdb); + exit_cleanup(1); + + } + else { + read_batch_csums_file((char *)&file_chunk_ct, sizeof(int)); + *checksums_match = 1; + for (i = 0;i < file_chunk_ct;i++) { + + read_batch_csums_file((char *)&file_sum1, sizeof(uint32)); + read_batch_csums_file(file_sum2, csum_length); + + if ( (s->sums[i].sum1 != file_sum1) || + ( memcmp(s->sums[i].sum2,file_sum2, csum_length)!=0) ) { + *checksums_match = 0; + } + } /* end for */ + } + +} + +void write_batch_delta_file(char *buff, int bytes_to_write) +{ + static int fdb_delta_open = 1; + + if (fdb_delta_open) { + /* Set up file extension */ + strcat(rsync_delta_file, batch_file_ext); + + /* Open batch delta file for writing; create it if it doesn't exist */ + fdb_delta = do_open(rsync_delta_file, O_WRONLY|O_CREAT|O_TRUNC, + S_IREAD|S_IWRITE); + if (fdb_delta == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", + rsync_delta_file, strerror(errno)); + close(fdb_delta); + exit_cleanup(1); + } + fdb_delta_open = 0; + } + + /* Write buffer to batch delta file */ + + if ( write(fdb_delta, buff, bytes_to_write) == -1 ) { + rprintf(FERROR, "Batch file %s write error: %s\n", + rsync_delta_file, strerror(errno)); + close(fdb_delta); + exit_cleanup(1); + } +} +void close_batch_delta_file() +{ + close(fdb_delta); + +} + +int read_batch_delta_file(char *buff, int len) +{ + static int fdb_delta_open = 1; + int bytes_read; + + if (fdb_delta_open) { + + /* Set up file extension */ + strcat(rsync_delta_file, batch_file_ext); + + /* Open batch flist file for reading */ + fdb_delta = do_open(rsync_delta_file, O_RDONLY, 0); + if (fdb_delta == -1) { + rprintf(FERROR, "Batch file %s open error: %s\n", rsync_delta_file, + strerror(errno)); + close(fdb_delta); + exit_cleanup(1); + } + fdb_delta_open = 0; + } + + /* Read delta batch file */ + + bytes_read = read(fdb_delta, buff, len); + + if (bytes_read == -1) { + rprintf(FERROR, "Batch file %s read error: %s\n", + rsync_delta_file, strerror(errno)); + close(fdb_delta); + exit_cleanup(1); + } + return bytes_read; +} + + +void show_flist(int index, struct file_struct **fptr) +{ + /* for debugging show_flist(flist->count, flist->files **/ + + int i; + for (i=0;iflags=%#x\n",fptr[i]->flags); + rprintf(FINFO, "flist->modtime=%#lx\n", + (long unsigned) fptr[i]->modtime); + rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length); + rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode); + rprintf(FINFO, "flist->basename=%s\n",fptr[i]->basename); + if (fptr[i]->dirname) + rprintf(FINFO, "flist->dirname=%s\n",fptr[i]->dirname); + if (fptr[i]->basedir) + rprintf(FINFO, "flist->basedir=%s\n",fptr[i]->basedir); + } +} + +void show_argvs(int argc, char *argv[]) +{ + /* for debugging **/ + + int i; + rprintf(FINFO,"BATCH.C:show_argvs,argc=%d\n",argc); + for (i=0;i code) code = status; + } + } + if (cleanup_got_literal && cleanup_fname && keep_partial) { char *fname = cleanup_fname; cleanup_fname = NULL; @@ -60,6 +73,10 @@ if (pidf && *pidf) { unlink(lp_pid_file()); } + } + + if (code == 0 && (io_error || log_got_error)) { + code = RERR_PARTIAL; } if (code) log_exit(code, file, line); diff -u -r --new-file --exclude=CVS rsync-2.4.6/clientserver.c rsync-2.5.0/clientserver.c --- rsync-2.4.6/clientserver.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/clientserver.c Thu Nov 29 16:21:07 2001 @@ -1,5 +1,7 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux"; -*- + + Copyright (C) 1998-2001 by Andrew Tridgell + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* the socket based protocol for setting up a connection wit rsyncd */ +/* the socket based protocol for setting up a connection with rsyncd */ #include "rsync.h" @@ -27,6 +29,10 @@ char *auth_user; int sanitize_paths = 0; +/* + * Run a client connected to an rsyncd. The alternative to this + * function for remote-shell connections is do_cmd. + */ int start_socket_client(char *host, char *path, int argc, char *argv[]) { int fd, i; @@ -36,15 +42,29 @@ char *p, *user=NULL; extern int remote_version; extern int am_sender; - extern struct in_addr socket_address; - + extern char *shell_cmd; + extern int kludge_around_eof; + extern char *bind_address; + if (argc == 0 && !am_sender) { extern int list_only; list_only = 1; } + /* This is just a friendliness enhancement: if the connection + * is to an rsyncd then there is no point specifying the -e option. + * Note that this is only set if the -e was explicitly specified, + * not if the environment variable just happens to be set. + * See http://lists.samba.org/pipermail/rsync/2000-September/002744.html + */ + if (shell_cmd) { + rprintf(FERROR, "WARNING: --rsh or -e option ignored when " + "connecting to rsync daemon\n"); + /* continue */ + } + if (*path == '/') { - rprintf(FERROR,"ERROR: The remote path must start with a module name\n"); + rprintf(FERROR,"ERROR: The remote path must start with a module name not a /\n"); return -1; } @@ -58,7 +78,8 @@ if (!user) user = getenv("USER"); if (!user) user = getenv("LOGNAME"); - fd = open_socket_out(host, rsync_port, &socket_address); + fd = open_socket_out_wrapped (host, rsync_port, bind_address, + global_opts.af_hint); if (fd == -1) { exit_cleanup(RERR_SOCKETIO); } @@ -87,6 +108,10 @@ io_printf(fd,"%s\n",path); if (p) *p = '/'; + /* Old servers may just drop the connection here, + rather than sending a proper EXIT command. Yuck. */ + kludge_around_eof = remote_version < 25; + while (1) { if (!read_line(fd, line, sizeof(line)-1)) { return -1; @@ -98,8 +123,12 @@ } if (strcmp(line,"@RSYNCD: OK") == 0) break; + + if (strcmp(line,"@RSYNCD: EXIT") == 0) exit(0); + rprintf(FINFO,"%s\n", line); } + kludge_around_eof = False; for (i=0;i 1) verbose = 1; #endif - argc -= optind; - argp = argv + optind; - optind = 0; - if (remote_version < 23) { if (remote_version == 22 || (remote_version > 17 && am_sender)) io_start_multiplex_out(fd); } - + + /* For later protocol versions, we don't start multiplexing + * until we've configured nonblocking in start_server. That + * means we're in a sticky situation now: there's no way to + * convey errors to the client. */ + + /* FIXME: Hold off on reporting option processing errors until + * we've set up nonblocking and multiplexed IO and can get the + * message back to them. */ if (!ret) { - option_error(); + option_error(); + exit_cleanup(RERR_UNSUPPORTED); } if (lp_timeout(i)) { @@ -345,10 +399,14 @@ { int n = lp_numservices(); int i; - + extern int remote_version; + for (i=0;i= 25) + io_printf(fd,"@RSYNCD: EXIT\n"); } /* this is called when a socket connection is established to a client @@ -449,9 +507,13 @@ exit_cleanup(RERR_SYNTAX); } - log_open(); + log_init(); - rprintf(FINFO,"rsyncd version %s starting\n",VERSION); + rprintf(FINFO, "rsyncd version %s starting, listening on port %d\n", + RSYNC_VERSION, + rsync_port); + /* TODO: If listening on a particular address, then show that + * address too. */ if (((pid_file = lp_pid_file()) != NULL) && (*pid_file != '\0')) { char pidbuf[16]; @@ -461,10 +523,10 @@ if ((fd = do_open(lp_pid_file(), O_WRONLY|O_CREAT|O_TRUNC, 0666 & ~orig_umask)) == -1) { cleanup_set_pid(0); - rprintf(FLOG,"failed to create pid file %s\n", pid_file); + rsyserr(FLOG, errno, "failed to create pid file %s", pid_file); exit_cleanup(RERR_FILEIO); } - slprintf(pidbuf, sizeof(pidbuf), "%d\n", pid); + snprintf(pidbuf, sizeof(pidbuf), "%d\n", pid); write(fd, pidbuf, strlen(pidbuf)); close(fd); } diff -u -r --new-file --exclude=CVS rsync-2.4.6/compat.c rsync-2.5.0/compat.c --- rsync-2.4.6/compat.c Mon Nov 8 05:14:59 1999 +++ rsync-2.5.0/compat.c Thu Nov 29 16:21:07 2001 @@ -36,6 +36,9 @@ extern int remote_version; extern int verbose; +extern int read_batch; /* dw */ +extern int write_batch; /* dw */ + void setup_protocol(int f_out,int f_in) { if (remote_version == 0) { @@ -55,12 +58,11 @@ exit_cleanup(RERR_PROTOCOL); } - if (verbose > 2) - rprintf(FINFO, "local_version=%d remote_version=%d\n", - PROTOCOL_VERSION, remote_version); - if (remote_version >= 12) { if (am_server) { + if (read_batch || write_batch) /* dw */ + checksum_seed = 32761; + else checksum_seed = time(NULL); write_int(f_out,checksum_seed); } else { diff -u -r --new-file --exclude=CVS rsync-2.4.6/config.guess rsync-2.5.0/config.guess --- rsync-2.4.6/config.guess Sat Aug 19 06:10:39 2000 +++ rsync-2.5.0/config.guess Thu Nov 29 16:21:07 2001 @@ -1,8 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -# + +timestamp='2001-07-19' + # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -23,51 +25,153 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to . +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. -# Use $HOST_CC if defined. $CC may point to a cross-compiler -if test x"$CC_FOR_BUILD" = x; then - if test x"$HOST_CC" != x; then - CC_FOR_BUILD="$HOST_CC" - else - if test x"$CC" != x; then - CC_FOR_BUILD="$CC" - else - CC_FOR_BUILD=cc - fi - fi +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 fi +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -77,41 +181,52 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac fi rm -f $dummy.s $dummy @@ -127,11 +242,8 @@ echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 + echo m68k-unknown-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -162,10 +274,7 @@ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) @@ -221,15 +330,12 @@ aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor + # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not @@ -253,15 +359,9 @@ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -274,9 +374,6 @@ powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -292,6 +389,7 @@ mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -310,12 +408,16 @@ exit (-1); } EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 + && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -331,7 +433,7 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] @@ -363,9 +465,17 @@ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c @@ -379,7 +489,8 @@ exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then @@ -388,9 +499,9 @@ echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -398,7 +509,7 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -408,7 +519,7 @@ ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -424,11 +535,31 @@ echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include @@ -459,12 +590,18 @@ exit (0); } EOF + eval $set_cc_for_build (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include @@ -491,7 +628,8 @@ exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; @@ -501,7 +639,7 @@ 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - *9??*:MPE/iX:*:*) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) @@ -510,7 +648,7 @@ hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -545,37 +683,39 @@ echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; - F300:UNIX_System_V:*:*) + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -585,17 +725,8 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - if test -x /usr/bin/objformat; then - if test "elf" = "`/usr/bin/objformat`"; then - echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 - fi - fi echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; @@ -605,6 +736,9 @@ i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -623,172 +757,98 @@ *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; - *:Linux:*:*) - + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev67 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_help_string=`cd /; ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - *ia64) - echo "${UNAME_MACHINE}-unknown-linux" - exit 0 + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - i?86linux) + a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - i?86coff) + exit 0 ;; + coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - sparclinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - armlinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - elf32arm*) - echo "${UNAME_MACHINE}-unknown-linux-gnu" - exit 0 - ;; - armelf_linux*) - echo "${UNAME_MACHINE}-unknown-linux-gnu" - exit 0 - ;; - m68klinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - elf32ppc) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unkown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} - exit 0 - ;; + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c <$dummy.c < #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -796,28 +856,31 @@ #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + printf ("%s-pc-linux-gnu\n", argv[1]); # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) + i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, @@ -825,7 +888,7 @@ # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -833,16 +896,15 @@ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:5:7*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; - i?86:*:3.2:*) + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; @@ -943,7 +1012,7 @@ mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - news*:NEWS-OS:*:6*) + news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) @@ -974,12 +1043,64 @@ *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; *:QNX:*:4*) - echo i386-qnx-qnx${UNAME_VERSION} + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its exit 0 ;; - *:"Mac OS":*:*) - echo `uname -p`-apple-macos${UNAME_RELEASE} - exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1071,11 +1192,24 @@ #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -1086,7 +1220,8 @@ } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +eval $set_cc_for_build +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -1119,6 +1254,48 @@ esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -u -r --new-file --exclude=CVS rsync-2.4.6/config.h.in rsync-2.5.0/config.h.in --- rsync-2.4.6/config.h.in Fri Jul 28 22:05:08 2000 +++ rsync-2.5.0/config.h.in Thu Nov 29 16:21:07 2001 @@ -1,241 +1,344 @@ /* config.h.in. Generated automatically from configure.in by autoheader. */ +#undef ino_t +#undef HAVE_CONNECT +#undef HAVE_SHORT_INO_T +#undef HAVE_GETOPT_LONG +#undef REPLACE_INET_NTOA +#undef REPLACE_INET_ATON +#undef HAVE_GETTIMEOFDAY_TZ +#undef ENABLE_IPV6 +#undef HAVE_SOCKADDR_LEN +#undef HAVE_SOCKETPAIR + +/* Define to turn on debugging code that may slow normal operation */ +#undef DEBUG -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ #undef GETGROUPS_T -/* Define to `int' if doesn't define. */ -#undef gid_t +/* Define if you have the header file. */ +#undef HAVE_ALLOCA_H -/* Define if your system has a working fnmatch function. */ -#undef HAVE_FNMATCH +/* Define if you have the header file. */ +#undef HAVE_ARPA_INET_H -/* Define if your struct stat has st_rdev. */ -#undef HAVE_ST_RDEV +/* Define if you have the header file. */ +#undef HAVE_ARPA_NAMESER_H -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H +/* Define if you have the `asprintf' function. */ +#undef HAVE_ASPRINTF -/* Define if utime(file, NULL) sets file's timestamp to the present. */ -#undef HAVE_UTIME_NULL +/* */ +#undef HAVE_BROKEN_READDIR -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline +/* */ +#undef HAVE_C99_VSNPRINTF -/* Define to `int' if doesn't define. */ -#undef mode_t +/* Define if you have the `chmod' function. */ +#undef HAVE_CHMOD -/* Define to `long' if doesn't define. */ -#undef off_t +/* Define if you have the `chown' function. */ +#undef HAVE_CHOWN -/* Define to `int' if doesn't define. */ -#undef pid_t +/* Define if you have the header file. */ +#undef HAVE_COMPAT_H -/* Define as the return type of signal handlers (int or void). */ -#undef RETSIGTYPE +/* */ +#undef HAVE_CONNECT -/* Define to `unsigned' if doesn't define. */ -#undef size_t +/* Define if you have the header file. */ +#undef HAVE_CTYPE_H -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS +/* Define if you have the header file, and it defines `DIR'. */ +#undef HAVE_DIRENT_H -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME +/* */ +#undef HAVE_ERRNO_DECL -/* Define to `int' if doesn't define. */ -#undef uid_t +/* Define if you have the `fchmod' function. */ +#undef HAVE_FCHMOD -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H -#undef HAVE_BROKEN_READDIR -#undef HAVE_ERRNO_DECL -#undef HAVE_LONGLONG -#undef HAVE_OFF64_T -#undef HAVE_REMSH -#undef HAVE_UNSIGNED_CHAR -#undef HAVE_UTIMBUF -#undef ino_t -#undef HAVE_CONNECT -#undef HAVE_SHORT_INO_T -#undef HAVE_GETOPT_LONG -#undef REPLACE_INET_NTOA -#undef REPLACE_INET_ATON +/* */ +#undef HAVE_FNMATCH + +/* Define if you have the `fstat' function. */ +#undef HAVE_FSTAT + +/* Define if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* */ #undef HAVE_GETTIMEOFDAY_TZ -#undef HAVE_SOCKETPAIR -/* The number of bytes in a int. */ -#undef SIZEOF_INT +/* Define if you have the `glob' function. */ +#undef HAVE_GLOB -/* The number of bytes in a long. */ -#undef SIZEOF_LONG +/* Define if you have the header file. */ +#undef HAVE_GLOB_H -/* The number of bytes in a short. */ -#undef SIZEOF_SHORT +/* Define if you have the header file. */ +#undef HAVE_GRP_H -/* Define if you have the chmod function. */ -#undef HAVE_CHMOD +/* Define if you have the header file. */ +#undef HAVE_INTTYPES_H -/* Define if you have the chown function. */ -#undef HAVE_CHOWN +/* Define if you have the `lchown' function. */ +#undef HAVE_LCHOWN -/* Define if you have the connect function. */ -#undef HAVE_CONNECT +/* Define if you have the `inet' library (-linet). */ +#undef HAVE_LIBINET -/* Define if you have the fchmod function. */ -#undef HAVE_FCHMOD +/* Define if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL -/* Define if you have the fstat function. */ -#undef HAVE_FSTAT +/* Define if you have the `nsl_s' library (-lnsl_s). */ +#undef HAVE_LIBNSL_S -/* Define if you have the getcwd function. */ -#undef HAVE_GETCWD +/* Define if you have the `popt' library (-lpopt). */ +#undef HAVE_LIBPOPT -/* Define if you have the glob function. */ -#undef HAVE_GLOB +/* Define if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV -/* Define if you have the lchown function. */ -#undef HAVE_LCHOWN +/* Define if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET -/* Define if you have the link function. */ +/* Define if you have the `link' function. */ #undef HAVE_LINK -/* Define if you have the memmove function. */ +/* */ +#undef HAVE_LONGLONG + +/* Define if you have the header file. */ +#undef HAVE_MCHECK_H + +/* Define if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the mknod function. */ -#undef HAVE_MKNOD +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H -/* Define if you have the readlink function. */ -#undef HAVE_READLINK +/* Define if you have the `mknod' function. */ +#undef HAVE_MKNOD -/* Define if you have the setsid function. */ -#undef HAVE_SETSID +/* Define if you have the `mtrace' function. */ +#undef HAVE_MTRACE -/* Define if you have the snprintf function. */ -#undef HAVE_SNPRINTF +/* Define if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H -/* Define if you have the strcasecmp function. */ -#undef HAVE_STRCASECMP +/* Define if you have the header file. */ +#undef HAVE_NETDB_H -/* Define if you have the strchr function. */ -#undef HAVE_STRCHR +/* */ +#undef HAVE_OFF64_T -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP +/* Define if you have the `readlink' function. */ +#undef HAVE_READLINK -/* Define if you have the strerror function. */ -#undef HAVE_STRERROR +/* */ +#undef HAVE_REMSH -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME +/* */ +#undef HAVE_SECURE_MKSTEMP -/* Define if you have the strlcat function. */ -#undef HAVE_STRLCAT +/* Define if you have the `setsid' function. */ +#undef HAVE_SETSID -/* Define if you have the strlcpy function. */ -#undef HAVE_STRLCPY +/* */ +#undef HAVE_SHORT_INO_T -/* Define if you have the strpbrk function. */ -#undef HAVE_STRPBRK +/* Define if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF -/* Define if you have the utime function. */ -#undef HAVE_UTIME +/* */ +#undef HAVE_SOCKETPAIR -/* Define if you have the utimes function. */ -#undef HAVE_UTIMES +/* Define if you have the header file. */ +#undef HAVE_STDINT_H -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H -/* Define if you have the wait4 function. */ -#undef HAVE_WAIT4 +/* Define if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP -/* Define if you have the waitpid function. */ -#undef HAVE_WAITPID +/* Define if you have the `strchr' function. */ +#undef HAVE_STRCHR -/* Define if you have the header file. */ -#undef HAVE_COMPAT_H +/* Define if you have the `strdup' function. */ +#undef HAVE_STRDUP -/* Define if you have the header file. */ -#undef HAVE_CTYPE_H +/* Define if you have the `strerror' function. */ +#undef HAVE_STRERROR -/* Define if you have the header file. */ -#undef HAVE_DIRENT_H +/* Define if you have the `strftime' function. */ +#undef HAVE_STRFTIME -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H -/* Define if you have the header file. */ -#undef HAVE_GLOB_H +/* Define if you have the header file. */ +#undef HAVE_STRING_H -/* Define if you have the header file. */ -#undef HAVE_GRP_H +/* Define if you have the `strlcat' function. */ +#undef HAVE_STRLCAT -/* Define if you have the header file. */ -#undef HAVE_NDIR_H +/* Define if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H +/* Define if you have the `strpbrk' function. */ +#undef HAVE_STRPBRK -/* Define if you have the header file. */ -#undef HAVE_STRING_H +/* Define if `st_rdev' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV -/* Define if you have the header file. */ +/* Define if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_FCNTL_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_FILIO_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_MODE_H -/* Define if you have the header file. */ +/* Define if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SELECT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + +/* Define if you have the header file. */ #undef HAVE_SYS_TIME_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the header file. */ #undef HAVE_SYS_UNISTD_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the header file. */ +/* */ +#undef HAVE_UNSIGNED_CHAR + +/* */ +#undef HAVE_UTIMBUF + +/* Define if you have the `utime' function. */ +#undef HAVE_UTIME + +/* Define if you have the `utimes' function. */ +#undef HAVE_UTIMES + +/* Define if you have the header file. */ #undef HAVE_UTIME_H -/* Define if you have the inet library (-linet). */ -#undef HAVE_LIBINET +/* Define if `utime(file, NULL)' sets file's timestamp to the present. */ +#undef HAVE_UTIME_NULL -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* Define if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF -/* Define if you have the nsl_s library (-lnsl_s). */ -#undef HAVE_LIBNSL_S +/* Define if you have the `wait4' function. */ +#undef HAVE_WAIT4 -/* Define if you have the resolv library (-lresolv). */ -#undef HAVE_LIBRESOLV +/* Define if you have the `waitpid' function. */ +#undef HAVE_WAITPID -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* true if you have IPv6 */ +#undef INET6 + +/* */ +#undef REPLACE_INET_ATON + +/* */ +#undef REPLACE_INET_NTOA + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* */ +#undef RSYNC_PATH + +/* rsync release version */ +#undef RSYNC_VERSION + +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of a `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if your processor stores words with the most significant byte first + (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline + +/* Define to `unsigned' if does not define. */ +#undef ino_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned' if does not 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. */ +#undef uid_t diff -u -r --new-file --exclude=CVS rsync-2.4.6/config.sub rsync-2.5.0/config.sub --- rsync-2.4.6/config.sub Mon Mar 15 13:23:11 1999 +++ rsync-2.5.0/config.sub Thu Nov 29 16:21:07 2001 @@ -1,6 +1,10 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-06-08' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,8 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +51,73 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -94,15 +143,33 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; -sco5) - os=sco3.2v5 + os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) @@ -121,6 +188,9 @@ os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -143,26 +213,50 @@ -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ + | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500 | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -171,27 +265,52 @@ exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ + | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ + | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -207,20 +326,24 @@ os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; amigaos | amigados) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; aux) basic_machine=m68k-apple os=-aux @@ -257,13 +380,16 @@ basic_machine=cray2-cray os=-unicos ;; - [ctj]90-cray) - basic_machine=c90-cray + [cjt]90) + basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -297,6 +423,10 @@ encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -307,6 +437,10 @@ basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -315,6 +449,14 @@ basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -330,13 +472,30 @@ basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) @@ -345,27 +504,42 @@ hppa-next) os=-nextstep3 ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[34567]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[34567]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[34567]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -391,9 +565,17 @@ basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu @@ -408,10 +590,34 @@ mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -424,6 +630,10 @@ basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -449,9 +659,32 @@ basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -469,28 +702,28 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | nexen) + pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; - pentiumpro | p6 | k6 | 6x86) + pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) - basic_machine=i786-pc + basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | nexen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; - power) basic_machine=rs6000-ibm + power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; @@ -505,12 +738,24 @@ ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; sequent) basic_machine=i386-sequent ;; @@ -518,6 +763,10 @@ basic_machine=sh-hitachi os=-hms ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -525,6 +774,13 @@ spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -565,10 +821,22 @@ sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -586,6 +854,10 @@ basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -609,6 +881,18 @@ basic_machine=a29k-wrs os=-vxworks ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -616,6 +900,10 @@ xps | xps100) basic_machine=xps100-honeywell ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -623,6 +911,15 @@ # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown @@ -639,13 +936,20 @@ vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -657,6 +961,19 @@ orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -710,14 +1027,36 @@ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ - | -openstep*) + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -727,6 +1066,12 @@ -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -742,12 +1087,18 @@ -acis*) os=-aos ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; + -nsk*) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -773,9 +1124,18 @@ # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; -none) ;; *) @@ -801,9 +1161,15 @@ *-acorn) os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; @@ -822,6 +1188,15 @@ # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -834,6 +1209,15 @@ *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -894,9 +1278,21 @@ *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -918,9 +1314,15 @@ -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -936,7 +1338,7 @@ -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -948,9 +1350,26 @@ -aux*) vendor=apple ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff -u -r --new-file --exclude=CVS rsync-2.4.6/configure rsync-2.5.0/configure --- rsync-2.4.6/configure Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/configure Thu Nov 29 16:31:21 2001 @@ -1,26 +1,155 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by Autoconf 2.52. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Defaults: -ac_help= +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +ac_unique_file="byteorder.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -29,10 +158,15 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -46,17 +180,16 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -64,59 +197,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -125,95 +258,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # 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 << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -222,12 +307,12 @@ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. @@ -248,26 +333,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -284,7 +369,7 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -294,7 +379,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -305,58 +390,57 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -367,98 +451,98 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=byteorder.h +test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -469,13 +553,314 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +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 < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +EOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue + cd $ac_subdir + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + echo + $SHELL $ac_sub_srcdir/configure.gnu --help=recursive + elif test -f $ac_sub_srcdir/configure; then + echo + $SHELL $ac_sub_srcdir/configure --help=recursive + elif test -f $ac_sub_srcdir/configure.ac || + test -f $ac_sub_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\EOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +EOF + exit 0 +fi +exec 5>config.log +cat >&5 </dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + echo >&5 + echo "## ----------------- ##" >&5 + echo "## Cache variables. ##" >&5 + echo "## ----------------- ##" >&5 + echo >&5 + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} >&5 + sed "/^$/d" confdefs.h >conftest.log + if test -s conftest.log; then + echo >&5 + echo "## ------------ ##" >&5 + echo "## confdefs.h. ##" >&5 + echo "## ------------ ##" >&5 + echo >&5 + cat conftest.log >&5 + fi + (echo; echo) >&5 + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" >&5 + echo "$as_me: exit $exit_status" >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -486,45 +871,119 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:874: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:885: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:893: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:909: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:913: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:919: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:921: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:923: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. It doesn't matter if + # we pass some twice (in addition to the command line arguments). + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" + ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:942: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:944: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:964: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:967: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' +else + ac_path_separator=: +fi +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh + +ac_config_headers="$ac_config_headers config.h" +RSYNC_VERSION=2.5.0 +{ echo "$as_me:980: Configuring rsync $RSYNC_VERSION" >&5 +echo "$as_me: Configuring rsync $RSYNC_VERSION" >&6;} +cat >>confdefs.h <&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + { { echo "$as_me:1006: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:1016: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:1020: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:1029: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_build_alias failed." >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1038: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1045: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:1054: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1059: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1066: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:1075: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1080: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # The aliases save the names the user supplied, while $host etc. # will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:578: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:599: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:617: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && +test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:1102: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:1117: found $ac_dir/$ac_word" >&5 +break +done - - echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:642: checking config.cache system type" >&5 - if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - echo "$ac_t""different" 1>&6 - { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; } - else - echo "$ac_t""same" 1>&6 - fi - ac_cv_host_system_type="$host" - ac_cv_build_system_type="$build" - ac_cv_target_system_type="$target" - - -# look for getconf early as this affects just about everything -# Extract the first word of "getconf", so it can be a program name with args. -set dummy getconf; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:663: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_HAVE_GETCONF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$HAVE_GETCONF"; then - ac_cv_prog_HAVE_GETCONF="$HAVE_GETCONF" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_HAVE_GETCONF="1" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_HAVE_GETCONF" && ac_cv_prog_HAVE_GETCONF="0" fi fi -HAVE_GETCONF="$ac_cv_prog_HAVE_GETCONF" -if test -n "$HAVE_GETCONF"; then - echo "$ac_t""$HAVE_GETCONF" 1>&6 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1125: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1128: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -if test $HAVE_GETCONF = 1; then - CFLAGS=$CFLAGS" "`getconf LFS_CFLAGS` - LDFLAGS=$LDFLAGS" "`getconf LFS_LDFLAGS` fi - -# Extract the first word of "gcc", so it can be a program name with args. +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:698: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1137: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:1152: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1160: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1163: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:1176: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1191: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1199: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1202: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1211: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1226: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1234: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1237: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC else - echo "$ac_t""no" 1>&6 + CC="$ac_cv_prog_CC" fi +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:728: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1250: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1270: found $ac_dir/$ac_word" >&5 +break +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" + set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1292: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1295: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:779: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1306: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1321: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1329: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1332: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + + test -n "$CC" && break + done fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1345: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1360: found $ac_dir/$ac_word" >&5 +break +done -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1368: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1371: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi -cat > conftest.$ac_ext << EOF +test -z "$CC" && { { echo "$as_me:1383: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:1388:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:1391: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:1394: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1396: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:1399: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1401: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:1404: \$? = $ac_status" >&5 + (exit $ac_status); } -#line 822 "configure" +cat >conftest.$ac_ext <<_ACEOF +#line 1408 "configure" #include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:1424: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1427: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1430: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. +for ac_file in `ls a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1453: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1459: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1464: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1470: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1473: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1480: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:1488: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1495: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1497: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:1500: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1502: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1505: \$? = $ac_status" >&5 + (exit $ac_status); }; 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'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:1521: error: cannot compute EXEEXT: cannot compile and link" >&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:853: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:858: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes +rm -f conftest$ac_cv_exeext +echo "$as_me:1527: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1533: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_gcc=no -fi -fi + cat >conftest.$ac_ext <<_ACEOF +#line 1539 "configure" +#include "confdefs.h" -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +int +main () +{ -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1551: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1554: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - GCC= -fi + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1566: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1573: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1577: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1583 "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:886: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1601: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1604: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1607: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1619: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1625: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line 1631 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1643: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1646: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1649: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1652: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +echo "$as_me:1662: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -912,6 +1676,316 @@ CFLAGS= fi fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1692: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1695: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1698: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1710 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1723: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1726: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1729: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1732: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1742 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1754: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1757: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1760: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1763: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:1795: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 1816 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:1821: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1827: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1850 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1854: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1860: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:1897: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 1907 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:1912: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1918: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1941 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1945: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1951: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:1979: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -920,31 +1994,39 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:929: checking for a BSD compatible install" >&5 +echo "$as_me:2002: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -954,771 +2036,2446 @@ ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:2051: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +echo "$as_me:2062: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line 2070 "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2119: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2122: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2125: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2128: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:2145: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:2148: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +if test "$xac_cv_prog_cc_stdc" = xno +then + { echo "$as_me:2155: WARNING: rsync requires an ANSI C compiler and you don't seem to have one" >&5 +echo "$as_me: WARNING: rsync requires an ANSI C compiler and you don't seem to have one" >&2;} +fi + +# compile with optimisation and without debugging by default, unless +# --debug is given. We must decide this before testing the compiler. + +echo "$as_me:2162: checking whether to include debugging symbols" >&5 +echo $ECHO_N "checking whether to include debugging symbols... $ECHO_C" >&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + +fi; + +if test x"$enable_debug" = x"no" +then + echo "$as_me:2172: result: no" >&5 +echo "${ECHO_T}no" >&6 + CFLAGS=${CFLAGS-"-O"} +else + echo "$as_me:2176: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + # leave CFLAGS alone; AC_PROG_CC will try to include -g if it can + +cat >>confdefs.h <<\EOF +#define DEBUG 1 +EOF + + fi + +CFLAGS="$CFLAGS -DHAVE_CONFIG_H" + +# Check whether --with-included-popt or --without-included-popt was given. +if test "${with_included_popt+set}" = set; then + withval="$with_included_popt" +fi; + +# Check whether --with-rsync-path or --without-rsync-path was given. +if test "${with_rsync_path+set}" = set; then + withval="$with_rsync_path" + RSYNC_PATH="$with_rsync_path" +else + RSYNC_PATH="rsync" +fi; +cat >>confdefs.h <&6 -echo "configure:987: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_HAVE_REMSH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2208: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_HAVE_REMSH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$HAVE_REMSH"; then ac_cv_prog_HAVE_REMSH="$HAVE_REMSH" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_HAVE_REMSH="1" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_HAVE_REMSH="1" +echo "$as_me:2223: found $ac_dir/$ac_word" >&5 +break +done + test -z "$ac_cv_prog_HAVE_REMSH" && ac_cv_prog_HAVE_REMSH="0" fi fi -HAVE_REMSH="$ac_cv_prog_HAVE_REMSH" +HAVE_REMSH=$ac_cv_prog_HAVE_REMSH if test -n "$HAVE_REMSH"; then - echo "$ac_t""$HAVE_REMSH" 1>&6 + echo "$as_me:2232: result: $HAVE_REMSH" >&5 +echo "${ECHO_T}$HAVE_REMSH" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2235: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -cat >> confdefs.h <>confdefs.h <&5 +echo $ECHO_N "checking for broken largefile support... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_BROKEN_LARGEFILE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1020: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "$cross_compiling" = yes; then + rsync_cv_HAVE_BROKEN_LARGEFILE=cross else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2255 "configure" #include "confdefs.h" + +#define _FILE_OFFSET_BITS 64 +#include +#include #include -#include -int main() { +#include -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:1038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2290: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2292: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2295: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rsync_cv_HAVE_BROKEN_LARGEFILE=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_BROKEN_LARGEFILE=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:2307: result: $rsync_cv_HAVE_BROKEN_LARGEFILE" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_BROKEN_LARGEFILE" >&6 +if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then + # Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:2317: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 >conftest.$ac_ext <<_ACEOF +#line 2329 "configure" #include "confdefs.h" #include -#include -int main() { + /* 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 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:1053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2349: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2352: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2355: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2358: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2368: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2371: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2374: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2377: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + echo "$as_me:2397: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +#line 2405 "configure" #include "confdefs.h" -main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 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 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; } -EOF -if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2425: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2428: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2431: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2434: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 2443 "configure" +#include "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 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2464: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2467: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2470: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2473: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done fi +echo "$as_me:2484: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 +cat >>confdefs.h <&6 -echo "configure:1114: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest* + echo "$as_me:2494: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2502 "configure" #include "confdefs.h" #include -#include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi + /* 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 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2525: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2528: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2531: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 2540 "configure" +#include "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 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2561: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2564: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2567: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2570: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:2581: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + +cat >>confdefs.h <&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6 + for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do + case $i in + inria) + # http://www.kame.net/ + +cat >conftest.$ac_ext <<_ACEOF +#line 2615 "configure" +#include "confdefs.h" + +#include +#ifdef IPV6_INRIA_VERSION +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + +cat >>confdefs.h <<\EOF +#define INET6 1 EOF - ac_header_dirent=$ac_hdr; break -else - echo "$ac_t""no" 1>&6 + fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1152: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest* + + ;; + kame) + # http://www.kame.net/ + cat >conftest.$ac_ext <<_ACEOF +#line 2638 "configure" +#include "confdefs.h" + +#include +#ifdef __KAME__ +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + +fi +rm -f conftest* + + ;; + linux-glibc) + # http://www.v6.linux.or.jp/ + cat >conftest.$ac_ext <<_ACEOF +#line 2661 "configure" +#include "confdefs.h" + +#include +#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + +fi +rm -f conftest* + + ;; + linux-inet6) + # http://www.v6.linux.or.jp/ + if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then + ipv6type=$i + ipv6lib=inet6 + ipv6libdir=/usr/inet6/lib + ipv6trylibc=yes; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + + CFLAGS="-I/usr/inet6/include $CFLAGS" + fi + ;; + toshiba) + cat >conftest.$ac_ext <<_ACEOF +#line 2698 "configure" +#include "confdefs.h" + +#include +#ifdef _TOSHIBA_INET6 +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + +fi +rm -f conftest* + + ;; + v6d) + cat >conftest.$ac_ext <<_ACEOF +#line 2722 "configure" +#include "confdefs.h" + +#include +#ifdef __V6D__ +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=v6; + ipv6libdir=/usr/local/v6/lib; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + +fi +rm -f conftest* + + ;; + zeta) + cat >conftest.$ac_ext <<_ACEOF +#line 2746 "configure" +#include "confdefs.h" + +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + +cat >>confdefs.h <<\EOF +#define INET6 1 +EOF + +fi +rm -f conftest* + + ;; + esac + if test "$ipv6type" != "unknown"; then + break + fi + done + echo "$as_me:2773: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6 + + echo "$as_me:2776: checking for library containing getaddrinfo" >&5 +echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_search_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2784 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:2803: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2806: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:2809: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2812: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getaddrinfo="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_getaddrinfo" = no; then + for ac_lib in inet6; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line 2824 "configure" +#include "confdefs.h" -int main() { -opendir() -; return 0; } -EOF -if { (eval echo configure:1171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +int +main () +{ +getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:2843: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2846: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:2849: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2852: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_getaddrinfo="-l$ac_lib" +break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:2865: result: $ac_cv_search_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6 +if test "$ac_cv_search_getaddrinfo" != no; then + test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 + fi +echo "$as_me:2874: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1193: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line 2882 "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2899: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2902: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2905: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2908: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +#line 2912 "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2929: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2932: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2935: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2938: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { { echo "$as_me:2954: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 2959 "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2975: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2978: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2980: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2983: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=yes +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:2996: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +if test $ac_cv_c_bigendian = yes; then -int main() { -opendir() -; return 0; } +cat >>confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 EOF -if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:3009: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + cat >conftest.$ac_ext <<_ACEOF +#line 3015 "configure" +#include "confdefs.h" +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3030: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3033: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3036: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3039: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:3049: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 +if test "${ac_cv_lib_dir_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldir $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 3070 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3089: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3092: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3095: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3098: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dir_opendir=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dir_opendir=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:3109: result: $ac_cv_lib_dir_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 +if test $ac_cv_lib_dir_opendir = yes; then + LIBS="$LIBS -ldir" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" + +else + echo "$as_me:3116: checking for opendir in -lx" >&5 +echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 +if test "${ac_cv_lib_x_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lx $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 3124 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3143: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3146: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3149: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3152: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_x_opendir=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_x_opendir=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:3163: result: $ac_cv_lib_x_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 +if test $ac_cv_lib_x_opendir = yes; then + LIBS="$LIBS -lx" fi fi -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1235: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3171: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3177 "configure" #include "confdefs.h" #include #include #include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3193: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3196: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3199: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3202: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_time=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 +echo "$as_me:3212: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1270: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3222: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3228 "configure" #include "confdefs.h" #include #include #ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3250: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3253: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3256: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3259: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_sys_wait_h=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +echo "$as_me:3269: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_SYS_WAIT_H 1 EOF fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1312: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= +for ac_header in sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h unistd.h utime.h grp.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3282: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3288 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3292: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3298: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3317: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + +fi +done + +for ac_header in compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3330: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3336 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3340: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3346: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3365: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + +fi +done + +for ac_header in sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3378: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3384 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3388: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3394: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3413: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + +fi +done + +for ac_header in glob.h alloca.h mcheck.h sys/sysctl.h arpa/inet.h arpa/nameser.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3426: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3432 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3436: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3442: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + eval "$as_ac_Header=no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -rm -f conftest* +echo "$as_me:3461: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3480 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3484: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3490: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - CPP="$ac_cv_prog_CPP" +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" else - ac_cv_prog_CPP="$CPP" + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext fi -echo "$ac_t""$CPP" 1>&6 +echo "$as_me:3509: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 -echo "configure:1395: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +done + +echo "$as_me:3519: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3525 "configure" #include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +#include +#include +#include +#include + +_ACEOF +if { (eval echo "$as_me:3533: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3539: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 3561 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 3579 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_stdc=no fi rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done -for ac_hdr in compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1435: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3600 "configure" #include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3626: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3629: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3631: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3634: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_stdc=no fi -rm -f conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 fi -done +fi +echo "$as_me:3647: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then -for ac_hdr in sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1475: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < +cat >>confdefs.h <<\EOF +#define STDC_HEADERS 1 EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3669 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3675: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3678: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3681: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3684: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:3694: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 + fi done -for ac_hdr in glob.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1515: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3704: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3710 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3725: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3728: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3731: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3734: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:3744: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:3747: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + if test "$ac_cv_type_int" = yes; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 3756 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3768: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3771: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3774: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3777: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 3782 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3794: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3797: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3800: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3803: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 3819 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3831: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3834: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3837: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3840: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext + done fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 3856 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3868: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3871: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3874: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3877: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` fi +rm -f conftest.$ac_objext conftest.$ac_ext done - - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1553: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_cv_sizeof_int=$ac_lo else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() + { { echo "$as_me:3890: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 3895 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (int))); +fclose (f); + ; + return 0; } -EOF -if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3911: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3914: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3916: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3919: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* ac_cv_sizeof_int=0 fi -rm -fr conftest* fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <&6 -echo "configure:1592: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3941: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3947 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3962: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3965: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3968: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3971: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_long=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:3981: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:3984: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_long" = yes; then if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 3993 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4005: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4008: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4011: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4014: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 4019 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4031: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4034: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4037: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4040: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 4056 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); +int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4068: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4071: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4074: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4077: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 4093 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4105: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4108: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4111: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4114: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_long=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:4127: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 4132 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (long))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:4148: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4151: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:4153: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4156: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <&6 -echo "configure:1631: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4178: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4184 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((short *) 0) + return 0; +if (sizeof (short)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4199: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4202: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4205: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4208: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_short=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4218: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 + +echo "$as_me:4221: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_short" = yes; then if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 4230 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4242: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4245: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4248: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4251: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 4256 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4268: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4271: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4274: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4277: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 4293 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); +int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4308: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4311: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4314: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 4330 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4342: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4345: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4348: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4351: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_short=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:4364: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 4369 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (short))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:4385: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4388: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:4390: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4393: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +cat >>confdefs.h <&6 -echo "configure:1671: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4415: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4423 "configure" #include "confdefs.h" +#ifndef __cplusplus +static $ac_kw int static_foo () {return 0; } +$ac_kw int foo () {return 0; } +#endif -int main() { -} $ac_kw foo() { -; return 0; } -EOF -if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4432: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4435: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4438: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4441: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext done fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in +echo "$as_me:4452: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline + no) +cat >>confdefs.h <<\EOF +#define inline EOF ;; - *) cat >> confdefs.h <>confdefs.h <&6 -echo "configure:1712: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4467: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4473 "configure" #include "confdefs.h" #include #include #ifdef signal -#undef signal +# undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); @@ -1726,316 +4483,302 @@ void (*signal ()) (); #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:1734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1753: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1787: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4495: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4498: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4501: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4504: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_signal=void +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int fi +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:4514: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 +cat >>confdefs.h <&6 -echo "configure:1891: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4521: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4527 "configure" #include "confdefs.h" #include -#if STDC_HEADERS -#include -#include -#endif -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes + egrep "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes else - rm -rf conftest* - ac_cv_type_mode_t=no + ac_cv_type_uid_t=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF -#define mode_t int +echo "$as_me:4541: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +if test $ac_cv_type_uid_t = no; then + +cat >>confdefs.h <<\EOF +#define uid_t int +EOF + +cat >>confdefs.h <<\EOF +#define gid_t int EOF fi -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1924: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4555: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +if test "${ac_cv_type_mode_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4561 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((mode_t *) 0) + return 0; +if (sizeof (mode_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4576: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4579: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4582: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4585: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_mode_t=yes else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_mode_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4595: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +if test $ac_cv_type_mode_t = yes; then + : +else + +cat >>confdefs.h <&5 | - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* + +fi + +echo "$as_me:4607: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4613 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4631: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4634: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4637: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_off_t=yes else - rm -rf conftest* - ac_cv_type_off_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_off_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4647: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else -fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <&6 -echo "configure:1957: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +echo "$as_me:4659: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4665 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4680: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4683: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4686: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4689: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4699: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <&6 -echo "configure:1990: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +echo "$as_me:4711: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4717 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4732: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4735: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4738: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4741: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_pid_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4751: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <&6 -echo "configure:2023: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4763: checking type of array argument to getgroups" >&5 +echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 +if test "${ac_cv_type_getgroups+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_type_getgroups=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4772 "configure" #include "confdefs.h" - /* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() + +int +main () { gid_t gidset[NGID]; int i, n; @@ -2050,142 +4793,315 @@ happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); } - -EOF -if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:4798: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4801: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:4803: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4806: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_getgroups=gid_t else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_getgroups=int fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4819 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_type_getgroups=gid_t else - rm -rf conftest* ac_cv_type_getgroups=int fi rm -f conftest* fi fi +echo "$as_me:4834: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6 -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <>confdefs.h <&5 +echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4847 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_rdev) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4861: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4864: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4867: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4870: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_rdev=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_stat_st_rdev=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4880: result: $ac_cv_member_struct_stat_st_rdev" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6 +if test $ac_cv_member_struct_stat_st_rdev = yes; then + +cat >>confdefs.h <&6 -echo "configure:2094: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4890: checking for ino_t" >&5 +echo $ECHO_N "checking for ino_t... $ECHO_C" >&6 +if test "${ac_cv_type_ino_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4896 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((ino_t *) 0) + return 0; +if (sizeof (ino_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4911: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4914: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4917: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4920: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ino_t=yes else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_rdev; -; return 0; } -EOF -if { (eval echo configure:2107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_ino_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4930: result: $ac_cv_type_ino_t" >&5 +echo "${ECHO_T}$ac_cv_type_ino_t" >&6 +if test $ac_cv_type_ino_t = yes; then + : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_rdev=no -fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 -if test $ac_cv_struct_st_rdev = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_RDEV 1 +cat >>confdefs.h <&6 -echo "configure:2128: checking for ino_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4942: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4948 "configure" #include "confdefs.h" #include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_ino_t=yes +#include + +int +main () +{ +if ((socklen_t *) 0) + return 0; +if (sizeof (socklen_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4965: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4968: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4971: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4974: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_socklen_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:4984: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +if test $ac_cv_type_socklen_t = yes; then + : +else + + echo "$as_me:4990: checking for socklen_t equivalent" >&5 +echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + if test "${rsync_cv_socklen_t_equiv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + rsync_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + cat >conftest.$ac_ext <<_ACEOF +#line 5002 "configure" +#include "confdefs.h" + +#include +#include + + int getpeername (int, $arg2 *, $t *); + +int +main () +{ + + $t len; + getpeername(0,0,&len); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5022: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5025: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5028: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5031: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + rsync_cv_socklen_t_equiv="$t" + break + else - rm -rf conftest* - ac_cv_type_ino_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext + done + done + + if test "x$rsync_cv_socklen_t_equiv" = x; then + { { echo "$as_me:5046: error: Cannot find a type to use in place of socklen_t" >&5 +echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} + { (exit 1); exit 1; }; } + fi fi -echo "$ac_t""$ac_cv_type_ino_t" 1>&6 -if test $ac_cv_type_ino_t = no; then - cat >> confdefs.h <<\EOF -#define ino_t unsigned + + echo "$as_me:5053: result: $rsync_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$rsync_cv_socklen_t_equiv" >&6 + +cat >>confdefs.h <&5 +echo $ECHO_N "checking for errno in errno.h... $ECHO_C" >&6 +if test "${rsync_cv_errno+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6 -echo "configure:2162: checking for errno in errno.h" >&5 -if eval "test \"`echo '$''{'rsync_cv_errno'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5069 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int i = errno -; return 0; } -EOF -if { (eval echo configure:2175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5081: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5084: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5087: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5090: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_errno=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rsync_cv_have_errno_decl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_have_errno_decl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$rsync_cv_errno" 1>&6 +echo "$as_me:5100: result: $rsync_cv_errno" >&5 +echo "${ECHO_T}$rsync_cv_errno" >&6 if test x"$rsync_cv_errno" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_ERRNO_DECL 1 EOF @@ -2199,1084 +5115,1817 @@ # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. + for ac_func in connect do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2206: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:5122: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5128 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5159: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5162: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5165: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5168: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5178: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; - *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:2262: checking for printf in -lnsl_s" >&5 -ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *) +echo "$as_me:5192: checking for printf in -lnsl_s" >&5 +echo $ECHO_N "checking for printf in -lnsl_s... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_s_printf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl_s $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5200 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char printf(); - -int main() { -printf() -; return 0; } + builtin and then its argument prototype would still apply. */ +char printf (); +int +main () +{ +printf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5219: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5222: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5225: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5228: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_s_printf=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_s_printf=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5239: result: $ac_cv_lib_nsl_s_printf" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_s_printf" >&6 +if test $ac_cv_lib_nsl_s_printf = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + + LIBS="-lnsl_s $LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking for printf in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_printf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 5262 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char printf (); +int +main () +{ +printf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5281: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5284: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5287: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5290: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_printf=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_printf=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5301: result: $ac_cv_lib_nsl_printf" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_printf" >&6 +if test $ac_cv_lib_nsl_printf = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 5324 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5343: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5346: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5349: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5352: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5363: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + cat >>confdefs.h <&6 -echo "configure:2312: checking for printf in -lnsl" >&5 -ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + *-linet*) ;; + *) +echo "$as_me:5378: checking for connect in -linet" >&5 +echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6 +if test "${ac_cv_lib_inet_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5386 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5405: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5408: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5411: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5414: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_inet_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_inet_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5425: result: $ac_cv_lib_inet_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6 +if test $ac_cv_lib_inet_connect = yes; then + cat >>confdefs.h <>confdefs.h <<\EOF +#define HAVE_CONNECT 1 +EOF + + fi +fi + +echo "$as_me:5449: checking for inet_ntop in -lresolv" >&5 +echo $ECHO_N "checking for inet_ntop in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_inet_ntop+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 5457 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inet_ntop (); +int +main () +{ +inet_ntop (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5476: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5479: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5482: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5485: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_inet_ntop=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_inet_ntop=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5496: result: $ac_cv_lib_resolv_inet_ntop" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_inet_ntop" >&6 +if test $ac_cv_lib_resolv_inet_ntop = yes; then + cat >>confdefs.h <&5 +echo "$as_me: Looking in libraries: $LIBS" >&6;} + +echo "$as_me:5510: checking for inet_ntop" >&5 +echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6 +if test "${ac_cv_func_inet_ntop+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 5516 "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char inet_ntop (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char printf(); - -int main() { -printf() -; return 0; } -EOF -if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5550: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5553: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5556: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_inet_ntop=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_inet_ntop=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5566: result: $ac_cv_func_inet_ntop" >&5 +echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6 +if test $ac_cv_func_inet_ntop = yes; then + : else - echo "$ac_t""no" 1>&6 + LIBOBJS="$LIBOBJS lib/inet_ntop.$ac_objext" fi - ;; - esac - case "$LIBS" in - *-lsocket*) ;; - *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2362: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:5574: checking for inet_pton" >&5 +echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6 +if test "${ac_cv_func_inet_pton+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5580 "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char inet_pton (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); + builtin and then its argument prototype would still apply. */ +char inet_pton (); +char (*f) (); -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +int +main () +{ +/* 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. */ +#if defined (__stub_inet_pton) || defined (__stub___inet_pton) +choke me +#else +f = inet_pton; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5611: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5614: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5617: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5620: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_inet_pton=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_inet_pton=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5630: result: $ac_cv_func_inet_pton" >&5 +echo "${ECHO_T}$ac_cv_func_inet_pton" >&6 +if test $ac_cv_func_inet_pton = yes; then + : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + LIBOBJS="$LIBOBJS lib/inet_pton.$ac_objext" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_func_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 5644 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +char (*f) (); - LIBS="-lsocket $LIBS" +int +main () +{ +/* 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. */ +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +choke me +#else +f = getaddrinfo; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5675: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5678: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5681: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5684: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_getaddrinfo=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5694: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +if test $ac_cv_func_getaddrinfo = yes; then + : else - echo "$ac_t""no" 1>&6 + LIBOBJS="$LIBOBJS lib/getaddrinfo.$ac_objext" fi - ;; - esac - case "$LIBS" in - *-linet*) ;; - *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:2412: checking for connect in -linet" >&5 -ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:5702: checking for getnameinfo" >&5 +echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6 +if test "${ac_cv_func_getnameinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-linet $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5708 "configure" #include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getnameinfo (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); + builtin and then its argument prototype would still apply. */ +char getnameinfo (); +char (*f) (); -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +int +main () +{ +/* 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. */ +#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo) +choke me +#else +f = getnameinfo; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5739: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5742: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5745: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5748: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getnameinfo=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_getnameinfo=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5758: result: $ac_cv_func_getnameinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6 +if test $ac_cv_func_getnameinfo = yes; then + : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + LIBOBJS="$LIBOBJS lib/getnameinfo.$ac_objext" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6 +if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 5772 "configure" +#include "confdefs.h" - LIBS="-linet $LIBS" +#include +#include -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - if test x"$ac_cv_lib_socket_connect" = x"yes" || - test x"$ac_cv_lib_inet_connect" = x"yes"; then - # ac_cv_func_connect=yes - # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run - cat >> confdefs.h <<\EOF -#define HAVE_CONNECT 1 +int +main () +{ +static struct sockaddr ac_aggr; +if (ac_aggr.sa_len) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5789: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5792: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5795: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5798: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_sockaddr_sa_len=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_sockaddr_sa_len=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:5808: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 +echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6 +if test $ac_cv_member_struct_sockaddr_sa_len = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_SOCKADDR_LEN 1 EOF - fi fi -# # if we can't find strcasecmp, look in -lresolv (for Unixware at least) # + for ac_func in strcasecmp do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2476: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:5823: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5829 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5860: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5863: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5866: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5869: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5879: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done if test x"$ac_cv_func_strcasecmp" = x"no"; then - echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:2530: checking for strcasecmp in -lresolv" >&5 -ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:5891: checking for strcasecmp in -lresolv" >&5 +echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5899 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strcasecmp(); - -int main() { -strcasecmp() -; return 0; } -EOF -if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5921: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5924: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5927: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_strcasecmp=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5938: result: $ac_cv_lib_resolv_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6 +if test $ac_cv_lib_resolv_strcasecmp = yes; then + cat >>confdefs.h <&6 -fi - -fi - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2579: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_clean=no -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" - -echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 -echo "configure:2615: checking whether utime accepts a null argument" >&5 -if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:5951: checking whether utime accepts a null argument" >&5 +echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6 +if test "${ac_cv_func_utime_null+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - rm -f conftestdata; > conftestdata + 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=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5962 "configure" #include "confdefs.h" -#include -#include -main() { +$ac_includes_default +int +main () +{ struct stat s, t; -exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 -&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime -&& t.st_mtime - s.st_mtime < 120)); + exit (!(stat ("conftest.data", &s) == 0 + && utime ("conftest.data", (long *)0) == 0 + && stat ("conftest.data", &t) == 0 + && t.st_mtime >= s.st_mtime + && t.st_mtime - s.st_mtime < 120)); + ; + return 0; } -EOF -if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:5979: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5982: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:5984: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5987: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_utime_null=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_utime_null=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_utime_null=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -f core core.* *.core fi - -echo "$ac_t""$ac_cv_func_utime_null" 1>&6 +echo "$as_me:6000: result: $ac_cv_func_utime_null" >&5 +echo "${ECHO_T}$ac_cv_func_utime_null" >&6 if test $ac_cv_func_utime_null = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_UTIME_NULL 1 EOF fi +rm -f conftest.data for ac_func in waitpid wait4 getcwd strdup strerror chown chmod mknod do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2662: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6014: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6020 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6051: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6054: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6057: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6060: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6070: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done for ac_func in fchmod fstat strchr readlink link utime utimes strftime do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2717: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6083: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6089 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6120: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6123: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6126: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6129: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6139: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -for ac_func in memmove lchown vsnprintf snprintf setsid glob strpbrk +for ac_func in memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2772: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6152: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6158 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6189: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6192: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6195: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6198: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6208: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -for ac_func in strlcat strlcpy +for ac_func in strlcat strlcpy mtrace do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2827: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6221: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6227 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* 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. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6258: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6261: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6264: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6267: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6277: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - -echo $ac_n "checking for working socketpair""... $ac_c" 1>&6 -echo "configure:2881: checking for working socketpair" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_SOCKETPAIR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6287: checking for working socketpair" >&5 +echo $ECHO_N "checking for working socketpair... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_SOCKETPAIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_SOCKETPAIR=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6297 "configure" #include "confdefs.h" + #include - #include - main() { - int fd[2]; - exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1); - } -EOF -if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#include + +main() { + int fd[2]; + exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6309: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6312: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6314: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6317: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_SOCKETPAIR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_SOCKETPAIR=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_SOCKETPAIR=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_SOCKETPAIR" 1>&6 +echo "$as_me:6329: result: $rsync_cv_HAVE_SOCKETPAIR" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_SOCKETPAIR" >&6 if test x"$rsync_cv_HAVE_SOCKETPAIR" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_SOCKETPAIR 1 EOF fi -echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 -echo "configure:2922: checking for working fnmatch" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_FNMATCH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6339: checking for working fnmatch" >&5 +echo $ECHO_N "checking for working fnmatch... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_FNMATCH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_FNMATCH=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6349 "configure" #include "confdefs.h" #include main() { exit((fnmatch("*.o", "x.o", FNM_PATHNAME) == 0 && fnmatch("a/b/*", "a/b/c/d", FNM_PATHNAME) != 0) ? 0: 1); } -EOF -if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6356: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6359: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6361: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6364: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_FNMATCH=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_FNMATCH=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_FNMATCH=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_FNMATCH" 1>&6 +echo "$as_me:6376: result: $rsync_cv_HAVE_FNMATCH" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_FNMATCH" >&6 if test x"$rsync_cv_HAVE_FNMATCH" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_FNMATCH 1 EOF fi -# sometimes getopt_long cannot parse same arguments twice -# e.g. on certain versions of CygWin32 -echo $ac_n "checking for working getopt_long""... $ac_c" 1>&6 -echo "configure:2962: checking for working getopt_long" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_GETOPT_LONG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - rsync_cv_HAVE_GETOPT_LONG=cross -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6 +if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpopt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 6397 "configure" #include "confdefs.h" -#include -main() { - int i, x = 0; char *argv[] = { "x", "--xx" }; - struct option o[] = {{"xx", 0, 0, 1}, {0,0,0,0}}; - getopt_long(2, argv, "x", o, &i) == 1 ? x++ : 0; optind = 0; - getopt_long(2, argv, "x", o, &i) == 1 ? x++ : 0; - exit(x == 2 ? 0 : 1); + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char poptGetContext (); +int +main () +{ +poptGetContext (); + ; + return 0; } -EOF -if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rsync_cv_HAVE_GETOPT_LONG=yes +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6416: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6419: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6422: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6425: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_popt_poptGetContext=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_GETOPT_LONG=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_popt_poptGetContext=no fi -rm -fr conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +echo "$as_me:6436: result: $ac_cv_lib_popt_poptGetContext" >&5 +echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6 +if test $ac_cv_lib_popt_poptGetContext = yes; then + cat >>confdefs.h <&6 -if test x"$rsync_cv_HAVE_GETOPT_LONG" = x"yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_GETOPT_LONG 1 -EOF +fi +echo "$as_me:6451: checking whether to use included libpopt" >&5 +echo $ECHO_N "checking whether to use included libpopt... $ECHO_C" >&6 +if test x"$with_included_popt" = x"yes" +then + echo "$as_me:6455: result: $srcdir/popt" >&5 +echo "${ECHO_T}$srcdir/popt" >&6 + BUILD_POPT='$(popt_OBJS)' + CFLAGS="$CFLAGS -I$srcdir/popt" +else + echo "$as_me:6460: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:3005: checking for long long" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_LONGLONG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6464: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_LONGLONG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_LONGLONG=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6474 "configure" #include "confdefs.h" #include main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } -EOF -if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6480: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6483: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6485: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6488: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_LONGLONG=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_LONGLONG=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_LONGLONG=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_LONGLONG" 1>&6 +echo "$as_me:6500: result: $rsync_cv_HAVE_LONGLONG" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_LONGLONG" >&6 if test x"$rsync_cv_HAVE_LONGLONG" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_LONGLONG 1 EOF fi -echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:3042: checking for off64_t" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_OFF64_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6510: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_OFF64_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_OFF64_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6520 "configure" #include "confdefs.h" #include #include main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } -EOF -if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6527: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6530: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6532: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6535: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_OFF64_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_OFF64_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_OFF64_T=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_OFF64_T" 1>&6 +echo "$as_me:6547: result: $rsync_cv_HAVE_OFF64_T" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_OFF64_T" >&6 if test x"$rsync_cv_HAVE_OFF64_T" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_OFF64_T 1 EOF fi -echo $ac_n "checking for short ino_t""... $ac_c" 1>&6 -echo "configure:3080: checking for short ino_t" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_SHORT_INO_T'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6557: checking for short ino_t" >&5 +echo $ECHO_N "checking for short ino_t... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_SHORT_INO_T+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_SHORT_INO_T=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6567 "configure" #include "confdefs.h" #include #include #include main() { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; } -EOF -if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6575: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6578: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6580: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6583: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_SHORT_INO_T=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_SHORT_INO_T=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_SHORT_INO_T=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_SHORT_INO_T" 1>&6 +echo "$as_me:6595: result: $rsync_cv_HAVE_SHORT_INO_T" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_SHORT_INO_T" >&6 if test x"$rsync_cv_HAVE_SHORT_INO_T" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_SHORT_INO_T 1 EOF fi -echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:3119: checking for unsigned char" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6605: checking for unsigned char" >&5 +echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_UNSIGNED_CHAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_UNSIGNED_CHAR=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6615 "configure" #include "confdefs.h" #include main() { char c; c=250; exit((c > 0)?0:1); } -EOF -if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6621: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6624: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6626: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6629: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_UNSIGNED_CHAR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_UNSIGNED_CHAR=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_UNSIGNED_CHAR=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_UNSIGNED_CHAR" 1>&6 +echo "$as_me:6641: result: $rsync_cv_HAVE_UNSIGNED_CHAR" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_UNSIGNED_CHAR" >&6 if test x"$rsync_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_UNSIGNED_CHAR 1 EOF fi -echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:3156: checking for broken readdir" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6651: checking for broken readdir" >&5 +echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_BROKEN_READDIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_BROKEN_READDIR=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6661 "configure" #include "confdefs.h" #include #include main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && -di->d_name[0] == 0) exit(0); exit(1);} -EOF -if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +di->d_name[0] == 0) exit(0); exit(1);} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6670: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6673: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6675: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6678: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_BROKEN_READDIR=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_BROKEN_READDIR=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_BROKEN_READDIR=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_BROKEN_READDIR" 1>&6 +echo "$as_me:6690: result: $rsync_cv_HAVE_BROKEN_READDIR" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_BROKEN_READDIR" >&6 if test x"$rsync_cv_HAVE_BROKEN_READDIR" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_BROKEN_READDIR 1 EOF fi -echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:3196: checking for utimbuf" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_UTIMBUF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6700: checking for utimbuf" >&5 +echo $ECHO_N "checking for utimbuf... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_UTIMBUF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6707 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); -; return 0; } -EOF -if { (eval echo configure:3210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:6720: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6723: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:6726: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6729: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_UTIMBUF=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rsync_cv_HAVE_UTIMBUF=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_UTIMBUF=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$rsync_cv_HAVE_UTIMBUF" 1>&6 +echo "$as_me:6739: result: $rsync_cv_HAVE_UTIMBUF" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_UTIMBUF" >&6 if test x"$rsync_cv_HAVE_UTIMBUF" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_UTIMBUF 1 EOF fi -echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:3231: checking if gettimeofday takes tz argument" >&5 -if eval "test \"`echo '$''{'rsync_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6749: checking if gettimeofday takes tz argument" >&5 +echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_GETTIMEOFDAY_TZ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_HAVE_GETTIMEOFDAY_TZ=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6759 "configure" #include "confdefs.h" #include #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} -EOF -if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6767: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6770: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6772: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6775: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_HAVE_GETTIMEOFDAY_TZ=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_GETTIMEOFDAY_TZ=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6 +echo "$as_me:6787: result: $rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&6 if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_GETTIMEOFDAY_TZ 1 EOF fi +echo "$as_me:6797: checking for C99 vsnprintf" >&5 +echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_C99_VSNPRINTF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test "$cross_compiling" = yes; then + rsync_cv_HAVE_C99_VSNPRINTF=cross +else + cat >conftest.$ac_ext <<_ACEOF +#line 6807 "configure" +#include "confdefs.h" + +#include +#include +void foo(const char *format, ...) { + va_list ap; + int len; + char buf[5]; + + va_start(ap, format); + len = vsnprintf(0, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); + + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); +} +main() { foo("hello"); } + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6830: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6833: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6835: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6838: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rsync_cv_HAVE_C99_VSNPRINTF=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_C99_VSNPRINTF=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:6850: result: $rsync_cv_HAVE_C99_VSNPRINTF" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_C99_VSNPRINTF" >&6 +if test x"$rsync_cv_HAVE_C99_VSNPRINTF" = x"yes"; then + +cat >>confdefs.h <<\EOF +#define HAVE_C99_VSNPRINTF 1 +EOF + +fi + +echo "$as_me:6860: checking for secure mkstemp" >&5 +echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6 +if test "${rsync_cv_HAVE_SECURE_MKSTEMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test "$cross_compiling" = yes; then + rsync_cv_HAVE_SECURE_MKSTEMP=cross +else + cat >conftest.$ac_ext <<_ACEOF +#line 6870 "configure" +#include "confdefs.h" +#include +#include +#include +#include +main() { + struct stat st; + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); + if (fd == -1) exit(1); + unlink(tpl); + if (fstat(fd, &st) != 0) exit(1); + if ((st.st_mode & 0777) != 0600) exit(1); + exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6888: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6891: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6893: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6896: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rsync_cv_HAVE_SECURE_MKSTEMP=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_HAVE_SECURE_MKSTEMP=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:6908: result: $rsync_cv_HAVE_SECURE_MKSTEMP" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_SECURE_MKSTEMP" >&6 +if test x"$rsync_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then + +cat >>confdefs.h <<\EOF +#define HAVE_SECURE_MKSTEMP 1 +EOF + +fi -echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:3271: checking for broken inet_ntoa" >&5 -if eval "test \"`echo '$''{'rsync_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6918: checking for broken inet_ntoa" >&5 +echo $ECHO_N "checking for broken inet_ntoa... $ECHO_C" >&6 +if test "${rsync_cv_REPLACE_INET_NTOA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_REPLACE_INET_NTOA=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6928 "configure" #include "confdefs.h" #include @@ -3285,69 +6934,86 @@ #include main() { struct in_addr ip; ip.s_addr = 0x12345678; if (strcmp(inet_ntoa(ip),"18.52.86.120") && - strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(1); } + strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(1); } exit(0);} -EOF -if { (eval echo configure:3292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6941: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6944: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6946: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6949: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_REPLACE_INET_NTOA=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_REPLACE_INET_NTOA=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_REPLACE_INET_NTOA=yes fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_REPLACE_INET_NTOA" 1>&6 +echo "$as_me:6961: result: $rsync_cv_REPLACE_INET_NTOA" >&5 +echo "${ECHO_T}$rsync_cv_REPLACE_INET_NTOA" >&6 if test x"$rsync_cv_REPLACE_INET_NTOA" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define REPLACE_INET_NTOA 1 EOF fi - -echo $ac_n "checking for broken inet_aton""... $ac_c" 1>&6 -echo "configure:3316: checking for broken inet_aton" >&5 -if eval "test \"`echo '$''{'rsync_cv_REPLACE_INET_ATON'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6971: checking for broken inet_aton" >&5 +echo $ECHO_N "checking for broken inet_aton... $ECHO_C" >&6 +if test "${rsync_cv_REPLACE_INET_ATON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + if test "$cross_compiling" = yes; then rsync_cv_REPLACE_INET_ATON=cross else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6981 "configure" #include "confdefs.h" #include #include #include #include -main() { struct in_addr ip; +main() { struct in_addr ip; if (inet_aton("example", &ip) == 0) exit(0); exit(1);} -EOF -if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6992: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6995: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6997: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7000: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then rsync_cv_REPLACE_INET_ATON=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rsync_cv_REPLACE_INET_ATON=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +rsync_cv_REPLACE_INET_ATON=yes fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$rsync_cv_REPLACE_INET_ATON" 1>&6 +echo "$as_me:7012: result: $rsync_cv_REPLACE_INET_ATON" >&5 +echo "${ECHO_T}$rsync_cv_REPLACE_INET_ATON" >&6 if test x"$rsync_cv_REPLACE_INET_ATON" = x"yes"; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define REPLACE_INET_ATON 1 EOF @@ -3356,12 +7022,12 @@ # # The following test was mostly taken from the tcl/tk plus patches # -echo $ac_n "checking whether -c -o works""... $ac_c" 1>&6 -echo "configure:3361: checking whether -c -o works" >&5 -if eval "test \"`echo '$''{'rsync_cv_DASHC_WORKS_WITH_DASHO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7025: checking whether -c -o works" >&5 +echo $ECHO_N "checking whether -c -o works... $ECHO_C" >&6 +if test "${rsync_cv_DASHC_WORKS_WITH_DASHO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + rm -rf conftest* cat > conftest.$ac_ext <&6 +echo "$as_me:7044: result: $rsync_cv_DASHC_WORKS_WITH_DASHO" >&5 +echo "${ECHO_T}$rsync_cv_DASHC_WORKS_WITH_DASHO" >&6 if test x"$rsync_cv_DASHC_WORKS_WITH_DASHO" = x"yes"; then OBJ_SAVE="#" OBJ_RESTORE="#" @@ -3387,386 +7053,842 @@ CC_SHOBJ_FLAG="" fi +ac_config_files="$ac_config_files Makefile lib/dummy zlib/dummy popt/dummy shconfig" - - - - -trap '' 1 2 15 -cat > confcache <<\EOF +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `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. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +ac_cs_invocation="\$0 \$@" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\EOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +EOF + +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 do - case "\$ac_option" in + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:7310: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:7329: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + esac + shift done -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +exec 5>>config.log +cat >&5 << _ACEOF -trap 'rm -fr `echo "Makefile lib/dummy zlib/dummy config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +## ----------------------- ## +## Running config.status. ## +## ----------------------- ## + +This file was extended by $as_me 2.52, executed with + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + > $ac_cs_invocation +on `(hostname || uname -n) 2>/dev/null | sed 1q` + +_ACEOF EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@HAVE_GETCONF@%$HAVE_GETCONF%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@HAVE_REMSH@%$HAVE_REMSH%g -s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g -s%@OBJ_SAVE@%$OBJ_SAVE%g -s%@OBJ_RESTORE@%$OBJ_RESTORE%g -s%@CC_SHOBJ_FLAG@%$CC_SHOBJ_FLAG%g +cat >>$CONFIG_STATUS <<\EOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/dummy" ) CONFIG_FILES="$CONFIG_FILES lib/dummy" ;; + "zlib/dummy" ) CONFIG_FILES="$CONFIG_FILES zlib/dummy" ;; + "popt/dummy" ) CONFIG_FILES="$CONFIG_FILES popt/dummy" ;; + "shconfig" ) CONFIG_FILES="$CONFIG_FILES shconfig" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:7370: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} -CEOF EOF -cat >> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS < conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@RSYNC_VERSION@,$RSYNC_VERSION,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@HAVE_REMSH@,$HAVE_REMSH,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@OBJ_SAVE@,$OBJ_SAVE,;t t +s,@OBJ_RESTORE@,$OBJ_RESTORE,;t t +s,@CC_SHOBJ_FLAG@,$CC_SHOBJ_FLAG,;t t +s,@BUILD_POPT@,$BUILD_POPT,;t t +CEOF + +EOF + + cat >>$CONFIG_STATUS <<\EOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +cat >>$CONFIG_STATUS <<\EOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + case $srcdir in + .) ac_srcdir=. + if test -z "$ac_dots"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; + ac_srcdir=$ac_dots$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_dots$srcdir ;; esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_dots$INSTALL ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac + if test x"$ac_file" != x-; then + { echo "$as_me:7595: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # 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 automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:7613: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:7626: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +EOF +cat >>$CONFIG_STATUS <<\EOF - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:7687: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:7698: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:7711: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in EOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\EOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +EOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +cat >>conftest.undefs <<\EOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, EOF -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.undefs >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\EOF + # 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 automatically by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated automatically by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:7828: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + fi + rm -f $ac_file + mv $tmp/config.h $ac_file fi - rm -f $ac_file - mv conftest.h $ac_file + else + cat $tmp/config.h + rm -f $tmp/config.h fi -fi; done - +done EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\EOF -exit 0 +{ (exit 0); exit 0; } EOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff -u -r --new-file --exclude=CVS rsync-2.4.6/configure.in rsync-2.5.0/configure.in --- rsync-2.4.6/configure.in Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/configure.in Thu Nov 29 16:31:21 2001 @@ -1,29 +1,199 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(byteorder.h) + +AC_INIT() +AC_CONFIG_SRCDIR([byteorder.h]) AC_CONFIG_HEADER(config.h) +AC_PREREQ(2.52) -# compile with optimisation and without debugging by default -CFLAGS=${CFLAGS-"-O"} -LDFLAGS=${LDFLAGS-""} +RSYNC_VERSION=2.5.0 +AC_SUBST(RSYNC_VERSION) +AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION]) -AC_CANONICAL_SYSTEM -AC_VALIDATE_CACHE_SYSTEM_TYPE +AC_DEFINE_UNQUOTED(RSYNC_VERSION, ["$RSYNC_VERSION"], [rsync release version]) -# look for getconf early as this affects just about everything -AC_CHECK_PROG(HAVE_GETCONF, getconf, 1, 0) -if test $HAVE_GETCONF = 1; then - CFLAGS=$CFLAGS" "`getconf LFS_CFLAGS` - LDFLAGS=$LDFLAGS" "`getconf LFS_LDFLAGS` -fi +LDFLAGS=${LDFLAGS-""} + +AC_CANONICAL_TARGET([]) dnl Checks for programs. AC_PROG_CC +AC_PROG_CPP AC_PROG_INSTALL +AC_PROG_CC_STDC AC_SUBST(SHELL) +if test "$xac_cv_prog_cc_stdc" = xno +then + AC_MSG_WARN([rsync requires an ANSI C compiler and you don't seem to have one]) +fi + +# compile with optimisation and without debugging by default, unless +# --debug is given. We must decide this before testing the compiler. + +AC_MSG_CHECKING([whether to include debugging symbols]) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [including debugging symbols and features (default yes)]), + [], []) + +if test x"$enable_debug" = x"no" +then + AC_MSG_RESULT(no) + CFLAGS=${CFLAGS-"-O"} +else + AC_MSG_RESULT([yes]) + # leave CFLAGS alone; AC_PROG_CC will try to include -g if it can + AC_DEFINE(DEBUG, 1, [Define to turn on debugging code that may slow normal operation]) + dnl CFLAGS=${CFLAGS-"-g"} +fi + +CFLAGS="$CFLAGS -DHAVE_CONFIG_H" + +AC_ARG_WITH(included-popt, + [ --with-included-popt use bundled popt library, not from system]) + +AC_ARG_WITH(rsync-path, + [ --with-rsync-path=PATH set default --rsync-path to PATH (default: \"rsync\")], + [ RSYNC_PATH="$with_rsync_path" ], + [ RSYNC_PATH="rsync" ]) +AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [ ]) AC_CHECK_PROG(HAVE_REMSH, remsh, 1, 0) -AC_DEFINE_UNQUOTED(HAVE_REMSH, $HAVE_REMSH) +AC_DEFINE_UNQUOTED(HAVE_REMSH, $HAVE_REMSH, [ ]) + + +# arrgh. libc in the current debian stable screws up the largefile +# stuff, getting byte range locking wrong +AC_CACHE_CHECK([for broken largefile support],rsync_cv_HAVE_BROKEN_LARGEFILE,[ +AC_TRY_RUN([ +#define _FILE_OFFSET_BITS 64 +#include +#include +#include +#include + +int main(void) +{ + struct flock lock; + int status; + int fd = open("conftest.dat", O_CREAT|O_RDWR, 0600); + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 1; + lock.l_pid = 0; + + fcntl(fd,F_SETLK,&lock); + if (fork() == 0) { + lock.l_start = 1; + exit(fcntl(fd,F_SETLK,&lock) == 0); + } + wait(&status); + unlink("conftest.dat"); + exit(WEXITSTATUS(status)); +} +], +rsync_cv_HAVE_BROKEN_LARGEFILE=yes,rsync_cv_HAVE_BROKEN_LARGEFILE=no,rsync_cv_HAVE_BROKEN_LARGEFILE=cross)]) +if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then + AC_SYS_LARGEFILE +fi + +ipv6type=unknown +ipv6lib=none +ipv6trylibc=yes + +AC_ARG_ENABLE(ipv6, + AC_HELP_STRING([--disable-ipv6], [don't even try to use IPv6])) + +if test "x$enable_ipv6" != xno +then + AC_MSG_CHECKING([ipv6 stack type]) + for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do + case $i in + inria) + # http://www.kame.net/ + AC_EGREP_CPP(yes, [ +#include +#ifdef IPV6_INRIA_VERSION +yes +#endif], + [ipv6type=$i; + AC_DEFINE(INET6, 1, [true if you have IPv6]) + ]) + ;; + kame) + # http://www.kame.net/ + AC_EGREP_CPP(yes, [ +#include +#ifdef __KAME__ +yes +#endif], + [ipv6type=$i; + AC_DEFINE(INET6, 1, [true if you have IPv6])]) + ;; + linux-glibc) + # http://www.v6.linux.or.jp/ + AC_EGREP_CPP(yes, [ +#include +#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +yes +#endif], + [ipv6type=$i; +AC_DEFINE(INET6, 1, [true if you have IPv6])]) + ;; + linux-inet6) + # http://www.v6.linux.or.jp/ + if test -d /usr/inet6 -o -f /usr/inet6/lib/libinet6.a; then + ipv6type=$i + ipv6lib=inet6 + ipv6libdir=/usr/inet6/lib + ipv6trylibc=yes; + AC_DEFINE(INET6, 1, [true if you have IPv6]) + CFLAGS="-I/usr/inet6/include $CFLAGS" + fi + ;; + toshiba) + AC_EGREP_CPP(yes, [ +#include +#ifdef _TOSHIBA_INET6 +yes +#endif], + [ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + AC_DEFINE(INET6, 1, [true if you have IPv6])]) + ;; + v6d) + AC_EGREP_CPP(yes, [ +#include +#ifdef __V6D__ +yes +#endif], + [ipv6type=$i; + ipv6lib=v6; + ipv6libdir=/usr/local/v6/lib; + AC_DEFINE(INET6, 1, [true if you have IPv6])]) + ;; + zeta) + AC_EGREP_CPP(yes, [ +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif], + [ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + AC_DEFINE(INET6, 1, [true if you have IPv6])]) + ;; + esac + if test "$ipv6type" != "unknown"; then + break + fi + done + AC_MSG_RESULT($ipv6type) + + AC_SEARCH_LIBS(getaddrinfo, inet6) +fi AC_C_BIGENDIAN AC_HEADER_DIRENT @@ -32,7 +202,8 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h unistd.h utime.h grp.h) AC_CHECK_HEADERS(compat.h sys/param.h ctype.h sys/wait.h sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h) -AC_CHECK_HEADERS(glob.h) +AC_CHECK_HEADERS(glob.h alloca.h mcheck.h sys/sysctl.h arpa/inet.h arpa/nameser.h) +AC_CHECK_HEADERS(netdb.h) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) @@ -47,14 +218,16 @@ AC_TYPE_SIZE_T AC_TYPE_PID_T AC_TYPE_GETGROUPS -AC_STRUCT_ST_RDEV -AC_CHECK_TYPE(ino_t,unsigned) +AC_CHECK_MEMBERS([struct stat.st_rdev]) + +AC_CHECK_TYPE([ino_t], [unsigned]) +TYPE_SOCKLEN_T AC_CACHE_CHECK([for errno in errno.h],rsync_cv_errno, [ AC_TRY_COMPILE([#include ],[int i = errno], rsync_cv_errno=yes,rsync_cv_have_errno_decl=no)]) if test x"$rsync_cv_errno" = x"yes"; then - AC_DEFINE(HAVE_ERRNO_DECL) + AC_DEFINE(HAVE_ERRNO_DECL, 1, [ ]) fi # The following test taken from the cvs sources @@ -89,11 +262,28 @@ test x"$ac_cv_lib_inet_connect" = x"yes"; then # ac_cv_func_connect=yes # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run - AC_DEFINE(HAVE_CONNECT) + AC_DEFINE(HAVE_CONNECT, 1, [ ]) fi fi -# +AC_CHECK_LIB(resolv, inet_ntop) + +AC_MSG_NOTICE([Looking in libraries: $LIBS]) + +AC_CHECK_FUNC(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) +AC_CHECK_FUNC(inet_pton, , AC_LIBOBJ(lib/inet_pton)) + +AC_CHECK_FUNC(getaddrinfo, , AC_LIBOBJ(lib/getaddrinfo)) +AC_CHECK_FUNC(getnameinfo, , AC_LIBOBJ(lib/getnameinfo)) + +AC_CHECK_MEMBER([struct sockaddr.sa_len], + [ AC_DEFINE(HAVE_SOCKADDR_LEN) ], + [], + [ +#include +#include +]) + # if we can't find strcasecmp, look in -lresolv (for Unixware at least) # AC_CHECK_FUNCS(strcasecmp) @@ -101,23 +291,29 @@ AC_CHECK_LIB(resolv, strcasecmp) fi -AC_FUNC_MEMCMP +dnl At the moment we don't test for a broken memcmp(), because all we +dnl need to do is test for equality, not comparison, and it seems that +dnl every platform has a memcmp that can do at least that. +dnl AC_FUNC_MEMCMP + AC_FUNC_UTIME_NULL AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod) AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime) -AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf setsid glob strpbrk) -AC_CHECK_FUNCS(strlcat strlcpy) +AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk) +AC_CHECK_FUNCS(strlcat strlcpy mtrace) AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[ -AC_TRY_RUN([#include - #include - main() { - int fd[2]; - exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1); - }], +AC_TRY_RUN([ +#include +#include + +main() { + int fd[2]; + exit((socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != -1) ? 0 : 1); +}], rsync_cv_HAVE_SOCKETPAIR=yes,rsync_cv_HAVE_SOCKETPAIR=no,rsync_cv_HAVE_SOCKETPAIR=cross)]) if test x"$rsync_cv_HAVE_SOCKETPAIR" = x"yes"; then - AC_DEFINE(HAVE_SOCKETPAIR) + AC_DEFINE(HAVE_SOCKETPAIR, 1, [ ]) fi AC_CACHE_CHECK([for working fnmatch],rsync_cv_HAVE_FNMATCH,[ @@ -126,23 +322,22 @@ fnmatch("a/b/*", "a/b/c/d", FNM_PATHNAME) != 0) ? 0: 1); }], rsync_cv_HAVE_FNMATCH=yes,rsync_cv_HAVE_FNMATCH=no,rsync_cv_HAVE_FNMATCH=cross)]) if test x"$rsync_cv_HAVE_FNMATCH" = x"yes"; then - AC_DEFINE(HAVE_FNMATCH) + AC_DEFINE(HAVE_FNMATCH, 1, [ ]) fi -# sometimes getopt_long cannot parse same arguments twice -# e.g. on certain versions of CygWin32 -AC_CACHE_CHECK([for working getopt_long],rsync_cv_HAVE_GETOPT_LONG,[ -AC_TRY_RUN([#include -main() { - int i, x = 0; char *argv[] = { "x", "--xx" }; - struct option o[] = {{"xx", 0, 0, 1}, {0,0,0,0}}; - getopt_long(2, argv, "x", o, &i) == 1 ? x++ : 0; optind = 0; - getopt_long(2, argv, "x", o, &i) == 1 ? x++ : 0; - exit(x == 2 ? 0 : 1); -}], rsync_cv_HAVE_GETOPT_LONG=yes,rsync_cv_HAVE_GETOPT_LONG=no, - rsync_cv_HAVE_GETOPT_LONG=cross)]) -if test x"$rsync_cv_HAVE_GETOPT_LONG" = x"yes"; then - AC_DEFINE(HAVE_GETOPT_LONG) +if test x"$with_included_popt" != x"yes" +then + AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes]) +fi + +AC_MSG_CHECKING([whether to use included libpopt]) +if test x"$with_included_popt" = x"yes" +then + AC_MSG_RESULT($srcdir/popt) + BUILD_POPT='$(popt_OBJS)' + CFLAGS="$CFLAGS -I$srcdir/popt" +else + AC_MSG_RESULT(no) fi AC_CACHE_CHECK([for long long],rsync_cv_HAVE_LONGLONG,[ @@ -150,7 +345,7 @@ main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], rsync_cv_HAVE_LONGLONG=yes,rsync_cv_HAVE_LONGLONG=no,rsync_cv_HAVE_LONGLONG=cross)]) if test x"$rsync_cv_HAVE_LONGLONG" = x"yes"; then - AC_DEFINE(HAVE_LONGLONG) + AC_DEFINE(HAVE_LONGLONG, 1, [ ]) fi AC_CACHE_CHECK([for off64_t],rsync_cv_HAVE_OFF64_T,[ @@ -159,7 +354,7 @@ main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], rsync_cv_HAVE_OFF64_T=yes,rsync_cv_HAVE_OFF64_T=no,rsync_cv_HAVE_OFF64_T=cross)]) if test x"$rsync_cv_HAVE_OFF64_T" = x"yes"; then - AC_DEFINE(HAVE_OFF64_T) + AC_DEFINE(HAVE_OFF64_T, 1, [ ]) fi AC_CACHE_CHECK([for short ino_t],rsync_cv_HAVE_SHORT_INO_T,[ @@ -169,7 +364,7 @@ main() { if (sizeof(ino_t) < sizeof(unsigned int)) return 0; return 1; }], rsync_cv_HAVE_SHORT_INO_T=yes,rsync_cv_HAVE_SHORT_INO_T=no,rsync_cv_HAVE_SHORT_INO_T=cross)]) if test x"$rsync_cv_HAVE_SHORT_INO_T" = x"yes"; then - AC_DEFINE(HAVE_SHORT_INO_T) + AC_DEFINE(HAVE_SHORT_INO_T, 1, [ ]) fi AC_CACHE_CHECK([for unsigned char],rsync_cv_HAVE_UNSIGNED_CHAR,[ @@ -177,7 +372,7 @@ main() { char c; c=250; exit((c > 0)?0:1); }], rsync_cv_HAVE_UNSIGNED_CHAR=yes,rsync_cv_HAVE_UNSIGNED_CHAR=no,rsync_cv_HAVE_UNSIGNED_CHAR=cross)]) if test x"$rsync_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then - AC_DEFINE(HAVE_UNSIGNED_CHAR) + AC_DEFINE(HAVE_UNSIGNED_CHAR, 1, [ ]) fi AC_CACHE_CHECK([for broken readdir],rsync_cv_HAVE_BROKEN_READDIR,[ @@ -188,7 +383,7 @@ di->d_name[0] == 0) exit(0); exit(1);} ], rsync_cv_HAVE_BROKEN_READDIR=yes,rsync_cv_HAVE_BROKEN_READDIR=no,rsync_cv_HAVE_BROKEN_READDIR=cross)]) if test x"$rsync_cv_HAVE_BROKEN_READDIR" = x"yes"; then - AC_DEFINE(HAVE_BROKEN_READDIR) + AC_DEFINE(HAVE_BROKEN_READDIR, 1, [ ]) fi AC_CACHE_CHECK([for utimbuf],rsync_cv_HAVE_UTIMBUF,[ @@ -197,7 +392,7 @@ [struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));], rsync_cv_HAVE_UTIMBUF=yes,rsync_cv_HAVE_UTIMBUF=no,rsync_cv_HAVE_UTIMBUF=cross)]) if test x"$rsync_cv_HAVE_UTIMBUF" = x"yes"; then - AC_DEFINE(HAVE_UTIMBUF) + AC_DEFINE(HAVE_UTIMBUF, 1, [ ]) fi AC_CACHE_CHECK([if gettimeofday takes tz argument],rsync_cv_HAVE_GETTIMEOFDAY_TZ,[ @@ -207,7 +402,55 @@ main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}], rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes,rsync_cv_HAVE_GETTIMEOFDAY_TZ=no,rsync_cv_HAVE_GETTIMEOFDAY_TZ=cross)]) if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then - AC_DEFINE(HAVE_GETTIMEOFDAY_TZ) + AC_DEFINE(HAVE_GETTIMEOFDAY_TZ, 1, [ ]) +fi + +AC_CACHE_CHECK([for C99 vsnprintf],rsync_cv_HAVE_C99_VSNPRINTF,[ +AC_TRY_RUN([ +#include +#include +void foo(const char *format, ...) { + va_list ap; + int len; + char buf[5]; + + va_start(ap, format); + len = vsnprintf(0, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); + + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); +} +main() { foo("hello"); } +], +rsync_cv_HAVE_C99_VSNPRINTF=yes,rsync_cv_HAVE_C99_VSNPRINTF=no,rsync_cv_HAVE_C99_VSNPRINTF=cross)]) +if test x"$rsync_cv_HAVE_C99_VSNPRINTF" = x"yes"; then + AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [ ]) +fi + + +AC_CACHE_CHECK([for secure mkstemp],rsync_cv_HAVE_SECURE_MKSTEMP,[ +AC_TRY_RUN([#include +#include +#include +#include +main() { + struct stat st; + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); + if (fd == -1) exit(1); + unlink(tpl); + if (fstat(fd, &st) != 0) exit(1); + if ((st.st_mode & 0777) != 0600) exit(1); + exit(0); +}], +rsync_cv_HAVE_SECURE_MKSTEMP=yes, +rsync_cv_HAVE_SECURE_MKSTEMP=no, +rsync_cv_HAVE_SECURE_MKSTEMP=cross)]) +if test x"$rsync_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then + AC_DEFINE(HAVE_SECURE_MKSTEMP, 1, [ ]) fi @@ -223,7 +466,7 @@ exit(0);}], rsync_cv_REPLACE_INET_NTOA=no,rsync_cv_REPLACE_INET_NTOA=yes,rsync_cv_REPLACE_INET_NTOA=cross)]) if test x"$rsync_cv_REPLACE_INET_NTOA" = x"yes"; then - AC_DEFINE(REPLACE_INET_NTOA) + AC_DEFINE(REPLACE_INET_NTOA, 1, [ ]) fi @@ -237,7 +480,7 @@ if (inet_aton("example", &ip) == 0) exit(0); exit(1);}], rsync_cv_REPLACE_INET_ATON=no,rsync_cv_REPLACE_INET_ATON=yes,rsync_cv_REPLACE_INET_ATON=cross)]) if test x"$rsync_cv_REPLACE_INET_ATON" = x"yes"; then - AC_DEFINE(REPLACE_INET_ATON) + AC_DEFINE(REPLACE_INET_ATON, 1, [ ]) fi # @@ -269,6 +512,7 @@ AC_SUBST(OBJ_SAVE) AC_SUBST(OBJ_RESTORE) AC_SUBST(CC_SHOBJ_FLAG) +AC_SUBST(BUILD_POPT) - -AC_OUTPUT(Makefile lib/dummy zlib/dummy) +AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) +AC_OUTPUT diff -u -r --new-file --exclude=CVS rsync-2.4.6/csprotocol.txt rsync-2.5.0/csprotocol.txt --- rsync-2.4.6/csprotocol.txt Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/csprotocol.txt Wed Aug 22 23:14:54 2001 @@ -0,0 +1,82 @@ +This is kind of informal and may be wrong, but it helped me. It's +basically a summary of clientserver.c and authenticate.c. + + -- Martin Pool + +$Id: csprotocol.txt,v 1.4 2001/08/23 06:14:54 mbp Exp $ + + + + +This is the protocol used for rsync --daemon; i.e. connections to port +873 rather than invocations over a remote shell. + +When the server accepts a connection, it prints a greeting + + @RSYNCD: + +where is the numeric version; currently 24. It follows this +with a free text message-of-the-day. It expects to see a similar +greeting back from the client. + +The server is now in the connected state. The client can either send +the command + + #list + +to get a listing of modules, or the name of a module. After this, the +connection is now bound to a particular module. Access per host for +this module is now checked, as is per-module connection limits. + +If authentication is required to use this module, the server will say + + @RSYNCD: AUTHREQD + +where is a random string of base64 characters. The client +must respond with + + + +where is the username they claim to be, and is the +base64 form of the MD4 hash of challenge+password. + +At this point the server applies all remaining constraints before +handing control to the client, including switching uid/gid, setting up +include and exclude lists, moving to the root of the module, and doing +chroot. + +If the login is acceptable, then the server will respond with + + @RSYNCD: OK + +The client now writes some rsync options, as if it were remotely +executing the command. The server parses these arguments as if it had +just been invoked with them, but they're added to the existing state. +So if the client specifies a list of files to be included or excluded, +they'll defer to existing limits specified in the server +configuration. + +At this point the client and server both switch to using a +multiplexing layer across the socket. The main point of this is to +allow the server to asynchronously pass errors back, while still +allowing streamed and pipelined data. + +Unfortunately, the multiplex protocol is not used at every stage. We +start up in plain socket mode and then change over by calling +io_start_buffering. Of course both the client and the server have to +do this at the same point. + +The server then talks to the client as normal across the socket, +passing checksums, file lists and so on. For documentation of that, +stay tuned (or write it yourself!). + + + +------------ +Protocol version changes + +25 (2001-08-20, 2.4.7pre2) + + Send an explicit "@RSYNC EXIT" command at the end of the + module listing. We never intentionally end the transmission + by just closing the socket anymore. diff -u -r --new-file --exclude=CVS rsync-2.4.6/cvs.log rsync-2.5.0/cvs.log --- rsync-2.4.6/cvs.log Tue Sep 5 19:47:09 2000 +++ rsync-2.5.0/cvs.log Thu Nov 29 16:31:38 2001 @@ -11947,3 +11947,8738 @@ Log Message: preparing for release of 2.4.6 + +**************************************** +Date: Wednesday September 6, 2000 @ 17:15 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv21581 + +Modified Files: + configure.in +Log Message: +neater getconf test + + + +**************************************** +Date: Tuesday September 12, 2000 @ 4:03 +Author: jht + +Update of /data/cvs/rsync/packaging/lsb +In directory samba:/tmp/cvs-serv13083/lsb + +Log Message: +Directory /data/cvs/rsync/packaging/lsb added to the repository + + + +**************************************** +Date: Tuesday September 12, 2000 @ 4:04 +Author: jht + +Update of /data/cvs/rsync/packaging/lsb +In directory samba:/tmp/cvs-serv4643/lsb + +Added Files: + rsync.spec.tmpl +Log Message: +Added provision for packaging for Linux Standards Base compliant Linux systems. + + + +**************************************** +Date: Monday October 9, 2000 @ 13:46 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1740 + +Modified Files: + rsync.h rsync.1 flist.c exclude.c +Log Message: +include/exclude cluestick: with -vv, print out whether files are +included or excluded and why. + + + +**************************************** +Date: Monday October 9, 2000 @ 13:48 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv19828 + +Modified Files: + exclude.c +Log Message: +Get rid of const modifiers; they're problematic with old compilers. + + +**************************************** +Date: Tuesday October 10, 2000 @ 11:26 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv6567 + +Modified Files: + main.c +Log Message: +Clearer "nothing to do" message. + + +**************************************** +Date: Wednesday October 11, 2000 @ 10:57 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv27903 + +Added Files: + TODO +Log Message: +Quick list of things to do. + + +**************************************** +Date: Friday October 13, 2000 @ 13:25 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv28458 + +Modified Files: + rsync.yo +Log Message: +Oops: manpage updates should go into the yodl source. + + +**************************************** +Date: Friday October 13, 2000 @ 13:25 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv6730 + +Modified Files: + rsync.1 +Log Message: +Oops: manpage updates should go into the yodl source. + + +**************************************** +Date: Friday October 13, 2000 @ 13:28 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1278 + +Modified Files: + rsyncd.conf.yo rsyncd.conf.5 .cvsignore +Log Message: +Clear up conditions for running as root. + + + +**************************************** +Date: Friday October 13, 2000 @ 23:49 +Author: dwd + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1324 + +Modified Files: + rsyncd.conf.5 rsyncd.conf.yo +Log Message: +Add note in "secrets file" section to see "strict modes". + + + +**************************************** +Date: Thursday October 19, 2000 @ 10:47 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1044 + +Modified Files: + main.c +Log Message: +don't clobber argv[0], so ps shows the right thing + + + +**************************************** +Date: Wednesday October 25, 2000 @ 4:50 +Author: dwd + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv21241 + +Modified Files: + clientserver.c log.c socket.c +Log Message: +When running as --daemon in the background and using a "log file" rsyncd.conf +directive, close the log file every time it is open when going to sleep on +the socket. This allows the log file to get cleaned out by another process. + + + +**************************************** +Date: Thursday October 26, 2000 @ 5:57 +Author: dwd + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv17242 + +Modified Files: + log.c socket.c +Log Message: +Make sure the log file is always opened before root privileges (if any) +are given up. + + + +**************************************** +Date: Thursday October 26, 2000 @ 17:24 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1695 + +Modified Files: + authenticate.c backup.c clientserver.c exclude.c log.c rsync.h +Log Message: +Print strerror when a system error occurs; add a new function rsyserr +to do this. This is not used in every case yet -- I've just changed a +few cases that were causing trouble. Please convert others as you see them. + + + +**************************************** +Date: Thursday October 26, 2000 @ 17:31 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv25633 + +Modified Files: + authenticate.c +Log Message: +Print strerror when a system error occurs; add a new function rsyserr +to do this. This is not used in every case yet -- I've just changed a +few cases that were causing trouble. Please convert others as you see them. + + + +**************************************** +Date: Thursday October 26, 2000 @ 18:05 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv9751 + +Added Files: + csprotocol.txt +Log Message: +Draft documentation of the client-server protocol. + + + +**************************************** +Date: Tuesday October 31, 2000 @ 12:05 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv20772 + +Modified Files: + clientserver.c +Log Message: +Display a warning about pointlessly using --rsh with clientserver mode. + + + +**************************************** +Date: Tuesday October 31, 2000 @ 21:59 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv19312 + +Modified Files: + main.c +Log Message: +fix bug in handling of : + + +**************************************** +Date: Thursday November 2, 2000 @ 22:37 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv19475 + +Modified Files: + configure io.c main.c +Log Message: +Add some comments. + + + +**************************************** +Date: Thursday November 2, 2000 @ 22:38 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1056 + +Modified Files: + README +Log Message: +Correct license name. Note new address of pserver. Correct documentation. + + + +**************************************** +Date: Wednesday November 8, 2000 @ 20:32 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv18433 + +Modified Files: + receiver.c rsync.c +Log Message: +Better error messages when unlink fails + + +**************************************** +Date: Wednesday November 8, 2000 @ 20:32 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv4207 + +Modified Files: + receiver.c +Log Message: +Better error messages when unlink fails + + +**************************************** +Date: Wednesday November 8, 2000 @ 20:45 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv25849 + +Modified Files: + generator.c +Log Message: +Better error messages when unlink fails + + +**************************************** +Date: Thursday November 9, 2000 @ 20:02 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv26879 + +Modified Files: + generator.c +Log Message: +Better error messages + + +**************************************** +Date: Thursday November 9, 2000 @ 20:05 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv220 + +Modified Files: + io.c options.c +Log Message: +Print a warning message in the version if the platform cannot support 32-bit ints + + +**************************************** +Date: Thursday November 9, 2000 @ 20:27 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv24419 + +Modified Files: + socket.c +Log Message: +Document getsockopt POSIX confusion. + + + +**************************************** +Date: Thursday November 9, 2000 @ 20:45 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv10632 + +Modified Files: + util.c +Log Message: +Drop dead variable. + + +**************************************** +Date: Thursday November 9, 2000 @ 21:20 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv18667 + +Modified Files: + Tag: branch-mbp-privacy + rsync.h proto.h options.c main.c io.c csprotocol.txt + clientserver.c checksum.c authenticate.c Makefile.in +Log Message: +Implement --privacy option, though apparently not working yet. + + + +**************************************** +Date: Friday November 10, 2000 @ 14:17 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv6677 + +Modified Files: + generator.c +Log Message: +Doc. + + + +**************************************** +Date: Friday November 10, 2000 @ 14:19 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv26686 + +Modified Files: + cleanup.c +Log Message: +Doc. + + + +**************************************** +Date: Friday November 10, 2000 @ 14:28 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv3741 + +Modified Files: + errcode.h log.c +Log Message: +If an error occurs, print an explanatory string rather +than just an RERR code. + + +**************************************** +Date: Friday November 10, 2000 @ 14:41 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv6569 + +Modified Files: + .cvsignore +Log Message: +Ignore dummy output file + + +**************************************** +Date: Friday November 10, 2000 @ 14:41 +Author: mbp + +Update of /data/cvs//rsync +In directory samba:/tmp/cvs-serv26860 + +Modified Files: + options.c +Log Message: +In --version, say whether we have socketpair() or not + + +**************************************** +Date: Wednesday November 15, 2000 @ 14:16 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv7286 + +Modified Files: + io.c +Log Message: +Doc. + + +**************************************** +Date: Wednesday November 15, 2000 @ 16:53 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv17346 + +Modified Files: + generator.c +Log Message: +Add comments. + + + +**************************************** +Date: Saturday January 6, 2001 @ 4:57 +Author: dwd + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv7056 + +Modified Files: + rsync.1 rsync.yo +Log Message: +Better explain how the --blocking-io option works. + + + +**************************************** +Date: Monday January 8, 2001 @ 12:10 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1374 + +Modified Files: + rsync.yo +Log Message: +Typo fix from Jim Meyering + + +**************************************** +Date: Monday January 8, 2001 @ 14:39 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv7661 + +Modified Files: + .cvsignore +Log Message: +Ignore generated files that are not stored in CVS. + + + +**************************************** +Date: Monday January 8, 2001 @ 14:39 +Author: mbp + +Update of /data/cvs/rsync/zlib +In directory samba:/tmp/cvs-serv9711/zlib + +Added Files: + .cvsignore +Log Message: +Ignore generated files that are not stored in CVS. + + + +**************************************** +Date: Monday January 8, 2001 @ 14:39 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv16133 + +Modified Files: + io.c +Log Message: +Improved error message. + + + +**************************************** +Date: Monday January 8, 2001 @ 21:25 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5581 + +Modified Files: + socket.c +Log Message: +Include strerror message when there's a socket error. + + + +**************************************** +Date: Thursday February 8, 2001 @ 14:28 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv14515 + +Modified Files: + options.c +Log Message: +Document shortcoming of "unrecognised option" message. + + + +**************************************** +Date: Thursday February 15, 2001 @ 9:47 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv22951 + +Modified Files: + rsync.yo +Log Message: +Add table of exit values, from errcode.h. + + + +**************************************** +Date: Thursday February 15, 2001 @ 9:59 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv22700 + +Modified Files: + version.h +Log Message: +Call this 2.4.6dev so that we don't get bug reports claiming to be +about 2.4.6. + + + +**************************************** +Date: Thursday February 15, 2001 @ 13:47 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv3558 + +Modified Files: + rsync.1 +Log Message: +Add table of exit values, from errcode.h. (Checkin to match .yo file.) + + + +**************************************** +Date: Wednesday February 21, 2001 @ 18:18 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv25637 + +Modified Files: + log.c +Log Message: +Better message grammar. + + + +**************************************** +Date: Wednesday February 21, 2001 @ 19:16 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv11224 + +Modified Files: + rsync.1 rsync.yo +Log Message: +More explanation of return values. + + + +**************************************** +Date: Wednesday February 21, 2001 @ 19:25 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv18831 + +Modified Files: + main.c +Log Message: +Doc. + + + +**************************************** +Date: Thursday February 22, 2001 @ 23:58 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2 +In directory samba:/tmp/cvs-serv21394/popt-1.2 + +Log Message: +Directory /data/cvs/rsync/popt-1.2 added to the repository + + + +**************************************** +Date: Thursday February 22, 2001 @ 23:58 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2/po +In directory samba:/tmp/cvs-serv5375/po + +Log Message: +Directory /data/cvs/rsync/popt-1.2/po added to the repository + + + +**************************************** +Date: Friday February 23, 2001 @ 0:01 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2 +In directory samba:/tmp/cvs-serv15839 + +Added Files: + CHANGES COPYING Makefile.am Makefile.in README acconfig.h + aclocal.m4 autogen.sh config.h.in configure configure.in + findme.c findme.h install-sh missing mkinstalldirs popt.3 + popt.c popt.h popt.spec poptconfig.c popthelp.c poptint.h + poptparse.c stamp-h.in test-poptrc test1.c testit.sh +Log Message: +Check in built-in copy of libpopt in preparation for switching +from getopt + + +**************************************** +Date: Friday February 23, 2001 @ 0:01 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2/po +In directory samba:/tmp/cvs-serv15839/po + +Added Files: + Makefile.in Makefile.in.in POTFILES POTFILES.in ro.po +Log Message: +Check in built-in copy of libpopt in preparation for switching +from getopt + + +**************************************** +Date: Friday February 23, 2001 @ 0:01 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv10621 + +Modified Files: + csprotocol.txt +Log Message: +Note about multiplexing. + + + +**************************************** +Date: Friday February 23, 2001 @ 0:02 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv14972 + +Modified Files: + io.c +Log Message: +Add comments. +Better error message in the case of eof on read_timeout. + + + + +**************************************** +Date: Friday February 23, 2001 @ 11:45 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory samba:/tmp/cvs-serv4255/lib + +Removed Files: + getopt.c getopt.h +Log Message: +Change from getopt to popt. + + + +**************************************** +Date: Friday February 23, 2001 @ 11:45 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2 +In directory samba:/tmp/cvs-serv4255/popt-1.2 + +Added Files: + .cvsignore +Log Message: +Change from getopt to popt. + + + +**************************************** +Date: Friday February 23, 2001 @ 11:45 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2/po +In directory samba:/tmp/cvs-serv4255/popt-1.2/po + +Added Files: + .cvsignore +Log Message: +Change from getopt to popt. + + + +**************************************** +Date: Friday February 23, 2001 @ 11:47 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv21694 + +Modified Files: + Makefile.in +Log Message: +Change from getopt to popt. +Automatically build included libpopt if there is none on the system. + + + + +**************************************** +Date: Friday February 23, 2001 @ 11:48 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv20238 + +Modified Files: + configure configure.in +Log Message: +Change from getopt to popt. +Automatically build included libpopt if there is none on the system, +or if --with-included-popt is specified. +Add --enable-debug. + + + + + +**************************************** +Date: Friday February 23, 2001 @ 11:48 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv7734 + +Modified Files: + main.c +Log Message: +Change from getopt to popt. + + + + + +**************************************** +Date: Friday February 23, 2001 @ 12:02 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv13148 + +Modified Files: + options.c +Log Message: +Change from getopt to popt. +Include more details in --version output: say whether symlinks and +hardlinks are supported. +When hardlink support is missing, explain whether the problem is on +the client or server. +When a bad option is encountered, don't just print it to stderr but +send it to the rsync log mechanism. (However, server errors currently +seem to get lost in transit because of bugs in logging.) + + + +**************************************** +Date: Friday February 23, 2001 @ 12:02 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv19884 + +Modified Files: + rsync.h +Log Message: +Change from getopt to popt. +Add comment. + + + +**************************************** +Date: Friday February 23, 2001 @ 12:44 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5002 + +Modified Files: + clientserver.c +Log Message: +Change from getopt to popt. +Add comments. +Show listening port number in startup log message. + + + +**************************************** +Date: Friday February 23, 2001 @ 12:44 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv23664 + +Modified Files: + config.h.in +Log Message: +Change from getopt to popt. +Add --enable-debug. + + + +**************************************** +Date: Friday February 23, 2001 @ 12:44 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv4638 + +Modified Files: + exclude.c +Log Message: +Change from getopt to popt -- requires const-correctness on arguments. + + + +**************************************** +Date: Friday February 23, 2001 @ 12:45 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv21591 + +Modified Files: + syscall.c +Log Message: +Doc. + + + +**************************************** +Date: Friday February 23, 2001 @ 12:46 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv1963 + +Modified Files: + log.c +Log Message: +Doc. + + + +**************************************** +Date: Saturday February 24, 2001 @ 12:25 +Author: mbp + +Update of /data/cvs/rsync/popt +In directory samba:/tmp/cvs-serv14851/popt + +Log Message: +Directory /data/cvs/rsync/popt added to the repository + + + +**************************************** +Date: Saturday February 24, 2001 @ 12:32 +Author: mbp + +Update of /data/cvs/rsync/popt +In directory samba:/tmp/cvs-serv20923/popt + +Added Files: + .cvsignore CHANGES COPYING README config.log findme.c findme.h + popt.c popt.h poptconfig.c popthelp.c poptint.h poptparse.c + system.h +Log Message: +Upgrade from popt 1.2 to a cut-down 1.5 + + +**************************************** +Date: Saturday February 24, 2001 @ 12:32 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2 +In directory samba:/tmp/cvs-serv20923/popt-1.2 + +Removed Files: + .cvsignore CHANGES COPYING Makefile.am Makefile.in README + acconfig.h aclocal.m4 autogen.sh config.h.in configure + configure.in findme.c findme.h install-sh missing + mkinstalldirs popt.3 popt.c popt.h popt.spec poptconfig.c + popthelp.c poptint.h poptparse.c stamp-h.in test-poptrc + test1.c testit.sh +Log Message: +Upgrade from popt 1.2 to a cut-down 1.5 + + +**************************************** +Date: Saturday February 24, 2001 @ 12:32 +Author: mbp + +Update of /data/cvs/rsync/popt-1.2/po +In directory samba:/tmp/cvs-serv20923/popt-1.2/po + +Removed Files: + .cvsignore Makefile.in Makefile.in.in POTFILES POTFILES.in + ro.po +Log Message: +Upgrade from popt 1.2 to a cut-down 1.5 + + +**************************************** +Date: Saturday February 24, 2001 @ 12:37 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv16528 + +Modified Files: + Makefile.in configure configure.in +Log Message: +Upgrade from including popt1.2 to a version of popt1.5 trimmed down to +include only source and build from our Makefile. +Don't scan for libpopt if we're using our own; this makes +autoconf confused. + + + + +**************************************** +Date: Saturday February 24, 2001 @ 12:39 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv2585 + +Modified Files: + options.c +Log Message: +popt-1.5 is const-correct. + + + + +**************************************** +Date: Saturday February 24, 2001 @ 12:41 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv28184 + +Modified Files: + proto.h +Log Message: +popt-1.5 is const-correct. + + + +**************************************** +Date: Saturday February 24, 2001 @ 12:45 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv28320 + +Added Files: + INSTALL +Log Message: +Add some brief notes on how to install. + + + +**************************************** +Date: Tuesday February 27, 2001 @ 12:46 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv10895 + +Modified Files: + Makefile.in +Log Message: +Explain that the mktemp warning is harmless. + +If the autoconf inputs are changed, then try to reconfigure. Don't +worry if we can't do it, though. + + + +**************************************** +Date: Tuesday February 27, 2001 @ 12:49 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv11349 + +Modified Files: + rsync.yo +Log Message: +Add my name and a suggestion to read the FAQ for unanswered questions. + + + +**************************************** +Date: Sunday March 11, 2001 @ 14:40 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv20847 + +Modified Files: + Makefile.am +Log Message: +Don't include backups in upload of doxy. + + + +**************************************** +Date: Sunday March 11, 2001 @ 14:45 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3462 + +Modified Files: + whole.c tube.c stream.h stream.c scoop.c rsync.h readsums.c + patch.c mksum.c main.dox job.h job.c delta.c buf.h buf.c TODO + NEWS +Log Message: +It's no longer necessary to call rs_buffers_init on a stream before +starting to use it: all the internal data is kept in the job, not +in the stream. + +Rename rs_stream_t to rs_buffers_t, a more obvious name. Pass the +buffers to every rs_job_iter() call, rather than setting it at +startup. Similarly for all the _begin() functions. + +rs_job_new also takes the initial state function. + +Return RS_PARAM_ERROR when library is misused. + + + +**************************************** +Date: Sunday March 11, 2001 @ 15:40 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv18509 + +Modified Files: + main.dox +Log Message: +Add more buffers documentation. + + + +**************************************** +Date: Sunday March 11, 2001 @ 15:40 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10289 + +Modified Files: + rsync.h +Log Message: +Add more buffers documentation. + + + +**************************************** +Date: Sunday March 11, 2001 @ 15:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv25437 + +Modified Files: + Makefile.am NEWS configure.in +Log Message: +Get ready for 0.9.1. + + + +**************************************** +Date: Sunday March 11, 2001 @ 15:49 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv24689 + +Modified Files: + configure.in +Log Message: +Get ready for 0.9.1. + + + +**************************************** +Date: Sunday March 11, 2001 @ 16:32 +Author: mbp + +Update of /data/cvs/librsync/popt +In directory samba:/tmp/cvs-serv9793/popt + +Removed Files: + config.log +Log Message: +Does not belong in CVS. + + + +**************************************** +Date: Monday March 12, 2001 @ 0:52 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv24307 + +Modified Files: + trace.c +Log Message: +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 0:52 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv446 + +Modified Files: + rdiff.c +Log Message: +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:03 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv730 + +Modified Files: + Makefile.am +Log Message: +Build man pages and converted forms. Upload converted man pages to +websites. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:14 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv16422 + +Modified Files: + Makefile.am +Log Message: +Make manpages look better. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:16 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv638 + +Modified Files: + librsync.3 +Log Message: +Fix man page markup. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:16 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv17908 + +Modified Files: + buf.c +Log Message: +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:17 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv20024 + +Modified Files: + Makefile.am autogen.sh +Log Message: +Cater to people who prefer the name 'make test'. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:18 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3920 + +Modified Files: + configure.in +Log Message: +Call this 0.9.2pre. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv28315 + +Modified Files: + sumset.h +Log Message: +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8016 + +Modified Files: + stats.c trace.c trace.h +Log Message: +Optionally hide function name in trace output. Do this when displaying statistics. + + + +**************************************** +Date: Monday March 12, 2001 @ 1:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv5378 + +Removed Files: + includes.h +Log Message: +no longer required + + +**************************************** +Date: Monday March 12, 2001 @ 10:57 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8522 + +Modified Files: + configure.in +Log Message: +Look for libz and libbz2 so that we can later try using them in rdiff. + + + +**************************************** +Date: Monday March 12, 2001 @ 10:59 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv11270 + +Modified Files: + delta.c +Log Message: +When generating a delta, if there is a signature loaded then use a +different statefn that tries to get enough readahead to look for a +match. At the moment it just outputs LITERALs, but it's closer. + +Copy signature parameters into the job, so block_len is available for +deltas. + + + +**************************************** +Date: Monday March 12, 2001 @ 10:59 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2308 + +Modified Files: + job.h +Log Message: +When generating a delta, if there is a signature loaded then use a +different statefn that tries to get enough readahead to look for a +match. At the moment it just outputs LITERALs, but it's closer. + +Copy signature parameters into the job, so block_len is available for +deltas. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:00 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2844 + +Modified Files: + msg.c +Log Message: +Improved error messages. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv816 + +Modified Files: + rdiff.c +Log Message: +Get ready for built-in gzip/bzip2 support. + +Make sure we suggest --help when somebody makes a command-line mistake. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9746 + +Modified Files: + scoop.c +Log Message: +Get ready for readahead searching for matching blocks. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:03 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv18735 + +Modified Files: + stream.c stream.h +Log Message: +Get ready for readahead searching for matching blocks. + +Don't both copying if there are zero bytes left. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:04 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9508 + +Modified Files: + trace.c trace.h +Log Message: +Fix oops about RS_LOG_NONAME. + + + +**************************************** +Date: Monday March 12, 2001 @ 11:04 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv27923 + +Modified Files: + tube.c +Log Message: +Better trace. + +Doc. + +When copying data through to the tube, make sure we use up data in the +scoop first! + + + +**************************************** +Date: Monday March 12, 2001 @ 11:33 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv7800 + +Modified Files: + tube.c +Log Message: +Factor out code to copy from scoop. + + + +**************************************** +Date: Monday March 12, 2001 @ 12:02 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26981 + +Modified Files: + rsync.h stats.c +Log Message: +Include statistics about space used by command headers, and the total +bytes read and written. + + + +**************************************** +Date: Monday March 12, 2001 @ 12:08 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv27350 + +Modified Files: + emit.c +Log Message: +Include statistics about space used by command headers, and the total +bytes read and written. + + + +**************************************** +Date: Monday March 12, 2001 @ 12:09 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv17816 + +Modified Files: + job.c +Log Message: +Try to check that the job actually made progress if it said it did, so +as to better detect internal errors. + + + +**************************************** +Date: Monday March 12, 2001 @ 12:30 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv961 + +Modified Files: + main.dox +Log Message: +More documentation of buffers structure. + + + +**************************************** +Date: Monday March 12, 2001 @ 12:42 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv25483 + +Modified Files: + job.h mksum.c netint.c patch.c stream.c stream.h tube.c +Log Message: +Rename rs_blow_* to rs_tube_*. + +Rename rs_blow_literal to rs_tube_write, because it otherwise tends to +get confused with LITERAL commands. + + + + +**************************************** +Date: Monday March 12, 2001 @ 12:43 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26771 + +Modified Files: + delta.c +Log Message: +When generating a delta, get as much readahead as possible so that we +can generate the best deltas. Move code to actually scan out into a +separate function. Still just always emitting deltas. + + + + +**************************************** +Date: Monday March 12, 2001 @ 12:57 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv12218 + +Modified Files: + rsync.h +Log Message: +Fix Doxygen references. + + + +**************************************** +Date: Monday March 12, 2001 @ 13:16 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv19732 + +Modified Files: + job.c +Log Message: +More verbose internal error message. + + + +**************************************** +Date: Monday March 12, 2001 @ 13:23 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10949 + +Modified Files: + util.h +Log Message: +Drop unused macros. + + + +**************************************** +Date: Monday March 12, 2001 @ 13:28 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv20783 + +Modified Files: + scoop.c stream.h +Log Message: +Expose rs_scoop_input. + + + +**************************************** +Date: Monday March 12, 2001 @ 13:31 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv19667 + +Modified Files: + delta.c +Log Message: +Calculate checksums of full-size blocks in preparation for searching. +Still just emit literals. + +Sanity-check signature settings at job creation. + +If there's not enough input data to search for a block, then put what +we have into the scoop so that we can keep it for later. + + + +**************************************** +Date: Monday March 12, 2001 @ 14:28 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv13210 + +Modified Files: + emit.c emit.h +Log Message: +Add rs_emit_copy_cmd, with hardcoded cmdbyte. + + + +**************************************** +Date: Monday March 12, 2001 @ 14:31 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2104 + +Modified Files: + scoop.c +Log Message: +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 14:32 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9855 + +Modified Files: + delta.c +Log Message: +W00h00! Search for matching blocks and emit COPY commands when found. +Don't calculate the strong checksum unless we think we've found a +match. + + + +**************************************** +Date: Monday March 12, 2001 @ 14:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv19708 + +Modified Files: + patch.c +Log Message: +Add code to parse COPY commands. Doesn't execute them yet. + +Automatically stick immediate operands into job->param1. + + + + +**************************************** +Date: Monday March 12, 2001 @ 18:21 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3913 + +Modified Files: + buf.c +Log Message: +Fix rs_file_copy_cb, which needs to know the position at which to +copy. Show fd# if copy fails. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:22 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv27341 + +Modified Files: + rsync.h +Log Message: +Fix rs_file_copy_cb, which needs to know the position at which to +copy. Show fd# if copy fails. + +Doc. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:25 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3848 + +Modified Files: + rsync.h +Log Message: +Stats should include number of COPY cmdbytes. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:25 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6671 + +Modified Files: + emit.c +Log Message: +Stats should include number of COPY cmdbytes. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:27 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv1625 + +Modified Files: + job.h patch.c +Log Message: +Correctly execute COPY commands when patching. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:27 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv4153 + +Modified Files: + stats.c +Log Message: +Stats should include number of COPY cmdbytes. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:27 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3380 + +Modified Files: + scoop.c tube.c +Log Message: +Better trace. + + + +**************************************** +Date: Monday March 12, 2001 @ 18:29 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10780 + +Modified Files: + stats.c +Log Message: +Fix printf format. + + + +**************************************** +Date: Monday March 12, 2001 @ 23:34 +Author: mbp + +Update of /data/cvs/librsync/changes.input +In directory samba:/tmp/cvs-serv3090/changes.input + +Log Message: +Directory /data/cvs/librsync/changes.input added to the repository + + + +**************************************** +Date: Monday March 12, 2001 @ 23:38 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv13645 + +Modified Files: + delta.c +Log Message: +Make sure we progress by at least a single block when looking for a +match. + +After finding a match, remember its location and send it out on the +next iteration. + + + +**************************************** +Date: Monday March 12, 2001 @ 23:38 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9914 + +Modified Files: + patch.c +Log Message: +Keep track of statistics while reading patches. + + + +**************************************** +Date: Monday March 12, 2001 @ 23:40 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv23045 + +Modified Files: + Makefile.am +Added Files: + changes.test +Log Message: +Add another test case that compares similar files. + + +**************************************** +Date: Monday March 12, 2001 @ 23:40 +Author: mbp + +Update of /data/cvs/librsync/changes.input +In directory samba:/tmp/cvs-serv23045/changes.input + +Added Files: + 01.in 02.in 03.in 04.in +Log Message: +Add another test case that compares similar files. + + +**************************************** +Date: Monday March 12, 2001 @ 23:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8775 + +Modified Files: + search.c +Log Message: +Clean up. + + + +**************************************** +Date: Monday March 12, 2001 @ 23:43 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv23497 + +Modified Files: + .cvsignore +Log Message: +Ignore man products. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:00 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6729 + +Modified Files: + changes.test driver.sh +Added Files: + sources.test +Log Message: +Add triple_test function to test driver. + +Try a block size of 4096 first as it's a more common case. + +Add a test case that uses backups of source files. + + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:02 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv28281 + +Modified Files: + stats.c +Log Message: +Fix printf formats. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:02 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv1122 + +Modified Files: + delta.c +Log Message: +Doc. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:13 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv22826 + +Modified Files: + delta.c +Log Message: +Update the delta_scan routine to be able to do short end blocks. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:15 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv13972 + +Modified Files: + driver.sh +Log Message: +Driver now takes a -s option to make it show statistics. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:15 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10477 + +Modified Files: + sources.test +Log Message: +Also compare source to itself as the null case. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 0:52 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8445 + +Modified Files: + configure.in Makefile.am +Log Message: +Call this 0.9.2. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 1:04 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8753 + +Modified Files: + NEWS +Log Message: +Call this 0.9.2. + + + +**************************************** +Date: Tuesday March 13, 2001 @ 1:42 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv11874 + +Modified Files: + tube.c +Log Message: +Return error if file is truncated during COPY patch operation + + + +**************************************** +Date: Tuesday March 13, 2001 @ 1:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10904 + +Modified Files: + tube.c +Log Message: +Be more careful about criteria for detecting truncated literal blocks. + + + +**************************************** +Date: Thursday March 15, 2001 @ 11:34 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv1555 + +Modified Files: + configure.in +Log Message: +Moving towards 0.9.3. + + + +**************************************** +Date: Thursday March 15, 2001 @ 11:34 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv5928 + +Modified Files: + patch.c +Log Message: +Type-correctness. + + + +**************************************** +Date: Thursday March 15, 2001 @ 11:39 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv4641 + +Modified Files: + NEWS rsync.h +Log Message: +Patch to build on FreeBSD by Jos Backus , fixing +type-correctness. + + + +**************************************** +Date: Friday March 16, 2001 @ 13:11 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv23801 + +Modified Files: + main.c +Log Message: +Doc. + + + +**************************************** +Date: Friday March 16, 2001 @ 16:23 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv14035 + +Modified Files: + rsync.h +Log Message: +Define _LARGE_FILES to turn on LFS support on AIX (and some others?). + +See http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/prg_lrg_files.htm + +Thanks to Todd Willeat + + + +**************************************** +Date: Saturday March 17, 2001 @ 12:06 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv25000 + +Modified Files: + rsync.h configure.in configure aclocal.m4 +Log Message: +Don't unconditionally define _LARGEFILE_SOURCE, but instead include +some autoconf-2.13 macros that make the appropriate settings. Thanks +to Albert Chin and Paul Eggert +. + + + +**************************************** +Date: Saturday March 17, 2001 @ 12:34 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv11009 + +Modified Files: + clientserver.c +Log Message: +Add some todo comments. + + + +**************************************** +Date: Saturday March 17, 2001 @ 12:35 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv22366 + +Modified Files: + rsyncd.conf.yo rsyncd.conf.5 clientserver.c +Log Message: +More accurately, the uid/gid is set to -2, not "nobody". + + + +**************************************** +Date: Saturday March 17, 2001 @ 22:08 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2525 + +Modified Files: + Makefile.am +Log Message: +Add upload-news target. + + + +**************************************** +Date: Saturday March 17, 2001 @ 22:08 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv17888 + +Modified Files: + TODO +Log Message: +Note about output conversions. + + + +**************************************** +Date: Saturday March 17, 2001 @ 22:08 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3655 + +Modified Files: + rdiff.c +Log Message: +Gentler preprocessor syntax to support different compilers. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:40 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv18672 + +Modified Files: + .cvsignore Makefile.am +Log Message: +Suggestions to build on Solaris 2.6 from Alberto Accomazzi + + +Add `mutate' test utility (works, but incomplete) + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3596 + +Modified Files: + NEWS +Log Message: +Suggestions to build on Solaris 2.6 from Alberto Accomazzi + + +Add rs_job_drive, a generic mechanism for turning the library into +blocking mode. rs_whole_run now builds on top of this. The filebuf +interface has changed a little to accomodate it. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:46 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv19293 + +Modified Files: + autogen.sh +Log Message: +Get rid of GNUisms in scripts. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:47 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv13279 + +Modified Files: + configure.in +Log Message: +Canonical home page is rproxy.samba.org + +Look for intmax_t in stdint.h + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv27645 + +Modified Files: + driver.sh +Added Files: + dot +Log Message: +Get rid of GNUisms in scripts. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:49 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9099 + +Modified Files: + libversions.txt +Log Message: +Explain meaning of columns. + +Add release 0.9.3. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:49 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv12951 + +Modified Files: + patch.c +Log Message: +If the magic number is wrong, show the value we did receive. + + + +**************************************** +Date: Sunday March 18, 2001 @ 12:59 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv20682 + +Modified Files: + rdiff.c +Log Message: +Accept gzip and bzip2 options. Doesn't actually do anything yet. + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:00 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26651 + +Modified Files: + rsync.h +Log Message: +Add rs_job_drive, a generic mechanism for turning the library into +blocking mode. rs_whole_run now builds on top of this. The filebuf +interface has changed a little to accomodate it. + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv22421 + +Modified Files: + sources.test +Log Message: +Get rid of GNUisms in scripts. + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8909 + +Modified Files: + acconfig.h +Log Message: +Look for intmax_t in stdint.h + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:04 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26011 + +Added Files: + mutate.c +Log Message: +Add `mutate' test utility (works, but incomplete) + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:05 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv17356 + +Modified Files: + whole.c job.c buf.h buf.c +Log Message: +Add rs_job_drive, a generic mechanism for turning the library into +blocking mode. rs_whole_run now builds on top of this. The filebuf +interface has changed a little to accomodate it. + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:19 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv5442 + +Modified Files: + tube.c stats.c scoop.c patch.c netint.c job.c emit.c delta.c +Log Message: +Print large numbers as %f (double), so that we work whatever the +relationship between long, size_t and off_t. (Suggestion from tridge) + + + +**************************************** +Date: Sunday March 18, 2001 @ 13:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv943 + +Modified Files: + Makefile.am .cvsignore +Added Files: + mutate.pl +Removed Files: + mutate.c +Log Message: +It's much easier to write mutate in Perl rather than C. + + + +**************************************** +Date: Sunday March 18, 2001 @ 14:11 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10018 + +Modified Files: + mutate.pl Makefile.am +Added Files: + mutate.test +Log Message: +Add a test case based on mutate. + +Allow multiple mutations in a single invocation. + +More equally balance the choice of mutation operations. + + + + + +**************************************** +Date: Sunday March 18, 2001 @ 14:12 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv16207 + +Modified Files: + TODO +Log Message: +Doc. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:42 +Author: mbp + +Update of /data/cvs/librsync/signature.input +In directory samba:/tmp/cvs-serv25231/signature.input + +Log Message: +Directory /data/cvs/librsync/signature.input added to the repository + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:43 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv25542 + +Modified Files: + .cvsignore +Log Message: +Ignore profiler output. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:46 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv14100 + +Modified Files: + Makefile.am sources.test +Added Files: + signature.test +Log Message: +More exciting test cases. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:46 +Author: mbp + +Update of /data/cvs/librsync/signature.input +In directory samba:/tmp/cvs-serv14100/signature.input + +Added Files: + 01.in 01.sig +Log Message: +More exciting test cases. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:47 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26659 + +Modified Files: + acinclude.m4 +Log Message: +Drop explicit off64_t stuff from Samba, and instead use the +AC_SYS_LARGEFILE macro. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:47 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv1515 + +Modified Files: + configure.in +Log Message: +Drop explicit off64_t stuff from Samba, and instead use the +AC_SYS_LARGEFILE macro. + +Check more integer sizes. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv23018 + +Added Files: + types.h +Log Message: +Make sure we find a real uint32 type, so that MD4 code can assume it's +correct and be faster. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv1171 + +Modified Files: + whole.c +Log Message: +Do signatures on signature and loadsig operations. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:48 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6545 + +Modified Files: + rsync.h +Log Message: +Do signatures on signature and loadsig operations. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:49 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv22218 + +Modified Files: + sumset.h +Removed Files: + rollsum.c rollsum.h +Log Message: +rollsum_t is no longer used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:50 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3328 + +Modified Files: + trace.c trace.h +Log Message: +Check that %ld in trace statements is going to work. + +Add rs_trace_enabled() so that we can avoid spending too much time +generating trace output if it's not going to be used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:51 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv16822 + +Modified Files: + tube.c +Log Message: +size_t doesn't need to be printed as a double. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:51 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv26010 + +Modified Files: + stats.c +Log Message: +Do signatures on signature and loadsig operations. + +Fix float output formats. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:51 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv7239 + +Modified Files: + scoop.c +Log Message: +Fix float output formats. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:52 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3765 + +Modified Files: + readsums.c +Log Message: +Fix float output formats. + +Add rs_trace_enabled() so that we can avoid spending too much time +generating trace output if it's not going to be used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:53 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv13646 + +Modified Files: + rdiff.c +Log Message: +Add --paranoid option to double-check rolling sums. + +Explain that --gzip and --bzip2 don't work yet. + +Do stats on signature and loadsig operations. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:53 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2699 + +Modified Files: + patch.c +Log Message: +Fix float output formats. + +Add rs_trace_enabled() so that we can avoid spending too much time +generating trace output if it's not going to be used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:54 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2799 + +Modified Files: + netint.c +Log Message: +Fix float output formats. + +Add rs_trace_enabled() so that we can avoid spending too much time +generating trace output if it's not going to be used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:54 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv16222 + +Modified Files: + mutate.pl +Log Message: +Bias changes towards smaller sizes -- this is more realistic. + +Add a little user-friendliness. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:55 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv25655 + +Modified Files: + NEWS +Log Message: +Doc. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:56 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv5365 + +Modified Files: + checksum.c checksum.h delta.c +Log Message: +Use rolling checksums when generating deltas. (This seems to work, +but in very rare cases --paranoid finds a mismatch -- I'll check.) + +Fix float output formats. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:57 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv12261 + +Modified Files: + driver.sh +Log Message: +Fix output format for countdown() + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:58 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv904 + +Modified Files: + job.h +Log Message: +Do rolling checksums in deltas. + +Do stats on signatures. + + + +**************************************** +Date: Sunday March 18, 2001 @ 21:59 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv22274 + +Modified Files: + mdfour.c +Log Message: +Make MD4 40% faster! :-) + +Eliminate redundant copying of information. If we're on a +little-endian machine, do the calculations directly, and don't do byte +swapping. Use an exact uint32 type. Don't copy into the tail of the +MD4 accumulator unless there's already something there. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv5644 + +Modified Files: + mksum.c +Log Message: +Do stats on signatures. + +Add rs_trace_enabled() so that we can avoid spending too much time +generating trace output if it's not going to be used. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:01 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv4048 + +Modified Files: + main.dox +Log Message: +Explain importance of large buffers. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:02 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv2432 + +Modified Files: + job.c emit.c +Log Message: +Fix float output formats. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:10 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv15460 + +Modified Files: + Makefile.am +Log Message: +Include types.h in distribution. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:13 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6007 + +Removed Files: + tube.test +Log Message: +Obsolete. + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:16 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6232 + +Modified Files: + triple.test signature.test mutate.test mksum.test mdfour.test + driver.sh delta.test +Log Message: +Use test framework more consistently + + + +**************************************** +Date: Sunday March 18, 2001 @ 22:24 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv24271 + +Modified Files: + triple.test mutate.test mksum.test delta.test +Log Message: +Use test framework more consistently + + + +**************************************** +Date: Monday March 19, 2001 @ 0:17 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv576 + +Modified Files: + mutate.test +Log Message: +Fix silly mistake in test case loop. + + + +**************************************** +Date: Monday March 19, 2001 @ 0:20 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv7225 + +Modified Files: + driver.sh +Log Message: +Only run 150 of each test. + + + +**************************************** +Date: Monday March 19, 2001 @ 0:23 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6254 + +Modified Files: + configure.in NEWS +Log Message: +Get ready for 0.9.3 release. + + + +**************************************** +Date: Monday March 19, 2001 @ 0:25 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv9471 + +Modified Files: + NEWS +Log Message: +Get ready for 0.9.3 release. + + + +**************************************** +Date: Monday March 19, 2001 @ 0:41 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv14114 + +Modified Files: + rdiff.c +Log Message: +Build properly without zlib.h + + + +**************************************** +Date: Monday March 19, 2001 @ 1:19 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8980 + +Modified Files: + Makefile.am +Log Message: +Remove duplicate source file from list. + +Upload NEWS to librsync-NEWS on web site. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:19 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv10334 + +Modified Files: + configure.in +Log Message: +Tru64 cc can't cope with space between -I and the path. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:20 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv25083 + +Modified Files: + delta.c +Log Message: +Doc. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:20 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv3437 + +Modified Files: + job.c +Log Message: +Shut up compiler warning. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:21 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv6504 + +Modified Files: + netint.c +Log Message: +Type correctness on 64-bit platforms. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:28 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv18052 + +Modified Files: + rsync.h +Log Message: +Some compilers don't like trailing commas in enums. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:29 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv14747 + +Modified Files: + trace.h trace.c NEWS +Log Message: +Make trace work better on non-gcc compilers. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:42 +Author: mbp + +Update of /data/cvs/librsync +In directory samba:/tmp/cvs-serv8574 + +Modified Files: + trace.h hex.c driver.sh NEWS +Log Message: +More Tru64 portability fixes. + + + +**************************************** +Date: Monday March 19, 2001 @ 1:45 +Author: mbp + +Update of /data/cvs/librsync/debian +In directory samba:/tmp/cvs-serv21324/debian + +Log Message: +Directory /data/cvs/librsync/debian added to the repository + + + +**************************************** +Date: Monday March 19, 2001 @ 1:46 +Author: mbp + +Update of /data/cvs/librsync/debian +In directory samba:/tmp/cvs-serv10133 + +Added Files: + README.debian changelog control copyright crontab.ex dirs + diversions.ex inetd.conf.ex info.ex init.d.ex librsync1.files + manpage.1.ex menu.ex rules watch.ex +Log Message: +First-cut Debian support from deb-make + + +**************************************** +Date: Monday March 19, 2001 @ 19:19 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv9823 + +Modified Files: + log.c +Log Message: +Oops, fix edit mistake. + + + +**************************************** +Date: Tuesday March 20, 2001 @ 16:26 +Author: mbp + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv24124 + +Modified Files: + configure.in +Log Message: +Check for alloca.h and mcheck.h, as included popt needs to know about +them. + + + +**************************************** +Date: Thursday March 22, 2001 @ 0:12 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv16424 + +Modified Files: + io.c log.c +Log Message: +I came up with a new way of avoiding the error handling lockup bug in +rsync. It isn't pretty, but it does work and should completely avoid +that class of lockup. + + + + + +**************************************** +Date: Thursday March 22, 2001 @ 10:36 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5448 + +Modified Files: + Makefile.in +Log Message: +i hate makefiles that automatically run configure +:) + + + +**************************************** +Date: Thursday March 22, 2001 @ 10:44 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv5265 + +Modified Files: + clientserver.c +Log Message: +better error msg for "invalid uid" and "invalid gid" + + + + +**************************************** +Date: Thursday March 22, 2001 @ 18:36 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv12512 + +Modified Files: + cleanup.c clientserver.c compat.c io.c log.c main.c +Log Message: +new error handling system + +we now give a non-0 exit code if *any* of the files we have been asked +to transfer fail to transfer + + + + + +**************************************** +Date: Friday March 23, 2001 @ 12:26 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv18922 + +Modified Files: + cleanup.c errcode.h log.c main.c proto.h util.c +Log Message: +improved error handling again. Now we report messages for the remote +shell failing and propogate errors in a better fashion + + + +**************************************** +Date: Friday March 23, 2001 @ 14:44 +Author: tridge + +Update of /data/cvs/rsync/popt +In directory samba:/tmp/cvs-serv8573/popt + +Modified Files: + findme.c popt.c poptconfig.c poptparse.c +Log Message: +got rid of dependency on alloca in popt + + + +**************************************** +Date: Friday March 23, 2001 @ 14:46 +Author: tridge + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv12704 + +Modified Files: + log.c +Log Message: +"rsync error" is better than "transfer error", especially for -h + + + + +**************************************** +Date: Saturday March 24, 2001 @ 2:12 +Author: dwd + +Update of /data/cvs/rsync +In directory samba:/tmp/cvs-serv6221 + +Modified Files: + rsync.1 rsync.yo +Log Message: +Add the words "on destination machine" to the --compare-dist description +in rsync.yo. Re-ran yodl2man which I see pulled in a few other changes +from rsync.yo that hadn't yet made it into rsync.1. + + + +**************************************** +Date: Friday April 13, 2001 @ 5:25 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv16883 + +Modified Files: + io.c +Log Message: +use %.0f instead of %ld + + +**************************************** +Date: Tuesday May 1, 2001 @ 22:05 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22637 + +Modified Files: + rsyncd.conf.yo +Log Message: +better pid file location + + +**************************************** +Date: Wednesday May 2, 2001 @ 1:33 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv2920 + +Modified Files: + Makefile.in acconfig.h config.h.in configure configure.in + proto.h receiver.c syscall.c +Log Message: +use mkstemp on systems where it is secure + + +**************************************** +Date: Wednesday May 2, 2001 @ 1:33 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv2920/lib + +Modified Files: + compat.c +Log Message: +use mkstemp on systems where it is secure + + +**************************************** +Date: Wednesday May 2, 2001 @ 4:13 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30522 + +Modified Files: + flist.c +Log Message: +use _S_IFLNK not S_IFLNK + + +**************************************** +Date: Sunday May 6, 2001 @ 6:25 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv9858 + +Modified Files: + configure.in +Log Message: +no space after -I or Tru64 barfs + + +**************************************** +Date: Sunday May 6, 2001 @ 21:21 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28870 + +Modified Files: + configure +Log Message: +reran autoconf + + +**************************************** +Date: Sunday May 6, 2001 @ 23:59 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4837 + +Modified Files: + acconfig.h backup.c clientserver.c config.h.in configure + configure.in exclude.c generator.c io.c log.c options.c + receiver.c rsync.c socket.c util.c +Log Message: +imported new snprintf.c from samba, got rid of slprintf + + +**************************************** +Date: Sunday May 6, 2001 @ 23:59 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv4837/lib + +Modified Files: + snprintf.c +Log Message: +imported new snprintf.c from samba, got rid of slprintf + + +**************************************** +Date: Monday May 7, 2001 @ 1:59 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30900 + +Modified Files: + configure proto.h +Log Message: +forgot 1 place that used slprintf + + +**************************************** +Date: Monday May 7, 2001 @ 1:59 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv30900/lib + +Modified Files: + compat.c +Log Message: +forgot 1 place that used slprintf + + +**************************************** +Date: Tue May 22 07:33:39 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv2577 + +Modified Files: + rsync.1 rsync.yo +Log Message: +Add --ignore-errors documentation. + + +Revisions: +rsync.1 1.91 => 1.92 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.1?r1=1.91&r2=1.92 +rsync.yo 1.76 => 1.77 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.yo?r1=1.76&r2=1.77 + +**************************************** +Date: Thu May 24 11:01:56 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv9802 + +Modified Files: + rsync.1 rsync.yo +Log Message: +Ran rsync.yo through yodl2man to produce rsync.1. I found that the string +"file(s)" in rsync.yo was being improperly translated by yodl2man so I +changed it to just "files". + + +Revisions: +rsync.1 1.92 => 1.93 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.1?r1=1.92&r2=1.93 +rsync.yo 1.77 => 1.78 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.yo?r1=1.77&r2=1.78 + +**************************************** +Date: Tue May 29 07:37:54 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22943 + +Modified Files: + main.c rsync.yo +Log Message: +Make --whole-file the default when source and target are on the local machine. + + +Revisions: +main.c 1.126 => 1.127 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.126&r2=1.127 +rsync.yo 1.78 => 1.79 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.yo?r1=1.78&r2=1.79 + +**************************************** +Date: Tue May 29 07:38:36 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22985 + +Modified Files: + rsync.1 +Log Message: +Ran yodl2man on rsync.yo to update rsync.1 + + +Revisions: +rsync.1 1.93 => 1.94 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.1?r1=1.93&r2=1.94 + +**************************************** +Date: Tue Jun 12 12:33:43 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv360 + +Modified Files: + acconfig.h config.h.in configure configure.in options.c +Log Message: +Add --with-rsync-path option. + + +Revisions: +acconfig.h 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/acconfig.h?r1=1.10&r2=1.11 +config.h.in 1.48 => 1.49 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.48&r2=1.49 +configure 1.70 => 1.71 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.70&r2=1.71 +configure.in 1.72 => 1.73 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.72&r2=1.73 +options.c 1.52 => 1.53 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.52&r2=1.53 + +**************************************** +Date: Tue Jun 12 14:35:26 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28698 + +Modified Files: + acconfig.h config.h.in configure.in +Log Message: +Use 3rd parameter in AC_DEFINE and AC_DEFINE_UNQUOTED to avoid having to +manually put the defines into acconfig.h. + + +Revisions: +acconfig.h 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/acconfig.h?r1=1.11&r2=1.12 +config.h.in 1.49 => 1.50 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.49&r2=1.50 +configure.in 1.73 => 1.74 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.73&r2=1.74 + +**************************************** +Date: Wed Jun 13 09:47:22 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv12500 + +Modified Files: + configure configure.in +Log Message: +Simplify the --with-rsync-path option implementation. Can directly pass +the double-quotes to AC_DEFINE_UNQUOTED instead of having a separate step. + + +Revisions: +configure 1.71 => 1.72 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.71&r2=1.72 +configure.in 1.74 => 1.75 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.74&r2=1.75 + +**************************************** +Date: Wed Jun 20 23:15:34 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv2618 + +Modified Files: + exclude.c +Log Message: +Fix from Wayne Davison: + + The --cvs-exclude option is broken in the CVS version of rsync + because of a cut-and-paste-induced bug in exclude.c: + + This bug could cause the sending rsync to crash when it dereferenced + a NULL pointer. + + +Revisions: +exclude.c 1.37 => 1.38 + http://www.samba.org/cgi-bin/cvsweb/rsync/exclude.c?r1=1.37&r2=1.38 + +**************************************** +Date: Wed Jun 20 23:19:00 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3143 + +Modified Files: + socket.c +Log Message: +If binding to a low-numbered port fails with EACCES, then the error +message should explain that you probably need to be root. + +(Why leave off the final S? Kernighan must have been a *really* slow +typist.) + + +Revisions: +socket.c 1.27 => 1.28 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.27&r2=1.28 + +**************************************** +Date: Fri Jun 22 03:16:04 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv19752 + +Modified Files: + authenticate.c rsyncd.conf.yo +Log Message: +allow shell wildcards in auth users lines + +Revisions: +authenticate.c 1.16 => 1.17 + http://www.samba.org/cgi-bin/cvsweb/rsync/authenticate.c?r1=1.16&r2=1.17 +rsyncd.conf.yo 1.42 => 1.43 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsyncd.conf.yo?r1=1.42&r2=1.43 + +**************************************** +Date: Fri Jun 22 13:36:43 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv1616 + +Modified Files: + configure configure.in +Log Message: +Improve the description of --with-default-rsync. + + +Revisions: +configure 1.72 => 1.73 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.72&r2=1.73 +configure.in 1.75 => 1.76 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.75&r2=1.76 + +**************************************** +Date: Mon Jun 25 18:20:42 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv15401 + +Modified Files: + config.h.in configure main.c +Log Message: +applied simple nohang patch from Wayne Davison + +Revisions: +config.h.in 1.50 => 1.51 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.50&r2=1.51 +configure 1.73 => 1.74 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.73&r2=1.74 +main.c 1.127 => 1.128 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.127&r2=1.128 + +**************************************** +Date: Mon Jun 25 20:09:15 2001 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv12086 + +Modified Files: + mdfour.c +Log Message: +fixed md4 on 64 bit boxes + + +Revisions: +mdfour.c 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/mdfour.c?r1=1.4&r2=1.5 + +**************************************** +Date: Wed Jun 27 22:07:15 2001 +Author: tridge + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv21288 + +Modified Files: + mdfour.c +Log Message: +removed remnant test code for cray + + +Revisions: +mdfour.c 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/mdfour.c?r1=1.5&r2=1.6 + +**************************************** +Date: Tue Jul 17 03:45:54 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv11507 + +Modified Files: + clientserver.c +Log Message: +prevent nasty error msgs when listing shares + + +Revisions: +clientserver.c 1.67 => 1.68 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.67&r2=1.68 + +**************************************** +Date: Tue Jul 17 03:48:31 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv11895 + +Modified Files: + main.c +Log Message: +reap children in sigchld handler + + + +Revisions: +main.c 1.128 => 1.129 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.128&r2=1.129 + +**************************************** +Date: Sat Jul 21 19:39:06 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv13692 + +Modified Files: + config.guess config.sub +Log Message: +updated config scripts from subversion + +Revisions: +config.guess 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.guess?r1=1.4&r2=1.5 +config.sub 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.sub?r1=1.2&r2=1.3 + +**************************************** +Date: Sun Aug 5 21:31:05 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv12605 + +Added Files: + NEWS +Log Message: +Summarize all the changes since 2.4.6 so we have them in one place. + + +Revisions: +NEWS NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?rev=1.1 + +**************************************** +Date: Mon Aug 6 00:58:01 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24996 + +Modified Files: + Tag: branch_mbp_rsyncplus_merge + Makefile.in compat.c flist.c main.c match.c options.c proto.h + rsync.c sender.c token.c util.c +Added Files: + Tag: branch_mbp_rsyncplus_merge + batch.c +Log Message: +Merge rsync+ patch from Jos Backus onto a side branch. +If this works OK I will move it across shortly: in theory it only adds options +(and more global variable cruft!) + +Revisions: +batch.c NONE => 1.1.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?rev=1.1.2.1 +Makefile.in 1.46 => 1.46.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.46&r2=1.46.2.1 +compat.c 1.14 => 1.14.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/compat.c?r1=1.14&r2=1.14.2.1 +flist.c 1.90 => 1.90.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.90&r2=1.90.2.1 +main.c 1.129 => 1.129.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.129&r2=1.129.2.1 +match.c 1.45 => 1.45.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/match.c?r1=1.45&r2=1.45.8.1 +options.c 1.53 => 1.53.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.53&r2=1.53.2.1 +proto.h 1.126 => 1.126.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.126&r2=1.126.2.1 +rsync.c 1.117 => 1.117.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.c?r1=1.117&r2=1.117.2.1 +sender.c 1.10 => 1.10.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.10&r2=1.10.8.1 +token.c 1.20 => 1.20.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/token.c?r1=1.20&r2=1.20.8.1 +util.c 1.89 => 1.89.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/util.c?r1=1.89&r2=1.89.2.1 + +**************************************** +Date: Mon Aug 6 01:08:10 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25565 + +Modified Files: + Tag: branch-mbp-merge-rsync+ + Makefile.in compat.c configure flist.c main.c match.c + options.c proto.h rsync.c sender.c token.c util.c +Added Files: + Tag: branch-mbp-merge-rsync+ + batch.c +Log Message: +Merge Jos's rsync+ patch onto 2.4.6 -- it applies cleanly here. I'm going +to move it across to HEAD (2.4.7pre) next. + + +Revisions: +batch.c NONE => 1.1.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?rev=1.1.4.1 +Makefile.in 1.41 => 1.41.6.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.41&r2=1.41.6.1 +compat.c 1.13 => 1.13.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/compat.c?r1=1.13&r2=1.13.8.1 +configure 1.62 => 1.62.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.62&r2=1.62.4.1 +flist.c 1.88 => 1.88.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.88&r2=1.88.2.1 +main.c 1.117 => 1.117.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.117&r2=1.117.2.1 +match.c 1.45 => 1.45.10.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/match.c?r1=1.45&r2=1.45.10.1 +options.c 1.46 => 1.46.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.46&r2=1.46.4.1 +proto.h 1.122 => 1.122.6.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.122&r2=1.122.6.1 +rsync.c 1.115 => 1.115.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.c?r1=1.115&r2=1.115.4.1 +sender.c 1.10 => 1.10.10.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.10&r2=1.10.10.1 +token.c 1.20 => 1.20.10.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/token.c?r1=1.20&r2=1.20.10.1 +util.c 1.86 => 1.86.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/util.c?r1=1.86&r2=1.86.4.1 + +**************************************** +Date: Mon Aug 6 01:21:41 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26619 + +Modified Files: + Tag: branch-merge-rsync+-2-4-7 + util.c token.c sender.c rsync.c proto.h options.c match.c + main.c flist.c compat.c Makefile.in +Added Files: + Tag: branch-merge-rsync+-2-4-7 + batch.c +Log Message: +This time for sure :-): merge the rsync+ 2.4.6 patch onto the head. +The changes are just to accomodate other code which had been added in +conflicting regions, and to update the option-handling code to use +popt rather than getopt. + + +Revisions: +batch.c NONE => 1.1.6.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?rev=1.1.6.1 +util.c 1.89 => 1.89.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/util.c?r1=1.89&r2=1.89.4.1 +token.c 1.20 => 1.20.12.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/token.c?r1=1.20&r2=1.20.12.1 +sender.c 1.10 => 1.10.12.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.10&r2=1.10.12.1 +rsync.c 1.117 => 1.117.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.c?r1=1.117&r2=1.117.4.1 +proto.h 1.126 => 1.126.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.126&r2=1.126.4.1 +options.c 1.53 => 1.53.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.53&r2=1.53.4.1 +match.c 1.45 => 1.45.12.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/match.c?r1=1.45&r2=1.45.12.1 +main.c 1.129 => 1.129.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.129&r2=1.129.4.1 +flist.c 1.90 => 1.90.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.90&r2=1.90.4.1 +compat.c 1.14 => 1.14.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/compat.c?r1=1.14&r2=1.14.4.1 +Makefile.in 1.46 => 1.46.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.46&r2=1.46.4.1 + +**************************************** +Date: Mon Aug 6 01:41:13 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28169 + +Modified Files: + aclocal.m4 +Log Message: +Fix m4 quoting to make autoconf2.50 happy. I checked it still works +on 2.13. See "info:(autoconf)New Macros". + + +Revisions: +aclocal.m4 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.2&r2=1.3 + +**************************************** +Date: Mon Aug 6 01:49:19 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28547 + +Modified Files: + rsync.h configure.in configure +Log Message: +Fix check for ino_t to work with both autoconf2.50 and autoconf2.13. + + +Revisions: +rsync.h 1.99 => 1.100 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.99&r2=1.100 +configure.in 1.76 => 1.77 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.76&r2=1.77 +configure 1.74 => 1.75 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.74&r2=1.75 + +**************************************** +Date: Mon Aug 6 01:51:33 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28707 + +Modified Files: + Tag: branch-merge-rsync+-2-4-7 + NEWS +Log Message: +Document patch merge. + + +Revisions: +NEWS 1.1 => 1.1.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.1&r2=1.1.4.1 + +**************************************** +Date: Mon Aug 6 01:51:48 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28728 + +Modified Files: + NEWS +Log Message: +Document autoconf updates. + + +Revisions: +NEWS 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.1&r2=1.2 + +**************************************** +Date: Mon Aug 6 05:16:22 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8081 + +Modified Files: + flist.c +Log Message: +Fix for UNICOS CC: first argument to readlink must not be const, or we +get an error. + + +Revisions: +flist.c 1.90 => 1.91 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.90&r2=1.91 + +**************************************** +Date: Mon Aug 6 05:23:52 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8517 + +Modified Files: + flist.c +Log Message: +Correct over-zealous edit for UNICOS. + + +Revisions: +flist.c 1.91 => 1.92 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.91&r2=1.92 + +**************************************** +Date: Mon Aug 6 05:25:46 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8696 + +Modified Files: + main.c util.c +Log Message: +Try to fix "infinite loop" warning on AIX and other compilers. (We +exit on a signal.) + + +Revisions: +main.c 1.129 => 1.130 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.129&r2=1.130 +util.c 1.89 => 1.90 + http://www.samba.org/cgi-bin/cvsweb/rsync/util.c?r1=1.89&r2=1.90 + +**************************************** +Date: Mon Aug 6 05:27:04 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8816 + +Modified Files: + socket.c proto.h configure.in configure config.h.in +Log Message: +Use socklen_t if defined, or otherwise int. This tries to fix +warnings on platforms (e.g. AIX) where this type is defined and not +int. + + +Revisions: +socket.c 1.28 => 1.29 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.28&r2=1.29 +proto.h 1.126 => 1.127 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.126&r2=1.127 +configure.in 1.77 => 1.78 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.77&r2=1.78 +configure 1.75 => 1.76 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.75&r2=1.76 +config.h.in 1.51 => 1.52 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.51&r2=1.52 + +**************************************** +Date: Mon Aug 6 05:31:23 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv9053 + +Modified Files: + socket.c +Log Message: +Two more instances of socklen_t. + + +Revisions: +socket.c 1.29 => 1.30 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.29&r2=1.30 + +**************************************** +Date: Wed Aug 8 01:11:51 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8817 + +Modified Files: + configure.in configure config.h.in aclocal.m4 +Log Message: +Try various different types as replacements for socklen_t until we +find one that works. This helps on platforms like HP/UX and UNICOS +where the argument to getsockopt is neither socklen_t nor int. + + +Revisions: +configure.in 1.78 => 1.79 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.78&r2=1.79 +configure 1.76 => 1.77 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.76&r2=1.77 +config.h.in 1.52 => 1.53 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.52&r2=1.53 +aclocal.m4 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.3&r2=1.4 + +**************************************** +Date: Wed Aug 8 01:55:24 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv11501 + +Modified Files: + socket.c +Log Message: +don't need to lookup our own name in open_socket_in() + + +Revisions: +socket.c 1.30 => 1.31 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.30&r2=1.31 + +**************************************** +Date: Wed Aug 8 03:04:40 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv16042 + +Modified Files: + configure.in configure config.h.in aclocal.m4 +Log Message: +Another try at socklen_t: just check for it, and otherwise use int. +The HP manual says this will work on old HP/UX versions; I'm not sure +about other systems. Possibly it will break on old BSD-derived +systems with 32-bit int, 64-bit size_t and no socklen_t, if there are +any such. + + +Revisions: +configure.in 1.79 => 1.80 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.79&r2=1.80 +configure 1.77 => 1.78 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.77&r2=1.78 +config.h.in 1.53 => 1.54 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.53&r2=1.54 +aclocal.m4 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.4&r2=1.5 + +**************************************** +Date: Mon Aug 13 06:29:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22337 + +Modified Files: + Tag: track-kameipv6 + Makefile.in acconfig.h clientserver.c config.h.in configure + configure.in options.c proto.h socket.c +Log Message: +Apply KAME.net rsync-246-2000907 patch on branch, no other changes + +Revisions: +Makefile.in 1.41 => 1.41.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.41&r2=1.41.8.1 +acconfig.h 1.8 => 1.8.10.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/acconfig.h?r1=1.8&r2=1.8.10.1 +clientserver.c 1.58 => 1.58.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.58&r2=1.58.4.1 +config.h.in 1.45 => 1.45.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.45&r2=1.45.8.1 +configure 1.62 => 1.62.6.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.62&r2=1.62.6.1 +configure.in 1.64 => 1.64.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.64&r2=1.64.4.1 +options.c 1.46 => 1.46.6.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.46&r2=1.46.6.1 +proto.h 1.122 => 1.122.8.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.122&r2=1.122.8.1 +socket.c 1.22 => 1.22.4.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.22&r2=1.22.4.1 + +**************************************** +Date: Mon Aug 13 06:29:12 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv22337/lib + +Added Files: + Tag: track-kameipv6 + addrinfo.h getaddrinfo.c getnameinfo.c +Log Message: +Apply KAME.net rsync-246-2000907 patch on branch, no other changes + +Revisions: +addrinfo.h NONE => 1.1.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?rev=1.1.2.1 +getaddrinfo.c NONE => 1.1.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?rev=1.1.2.1 +getnameinfo.c NONE => 1.1.2.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?rev=1.1.2.1 + +**************************************** +Date: Mon Aug 13 19:04:51 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29721 + +Modified Files: + Makefile.in NEWS compat.c flist.c main.c match.c options.c + proto.h rsync.1 rsync.c rsync.yo sender.c token.c util.c +Added Files: + batch.c +Log Message: +Merge across rsync+ patch; add a little documentation to the manpage. More documentation would be better. + +Revisions: +batch.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?r1=1.1&r2=1.2 +Makefile.in 1.46 => 1.47 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.46&r2=1.47 +NEWS 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.2&r2=1.3 +compat.c 1.14 => 1.15 + http://www.samba.org/cgi-bin/cvsweb/rsync/compat.c?r1=1.14&r2=1.15 +flist.c 1.92 => 1.93 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.92&r2=1.93 +main.c 1.130 => 1.131 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.130&r2=1.131 +match.c 1.45 => 1.46 + http://www.samba.org/cgi-bin/cvsweb/rsync/match.c?r1=1.45&r2=1.46 +options.c 1.53 => 1.54 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.53&r2=1.54 +proto.h 1.127 => 1.128 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.127&r2=1.128 +rsync.1 1.94 => 1.95 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.1?r1=1.94&r2=1.95 +rsync.c 1.117 => 1.118 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.c?r1=1.117&r2=1.118 +rsync.yo 1.79 => 1.80 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.yo?r1=1.79&r2=1.80 +sender.c 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.10&r2=1.11 +token.c 1.20 => 1.21 + http://www.samba.org/cgi-bin/cvsweb/rsync/token.c?r1=1.20&r2=1.21 +util.c 1.90 => 1.91 + http://www.samba.org/cgi-bin/cvsweb/rsync/util.c?r1=1.90&r2=1.91 + +**************************************** +Date: Mon Aug 13 19:08:18 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29973 + +Modified Files: + options.c +Log Message: +Update version message to mention batch files. + +Revisions: +options.c 1.54 => 1.55 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.54&r2=1.55 + +**************************************** +Date: Mon Aug 13 19:14:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30478 + +Modified Files: + NEWS +Log Message: +Remove incorrect news message + +Revisions: +NEWS 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.3&r2=1.4 + +**************************************** +Date: Mon Aug 13 19:18:08 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30623 + +Modified Files: + aclocal.m4 config.h.in configure configure.in +Log Message: +Commit getconf/socklen_t/largefile patch suggested by Albert Chin. +This is tested on + Solaris 2.5.2, 2.6, 7, 8/SPARC, HP-UX 10.20, 11.00, + Tru64 UNIX 4.0D, 5.0A, IRIX 6.2, 6.5, AIX 4.3.2 +and it works ok. + +This patch *requires* autoconf 2.52. + + + +Revisions: +aclocal.m4 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.5&r2=1.6 +config.h.in 1.54 => 1.55 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.54&r2=1.55 +configure 1.78 => 1.79 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.78&r2=1.79 +configure.in 1.80 => 1.81 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.80&r2=1.81 + +**************************************** +Date: Mon Aug 13 19:22:29 2001 +Author: mbp + +Update of /data/cvs/rsync/packaging/redhat/7.1 +In directory va:/tmp/cvs-serv30837/7.1 + +Log Message: +Directory /data/cvs/rsync/packaging/redhat/7.1 added to the repository + + +Revisions: + +**************************************** +Date: Mon Aug 13 19:24:17 2001 +Author: mbp + +Update of /data/cvs/rsync/packaging/redhat/7.1 +In directory va:/tmp/cvs-serv30950 + +Added Files: + rsync.spec +Log Message: +Spec file from Jason Haar that works on RedHat 7.1. Not tested by me yet. + +Revisions: +rsync.spec NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/packaging/redhat/7.1/rsync.spec?rev=1.1 + +**************************************** +Date: Mon Aug 13 19:28:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv31194 + +Modified Files: + NEWS +Log Message: +Note UNICOS works again + +Revisions: +NEWS 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.4&r2=1.5 + +**************************************** +Date: Tue Aug 14 22:07:29 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24051 + +Modified Files: + options.c +Log Message: +Fix bug in --address handling. + + +Revisions: +options.c 1.55 => 1.56 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.55&r2=1.56 + +**************************************** +Date: Tue Aug 14 22:08:07 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24083 + +Modified Files: + socket.c +Log Message: +Better error messages for DNS. + + +Revisions: +socket.c 1.31 => 1.32 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.31&r2=1.32 + +**************************************** +Date: Tue Aug 14 22:45:05 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv26120/testsuite + +Log Message: +Directory /data/cvs/rsync/testsuite added to the repository + + +Revisions: + +**************************************** +Date: Tue Aug 14 22:47:29 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26267 + +Modified Files: + socket.c +Log Message: +Typo. Shouldn't depend on assert(). + + +Revisions: +socket.c 1.32 => 1.33 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.32&r2=1.33 + +**************************************** +Date: Tue Aug 14 22:47:57 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv26283/testsuite + +Added Files: + runlist rsync-hello.test README +Log Message: +Add the start of a buildfarm test suite for rsync. It doesn't do much +yet -- I just want to see if it runs. + + +Revisions: +runlist NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/runlist?rev=1.1 +rsync-hello.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?rev=1.1 +README NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/README?rev=1.1 + +**************************************** +Date: Tue Aug 14 23:34:28 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29039 + +Modified Files: + sender.c +Log Message: +Fix trace message which was missing a parameter. + +Drop dead variable introduced in rsync+ patch. + + +Revisions: +sender.c 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.11&r2=1.12 + +**************************************** +Date: Tue Aug 14 23:38:23 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29180 + +Modified Files: + main.c +Log Message: +Drop dead variables introduced in rsync+ patch. + + +Revisions: +main.c 1.131 => 1.132 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.131&r2=1.132 + +**************************************** +Date: Tue Aug 14 23:41:24 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29385 + +Modified Files: + flist.c main.c +Log Message: +Fix casts when some variables are printed out. + + +Revisions: +flist.c 1.93 => 1.94 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.93&r2=1.94 +main.c 1.132 => 1.133 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.132&r2=1.133 + +**************************************** +Date: Tue Aug 14 23:44:44 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29546 + +Modified Files: + clientserver.c batch.c +Log Message: +Fix casts when some variables are printed out. + + +Revisions: +clientserver.c 1.68 => 1.69 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.68&r2=1.69 +batch.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Aug 14 23:47:40 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29690 + +Modified Files: + socket.c +Log Message: +Use socklen_t for getpeername, since we hopefully now have it defined +on all platforms. + + +Revisions: +socket.c 1.33 => 1.34 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.33&r2=1.34 + +**************************************** +Date: Tue Aug 14 23:50:46 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv29872 + +Modified Files: + batch.c +Log Message: +Fix another format cast. + + +Revisions: +batch.c 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/batch.c?r1=1.3&r2=1.4 + +**************************************** +Date: Wed Aug 15 00:50:07 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv644 + +Modified Files: + main.c +Log Message: +Fix a bug introduced in 1.119, whereby strings like +"mirror.aarnet.edu.au::" were not properly digested. + +It wasn't even my bug! :-) + + +Revisions: +main.c 1.133 => 1.134 + http://www.samba.org/cgi-bin/cvsweb/rsync/main.c?r1=1.133&r2=1.134 + +**************************************** +Date: Wed Aug 15 00:52:30 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv777 + +Modified Files: + socket.c +Log Message: +Check that gethostbyname does actually return AF_INET addresses, since +that's all we can handle. + +Also, try a new method of handling in_addr and hostent that will +hopefully work on Cray machines without 32-bit types. + + +Revisions: +socket.c 1.34 => 1.35 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.34&r2=1.35 + +**************************************** +Date: Wed Aug 15 01:05:05 2001 +Author: mbp + +Update of /data/cvs/rsync/tests-dont-exist +In directory va:/tmp/cvs-serv1558/tests-dont-exist + +Log Message: +Directory /data/cvs/rsync/tests-dont-exist added to the repository + + +Revisions: + +**************************************** +Date: Wed Aug 15 01:06:26 2001 +Author: mbp + +Update of /data/cvs/rsync/tests-dont-exist +In directory va:/tmp/cvs-serv1641 + +Added Files: + runlist +Log Message: +Try to get tests to run with old buildfarm clients + +Revisions: +runlist NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/runlist?rev=1.1 + +**************************************** +Date: Wed Aug 15 01:52:11 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4426 + +Modified Files: + options.c +Log Message: +Fix cast warning. + + +Revisions: +options.c 1.56 => 1.57 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.56&r2=1.57 + +**************************************** +Date: Wed Aug 15 22:44:17 2001 +Author: mbp + +Update of /data/cvs/rsync/tests-dont-exist +In directory va:/tmp/cvs-serv18611/tests-dont-exist + +Modified Files: + runlist +Added Files: + rsync.fns rsync-hello.test oh-yes-they-do +Log Message: +Try to execute rsync --version as part of the test suite -- see if +this works on the farm. + + +Revisions: +rsync.fns NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/rsync.fns?rev=1.1 +rsync-hello.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/rsync-hello.test?rev=1.1 +oh-yes-they-do NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/oh-yes-they-do?rev=1.1 +runlist 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/runlist?r1=1.1&r2=1.2 + +**************************************** +Date: Wed Aug 15 23:24:56 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv20970 + +Modified Files: + rsync-hello.test runlist +Added Files: + rsync.fns +Log Message: +Updated directory name for rsync tests + +Revisions: +rsync.fns NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?rev=1.1 +rsync-hello.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?r1=1.1&r2=1.2 +runlist 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/runlist?r1=1.1&r2=1.2 + +**************************************** +Date: Wed Aug 15 23:27:52 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv21171 + +Modified Files: + runlist +Log Message: +fix filename + +Revisions: +runlist 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/runlist?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 16 00:08:29 2001 +Author: mbp + +Update of /data/cvs/rsync/tests-dont-exist +In directory va:/tmp/cvs-serv23897 + +Removed Files: + oh-yes-they-do rsync-hello.test rsync.fns runlist +Log Message: +Gave directory its proper name + +Revisions: +oh-yes-they-do 1.1 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/oh-yes-they-do?rev=1.1 +rsync-hello.test 1.1 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/rsync-hello.test?rev=1.1 +rsync.fns 1.1 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/rsync.fns?rev=1.1 +runlist 1.2 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/tests-dont-exist/runlist?rev=1.2 + +**************************************** +Date: Thu Aug 16 01:12:55 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv27901/testsuite + +Modified Files: + rsync.fns +Log Message: +Fix typo. + + +Revisions: +rsync.fns 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Aug 16 01:13:13 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv27964/testsuite + +Modified Files: + rsync-hello.test +Log Message: +Use set -x until this script works properly. + + +Revisions: +rsync-hello.test 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 16 02:08:30 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv31515 + +Modified Files: + Makefile.in +Log Message: +Start to unify the "make check" and build farm test suites + +Revisions: +Makefile.in 1.47 => 1.48 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.47&r2=1.48 + +**************************************** +Date: Thu Aug 16 02:08:30 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv31515/testsuite + +Modified Files: + README rsync-hello.test runlist +Added Files: + master.test +Removed Files: + rsync.fns +Log Message: +Start to unify the "make check" and build farm test suites + +Revisions: +master.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?rev=1.1 +README 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/README?r1=1.1&r2=1.2 +rsync-hello.test 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?r1=1.3&r2=1.4 +runlist 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/runlist?r1=1.3&r2=1.4 +rsync.fns 1.2 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?rev=1.2 + +**************************************** +Date: Thu Aug 16 02:13:38 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv32103 + +Modified Files: + master.test +Added Files: + hands.test +Log Message: +Move Phil Hand's test under the control of the master test suite. + +Revisions: +hands.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?rev=1.1 +master.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Aug 16 02:16:10 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv32201 + +Modified Files: + NEWS +Log Message: +Note test suite. + +Note autoconf2.52 is required. + + +Revisions: +NEWS 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.5&r2=1.6 + +**************************************** +Date: Thu Aug 16 02:35:21 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv835/testsuite + +Modified Files: + master.test +Log Message: +Don't print test headers unless the test is about to run. + + +Revisions: +master.test 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 16 02:37:54 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv1103/testsuite + +Modified Files: + master.test +Log Message: +Show number of passed/failed/skipped tests. + + +Revisions: +master.test 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.3&r2=1.4 + +**************************************** +Date: Thu Aug 16 17:51:20 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv828/testsuite + +Modified Files: + master.test +Log Message: +Try to get test scripts to run properly. + + +Revisions: +master.test 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.4&r2=1.5 + +**************************************** +Date: Thu Aug 16 17:58:21 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv1244/testsuite + +Modified Files: + master.test +Log Message: +Find the right directory to run the test components. + + +Revisions: +master.test 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.5&r2=1.6 + +**************************************** +Date: Thu Aug 16 18:34:31 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3324/testsuite + +Modified Files: + rsync-hello.test master.test +Log Message: +Try to fix "make check" directory path. + +Don't wait for input at end of tests. + + +Revisions: +rsync-hello.test 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?r1=1.4&r2=1.5 +master.test 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.6&r2=1.7 + +**************************************** +Date: Thu Aug 16 18:34:32 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3324 + +Modified Files: + Makefile.in +Log Message: +Try to fix "make check" directory path. + +Don't wait for input at end of tests. + + +Revisions: +Makefile.in 1.48 => 1.49 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.48&r2=1.49 + +**************************************** +Date: Thu Aug 16 18:43:16 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3928/testsuite + +Modified Files: + hands.test +Log Message: +Don't pause at end of tests. + + +Revisions: +hands.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Aug 16 18:44:13 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3989/testsuite + +Modified Files: + master.test +Log Message: +Set up scratch directory for tests. + + +Revisions: +master.test 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.7&r2=1.8 + +**************************************** +Date: Thu Aug 16 18:44:13 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3989 + +Modified Files: + Makefile.in +Log Message: +Set up scratch directory for tests. + + +Revisions: +Makefile.in 1.49 => 1.50 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.49&r2=1.50 + +**************************************** +Date: Thu Aug 16 18:44:27 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4050 + +Modified Files: + .cvsignore +Log Message: +Set up scratch directory for tests. + + +Revisions: +.cvsignore 1.16 => 1.17 + http://www.samba.org/cgi-bin/cvsweb/rsync/.cvsignore?r1=1.16&r2=1.17 + +**************************************** +Date: Thu Aug 16 18:57:43 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv4890/testsuite + +Modified Files: + master.test hands.test +Log Message: +Export autoconf settings to test scripts. Use this to cope with +systems that don't use "echo -n". + + +Revisions: +master.test 1.8 => 1.9 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.8&r2=1.9 +hands.test 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 16 18:57:43 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4890 + +Modified Files: + configure.in +Log Message: +Export autoconf settings to test scripts. Use this to cope with +systems that don't use "echo -n". + + +Revisions: +configure.in 1.81 => 1.82 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.81&r2=1.82 + +**************************************** +Date: Sat Aug 18 16:50:27 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv21483 + +Modified Files: + TODO +Log Message: +Update notes; add idea about rsyncsh + +Revisions: +TODO 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/TODO?r1=1.1&r2=1.2 + +**************************************** +Date: Tue Aug 21 05:49:24 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv12968 + +Modified Files: + master.test +Log Message: +Print source directory. + + +Revisions: +master.test 1.9 => 1.10 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.9&r2=1.10 + +**************************************** +Date: Tue Aug 21 06:00:55 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv13812 + +Added Files: + config.sh.in rsync.fns +Log Message: +More test suite stuff + +Revisions: +config.sh.in NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/config.sh.in?rev=1.1 +rsync.fns 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.3&r2=1.4 + +**************************************** +Date: Tue Aug 21 06:10:18 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv14474/testsuite + +Modified Files: + master.test +Log Message: +Try again to find the right directory on both local and farm builds. + + +Revisions: +master.test 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.10&r2=1.11 + +**************************************** +Date: Tue Aug 21 06:10:19 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv14474 + +Modified Files: + configure +Log Message: +Try again to find the right directory on both local and farm builds. + + +Revisions: +configure 1.79 => 1.80 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.79&r2=1.80 + +**************************************** +Date: Tue Aug 21 06:20:53 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv15263/testsuite + +Modified Files: + master.test +Log Message: +Show trace while testing. + + +Revisions: +master.test 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.11&r2=1.12 + +**************************************** +Date: Tue Aug 21 06:26:30 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv15555/testsuite + +Modified Files: + master.test +Log Message: +Don't look at $srcdir if it's not set. (Why isn't it set??) + + +Revisions: +master.test 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.12&r2=1.13 + +**************************************** +Date: Tue Aug 21 06:44:09 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv16500 + +Modified Files: + master.test +Log Message: +Change test directory again. + +Revisions: +master.test 1.13 => 1.14 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.13&r2=1.14 + +**************************************** +Date: Tue Aug 21 07:06:53 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv17986 + +Modified Files: + master.test +Log Message: +Return 1 if any tests failed so that the build farm can pick it up. + +Revisions: +master.test 1.14 => 1.15 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?r1=1.14&r2=1.15 + +**************************************** +Date: Tue Aug 21 21:09:07 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4741 + +Modified Files: + TODO +Log Message: +Note about cross-testing different versions. + + +Revisions: +TODO 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/TODO?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Aug 21 21:14:05 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv5046 + +Modified Files: + csprotocol.txt +Log Message: +Add a little more protocol documentation. + + +Revisions: +csprotocol.txt 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/csprotocol.txt?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Aug 21 21:15:50 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv5175 + +Modified Files: + io.c clientserver.c +Log Message: +Allow the server to terminate the module list by just closing the +socket, rather than sending a proper EXIT command. Keep the +global-variable hack to do this, but try to make it only apply in the +specific case where that occurs, not on all lines we read. + + +Revisions: +io.c 1.85 => 1.86 + http://www.samba.org/cgi-bin/cvsweb/rsync/io.c?r1=1.85&r2=1.86 +clientserver.c 1.69 => 1.70 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.69&r2=1.70 + +**************************************** +Date: Wed Aug 22 23:14:55 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20336 + +Modified Files: + rsync.h proto.h csprotocol.txt clientserver.c +Log Message: +Only use the "@RSYNC EXIT" tag if we're talking to a client about +version 25. This prevents it appearing and messing up the module list +when an old client connects to a 2.4.7 server. + + +Revisions: +rsync.h 1.100 => 1.101 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.100&r2=1.101 +proto.h 1.128 => 1.129 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.128&r2=1.129 +csprotocol.txt 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/csprotocol.txt?r1=1.3&r2=1.4 +clientserver.c 1.70 => 1.71 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.70&r2=1.71 + +**************************************** +Date: Mon Aug 27 09:23:41 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv12469 + +Modified Files: + configure configure.in +Log Message: +The --with-rsync-path configure option was using the wrong configure +variable "$with_rsync_name" instead of "$with_rsync_path". + + +Revisions: +configure 1.80 => 1.81 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.80&r2=1.81 +configure.in 1.82 => 1.83 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.82&r2=1.83 + +**************************************** +Date: Wed Aug 29 00:23:30 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv18470 + +Modified Files: + authenticate.c +Log Message: +Add comment: cyeoh says that getpass is deprecated, because it may +return a truncated password on some systems, and it is not in the LSB. + + +Revisions: +authenticate.c 1.17 => 1.18 + http://www.samba.org/cgi-bin/cvsweb/rsync/authenticate.c?r1=1.17&r2=1.18 + +**************************************** +Date: Wed Aug 29 00:33:27 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv19012 + +Modified Files: + Makefile.in .cvsignore +Added Files: + shconfig.in runtests.sh +Log Message: +Redraft testsuite driver script to unify 'make check', 'make +installcheck' and buildfarm tests. + +Add note from discussion with Tim about finding files/directories +under different circumstances. Now works (?) with VPATH build. + + +Revisions: +shconfig.in NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/shconfig.in?rev=1.1 +runtests.sh NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?rev=1.1 +Makefile.in 1.50 => 1.51 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.50&r2=1.51 +.cvsignore 1.17 => 1.18 + http://www.samba.org/cgi-bin/cvsweb/rsync/.cvsignore?r1=1.17&r2=1.18 + +**************************************** +Date: Wed Aug 29 00:38:07 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv19252/testsuite + +Removed Files: + master.test config.sh.in +Log Message: +Redraft testsuite driver script to unify 'make check', 'make +installcheck' and buildfarm tests. + +Add note from discussion with Tim about finding files/directories +under different circumstances. Now works (?) with VPATH build. + + +Revisions: +master.test 1.15 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/master.test?rev=1.15 +config.sh.in 1.1 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/config.sh.in?rev=1.1 + +**************************************** +Date: Wed Aug 29 00:38:09 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv19252 + +Modified Files: + configure.in configure +Log Message: +Redraft testsuite driver script to unify 'make check', 'make +installcheck' and buildfarm tests. + +Add note from discussion with Tim about finding files/directories +under different circumstances. Now works (?) with VPATH build. + + +Revisions: +configure.in 1.83 => 1.84 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.83&r2=1.84 +configure 1.81 => 1.82 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.81&r2=1.82 + +**************************************** +Date: Wed Aug 29 01:13:23 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv21180/testsuite + +Modified Files: + rsync.fns hands.test +Log Message: +More test case work: + + * make sure to build rsync before running 'make check' + + * Put back in the loglevel concept from the samba scripts. If >8, + then turn on shell tracing. + + * Allow tests to return 77 if they want to count as 'skipped'. + + * Add more docs. + + * Mangle Phil's script to get ready to run on non-Linux systems: we + need to not use shell functions, cp -a, etc. Not there yet. + + +Revisions: +rsync.fns 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.4&r2=1.5 +hands.test 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.3&r2=1.4 + +**************************************** +Date: Wed Aug 29 01:13:27 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv21180 + +Modified Files: + runtests.sh Makefile.in +Log Message: +More test case work: + + * make sure to build rsync before running 'make check' + + * Put back in the loglevel concept from the samba scripts. If >8, + then turn on shell tracing. + + * Allow tests to return 77 if they want to count as 'skipped'. + + * Add more docs. + + * Mangle Phil's script to get ready to run on non-Linux systems: we + need to not use shell functions, cp -a, etc. Not there yet. + + +Revisions: +runtests.sh 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.1&r2=1.2 +Makefile.in 1.51 => 1.52 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.51&r2=1.52 + +**************************************** +Date: Wed Aug 29 01:46:18 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23232 + +Modified Files: + Makefile.in +Log Message: +Remove testtmp directory on 'clean'. + +Run test scripts in POSIX mode to try to catch portability problems. + + +Revisions: +Makefile.in 1.52 => 1.53 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.52&r2=1.53 + +**************************************** +Date: Wed Aug 29 01:48:00 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23305 + +Modified Files: + runtests.sh +Log Message: +Count overall failure if some expected scripts were missing. + + +Revisions: +runtests.sh 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.2&r2=1.3 + +**************************************** +Date: Wed Aug 29 02:11:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24704 + +Modified Files: + Makefile.in +Log Message: +$RSYNC must be set to absolute path so that it can be passed to --rsync-path + + +Revisions: +Makefile.in 1.53 => 1.54 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.53&r2=1.54 + +**************************************** +Date: Wed Aug 29 02:12:05 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24756 + +Modified Files: + runtests.sh +Log Message: +$RSYNC and similar variables must be set to absolute path so that it +can be passed to --rsync-path. + +Add a nopersist=yes option that makes runtests bomb out as soon as one +test fails -- this is good if you're watching the trace output. + + +Revisions: +runtests.sh 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.3&r2=1.4 + +**************************************** +Date: Wed Aug 29 02:13:01 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv24856/testsuite + +Modified Files: + rsync.fns hands.test +Added Files: + ssh-basic.test rsync-address.test +Log Message: +Clean up Phil's test more. + +Make the checkit() routine more generic. + +Split out ssh tests. + + +Revisions: +ssh-basic.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/ssh-basic.test?rev=1.1 +rsync-address.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-address.test?rev=1.1 +rsync.fns 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.5&r2=1.6 +hands.test 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.4&r2=1.5 + +**************************************** +Date: Wed Aug 29 02:15:17 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv25047/testsuite + +Modified Files: + rsync.fns +Log Message: +Cleanup check_logs feature. + + +Revisions: +rsync.fns 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.6&r2=1.7 + +**************************************** +Date: Wed Aug 29 02:15:17 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25047 + +Modified Files: + runtests.sh +Log Message: +Cleanup check_logs feature. + + +Revisions: +runtests.sh 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.4&r2=1.5 + +**************************************** +Date: Wed Aug 29 02:18:45 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv25231/testsuite + +Modified Files: + rsync.fns hands.test +Log Message: +Cleanup check_logs feature. + +`ps ax' is not portable -- don't use it to generate random text. Use +`ls -lR' instead. + + +Revisions: +rsync.fns 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.7&r2=1.8 +hands.test 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.5&r2=1.6 + +**************************************** +Date: Wed Aug 29 02:20:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25366 + +Modified Files: + runtests.sh +Log Message: +Return the *number of tests that failed*, so that it will show up +nicely in the overall summary. + + +Revisions: +runtests.sh 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.5&r2=1.6 + +**************************************** +Date: Wed Aug 29 02:23:19 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25671 + +Modified Files: + runtests.sh +Log Message: +Apparently '!' to invert a pipeline result doesn't work on UnixWare. + + +Revisions: +runtests.sh 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.6&r2=1.7 + +**************************************** +Date: Wed Aug 29 02:24:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25739 + +Modified Files: + runtests.sh +Log Message: +Apparently `set -x' in the shell works on some Bourne shells, but not SCO. + + +Revisions: +runtests.sh 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.7&r2=1.8 + +**************************************** +Date: Wed Aug 29 02:27:43 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26063 + +Modified Files: + test.sh +Log Message: +BSD doesn't have /etc/resolv.conf or /etc/inittab, and hands.test was +trying to use them as a source of noise. + + +Revisions: +test.sh 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/test.sh?r1=1.10&r2=1.11 + +**************************************** +Date: Wed Aug 29 02:38:28 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv26856/testsuite + +Modified Files: + rsync.fns +Log Message: +Use rsync source rather than /etc for files because things in /etc +might be protected or missing on some systems. + + +Revisions: +rsync.fns 1.8 => 1.9 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.8&r2=1.9 + +**************************************** +Date: Wed Aug 29 23:35:48 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv2352 + +Modified Files: + rsync.fns +Log Message: +Try using `diff -c' not `diff -u' because the latter seems to be +broken on SCO2. + + +Revisions: +rsync.fns 1.9 => 1.10 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.9&r2=1.10 + +**************************************** +Date: Wed Aug 29 23:51:58 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3384 + +Modified Files: + ssh-basic.test +Log Message: +More debug output for testing SSH. + + +Revisions: +ssh-basic.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/ssh-basic.test?r1=1.1&r2=1.2 + +**************************************** +Date: Wed Aug 29 23:54:15 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3483 + +Modified Files: + runtests.sh +Log Message: +On BSD, this seemed to always exit after test failure. Try different +shell syntax. + + +Revisions: +runtests.sh 1.8 => 1.9 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.8&r2=1.9 + +**************************************** +Date: Wed Aug 29 23:54:59 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3576 + +Removed Files: + runlist +Log Message: +Obsolete + +Revisions: +runlist 1.4 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/runlist?rev=1.4 + +**************************************** +Date: Wed Aug 29 23:56:58 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv3731 + +Removed Files: + rsync-address.test +Log Message: +Abandoned + +Revisions: +rsync-address.test 1.1 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-address.test?rev=1.1 + +**************************************** +Date: Thu Aug 30 00:10:22 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4461 + +Modified Files: + runtests.sh +Log Message: +Run all scripts in the testsuite/ directory, not just named ones. I'd +like to make this script not rsync-specific if possible. + + +Revisions: +runtests.sh 1.9 => 1.10 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.9&r2=1.10 + +**************************************** +Date: Thu Aug 30 00:10:45 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv4504 + +Added Files: + daemon.test +Log Message: +Start testing daemon functionality + +Revisions: +daemon.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/daemon.test?rev=1.1 + +**************************************** +Date: Thu Aug 30 00:11:46 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4587 + +Added Files: + rsyncsh.txt +Log Message: +Notes on an interactive shell for rsync. + + +Revisions: +rsyncsh.txt NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsyncsh.txt?rev=1.1 + +**************************************** +Date: Thu Aug 30 00:14:57 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv4859/testsuite + +Modified Files: + rsync.fns +Log Message: +Split out generic functions for starting rsyncd. + + +Revisions: +rsync.fns 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.10&r2=1.11 + +**************************************** +Date: Thu Aug 30 01:28:54 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv10203 + +Modified Files: + daemon.test +Log Message: +fix bashism + +Revisions: +daemon.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/daemon.test?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Aug 30 09:24:03 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv5130 + +Modified Files: + options.c +Log Message: +The --compare-dest option was not listed as accepting a string parameter +like it was supposed to. There should probably be a testsuite test for +--compare-dest. + + +Revisions: +options.c 1.57 => 1.58 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.57&r2=1.58 + +**************************************** +Date: Thu Aug 30 22:41:45 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv20340 + +Modified Files: + ssh-basic.test +Log Message: +Skip SSH tests if $rsync_enable_ssh_tests is not set + + +Revisions: +ssh-basic.test 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/ssh-basic.test?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 30 22:45:49 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv20777 + +Added Files: + 00-hello.test +Removed Files: + rsync-hello.test +Log Message: +Show rsync version before doing anything else. + + +Revisions: +00-hello.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/00-hello.test?rev=1.1 +rsync-hello.test 1.5 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync-hello.test?rev=1.5 + +**************************************** +Date: Thu Aug 30 22:48:19 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv21106 + +Modified Files: + ssh-basic.test +Log Message: +Fix message. + + +Revisions: +ssh-basic.test 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/ssh-basic.test?r1=1.3&r2=1.4 + +**************************************** +Date: Thu Aug 30 22:49:17 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv21179 + +Modified Files: + rsync.fns daemon.test +Log Message: +Fix rsyncd.conf generation. + + +Revisions: +rsync.fns 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.11&r2=1.12 +daemon.test 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/daemon.test?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Aug 30 23:29:45 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23927 + +Modified Files: + options.c +Log Message: +Option should be --recursive, not --recurse. (This is what it was in +--help and 2.4.6.) + + +Revisions: +options.c 1.58 => 1.59 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.58&r2=1.59 + +**************************************** +Date: Thu Aug 30 23:48:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25272 + +Modified Files: + options.c +Log Message: +Doc. + +Try to give a better error message when there is a remote option error. + + +Revisions: +options.c 1.59 => 1.60 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.59&r2=1.60 + +**************************************** +Date: Fri Aug 31 00:06:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26735 + +Modified Files: + socket.c rsync.h proto.h clientserver.c +Log Message: +Merge in the LIBSMB_PROG idea from samba, so that you can do + + RSYNC_CONNECT_PROG='./rsync --daemon' ./rsync -vvvvvv localhost:: + +to test as a daemon without actually having to listen on a port. + + +Revisions: +socket.c 1.35 => 1.36 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.35&r2=1.36 +rsync.h 1.101 => 1.102 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.101&r2=1.102 +proto.h 1.129 => 1.130 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.129&r2=1.130 +clientserver.c 1.71 => 1.72 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.71&r2=1.72 + +**************************************** +Date: Fri Aug 31 01:08:45 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30183 + +Modified Files: + clientserver.c +Log Message: +Add comment about handling of 'use chroot' + + +Revisions: +clientserver.c 1.72 => 1.73 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.72&r2=1.73 + +**************************************** +Date: Fri Aug 31 01:12:38 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30412 + +Modified Files: + rsyncd.conf.5 rsyncd.conf.yo +Log Message: +Grammar fix. + + +Revisions: +rsyncd.conf.5 1.38 => 1.39 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsyncd.conf.5?r1=1.38&r2=1.39 +rsyncd.conf.yo 1.43 => 1.44 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsyncd.conf.yo?r1=1.43&r2=1.44 + +**************************************** +Date: Fri Aug 31 01:13:57 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv30498/testsuite + +Modified Files: + rsync.fns daemon.test +Log Message: +Run the daemon test using faked tcp connections. + + +Revisions: +rsync.fns 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.12&r2=1.13 +daemon.test 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/daemon.test?r1=1.3&r2=1.4 + +**************************************** +Date: Fri Aug 31 01:16:26 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30628 + +Modified Files: + .cvsignore +Log Message: +Ignore test tmp dir. + + +Revisions: +.cvsignore 1.18 => 1.19 + http://www.samba.org/cgi-bin/cvsweb/rsync/.cvsignore?r1=1.18&r2=1.19 + +**************************************** +Date: Fri Aug 31 01:22:03 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30925 + +Modified Files: + rsync.h +Log Message: +Cope on machines without INADDR_LOOPBACK. + + +Revisions: +rsync.h 1.102 => 1.103 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.102&r2=1.103 + +**************************************** +Date: Fri Aug 31 02:23:06 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4457 + +Modified Files: + rsync.h +Log Message: +If we're using built-in *printf functions, then provide prototypes. + + +Revisions: +rsync.h 1.103 => 1.104 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.103&r2=1.104 + +**************************************** +Date: Fri Aug 31 02:26:34 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4839 + +Modified Files: + runtests.sh +Log Message: +Fix sh syntax for FreeBSD. + + +Revisions: +runtests.sh 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.10&r2=1.11 + +**************************************** +Date: Fri Aug 31 02:26:34 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv4839/testsuite + +Modified Files: + rsync.fns +Log Message: +Fix sh syntax for FreeBSD. + + +Revisions: +rsync.fns 1.13 => 1.14 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.13&r2=1.14 + +**************************************** +Date: Fri Aug 31 02:27:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv5010 + +Modified Files: + sender.c +Log Message: +Clean up from rsync+ patch; fix compiler warning. + + +Revisions: +sender.c 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/sender.c?r1=1.12&r2=1.13 + +**************************************** +Date: Mon Sep 3 20:12:55 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv9037 + +Modified Files: + log.c NEWS +Log Message: +For log messages containing ridiculously long strings that might +overflow a buffer rsync no longer aborts, but rather prints an +ellipsis at the end of the string. (Patch from Ed Santiago.) + + +Revisions: +log.c 1.52 => 1.53 + http://www.samba.org/cgi-bin/cvsweb/rsync/log.c?r1=1.52&r2=1.53 +NEWS 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.6&r2=1.7 + +**************************************** +Date: Wed Sep 5 19:26:22 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv10013/testsuite + +Modified Files: + rsync.fns +Log Message: +Set umask so that symlinks will have the right permissions on BSD. + + +Revisions: +rsync.fns 1.14 => 1.15 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.14&r2=1.15 + +**************************************** +Date: Wed Sep 5 19:30:07 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10420 + +Modified Files: + runtests.sh +Log Message: +Clean up output a little. + + +Revisions: +runtests.sh 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.11&r2=1.12 + +**************************************** +Date: Wed Sep 5 21:56:02 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv18084/testsuite + +Modified Files: + rsync.fns +Log Message: +Fiddle umask again. + + +Revisions: +rsync.fns 1.15 => 1.16 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.15&r2=1.16 + +**************************************** +Date: Wed Sep 5 21:56:55 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv18132 + +Modified Files: + runtests.sh +Log Message: +Fix comment. + + +Revisions: +runtests.sh 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.12&r2=1.13 + +**************************************** +Date: Wed Sep 5 22:50:49 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv21791 + +Modified Files: + runtests.sh +Log Message: +Doc. + +Look at $whichtests to run just a subset -- good for calling from Make. + + +Revisions: +runtests.sh 1.13 => 1.14 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.13&r2=1.14 + +**************************************** +Date: Wed Sep 5 22:52:41 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv21918/testsuite + +Modified Files: + rsync.fns +Log Message: +Add a makepath() function to cope with machines that do not have +'mkdir -p'. (Stone knives and bearskins...) + + +Revisions: +rsync.fns 1.16 => 1.17 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.16&r2=1.17 + +**************************************** +Date: Wed Sep 5 22:57:27 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv22205/testsuite + +Modified Files: + rsync.fns hands.test +Added Files: + longdir.test +Log Message: +Split the 'longdir' test into its own script, and make it work without +'mkdir -p'. + + +Revisions: +longdir.test NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/longdir.test?rev=1.1 +rsync.fns 1.17 => 1.18 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.17&r2=1.18 +hands.test 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.6&r2=1.7 + +**************************************** +Date: Wed Sep 5 23:06:14 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv22675/testsuite + +Modified Files: + rsync.fns +Log Message: +BSD machines don't seem to have head(1). + + +Revisions: +rsync.fns 1.18 => 1.19 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.18&r2=1.19 + +**************************************** +Date: Wed Sep 5 23:06:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22675 + +Modified Files: + runtests.sh +Log Message: +BSD machines don't seem to have head(1). + + +Revisions: +runtests.sh 1.14 => 1.15 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.14&r2=1.15 + +**************************************** +Date: Wed Sep 5 23:21:15 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv24225/testsuite + +Modified Files: + rsync.fns hands.test +Log Message: +More testsuite cleanups. Now I hope we cope without 'cp -a', though +we still need 'cp -p'. + + +Revisions: +rsync.fns 1.19 => 1.20 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.19&r2=1.20 +hands.test 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/hands.test?r1=1.7&r2=1.8 + +**************************************** +Date: Wed Sep 5 23:27:03 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24484 + +Modified Files: + rsync.h +Log Message: +Fix selective definition of *snprintf. (Welcome to mbp's breakage world.) + + +Revisions: +rsync.h 1.104 => 1.105 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.104&r2=1.105 + +**************************************** +Date: Wed Sep 5 23:30:09 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv24706/testsuite + +Modified Files: + daemon.test +Log Message: +You cannot do "export VAR=VALUE" all on one line; the export must be +separate from the assignment. (SCO SysV) + + +Revisions: +daemon.test 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/daemon.test?r1=1.4&r2=1.5 + +**************************************** +Date: Wed Sep 5 23:30:09 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24706 + +Modified Files: + runtests.sh +Log Message: +You cannot do "export VAR=VALUE" all on one line; the export must be +separate from the assignment. (SCO SysV) + + +Revisions: +runtests.sh 1.15 => 1.16 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.15&r2=1.16 + +**************************************** +Date: Wed Sep 5 23:34:24 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv24940/testsuite + +Modified Files: + rsync.fns +Log Message: +See if head(1) works -- broken on some systems? + + +Revisions: +rsync.fns 1.20 => 1.21 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.20&r2=1.21 + +**************************************** +Date: Thu Sep 6 06:04:48 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv19206/testsuite + +Modified Files: + rsync.fns +Log Message: +Oops, some machines don't have `which`. + + +Revisions: +rsync.fns 1.21 => 1.22 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.21&r2=1.22 + +**************************************** +Date: Thu Sep 6 06:07:52 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv19524/testsuite + +Modified Files: + rsync.fns +Log Message: +Oops, some machines don't have `which`. + + +Revisions: +rsync.fns 1.22 => 1.23 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.22&r2=1.23 + +**************************************** +Date: Thu Sep 6 06:12:28 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv19819 + +Modified Files: + runtests.sh +Log Message: +Debug exit status -- on Sun1/cc all the tests pass, but make sees an +exit status of 1. ??? + + +Revisions: +runtests.sh 1.16 => 1.17 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.16&r2=1.17 + +**************************************** +Date: Fri Sep 7 00:35:09 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23340 + +Modified Files: + options.c +Log Message: +Update copyright notice. + + +Revisions: +options.c 1.60 => 1.61 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.60&r2=1.61 + +**************************************** +Date: Fri Sep 7 00:49:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24007 + +Modified Files: + runtests.sh +Log Message: +Try to exit 0 if nothing fails. + + +Revisions: +runtests.sh 1.17 => 1.18 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.17&r2=1.18 + +**************************************** +Date: Fri Sep 7 00:50:32 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24093 + +Modified Files: + runtests.sh +Log Message: +Remove test trace stuff. + + +Revisions: +runtests.sh 1.18 => 1.19 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.18&r2=1.19 + +**************************************** +Date: Fri Sep 7 00:50:32 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv24093/testsuite + +Modified Files: + rsync.fns +Log Message: +Remove test trace stuff. + + +Revisions: +rsync.fns 1.23 => 1.24 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.23&r2=1.24 + +**************************************** +Date: Fri Sep 7 00:52:10 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24199 + +Added Files: + tls.c +Log Message: +Add a little implementation of ls(1) so that we can look at all and +only the attributes of files that rsync is meant to synchronize. + + +Revisions: +tls.c NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?rev=1.1 + +**************************************** +Date: Fri Sep 7 00:52:34 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24225 + +Modified Files: + .cvsignore Makefile.in +Log Message: +Add a little implementation of ls(1) so that we can look at all and +only the attributes of files that rsync is meant to synchronize. + +Test cases should depend on testing tools. + + +Revisions: +.cvsignore 1.19 => 1.20 + http://www.samba.org/cgi-bin/cvsweb/rsync/.cvsignore?r1=1.19&r2=1.20 +Makefile.in 1.54 => 1.55 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.54&r2=1.55 + +**************************************** +Date: Fri Sep 7 00:57:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24405 + +Modified Files: + tls.c runtests.sh +Log Message: +Doc. + + +Revisions: +tls.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?r1=1.1&r2=1.2 +runtests.sh 1.19 => 1.20 + http://www.samba.org/cgi-bin/cvsweb/rsync/runtests.sh?r1=1.19&r2=1.20 + +**************************************** +Date: Sat Sep 8 05:48:50 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv4409 + +Modified Files: + configure configure.in +Log Message: +debian stable screws up largefile support for fcntl locking. This adds +a test for the screwup and disables largefile support + + +Revisions: +configure 1.82 => 1.83 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.82&r2=1.83 +configure.in 1.84 => 1.85 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.84&r2=1.85 + +**************************************** +Date: Sat Sep 8 21:41:14 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23899 + +Modified Files: + options.c +Log Message: +64-bit files depends on the size of OFF_T, not off64_t + + + + + +Revisions: +options.c 1.61 => 1.62 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.61&r2=1.62 + +**************************************** +Date: Sat Sep 8 21:42:09 2001 +Author: tridge + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23947 + +Modified Files: + generator.c io.c +Log Message: +fixed check for timeout in generator + +the generator can easily make no progress for a long time, so don't do +timeout processing checks + + + + + + + +Revisions: +generator.c 1.24 => 1.25 + http://www.samba.org/cgi-bin/cvsweb/rsync/generator.c?r1=1.24&r2=1.25 +io.c 1.86 => 1.87 + http://www.samba.org/cgi-bin/cvsweb/rsync/io.c?r1=1.86&r2=1.87 + +**************************************** +Date: Wed Sep 12 01:46:29 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3445 + +Modified Files: + configure configure.in +Log Message: +Fix from Marc Espie to make included-popt work with VPATH builds. + + +Revisions: +configure 1.83 => 1.84 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.83&r2=1.84 +configure.in 1.85 => 1.86 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.85&r2=1.86 + +**************************************** +Date: Wed Sep 12 01:46:29 2001 +Author: mbp + +Update of /data/cvs/rsync/popt +In directory va:/tmp/cvs-serv3445/popt + +Added Files: + dummy.in +Log Message: +Fix from Marc Espie to make included-popt work with VPATH builds. + + +Revisions: +dummy.in NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/popt/dummy.in?rev=1.1 + +**************************************** +Date: Wed Sep 12 01:51:24 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3702 + +Added Files: + rsync3.txt +Log Message: +Start to wrap up all thoughts on what should happen for rsync 3. + + +Revisions: +rsync3.txt NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync3.txt?rev=1.1 + +**************************************** +Date: Wed Sep 12 07:20:44 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22174 + +Modified Files: + rsync3.txt +Log Message: +Think think. + + +Revisions: +rsync3.txt 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync3.txt?r1=1.1&r2=1.2 + +**************************************** +Date: Wed Sep 12 07:35:40 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22977 + +Modified Files: + rsync3.txt +Log Message: +More notes. + + +Revisions: +rsync3.txt 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync3.txt?r1=1.2&r2=1.3 + +**************************************** +Date: Thu Nov 8 22:58:39 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv14109 + +Modified Files: + clientserver.c +Log Message: +Document chroot confusion. + + +Revisions: +clientserver.c 1.73 => 1.74 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.73&r2=1.74 + +**************************************** +Date: Fri Nov 16 11:19:44 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv3612 + +Modified Files: + flist.c +Log Message: +Fix to make_file() to exit earlier if a file is excluded, because doing +readlink_stat() on an excluded file can be a problem when using the +--copy-links option (also known as -L) and the excluded file is a symlink +that points nowhere. + + +Revisions: +flist.c 1.94 => 1.95 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.94&r2=1.95 + +**************************************** +Date: Thu Nov 22 23:35:50 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv31367 + +Modified Files: + Makefile.in acconfig.h clientserver.c config.h.in configure + configure.in options.c proto.h socket.c +Log Message: +Merge KAME.net IPv6 patch: you can now (in theory) pass IPv6 hostnames +or literal IP addresses to rsync, and if your platform supports them +they will be used. Also there are -4 and -6 command-line options to +choose the default address type. Thankyou! + + +Revisions: +Makefile.in 1.55 => 1.56 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.55&r2=1.56 +acconfig.h 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/acconfig.h?r1=1.12&r2=1.13 +clientserver.c 1.74 => 1.75 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.74&r2=1.75 +config.h.in 1.55 => 1.56 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.55&r2=1.56 +configure 1.84 => 1.85 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.84&r2=1.85 +configure.in 1.86 => 1.87 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.86&r2=1.87 +options.c 1.62 => 1.63 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.62&r2=1.63 +proto.h 1.130 => 1.131 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.130&r2=1.131 +socket.c 1.36 => 1.37 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.36&r2=1.37 + +**************************************** +Date: Thu Nov 22 23:35:50 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv31367/lib + +Added Files: + addrinfo.h getaddrinfo.c getnameinfo.c +Log Message: +Merge KAME.net IPv6 patch: you can now (in theory) pass IPv6 hostnames +or literal IP addresses to rsync, and if your platform supports them +they will be used. Also there are -4 and -6 command-line options to +choose the default address type. Thankyou! + + +Revisions: +addrinfo.h 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?r1=1.1&r2=1.2 +getaddrinfo.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.1&r2=1.2 +getnameinfo.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Nov 22 23:37:26 2001 +Author: mbp + +Update of /data/cvs/rsync/popt +In directory va:/tmp/cvs-serv31449/popt + +Modified Files: + .cvsignore +Log Message: +Ignore trash + + +Revisions: +.cvsignore 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/popt/.cvsignore?r1=1.1&r2=1.2 + +**************************************** +Date: Fri Nov 23 20:12:57 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv5941 + +Modified Files: + aclocal.m4 config.h.in configure configure.in +Log Message: +More autoconf fixes. + + +Revisions: +aclocal.m4 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.6&r2=1.7 +config.h.in 1.56 => 1.57 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.56&r2=1.57 +configure 1.85 => 1.86 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.85&r2=1.86 +configure.in 1.87 => 1.88 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.87&r2=1.88 + +**************************************** +Date: Fri Nov 23 20:16:18 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6252 + +Modified Files: + Makefile.in +Log Message: +Rebuild if headers changed. + + +Revisions: +Makefile.in 1.56 => 1.57 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.56&r2=1.57 + +**************************************** +Date: Fri Nov 23 20:22:20 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6507 + +Modified Files: + socket.c +Log Message: +Improved error messages. + + +Revisions: +socket.c 1.37 => 1.38 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.37&r2=1.38 + +**************************************** +Date: Fri Nov 23 20:29:37 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6755 + +Modified Files: + configure.in +Log Message: +Try to get IPv6 support, unless --disable-ipv6 is explicitly specified. + + +Revisions: +configure.in 1.88 => 1.89 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.88&r2=1.89 + +**************************************** +Date: Fri Nov 23 20:33:09 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6987 + +Modified Files: + Makefile.in +Log Message: +Fix Makefile syntax problem when LIBOBJS is defined. + + +Revisions: +Makefile.in 1.57 => 1.58 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.57&r2=1.58 + +**************************************** +Date: Fri Nov 23 20:57:41 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8227 + +Modified Files: + Makefile.in clientserver.c config.h.in configure configure.in + options.c rsync.h +Removed Files: + version.h +Log Message: +Set rsync version in configure.in + +Show IPv6 availability in --version. + + +Revisions: +Makefile.in 1.58 => 1.59 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.58&r2=1.59 +clientserver.c 1.75 => 1.76 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.75&r2=1.76 +config.h.in 1.57 => 1.58 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.57&r2=1.58 +configure 1.86 => 1.87 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.86&r2=1.87 +configure.in 1.89 => 1.90 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.89&r2=1.90 +options.c 1.63 => 1.64 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.63&r2=1.64 +rsync.h 1.105 => 1.106 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.105&r2=1.106 +version.h 1.67 => NONE + http://www.samba.org/cgi-bin/cvsweb/rsync/version.h?rev=1.67 + +**************************************** +Date: Fri Nov 23 21:06:07 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8855 + +Modified Files: + Makefile.in +Log Message: +Get rid of rule disliked by Sun Make. + + +Revisions: +Makefile.in 1.59 => 1.60 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.59&r2=1.60 + +**************************************** +Date: Fri Nov 23 21:13:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv9189 + +Modified Files: + NEWS +Log Message: +Note IPv6 and nohang patches. + + +Revisions: +NEWS 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.7&r2=1.8 + +**************************************** +Date: Fri Nov 23 21:30:28 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10271 + +Modified Files: + configure.in +Log Message: +IPv6 is off by default -- it seems to break header files on too many systems. + + +Revisions: +configure.in 1.90 => 1.91 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.90&r2=1.91 + +**************************************** +Date: Fri Nov 23 21:31:41 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10400 + +Modified Files: + NEWS configure +Log Message: +IPv6 is off by default. + + +Revisions: +NEWS 1.8 => 1.9 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.8&r2=1.9 +configure 1.87 => 1.88 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.87&r2=1.88 + +**************************************** +Date: Fri Nov 23 21:33:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10688 + +Modified Files: + configure configure.in +Log Message: +Call this pre3. + + +Revisions: +configure 1.88 => 1.89 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.88&r2=1.89 +configure.in 1.91 => 1.92 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.91&r2=1.92 + +**************************************** +Date: Fri Nov 23 21:38:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10957 + +Modified Files: + configure configure.in +Log Message: +Fix KAME patch to use proper autoconf AC_MSG macros rather than just echo/exit. + + +Revisions: +configure 1.89 => 1.90 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.89&r2=1.90 +configure.in 1.92 => 1.93 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.92&r2=1.93 + +**************************************** +Date: Fri Nov 23 21:49:02 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv11538 + +Modified Files: + addrinfo.h +Log Message: +Try to avoid redefined macros on Solaris. + + +Revisions: +addrinfo.h 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?r1=1.2&r2=1.3 + +**************************************** +Date: Sun Nov 25 01:30:36 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv17762 + +Modified Files: + config.h.in configure configure.in +Log Message: +Make some of the headers used by the KAME getaddrinfo implementation +be conditional -- they are missing on e.g. Solaris. Not sure if this +will fix it. + + +Revisions: +config.h.in 1.58 => 1.59 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.58&r2=1.59 +configure 1.90 => 1.91 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.90&r2=1.91 +configure.in 1.93 => 1.94 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.93&r2=1.94 + +**************************************** +Date: Sun Nov 25 01:30:37 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv17762/lib + +Modified Files: + getaddrinfo.c +Log Message: +Make some of the headers used by the KAME getaddrinfo implementation +be conditional -- they are missing on e.g. Solaris. Not sure if this +will fix it. + + +Revisions: +getaddrinfo.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.2&r2=1.3 + +**************************************** +Date: Sun Nov 25 16:23:30 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv12514 + +Modified Files: + configure.in configure config.h.in +Log Message: +Remove check for buggy getaddrinfo for the time being -- it's unclear +how this is supposed to help. + +Check for netdb.h + + +Revisions: +configure.in 1.94 => 1.95 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.94&r2=1.95 +configure 1.91 => 1.92 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.91&r2=1.92 +config.h.in 1.59 => 1.60 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.59&r2=1.60 + +**************************************** +Date: Sun Nov 25 16:41:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv15846 + +Modified Files: + configure.in socket.c +Log Message: +Remove highly suspicious redefinition of sockaddr structure -- there +seems no point using anything but the platform's native definition, +and if we can't get that from the system headers we're hosed anyhow. + + +Revisions: +configure.in 1.95 => 1.96 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.95&r2=1.96 +socket.c 1.38 => 1.39 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.38&r2=1.39 + +**************************************** +Date: Sun Nov 25 16:41:12 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv15846/lib + +Modified Files: + addrinfo.h getaddrinfo.c +Log Message: +Remove highly suspicious redefinition of sockaddr structure -- there +seems no point using anything but the platform's native definition, +and if we can't get that from the system headers we're hosed anyhow. + + +Revisions: +addrinfo.h 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?r1=1.3&r2=1.4 +getaddrinfo.c 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.3&r2=1.4 + +**************************************** +Date: Sun Nov 25 17:15:12 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv22023 + +Modified Files: + configure.in +Log Message: +Check for -lnsl, -lsocket, etc, *before* looking for getaddrinfo, +because on Solaris (for one) it's not in libc. + + +Revisions: +configure.in 1.96 => 1.97 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.96&r2=1.97 + +**************************************** +Date: Sun Nov 25 17:49:33 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28496 + +Modified Files: + config.h.in configure configure.in +Log Message: +Silly autoconf + + +Revisions: +config.h.in 1.60 => 1.61 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.60&r2=1.61 +configure 1.92 => 1.93 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.92&r2=1.93 +configure.in 1.97 => 1.98 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.97&r2=1.98 + +**************************************** +Date: Sun Nov 25 20:52:19 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23949 + +Modified Files: + clientserver.c options.c rsync.h socket.c +Log Message: +Put the new address family option into an options struct. We have too +many globals already. + +Better error messages for network-related failures. + + +Revisions: +clientserver.c 1.76 => 1.77 + http://www.samba.org/cgi-bin/cvsweb/rsync/clientserver.c?r1=1.76&r2=1.77 +options.c 1.64 => 1.65 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.64&r2=1.65 +rsync.h 1.106 => 1.107 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.106&r2=1.107 +socket.c 1.39 => 1.40 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.39&r2=1.40 + +**************************************** +Date: Sun Nov 25 23:10:06 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv13901 + +Modified Files: + proto.h socket.c +Log Message: +Try to be better about handling the results of getaddrinfo(): when +opening an inbound socket, we might get several address results, +e.g. for the machine's ipv4 and ipv6 name. + +If binding a wildcard, then any one of them should do. If an address +was specified but it's insufficiently specific then that's not our +fault. + +However, some of the advertized addresses may not work because e.g. we +don't have IPv6 support in the kernel. In that case go on and try all +addresses until one succeeds. + + +Revisions: +proto.h 1.131 => 1.132 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.131&r2=1.132 +socket.c 1.40 => 1.41 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.40&r2=1.41 + +**************************************** +Date: Sun Nov 25 23:11:55 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv14102 + +Modified Files: + socket.c +Log Message: +Kill a function for jra. + + +Revisions: +socket.c 1.41 => 1.42 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.41&r2=1.42 + +**************************************** +Date: Sun Nov 25 23:18:10 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv14805 + +Modified Files: + proto.h +Log Message: +Kill a function for jra. + + +Revisions: +proto.h 1.132 => 1.133 + http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h?r1=1.132&r2=1.133 + +**************************************** +Date: Sun Nov 25 23:47:59 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv17757 + +Modified Files: + socket.c +Log Message: +Oops, no C++ comments. + + +Revisions: +socket.c 1.42 => 1.43 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.42&r2=1.43 + +**************************************** +Date: Sun Nov 25 23:58:48 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv18567 + +Modified Files: + loadparm.c +Log Message: +Fix a small memory leak that was causing an Insure warning. + + +Revisions: +loadparm.c 1.38 => 1.39 + http://www.samba.org/cgi-bin/cvsweb/rsync/loadparm.c?r1=1.38&r2=1.39 + +**************************************** +Date: Mon Nov 26 00:20:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20734 + +Modified Files: + configure.in configure config.h.in +Log Message: +Attempted clean up some of the IPv6 tests. + + +Revisions: +configure.in 1.98 => 1.99 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.98&r2=1.99 +configure 1.93 => 1.94 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.93&r2=1.94 +config.h.in 1.61 => 1.62 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.61&r2=1.62 + +**************************************** +Date: Mon Nov 26 00:21:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20910 + +Modified Files: + socket.c +Log Message: +Remove kame cruft + + +Revisions: +socket.c 1.43 => 1.44 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.43&r2=1.44 + +**************************************** +Date: Mon Nov 26 00:21:30 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20979 + +Modified Files: + options.c +Log Message: +Fix rename of global option + + +Revisions: +options.c 1.65 => 1.66 + http://www.samba.org/cgi-bin/cvsweb/rsync/options.c?r1=1.65&r2=1.66 + +**************************************** +Date: Mon Nov 26 00:22:52 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv21061/lib + +Modified Files: + addrinfo.h +Log Message: +Remove __P(()) cruft + + +Revisions: +addrinfo.h 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?r1=1.4&r2=1.5 + +**************************************** +Date: Mon Nov 26 11:15:54 2001 +Author: dwd + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6514 + +Modified Files: + flist.c +Log Message: +Better fix for case of excluded symlinks that point nowhere when using +--copy-links. The readlink_stat() does need to be done in the normal case +before checking the exclude patterns because it needs to know whether or +not a file is a directory in order to properly handle a trailing slash +in an exclude pattern. This fix makes make_file() go ahead and call +readlink_stat() but then if the latter returns an ENOENT and copy_links is +on then it will only print an error if the path is not excluded. + + +Revisions: +flist.c 1.95 => 1.96 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.95&r2=1.96 + +**************************************** +Date: Mon Nov 26 18:28:36 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv19864 + +Modified Files: + NEWS +Log Message: +Explain IPv6 merge. + + +Revisions: +NEWS 1.9 => 1.10 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.9&r2=1.10 + +**************************************** +Date: Mon Nov 26 18:29:58 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv20637/lib + +Modified Files: + getaddrinfo.c getnameinfo.c +Log Message: +Oops, need to include config.h to find out if we have the other header files. + + +Revisions: +getaddrinfo.c 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.4&r2=1.5 +getnameinfo.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.2&r2=1.3 + +**************************************** +Date: Mon Nov 26 19:46:03 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv1817/lib + +Modified Files: + addrinfo.h +Log Message: +Protect against conflicts with EAI_* values defined by system. + + +Revisions: +addrinfo.h 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/addrinfo.h?r1=1.5&r2=1.6 + +**************************************** +Date: Mon Nov 26 19:49:53 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv2547 + +Modified Files: + config.h.in configure configure.in +Log Message: +Check for inet_ntop and inet_pton, which may be missing. + + +Revisions: +config.h.in 1.62 => 1.63 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.62&r2=1.63 +configure 1.94 => 1.95 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.94&r2=1.95 +configure.in 1.99 => 1.100 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.99&r2=1.100 + +**************************************** +Date: Mon Nov 26 20:21:32 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv8144/lib + +Modified Files: + getaddrinfo.c getnameinfo.c +Log Message: +Eliminate horrible GET_AI macro. Then discover that this code +depended on sockaddr.sa_len, which apparently doesn't exist +on IRIX and has to be #ifdef'd by HAVE_SOCKADDR_LEN, which +seems to work OK. + + +Revisions: +getaddrinfo.c 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.5&r2=1.6 +getnameinfo.c 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.3&r2=1.4 + +**************************************** +Date: Mon Nov 26 20:45:24 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv12200/lib + +Modified Files: + getaddrinfo.c +Log Message: +Try to fix side-effects of get_ai(). + + +Revisions: +getaddrinfo.c 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.6&r2=1.7 + +**************************************** +Date: Mon Nov 26 20:53:08 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv13469 + +Modified Files: + configure.in +Log Message: +Look in -lresolv for inet_ntop + + +Revisions: +configure.in 1.100 => 1.101 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.100&r2=1.101 + +**************************************** +Date: Mon Nov 26 21:22:23 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv18076/lib + +Added Files: + inet_pton.c inet_ntop.c +Log Message: +Add Paul Vixie's implementation of inet_ntop and inet_pton for +platforms that don't have them. + + +Revisions: +inet_pton.c NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_pton.c?rev=1.1 +inet_ntop.c NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_ntop.c?rev=1.1 + +**************************************** +Date: Mon Nov 26 21:23:46 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv18340 + +Modified Files: + NEWS configure configure.in rsync.h +Log Message: +Add Paul Vixie's implementation of inet_ntop and inet_pton for +platforms that don't have them. + + +Revisions: +NEWS 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.10&r2=1.11 +configure 1.95 => 1.96 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.95&r2=1.96 +configure.in 1.101 => 1.102 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.101&r2=1.102 +rsync.h 1.107 => 1.108 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.107&r2=1.108 + +**************************************** +Date: Mon Nov 26 21:35:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20315 + +Modified Files: + Makefile.in +Log Message: +Make clean should also remove the autoconf cache etc. + + +Revisions: +Makefile.in 1.60 => 1.61 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.60&r2=1.61 + +**************************************** +Date: Mon Nov 26 22:01:05 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv23100 + +Modified Files: + socket.c +Log Message: +Fix missing parameter in log call. + + +Revisions: +socket.c 1.44 => 1.45 + http://www.samba.org/cgi-bin/cvsweb/rsync/socket.c?r1=1.44&r2=1.45 + +**************************************** +Date: Mon Nov 26 22:17:35 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv24114 + +Modified Files: + configure.in configure +Log Message: +Try to fix LIBOBJ detection of ntop/pton. + + +Revisions: +configure.in 1.102 => 1.103 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.102&r2=1.103 +configure 1.96 => 1.97 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.96&r2=1.97 + +**************************************** +Date: Mon Nov 26 22:39:02 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv25917 + +Modified Files: + Makefile.in +Log Message: +make clean can rm config.cache but not config.h, or it wil jam. + +Build getaddr/nameinfo into lib/. + +Split code to generate "rwx-----" strings into lib/permstring.c so it +can be reused in tls. + + +Revisions: +Makefile.in 1.61 => 1.62 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.61&r2=1.62 + +**************************************** +Date: Mon Nov 26 22:41:39 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26404 + +Modified Files: + configure.in configure +Log Message: +Build getaddr/nameinfo into lib/. + + +Revisions: +configure.in 1.103 => 1.104 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.103&r2=1.104 +configure 1.97 => 1.98 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.97&r2=1.98 + +**************************************** +Date: Mon Nov 26 22:43:17 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv26525/lib + +Added Files: + permstring.h permstring.c +Log Message: +Split code to generate "rwx-----" strings into lib/permstring.c so it +can be reused in tls. + + +Revisions: +permstring.h NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/permstring.h?rev=1.1 +permstring.c NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/permstring.c?rev=1.1 + +**************************************** +Date: Mon Nov 26 22:43:17 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26525 + +Modified Files: + rsync.h flist.c +Log Message: +Split code to generate "rwx-----" strings into lib/permstring.c so it +can be reused in tls. + + +Revisions: +rsync.h 1.108 => 1.109 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h?r1=1.108&r2=1.109 +flist.c 1.96 => 1.97 + http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c?r1=1.96&r2=1.97 + +**************************************** +Date: Mon Nov 26 22:45:47 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv26914 + +Modified Files: + tls.c +Log Message: +Also list permissions, ownership, size, and mtime. + + +Revisions: +tls.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?r1=1.2&r2=1.3 + +**************************************** +Date: Mon Nov 26 22:51:51 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv27297 + +Modified Files: + Makefile.in +Log Message: +Use tls rather than the OS's ls(1) so that we have more chance of +reproducible results. + + +Revisions: +Makefile.in 1.62 => 1.63 + http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in?r1=1.62&r2=1.63 + +**************************************** +Date: Mon Nov 26 22:51:51 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv27297/testsuite + +Modified Files: + rsync.fns +Log Message: +Use tls rather than the OS's ls(1) so that we have more chance of +reproducible results. + + +Revisions: +rsync.fns 1.24 => 1.25 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.24&r2=1.25 + +**************************************** +Date: Mon Nov 26 23:05:33 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv28284/lib + +Modified Files: + permstring.c +Log Message: +When producing a ls-style permissions string, also handle +sticky/setuid/setgid bits the same way as GNU ls. + + +Revisions: +permstring.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/permstring.c?r1=1.1&r2=1.2 + +**************************************** +Date: Mon Nov 26 23:07:36 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv28442 + +Modified Files: + tls.c +Log Message: +The size of anything but a regular file is probably not worth thinking +about. + + +Revisions: +tls.c 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?r1=1.3&r2=1.4 + +**************************************** +Date: Mon Nov 26 23:09:47 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv28602 + +Modified Files: + rsync.fns +Log Message: +Oops, fix bash syntax + + +Revisions: +rsync.fns 1.25 => 1.26 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.25&r2=1.26 + +**************************************** +Date: Mon Nov 26 23:19:37 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv29405 + +Modified Files: + rsync.fns +Log Message: +Unbreak recursive ls test + + +Revisions: +rsync.fns 1.26 => 1.27 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.26&r2=1.27 + +**************************************** +Date: Mon Nov 26 23:23:58 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv29716/lib + +Modified Files: + inet_pton.c inet_ntop.c +Log Message: +Try to fix headers for UNICOS + + +Revisions: +inet_pton.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_pton.c?r1=1.1&r2=1.2 +inet_ntop.c 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_ntop.c?r1=1.1&r2=1.2 + +**************************************** +Date: Mon Nov 26 23:32:43 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv30474 + +Modified Files: + longdir.test +Log Message: +Be a bit more verbose + + +Revisions: +longdir.test 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/longdir.test?r1=1.1&r2=1.2 + +**************************************** +Date: Mon Nov 26 23:54:03 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv31546 + +Modified Files: + tls.c +Log Message: +mtime and ownership of symlinks can be random, so don't print them. + + +Revisions: +tls.c 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?r1=1.4&r2=1.5 + +**************************************** +Date: Mon Nov 26 23:54:48 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv31599/testsuite + +Modified Files: + rsync.fns +Log Message: +Be a bit more verbose + + +Revisions: +rsync.fns 1.27 => 1.28 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.27&r2=1.28 + +**************************************** +Date: Mon Nov 26 23:56:33 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv31704 + +Modified Files: + tls.c +Log Message: +Show symlink targets + + +Revisions: +tls.c 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/tls.c?r1=1.5&r2=1.6 + +**************************************** +Date: Mon Nov 26 23:59:34 2001 +Author: mbp + +Update of /data/cvs/rsync/testsuite +In directory va:/tmp/cvs-serv31881/testsuite + +Modified Files: + rsync.fns +Log Message: +Fix sh + + +Revisions: +rsync.fns 1.28 => 1.29 + http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/rsync.fns?r1=1.28&r2=1.29 + +**************************************** +Date: Tue Nov 27 15:36:21 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv8726/lib + +Modified Files: + getaddrinfo.c +Log Message: +Remove __P prototype macros -- we don't support compilers old enough +to need them. + + +Revisions: +getaddrinfo.c 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.7&r2=1.8 + +**************************************** +Date: Tue Nov 27 16:36:32 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv18192/lib + +Modified Files: + inet_pton.c +Log Message: +Protect AF_INET6 references with #ifdef INET6 + + +Revisions: +inet_pton.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_pton.c?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Nov 27 17:29:41 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv26284/lib + +Modified Files: + inet_pton.c inet_ntop.c +Log Message: +Fix inet_ntop/pton names + + +Revisions: +inet_pton.c 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_pton.c?r1=1.3&r2=1.4 +inet_ntop.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/inet_ntop.c?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Nov 27 18:55:20 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6608 + +Modified Files: + configure.in +Log Message: +HP's cpp chokes on preprocessor directives that have whitespace before +the '#'. Off to the Implant Office with you! + + +Revisions: +configure.in 1.104 => 1.105 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.104&r2=1.105 + +**************************************** +Date: Tue Nov 27 18:55:46 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv6668 + +Modified Files: + configure +Log Message: +HP's cpp chokes on preprocessor directives that have whitespace before +the '#'. Off to the Implant Office with you! + + +Revisions: +configure 1.98 => 1.99 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.98&r2=1.99 + +**************************************** +Date: Tue Nov 27 19:12:20 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8987 + +Modified Files: + aclocal.m4 config.h.in configure +Log Message: +HP's cpp apparently can't handle whitespace before #include + + +Revisions: +aclocal.m4 1.7 => 1.8 + http://www.samba.org/cgi-bin/cvsweb/rsync/aclocal.m4?r1=1.7&r2=1.8 +config.h.in 1.63 => 1.64 + http://www.samba.org/cgi-bin/cvsweb/rsync/config.h.in?r1=1.63&r2=1.64 +configure 1.99 => 1.100 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.99&r2=1.100 + +**************************************** +Date: Tue Nov 27 20:10:39 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv17191 + +Modified Files: + INSTALL +Log Message: +Note on HP-UX's bundled so-called C compiler. + + +Revisions: +INSTALL 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/INSTALL?r1=1.1&r2=1.2 + +**************************************** +Date: Tue Nov 27 20:32:34 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv20602 + +Modified Files: + configure configure.in +Log Message: +Call this 2.4.7pre4 + + +Revisions: +configure 1.100 => 1.101 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.100&r2=1.101 +configure.in 1.105 => 1.106 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.105&r2=1.106 + +**************************************** +Date: Tue Nov 27 21:03:24 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv25208/lib + +Modified Files: + getnameinfo.c +Log Message: +More HP-UX/gcc compile fixes. + + +Revisions: +getnameinfo.c 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.4&r2=1.5 + +**************************************** +Date: Tue Nov 27 22:52:05 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv7927 + +Modified Files: + configure configure.in +Log Message: +Put back the --disable-ipv6 option. This should only be needed if +your platform seems to support ipv6, but actually it breaks. This +seems to be the case for "powerpc-apple-darwin1.4". + + +Revisions: +configure 1.101 => 1.102 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.101&r2=1.102 +configure.in 1.106 => 1.107 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.106&r2=1.107 + +**************************************** +Date: Tue Nov 27 23:07:51 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv10068/lib + +Modified Files: + getaddrinfo.c getnameinfo.c +Log Message: +Standard name for the accessor macro seems to be struct +in6_addr.sin6_addr, not sin6_addr8. That name is used in the rest of +the KAME patch, so hopefully this will not break any places where IPv6 +builds at the moment, and it might fix Darwin. + + +Revisions: +getaddrinfo.c 1.8 => 1.9 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.8&r2=1.9 +getnameinfo.c 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.5&r2=1.6 + +**************************************** +Date: Tue Nov 27 23:12:09 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv10619 + +Modified Files: + INSTALL +Log Message: +Note half-baked Darwin IPv6 support. + + +Revisions: +INSTALL 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/INSTALL?r1=1.2&r2=1.3 + +**************************************** +Date: Tue Nov 27 23:49:32 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv15487 + +Modified Files: + NEWS +Log Message: +Add list of platforms that build. + + +Revisions: +NEWS 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.11&r2=1.12 + +**************************************** +Date: Wed Nov 28 16:04:49 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv7593 + +Modified Files: + NEWS configure configure.in +Log Message: +Show version when configuring. + +If we don't seem to have an ANSI compiler, then omit a warning as soon +as that is discovered, because it is likely to break later configure +tests. This doesn't seem to catch the particular HP-UX compiler I was +after, which is non-ANSI but only emits a warning on this configure +test. Nevertheless probably better to have it in. + + +Revisions: +NEWS 1.12 => 1.13 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.12&r2=1.13 +configure 1.102 => 1.103 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.102&r2=1.103 +configure.in 1.107 => 1.108 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.107&r2=1.108 + +**************************************** +Date: Wed Nov 28 16:08:36 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv7803 + +Modified Files: + configure configure.in +Log Message: +No need to test for memcmp, because even broken ones are good enough +for our purposes. (Patch from Dave Dykstra.) + + +Revisions: +configure 1.103 => 1.104 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.103&r2=1.104 +configure.in 1.108 => 1.109 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.108&r2=1.109 + +**************************************** +Date: Wed Nov 28 16:12:25 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv8018/lib + +Modified Files: + getaddrinfo.c +Log Message: +Amdahl's UTS 2.1.2 defines NO_ADDRESS instead of NO_DATA. (Fix from Dave) + +Just include rsync.h rather than all the individual headers. + + +Revisions: +getaddrinfo.c 1.9 => 1.10 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.9&r2=1.10 + +**************************************** +Date: Wed Nov 28 16:15:20 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv8210 + +Modified Files: + permstring.c +Log Message: +Just include rsync.h rather than all the individual headers. +(Suggestion from Dave Dykstra.) + + +Revisions: +permstring.c 1.2 => 1.3 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/permstring.c?r1=1.2&r2=1.3 + +**************************************** +Date: Wed Nov 28 16:23:29 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv8844 + +Modified Files: + TODO +Log Message: +IPv6 support is now merged. + + +Revisions: +TODO 1.3 => 1.4 + http://www.samba.org/cgi-bin/cvsweb/rsync/TODO?r1=1.3&r2=1.4 + +**************************************** +Date: Wed Nov 28 17:31:31 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv13082 + +Modified Files: + TODO +Log Message: +Add notes on things to do mentioned on the list in the last few months. + + +Revisions: +TODO 1.4 => 1.5 + http://www.samba.org/cgi-bin/cvsweb/rsync/TODO?r1=1.4&r2=1.5 + +**************************************** +Date: Wed Nov 28 20:28:30 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv23360 + +Modified Files: + getaddrinfo.c +Log Message: +Oops. + + +Revisions: +getaddrinfo.c 1.10 => 1.11 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.10&r2=1.11 + +**************************************** +Date: Wed Nov 28 21:01:28 2001 +Author: mbp + +Update of /data/cvs/rsync/lib +In directory va:/tmp/cvs-serv25072/lib + +Modified Files: + getnameinfo.c getaddrinfo.c +Log Message: +Fix headers again + + +Revisions: +getnameinfo.c 1.6 => 1.7 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getnameinfo.c?r1=1.6&r2=1.7 +getaddrinfo.c 1.11 => 1.12 + http://www.samba.org/cgi-bin/cvsweb/rsync/lib/getaddrinfo.c?r1=1.11&r2=1.12 + +**************************************** +Date: Thu Nov 29 16:15:32 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30581 + +Modified Files: + NEWS +Log Message: +Note other supported platforms + + +Revisions: +NEWS 1.13 => 1.14 + http://www.samba.org/cgi-bin/cvsweb/rsync/NEWS?r1=1.13&r2=1.14 + +**************************************** +Date: Thu Nov 29 16:16:14 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30681 + +Modified Files: + TODO +Log Message: +Note error cases that we ought to improve. + + +Revisions: +TODO 1.5 => 1.6 + http://www.samba.org/cgi-bin/cvsweb/rsync/TODO?r1=1.5&r2=1.6 + +**************************************** +Date: Thu Nov 29 16:17:53 2001 +Author: mbp + +Update of /data/cvs/rsync +In directory va:/tmp/cvs-serv30745 + +Modified Files: + rsync.1 rsync.yo +Log Message: +Last bug fix for 2.5.0? Make the documentation for -a point out that +it does not in fact propagate hardlinsk. + + +Revisions: +rsync.1 1.95 => 1.96 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.1?r1=1.95&r2=1.96 +rsync.yo 1.80 => 1.81 + http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.yo?r1=1.80&r2=1.81 + +**************************************** +Date: Thu Nov 29 16:23:11 2001 +Author: rsync-bugs + +Update of /data/cvs/rsync +In directory va:/home/rsync-bugs/rsync + +Modified Files: + configure configure.in +Log Message: +preparing for release of 2.5.0 + +Revisions: +configure 1.104 => 1.105 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure?r1=1.104&r2=1.105 +configure.in 1.109 => 1.110 + http://www.samba.org/cgi-bin/cvsweb/rsync/configure.in?r1=1.109&r2=1.110 + +**************************************** +Date: Thu Nov 29 16:23:11 2001 +Author: rsync-bugs + +Update of /data/cvs/rsync/packaging/redhat/5.0 +In directory va:/home/rsync-bugs/rsync/packaging/redhat/5.0 + +Modified Files: + rsync.spec +Log Message: +preparing for release of 2.5.0 + +Revisions: +rsync.spec 1.31 => 1.32 + http://www.samba.org/cgi-bin/cvsweb/rsync/packaging/redhat/5.0/rsync.spec?r1=1.31&r2=1.32 + +**************************************** +Date: Thu Nov 29 16:29:20 2001 +Author: mbp + +Update of /data/cvs/rsync/packaging/redhat/7.1 +In directory va:/tmp/cvs-serv32127/packaging/redhat/7.1 + +Added Files: + rsync.spec.tmpl +Log Message: +Spec file needs to be generated from a template to include the version +number. + + +Revisions: +rsync.spec.tmpl NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/packaging/redhat/7.1/rsync.spec.tmpl?rev=1.1 + +**************************************** +Date: Thu Nov 29 16:29:46 2001 +Author: rsync-bugs + +Update of /data/cvs/rsync/packaging/redhat/7.1 +In directory va:/home/rsync-bugs/rsync/packaging/redhat/7.1 + +Modified Files: + rsync.spec +Log Message: +preparing for release of 2.5.0 + +Revisions: +rsync.spec 1.1 => 1.2 + http://www.samba.org/cgi-bin/cvsweb/rsync/packaging/redhat/7.1/rsync.spec?r1=1.1&r2=1.2 + +**************************************** +Date: Thu Nov 29 16:31:07 2001 +Author: rsync-bugs + +Update of /data/cvs/rsync/packaging/lsb +In directory va:/home/rsync-bugs/rsync/packaging/lsb + +Added Files: + rsync.spec +Log Message: +Modified file stored as well + +Revisions: +rsync.spec NONE => 1.1 + http://www.samba.org/cgi-bin/cvsweb/rsync/packaging/lsb/rsync.spec?rev=1.1 diff -u -r --new-file --exclude=CVS rsync-2.4.6/errcode.h rsync-2.5.0/errcode.h --- rsync-2.4.6/errcode.h Wed Nov 25 08:24:39 1998 +++ rsync-2.5.0/errcode.h Thu Nov 29 16:21:08 2001 @@ -1,4 +1,26 @@ -/* error codes returned by rsync */ +/* -*- c-file-style: "linux"; -*- + + Copyright (C) 1998-2000 by Andrew Tridgell + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + * error codes returned by rsync. If you change these, please also update the + * string mappings in log.c + */ #define RERR_SYNTAX 1 /* syntax or usage error */ #define RERR_PROTOCOL 2 /* protocol incompatibility */ @@ -14,5 +36,22 @@ #define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */ #define RERR_WAITCHILD 21 /* some error returned by waitpid() */ #define RERR_MALLOC 22 /* error allocating core memory buffers */ +#define RERR_PARTIAL 23 /* partial transfer */ #define RERR_TIMEOUT 30 /* timeout in data send/receive */ + +/* Although it doesn't seem to be specified anywhere, + * ssh and the shell seem to return these values: + * + * 124 if the command exited with status 255 + * 125 if the command is killed by a signal + * 126 if the command cannot be run + * 127 if the command is not found + * + * and we could use this to give a better explanation if the remote + * command is not found. + */ +#define RERR_CMD_FAILED 124 +#define RERR_CMD_KILLED 125 +#define RERR_CMD_RUN 126 +#define RERR_CMD_NOTFOUND 127 diff -u -r --new-file --exclude=CVS rsync-2.4.6/exclude.c rsync-2.5.0/exclude.c --- rsync-2.4.6/exclude.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/exclude.c Thu Nov 29 16:21:08 2001 @@ -1,6 +1,7 @@ -/* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2001 by Andrew Tridgell + Copyright (C) 1996 by Paul Mackerras This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +21,8 @@ /* a lot of this stuff was originally derived from GNU tar, although it has now changed so much that it is hard to tell :) */ +/* include/exclude cluestick added by Martin Pool */ + #include "rsync.h" extern int verbose; @@ -28,7 +31,7 @@ static struct exclude_struct **exclude_list; /* build an exclude structure given a exclude pattern */ -static struct exclude_struct *make_exclude(char *pattern, int include) +static struct exclude_struct *make_exclude(const char *pattern, int include) { struct exclude_struct *ret; @@ -84,8 +87,8 @@ free(ex); } -static int check_one_exclude(char *name,struct exclude_struct *ex, - STRUCT_STAT *st) +static int check_one_exclude(char *name, struct exclude_struct *ex, + STRUCT_STAT *st) { char *p; int match_start=0; @@ -121,32 +124,62 @@ } -int check_exclude(char *name,struct exclude_struct **local_exclude_list, +static void report_exclude_result(char const *name, + struct exclude_struct const *ent, + STRUCT_STAT const *st) +{ + /* If a trailing slash is present to match only directories, + * then it is stripped out by make_exclude. So as a special + * case we add it back in here. */ + + if (verbose >= 2) + rprintf(FINFO, "%s %s %s because of pattern %s%s\n", + ent->include ? "including" : "excluding", + S_ISDIR(st->st_mode) ? "directory" : "file", + name, ent->pattern, + ent->directory ? "/" : ""); +} + + +/* + * Return true if file NAME is defined to be excluded by either + * LOCAL_EXCLUDE_LIST or the globals EXCLUDE_LIST. + */ +int check_exclude(char *name, struct exclude_struct **local_exclude_list, STRUCT_STAT *st) { int n; + struct exclude_struct *ent; if (name && (name[0] == '.') && !name[1]) /* never exclude '.', even if somebody does --exclude '*' */ return 0; if (exclude_list) { - for (n=0; exclude_list[n]; n++) - if (check_one_exclude(name,exclude_list[n],st)) - return !exclude_list[n]->include; + for (n=0; exclude_list[n]; n++) { + ent = exclude_list[n]; + if (check_one_exclude(name, ent, st)) { + report_exclude_result(name, ent, st); + return !ent->include; + } + } } if (local_exclude_list) { - for (n=0; local_exclude_list[n]; n++) - if (check_one_exclude(name,local_exclude_list[n],st)) - return !local_exclude_list[n]->include; + for (n=0; local_exclude_list[n]; n++) { + ent = local_exclude_list[n]; + if (check_one_exclude(name, ent, st)) { + report_exclude_result(name, ent, st); + return !ent->include; + } + } } return 0; } -void add_exclude_list(char *pattern,struct exclude_struct ***list, int include) +void add_exclude_list(const char *pattern, struct exclude_struct ***list, int include) { int len=0; if (list && *list) @@ -174,12 +207,12 @@ (*list)[len+1] = NULL; } -void add_exclude(char *pattern, int include) +void add_exclude(const char *pattern, int include) { add_exclude_list(pattern,&exclude_list, include); } -struct exclude_struct **make_exclude_list(char *fname, +struct exclude_struct **make_exclude_list(const char *fname, struct exclude_struct **list1, int fatal, int include) { @@ -188,7 +221,10 @@ char line[MAXPATHLEN]; if (!f) { if (fatal) { - rprintf(FERROR,"%s : %s\n",fname,strerror(errno)); + rsyserr(FERROR, errno, + "failed to open %s file %s", + include ? "include" : "exclude", + fname); exit_cleanup(RERR_FILEIO); } return list; @@ -210,7 +246,7 @@ } -void add_exclude_file(char *fname,int fatal,int include) +void add_exclude_file(const char *fname, int fatal, int include) { if (!fname || !*fname) return; @@ -362,7 +398,7 @@ add_exclude(cvs_ignore_list[i], 0); if ((p=getenv("HOME")) && strlen(p) < (MAXPATHLEN-12)) { - slprintf(fname,sizeof(fname), "%s/.cvsignore",p); + snprintf(fname,sizeof(fname), "%s/.cvsignore",p); add_exclude_file(fname,0,0); } diff -u -r --new-file --exclude=CVS rsync-2.4.6/flist.c rsync-2.5.0/flist.c --- rsync-2.4.6/flist.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/flist.c Thu Nov 29 16:21:08 2001 @@ -1,6 +1,7 @@ /* Copyright (C) Andrew Tridgell 1996 Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,6 +48,9 @@ extern int io_error; extern int sanitize_paths; +extern int read_batch; +extern int write_batch; + static char topsrcname[MAXPATHLEN]; static struct exclude_struct **local_exclude_list; @@ -108,24 +112,14 @@ static void list_file_entry(struct file_struct *f) { - char perms[11] = "----------"; - char *perm_map = "rwxrwxrwx"; - int i; + char perms[11]; if (!f->basename) /* this can happen if duplicate names were removed */ return; - for (i=0;i<9;i++) { - if (f->mode & (1<mode)) perms[0] = 'l'; - if (S_ISDIR(f->mode)) perms[0] = 'd'; - if (S_ISBLK(f->mode)) perms[0] = 'b'; - if (S_ISCHR(f->mode)) perms[0] = 'c'; - if (S_ISSOCK(f->mode)) perms[0] = 's'; - if (S_ISFIFO(f->mode)) perms[0] = 'p'; - + permstring(perms, f->mode); + if (preserve_links && S_ISLNK(f->mode)) { rprintf(FINFO,"%s %11.0f %s %s -> %s\n", perms, @@ -150,7 +144,7 @@ } if (S_ISLNK(Buffer->st_mode)) { int l; - if ((l = readlink(Path,Linkbuf,MAXPATHLEN-1)) == -1) { + if ((l = readlink((char *) Path, Linkbuf, MAXPATHLEN-1))== -1) { return -1; } Linkbuf[l] = 0; @@ -182,14 +176,18 @@ This function is used to check if a file should be included/excluded from the list of files based on its name and type etc */ -static int match_file_name(char *fname,STRUCT_STAT *st) +static int check_exclude_file(int f,char *fname,STRUCT_STAT *st) { - if (check_exclude(fname,local_exclude_list,st)) { - if (verbose > 2) - rprintf(FINFO,"excluding file %s\n",fname); - return 0; - } - return 1; + extern int delete_excluded; + + /* f is set to -1 when calculating deletion file list */ + if ((f == -1) && delete_excluded) { + return 0; + } + if (check_exclude(fname,local_exclude_list,st)) { + return 1; + } + return 0; } /* used by the one_file_system code */ @@ -205,7 +203,7 @@ static int to_wire_mode(mode_t mode) { - if (S_ISLNK(mode) && (S_IFLNK != 0120000)) { + if (S_ISLNK(mode) && (_S_IFLNK != 0120000)) { return (mode & ~(_S_IFMT)) | 0120000; } return (int)mode; @@ -213,8 +211,8 @@ static mode_t from_wire_mode(int mode) { - if ((mode & (_S_IFMT)) == 0120000 && (S_IFLNK != 0120000)) { - return (mode & ~(_S_IFMT)) | S_IFLNK; + if ((mode & (_S_IFMT)) == 0120000 && (_S_IFLNK != 0120000)) { + return (mode & ~(_S_IFMT)) | _S_IFLNK; } return (mode_t)mode; } @@ -478,7 +476,6 @@ char *p; char cleaned_name[MAXPATHLEN]; char linkbuf[MAXPATHLEN]; - extern int delete_excluded; extern int module_id; strlcpy(cleaned_name, fname, MAXPATHLEN); @@ -492,9 +489,18 @@ memset(sum,0,SUM_LENGTH); if (readlink_stat(fname,&st,linkbuf) != 0) { + int save_errno = errno; + if ((errno == ENOENT) && copy_links && !noexcludes) { + /* symlink pointing nowhere, see if excluded */ + memset((char *)&st, 0, sizeof(st)); + if (check_exclude_file(f,fname,&st)) { + /* file is excluded anyway, ignore silently */ + return NULL; + } + } io_error = 1; rprintf(FERROR,"readlink %s: %s\n", - fname,strerror(errno)); + fname,strerror(save_errno)); return NULL; } @@ -511,8 +517,7 @@ return NULL; } - /* f is set to -1 when calculating deletion file list */ - if (((f != -1) || !delete_excluded) && !match_file_name(fname,&st)) + if (check_exclude_file(f,fname,&st)) return NULL; @@ -615,6 +620,9 @@ out_of_memory("send_file_name"); } + if (write_batch) /* dw */ + file->flags = FLAG_DELETE; + if (strcmp(file->basename,"")) { flist->files[flist->count++] = file; send_file_entry(file,f,base_flags); @@ -700,6 +708,8 @@ if (verbose && recurse && !am_server && f != -1) { rprintf(FINFO,"building file list ... "); + if (verbose > 1) + rprintf(FINFO, "\n"); rflush(FINFO); } @@ -841,6 +851,8 @@ io_end_buffering(f); stats.flist_size = stats.total_written - start_write; stats.num_files = flist->count; + if (write_batch) /* dw */ + write_batch_flist_info(flist->count, flist->files); } if (verbose > 2) @@ -918,7 +930,7 @@ } /* if protocol version is >= 17 then recv the io_error flag */ - if (f != -1 && remote_version >= 17) { + if (f != -1 && remote_version >= 17 && !read_batch) { /* dw-added readbatch */ extern int module_id; extern int ignore_errors; if (lp_ignore_errors(module_id) || ignore_errors) { @@ -1096,10 +1108,10 @@ for (i=0;icount;i++) { rprintf(FINFO,"[%d] i=%d %s %s mode=0%o len=%.0f\n", - getpid(), i, + (int) getpid(), i, NS(flist->files[i]->dirname), NS(flist->files[i]->basename), - flist->files[i]->mode, + (int) flist->files[i]->mode, (double)flist->files[i]->length); } } diff -u -r --new-file --exclude=CVS rsync-2.4.6/generator.c rsync-2.5.0/generator.c --- rsync-2.4.6/generator.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/generator.c Thu Nov 29 16:21:08 2001 @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2000 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 This program is free software; you can redistribute it and/or modify @@ -55,7 +56,7 @@ if (compare_dest != NULL) { if (access(fname, 0) != 0) { - slprintf(fnamecmpdest,MAXPATHLEN,"%s/%s", + snprintf(fnamecmpdest,MAXPATHLEN,"%s/%s", compare_dest,fname); fname = fnamecmpdest; } @@ -176,6 +177,15 @@ } + +/* + * Acts on file number I from FLIST, whose name is fname. + * + * First fixes up permissions, then generates checksums for the file. + * + * (This comment was added later by mbp who was trying to work it out; + * it might be wrong.) + */ void recv_generator(char *fname,struct file_list *flist,int i,int f_out) { int fd; @@ -214,10 +224,17 @@ } if (S_ISDIR(file->mode)) { + /* The file to be received is a directory, so we need + * to prepare appropriately. If there is already a + * file of that name and it is *not* a directory, then + * we need to delete it. If it doesn't exist, then + * recursively create it. */ + if (dry_run) return; if (statret == 0 && !S_ISDIR(st.st_mode)) { if (robust_unlink(fname) != 0) { - rprintf(FERROR,"unlink %s : %s\n",fname,strerror(errno)); + rprintf(FERROR,"recv_generator: unlink %s: %s\n", + fname,strerror(errno)); return; } statret = -1; @@ -226,7 +243,7 @@ if (!(relative_paths && errno==ENOENT && create_directory_path(fname)==0 && do_mkdir(fname,file->mode)==0)) { - rprintf(FERROR,"mkdir %s : %s (2)\n", + rprintf(FERROR,"recv_generator: mkdir %s: %s (2)\n", fname,strerror(errno)); } } @@ -312,7 +329,7 @@ if ((statret == -1) && (compare_dest != NULL)) { /* try the file at compare_dest instead */ int saveerrno = errno; - slprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s",compare_dest,fname); + snprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s",compare_dest,fname); statret = link_stat(fnamecmpbuf,&st); if (!S_ISREG(st.st_mode)) statret = -1; @@ -412,6 +429,11 @@ rprintf(FINFO,"generator starting pid=%d count=%d\n", (int)getpid(),flist->count); + /* we expect to just sit around now, so don't exit on a + timeout. If we really get a timeout then the other process should + exit */ + io_timeout = 0; + for (i = 0; i < flist->count; i++) { struct file_struct *file = flist->files[i]; mode_t saved_mode = file->mode; @@ -422,6 +444,8 @@ them. This is then fixed after the files are transferred */ if (!am_root && S_ISDIR(file->mode)) { file->mode |= S_IWUSR; /* user write */ + /* XXX: Could this be causing a problem on SCO? Perhaps their + * handling of permissions is strange? */ } recv_generator(local_name?local_name:f_name(file), @@ -438,11 +462,6 @@ rprintf(FINFO,"generate_files phase=%d\n",phase); write_int(f,-1); - - /* we expect to just sit around now, so don't exit on a - timeout. If we really get a timeout then the other process should - exit */ - io_timeout = 0; if (remote_version >= 13) { /* in newer versions of the protocol the files can cycle through diff -u -r --new-file --exclude=CVS rsync-2.4.6/io.c rsync-2.5.0/io.c --- rsync-2.4.6/io.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/io.c Thu Nov 29 16:21:08 2001 @@ -1,6 +1,8 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2001 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,18 +29,24 @@ /* if no timeout is specified then use a 60 second select timeout */ #define SELECT_TIMEOUT 60 -extern int bwlimit; - static int io_multiplexing_out; static int io_multiplexing_in; static int multiplex_in_fd; static int multiplex_out_fd; static time_t last_io; -static int eof_error=1; +static int no_flush; + +extern int bwlimit; extern int verbose; extern int io_timeout; extern struct stats stats; + +/** Ignore EOF errors while reading a module listing if the remote + version is 24 or less. */ +int kludge_around_eof = False; + + static int io_error_fd = -1; static void read_loop(int fd, char *buf, int len); @@ -47,6 +55,8 @@ { extern int am_server, am_daemon; time_t t; + + err_list_push(); if (!io_timeout) return; @@ -59,7 +69,7 @@ if (last_io && io_timeout && (t-last_io) >= io_timeout) { if (!am_server && !am_daemon) { - rprintf(FERROR,"io timeout after %d second - exiting\n", + rprintf(FERROR,"io timeout after %d seconds - exiting\n", (int)(t-last_io)); } exit_cleanup(RERR_TIMEOUT); @@ -80,6 +90,8 @@ int fd = io_error_fd; int tag, len; + /* io_error_fd is temporarily disabled -- is this meant to + * prevent indefinite recursion? */ io_error_fd = -1; read_loop(fd, buf, 4); @@ -101,21 +113,68 @@ } -static int no_flush; +static void whine_about_eof (void) +{ + /** + It's almost always an error to get an EOF when we're trying + to read from the network, because the protocol is + self-terminating. + + However, there is one unfortunate cases where it is not, + which is rsync <2.4.6 sending a list of modules on a + server, since the list is terminated by closing the socket. + So, for the section of the program where that is a problem + (start_socket_client), kludge_around_eof is True and we + just exit. + */ + + if (kludge_around_eof) + exit_cleanup (0); + else { + rprintf (FERROR, + "%s: connection unexpectedly closed " + "(%.0f bytes read so far)\n", + RSYNC_NAME, (double)stats.total_read); + + exit_cleanup (RERR_STREAMIO); + } +} + + +static void die_from_readerr (int err) +{ + /* this prevents us trying to write errors on a dead socket */ + io_multiplexing_close(); + + rprintf(FERROR, "%s: read error: %s\n", + RSYNC_NAME, strerror (err)); + exit_cleanup(RERR_STREAMIO); +} + -/* read from a socket with IO timeout. return the number of - bytes read. If no bytes can be read then exit, never return - a number <= 0 */ -static int read_timeout(int fd, char *buf, int len) +/*! + * Read from a socket with IO timeout. return the number of bytes + * read. If no bytes can be read then exit, never return a number <= 0. + * + * TODO: If the remote shell connection fails, then current versions + * actually report an "unexpected EOF" error here. Since it's a + * fairly common mistake to try to use rsh when ssh is required, we + * should trap that: if we fail to read any data at all, we should + * give a better explanation. We can tell whether the connection has + * started by looking e.g. at whether the remote version is known yet. + */ +static int read_timeout (int fd, char *buf, int len) { int n, ret=0; io_flush(); while (ret == 0) { + /* until we manage to read *something* */ fd_set fds; struct timeval tv; int fd_count = fd+1; + int count; FD_ZERO(&fds); FD_SET(fd, &fds); @@ -129,11 +188,16 @@ errno = 0; - if (select(fd_count, &fds, NULL, NULL, &tv) < 1) { + count = select(fd_count, &fds, NULL, NULL, &tv); + + if (count == 0) { + check_timeout(); + } + + if (count <= 0) { if (errno == EBADF) { exit_cleanup(RERR_SOCKETIO); } - check_timeout(); continue; } @@ -152,38 +216,27 @@ if (io_timeout) last_io = time(NULL); continue; + } else if (n == 0) { + whine_about_eof (); + return -1; /* doesn't return */ + } else if (n == -1) { + if (errno == EINTR || errno == EWOULDBLOCK || + errno == EAGAIN) + continue; + else + die_from_readerr (errno); } - - if (n == -1 && errno == EINTR) { - continue; - } - - if (n == -1 && - (errno == EWOULDBLOCK || errno == EAGAIN)) { - continue; - } - - - if (n == 0) { - if (eof_error) { - rprintf(FERROR,"unexpected EOF in read_timeout\n"); - } - exit_cleanup(RERR_STREAMIO); - } - - /* this prevents us trying to write errors on a dead socket */ - io_multiplexing_close(); - - rprintf(FERROR,"read error: %s\n", strerror(errno)); - exit_cleanup(RERR_STREAMIO); } return ret; } -/* continue trying to read len bytes - don't return until len - has been read */ -static void read_loop(int fd, char *buf, int len) + + + +/*! Continue trying to read len bytes - don't return until len has + been read. */ +static void read_loop (int fd, char *buf, int len) { while (len) { int n = read_timeout(fd, buf, len); @@ -193,16 +246,20 @@ } } -/* read from the file descriptor handling multiplexing - - return number of bytes read - never return <= 0 */ + +/** + * Read from the file descriptor handling multiplexing - return number + * of bytes read. + * + * Never returns <= 0. + */ static int read_unbuffered(int fd, char *buf, int len) { static int remaining; int tag, ret=0; char line[1024]; - if (!io_multiplexing_in || fd != multiplex_in_fd) + if (!io_multiplexing_in || fd != multiplex_in_fd) return read_timeout(fd, buf, len); while (ret == 0) { @@ -214,7 +271,7 @@ continue; } - read_loop(fd, line, 4); + read_loop (fd, line, 4); tag = IVAL(line, 0); remaining = tag & 0xFFFFFF; @@ -248,7 +305,7 @@ /* do a buffered read from fd. don't return until all N bytes have been read. If all N can't be read then exit with an error */ -static void readfd(int fd,char *buffer,int N) +static void readfd (int fd, char *buffer, int N) { int ret; int total=0; @@ -256,7 +313,7 @@ while (total < N) { io_flush(); - ret = read_unbuffered(fd,buffer + total,N-total); + ret = read_unbuffered (fd, buffer + total, N-total); total += ret; } @@ -306,14 +363,14 @@ void read_sbuf(int f,char *buf,int len) { - read_buf(f,buf,len); + read_buf (f,buf,len); buf[len] = 0; } unsigned char read_byte(int f) { unsigned char c; - read_buf(f,(char *)&c,1); + read_buf (f, (char *)&c, 1); return c; } @@ -325,6 +382,8 @@ int fd_count, count; struct timeval tv; + err_list_push(); + no_flush++; while (total < len) { @@ -349,11 +408,14 @@ &w_fds,NULL, &tv); + if (count == 0) { + check_timeout(); + } + if (count <= 0) { if (errno == EBADF) { exit_cleanup(RERR_SOCKETIO); } - check_timeout(); continue; } @@ -363,7 +425,6 @@ if (FD_ISSET(fd, &w_fds)) { int ret, n = len-total; - ret = write(fd,buf+total,n); if (ret == -1 && errno == EINTR) { @@ -377,7 +438,10 @@ } if (ret <= 0) { - rprintf(FERROR,"erroring writing %d bytes - exiting\n", len); + rprintf(FERROR, + "error writing %d unbuffered bytes" + " - exiting: %s\n", len, + strerror(errno)); exit_cleanup(RERR_STREAMIO); } @@ -445,6 +509,9 @@ void io_flush(void) { int fd = multiplex_out_fd; + + err_list_push(); + if (!io_buffer_count || no_flush) return; if (io_multiplexing_out) { @@ -455,6 +522,8 @@ io_buffer_count = 0; } + +/* XXX: fd is ignored, which seems a little strange. */ void io_end_buffering(int fd) { io_flush(); @@ -464,21 +533,12 @@ } } -/* some OSes have a bug where an exit causes the pending writes on - a socket to be flushed. Do an explicit shutdown to try to prevent this */ -void io_shutdown(void) -{ - if (multiplex_out_fd != -1) close(multiplex_out_fd); - if (io_error_fd != -1) close(io_error_fd); - multiplex_out_fd = -1; - io_error_fd = -1; -} - - static void writefd(int fd,char *buf,int len) { stats.total_written += len; + err_list_push(); + if (!io_buffer || fd != multiplex_out_fd) { writefd_unbuffered(fd, buf, len); return; @@ -505,6 +565,11 @@ writefd(f,b,4); } + +/* + * Note: int64 may actually be a 32-bit type if ./configure couldn't find any + * 64-bit types on this platform. + */ void write_longint(int f, int64 x) { extern int remote_version; @@ -539,10 +604,10 @@ write_buf(f,(char *)&c,1); } + + int read_line(int f, char *buf, int maxlen) { - eof_error = 0; - while (maxlen) { buf[0] = 0; read_buf(f, buf, 1); @@ -561,8 +626,6 @@ return 0; } - eof_error = 1; - return 1; } @@ -574,7 +637,7 @@ int len; va_start(ap, format); - len = vslprintf(buf, sizeof(buf), format, ap); + len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len < 0) exit_cleanup(RERR_STREAMIO); @@ -608,14 +671,6 @@ io_flush(); stats.total_written += (len+4); mplex_write(multiplex_out_fd, code, buf, len); - return 1; -} - -/* write a message to the special error fd */ -int io_error_write(int f, enum logcode code, char *buf, int len) -{ - if (f == -1) return 0; - mplex_write(f, code, buf, len); return 1; } diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/addrinfo.h rsync-2.5.0/lib/addrinfo.h --- rsync-2.4.6/lib/addrinfo.h Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/addrinfo.h Mon Nov 26 19:46:03 2001 @@ -0,0 +1,108 @@ +/* + * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/** + * @file addrinfo.h + * + * Replacement getaddrinfo() for machines that don't have it. The new + * getaddrinfo()/getnameinfo() interface is implemented on top of the + * traditional resolver calls. + **/ + +#ifndef HAVE_GETADDRINFO + +#ifndef EAI_ADDRFAMILY +/* + * Error return codes from getaddrinfo() + */ +#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ +#define EAI_AGAIN 2 /* temporary failure in name resolution */ +#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ +#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_MEMORY 6 /* memory allocation failure */ +#define EAI_NODATA 7 /* no address associated with hostname */ +#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ +#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_SYSTEM 11 /* system error returned in errno */ +#define EAI_BADHINTS 12 +#define EAI_PROTOCOL 13 +#define EAI_MAX 14 +#endif /* ndef EAI_ADDRFAMILY */ + +/* + * Flag values for getaddrinfo() + */ + +#ifndef AI_PASSIVE + +#define AI_PASSIVE 0x00000001 /* get address to use bind() */ +#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ +#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */ +/* valid flags for addrinfo */ +#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST) + +#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ +#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ +#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ +#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ +/* special recommended flags for getipnodebyname */ +#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) + +/* + * Constants for getnameinfo() + */ +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 + +/* + * Flag values for getnameinfo() + */ +#define NI_NOFQDN 0x00000001 +#define NI_NUMERICHOST 0x00000002 +#define NI_NAMEREQD 0x00000004 +#define NI_NUMERICSERV 0x00000008 +#define NI_DGRAM 0x00000010 + +struct addrinfo { + int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ + size_t ai_addrlen; /* length of ai_addr */ + char *ai_canonname; /* canonical name for hostname */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ +}; + +extern void freehostent(struct hostent *); +extern char *gai_strerror(int); +#endif /* AI_PASSIVE */ +#endif /* HAVE_GETADDRINFO */ diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/compat.c rsync-2.5.0/lib/compat.c --- rsync-2.4.6/lib/compat.c Fri Jul 28 22:05:09 2000 +++ rsync-2.5.0/lib/compat.c Thu Nov 29 16:21:10 2001 @@ -103,6 +103,7 @@ { size_t len = strlen(s); size_t ret = len; + if (bufsize <= 0) return 0; if (len >= bufsize) len = bufsize-1; memcpy(d, s, len); d[len] = 0; @@ -137,10 +138,10 @@ unsigned char *p = (unsigned char *)&ip.s_addr; static char buf[18]; #if WORDS_BIGENDIAN - slprintf(buf, 18, "%d.%d.%d.%d", + snprintf(buf, 18, "%d.%d.%d.%d", (int)p[0], (int)p[1], (int)p[2], (int)p[3]); #else - slprintf(buf, 18, "%d.%d.%d.%d", + snprintf(buf, 18, "%d.%d.%d.%d", (int)p[3], (int)p[2], (int)p[1], (int)p[0]); #endif return buf; diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/getaddrinfo.c rsync-2.5.0/lib/getaddrinfo.c --- rsync-2.4.6/lib/getaddrinfo.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/getaddrinfo.c Wed Nov 28 21:01:28 2001 @@ -0,0 +1,623 @@ +/* + * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * + * Changes Copyright (C) 2001 by Martin Pool + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator. + * + * Issues to be discussed: + * - Thread safe-ness must be checked. + * - Return values. There are nonstandard return values defined and used + * in the source code. This is because RFC2133 is silent about which error + * code must be returned for which situation. + * - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag. + */ + +#include + +#if defined(__KAME__) && defined(INET6) +# define FAITH +#endif + +#include "lib/addrinfo.h" + +#define SUCCESS 0 +#define ANY 0 +#define YES 1 +#define NO 0 + +#ifdef FAITH +static int translate = NO; +static struct in6_addr faith_prefix = IN6ADDR_ANY_INIT; +#endif /* FAITH */ + +/* Amdahl's UTS 2.1.2 defines NO_ADDRESS instead of NO_DATA. */ + +#ifndef NO_DATA +#ifdef NO_ADDRESS +#define NO_DATA NO_ADDRESS +#endif +#endif /* ndef NO_DATA */ + +static const char in_addrany[] = { 0, 0, 0, 0 }; +static const char in6_addrany[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; +static const char in_loopback[] = { 127, 0, 0, 1 }; +static const char in6_loopback[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 +}; + +struct sockinet { + u_char si_len; + u_char si_family; + u_short si_port; +}; + +static struct afd { + int a_af; + int a_addrlen; + int a_socklen; + int a_off; + const char *a_addrany; + const char *a_loopback; +} afdl [] = { +#ifdef INET6 +#define N_INET6 0 + {PF_INET6, sizeof(struct in6_addr), + sizeof(struct sockaddr_in6), + offsetof(struct sockaddr_in6, sin6_addr), + in6_addrany, in6_loopback}, +#define N_INET 1 +#else +#define N_INET 0 +#endif + {PF_INET, sizeof(struct in_addr), + sizeof(struct sockaddr_in), + offsetof(struct sockaddr_in, sin_addr), + in_addrany, in_loopback}, + {0, 0, 0, 0, NULL, NULL}, +}; + +#ifdef INET6 +#define PTON_MAX 16 +#else +#define PTON_MAX 4 +#endif + + +static int get_name (const char *, struct afd *, + struct addrinfo **, char *, struct addrinfo *, + int); +static int get_addr (const char *, int, struct addrinfo **, + struct addrinfo *, int); +static int str_isnumber (const char *); + +static char *ai_errlist[] = { + "success.", + "address family for hostname not supported.", /* EAI_ADDRFAMILY */ + "temporary failure in name resolution.", /* EAI_AGAIN */ + "invalid value for ai_flags.", /* EAI_BADFLAGS */ + "non-recoverable failure in name resolution.", /* EAI_FAIL */ + "ai_family not supported.", /* EAI_FAMILY */ + "memory allocation failure.", /* EAI_MEMORY */ + "no address associated with hostname.", /* EAI_NODATA */ + "hostname nor servname provided, or not known.",/* EAI_NONAME */ + "servname not supported for ai_socktype.", /* EAI_SERVICE */ + "ai_socktype not supported.", /* EAI_SOCKTYPE */ + "system error returned in errno.", /* EAI_SYSTEM */ + "invalid value for hints.", /* EAI_BADHINTS */ + "resolved protocol is unknown.", /* EAI_PROTOCOL */ + "unknown error.", /* EAI_MAX */ +}; + +#define GET_CANONNAME(ai, str) \ +if (pai->ai_flags & AI_CANONNAME) {\ + if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\ + strcpy((ai)->ai_canonname, (str));\ + } else {\ + error = EAI_MEMORY;\ + goto free;\ + }\ +} + + +static int get_ai(struct addrinfo ** to_ai, + struct addrinfo const * pai, + struct afd *afd, + const char *addr, + short port) +{ + char *p; + if ((*to_ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) + + ((afd)->a_socklen))) + == NULL) + return 0; + memcpy(*to_ai, pai, sizeof(struct addrinfo)); + (*to_ai)->ai_addr = (struct sockaddr *)((*to_ai) + 1); + memset((*to_ai)->ai_addr, 0, (afd)->a_socklen); + (*to_ai)->ai_addrlen = (afd)->a_socklen; +#if HAVE_SOCKADDR_LEN + (*to_ai)->ai_addr->sa_len= (afd)->a_socklen; +#endif + (*to_ai)->ai_addr->sa_family = (*to_ai)->ai_family = (afd)->a_af; + ((struct sockinet *)(*to_ai)->ai_addr)->si_port = port; + p = (char *)((*to_ai)->ai_addr); + memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen); + return 1; +} + +#define ERR(err) { error = (err); goto bad; } + +char * +gai_strerror(ecode) + int ecode; +{ + if (ecode < 0 || ecode > EAI_MAX) + ecode = EAI_MAX; + return ai_errlist[ecode]; +} + +void +freeaddrinfo(ai) + struct addrinfo *ai; +{ + struct addrinfo *next; + + do { + next = ai->ai_next; + if (ai->ai_canonname) + free(ai->ai_canonname); + /* no need to free(ai->ai_addr) */ + free(ai); + } while ((ai = next) != NULL); +} + +static int +str_isnumber(p) + const char *p; +{ + char *q = (char *)p; + while (*q) { + if (! isdigit(*q)) + return NO; + q++; + } + return YES; +} + +int +getaddrinfo(hostname, servname, hints, res) + const char *hostname, *servname; + const struct addrinfo *hints; + struct addrinfo **res; +{ + struct addrinfo sentinel; + struct addrinfo *top = NULL; + struct addrinfo *cur; + int i, error = 0; + char pton[PTON_MAX]; + struct addrinfo ai; + struct addrinfo *pai; + u_short port; + +#ifdef FAITH + static int firsttime = 1; + + if (firsttime) { + /* translator hack */ + { + char *q = getenv("GAI"); + if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1) + translate = YES; + } + firsttime = 0; + } +#endif + + /* initialize file static vars */ + sentinel.ai_next = NULL; + cur = &sentinel; + pai = &ai; + pai->ai_flags = 0; + pai->ai_family = PF_UNSPEC; + pai->ai_socktype = ANY; + pai->ai_protocol = ANY; + pai->ai_addrlen = 0; + pai->ai_canonname = NULL; + pai->ai_addr = NULL; + pai->ai_next = NULL; + port = ANY; + + if (hostname == NULL && servname == NULL) + return EAI_NONAME; + if (hints) { + /* error check for hints */ + if (hints->ai_addrlen || hints->ai_canonname || + hints->ai_addr || hints->ai_next) + ERR(EAI_BADHINTS); /* xxx */ + if (hints->ai_flags & ~AI_MASK) + ERR(EAI_BADFLAGS); + switch (hints->ai_family) { + case PF_UNSPEC: + case PF_INET: +#ifdef INET6 + case PF_INET6: +#endif + break; + default: + ERR(EAI_FAMILY); + } + memcpy(pai, hints, sizeof(*pai)); + switch (pai->ai_socktype) { + case ANY: + switch (pai->ai_protocol) { + case ANY: + break; + case IPPROTO_UDP: + pai->ai_socktype = SOCK_DGRAM; + break; + case IPPROTO_TCP: + pai->ai_socktype = SOCK_STREAM; + break; + default: + pai->ai_socktype = SOCK_RAW; + break; + } + break; + case SOCK_RAW: + break; + case SOCK_DGRAM: + if (pai->ai_protocol != IPPROTO_UDP && + pai->ai_protocol != ANY) + ERR(EAI_BADHINTS); /*xxx*/ + pai->ai_protocol = IPPROTO_UDP; + break; + case SOCK_STREAM: + if (pai->ai_protocol != IPPROTO_TCP && + pai->ai_protocol != ANY) + ERR(EAI_BADHINTS); /*xxx*/ + pai->ai_protocol = IPPROTO_TCP; + break; + default: + ERR(EAI_SOCKTYPE); + break; + } + } + + /* + * service port + */ + if (servname) { + if (str_isnumber(servname)) { + if (pai->ai_socktype == ANY) { + /* caller accept *ANY* socktype */ + pai->ai_socktype = SOCK_DGRAM; + pai->ai_protocol = IPPROTO_UDP; + } + port = htons(atoi(servname)); + } else { + struct servent *sp; + char *proto; + + proto = NULL; + switch (pai->ai_socktype) { + case ANY: + proto = NULL; + break; + case SOCK_DGRAM: + proto = "udp"; + break; + case SOCK_STREAM: + proto = "tcp"; + break; + default: + fprintf(stderr, "panic!\n"); + break; + } + if ((sp = getservbyname(servname, proto)) == NULL) + ERR(EAI_SERVICE); + port = sp->s_port; + if (pai->ai_socktype == ANY) + if (strcmp(sp->s_proto, "udp") == 0) { + pai->ai_socktype = SOCK_DGRAM; + pai->ai_protocol = IPPROTO_UDP; + } else if (strcmp(sp->s_proto, "tcp") == 0) { + pai->ai_socktype = SOCK_STREAM; + pai->ai_protocol = IPPROTO_TCP; + } else + ERR(EAI_PROTOCOL); /*xxx*/ + } + } + + /* + * hostname == NULL. + * passive socket -> anyaddr (0.0.0.0 or ::) + * non-passive socket -> localhost (127.0.0.1 or ::1) + */ + if (hostname == NULL) { + struct afd *afd; + + for (afd = &afdl[0]; afd->a_af; afd++) { + if (!(pai->ai_family == PF_UNSPEC + || pai->ai_family == afd->a_af)) { + continue; + } + + if (pai->ai_flags & AI_PASSIVE) { + if (!get_ai(&cur->ai_next, pai, afd, afd->a_addrany, port)) + goto free; + /* xxx meaningless? + * GET_CANONNAME(cur->ai_next, "anyaddr"); + */ + } else { + if (!get_ai(&cur->ai_next, pai, afd, afd->a_loopback, + port)) + goto free; + /* xxx meaningless? + * GET_CANONNAME(cur->ai_next, "localhost"); + */ + } + cur = cur->ai_next; + } + top = sentinel.ai_next; + if (top) + goto good; + else + ERR(EAI_FAMILY); + } + + /* hostname as numeric name */ + for (i = 0; afdl[i].a_af; i++) { + if (inet_pton(afdl[i].a_af, hostname, pton)) { + u_long v4a; + u_char pfx; + + switch (afdl[i].a_af) { + case AF_INET: + v4a = ((struct in_addr *)pton)->s_addr; + if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) + pai->ai_flags &= ~AI_CANONNAME; + v4a >>= IN_CLASSA_NSHIFT; + if (v4a == 0 || v4a == IN_LOOPBACKNET) + pai->ai_flags &= ~AI_CANONNAME; + break; +#ifdef INET6 + case AF_INET6: + pfx = ((struct in6_addr *)pton)->s6_addr[0]; + if (pfx == 0 || pfx == 0xfe || pfx == 0xff) + pai->ai_flags &= ~AI_CANONNAME; + break; +#endif + } + + if (pai->ai_family == afdl[i].a_af || + pai->ai_family == PF_UNSPEC) { + if (! (pai->ai_flags & AI_CANONNAME)) { + if (get_ai(&top, pai, &afdl[i], pton, port)) + goto good; + else + goto free; + } + /* + * if AI_CANONNAME and if reverse lookup + * fail, return ai anyway to pacify + * calling application. + * + * XXX getaddrinfo() is a name->address + * translation function, and it looks strange + * that we do addr->name translation here. + */ + get_name(pton, &afdl[i], &top, pton, pai, port); + goto good; + } else + ERR(EAI_FAMILY); /*xxx*/ + } + } + + if (pai->ai_flags & AI_NUMERICHOST) + ERR(EAI_NONAME); + + /* hostname as alphabetical name */ + error = get_addr(hostname, pai->ai_family, &top, pai, port); + if (error == 0) { + if (top) { + good: + *res = top; + return SUCCESS; + } else + error = EAI_FAIL; + } + free: + if (top) + freeaddrinfo(top); + bad: + *res = NULL; + return error; +} + +static int +get_name(addr, afd, res, numaddr, pai, port0) + const char *addr; + struct afd *afd; + struct addrinfo **res; + char *numaddr; + struct addrinfo *pai; + int port0; +{ + u_short port = port0 & 0xffff; + struct hostent *hp; + struct addrinfo *cur; + int error = 0, h_error; + +#ifdef INET6 + hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error); +#else + hp = gethostbyaddr(addr, afd->a_addrlen, AF_INET); +#endif + if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { + if (!get_ai(&cur, pai, afd, hp->h_addr_list[0], port)) + goto free; + GET_CANONNAME(cur, hp->h_name); + } else { + if (!get_ai(&cur, pai, afd, numaddr, port)) + goto free; + } + +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + *res = cur; + return SUCCESS; + free: + if (cur) + freeaddrinfo(cur); +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + /* bad: */ + *res = NULL; + return error; +} + +static int +get_addr(hostname, af, res, pai, port0) + const char *hostname; + int af; + struct addrinfo **res; + struct addrinfo *pai; + int port0; +{ + u_short port = port0 & 0xffff; + struct addrinfo sentinel; + struct hostent *hp; + struct addrinfo *top, *cur; + struct afd *afd; + int i, error = 0, h_error; + char *ap; +#ifndef INET6 + extern int h_errno; +#endif + + top = NULL; + sentinel.ai_next = NULL; + cur = &sentinel; +#ifdef INET6 + if (af == AF_UNSPEC) { + hp = getipnodebyname(hostname, AF_INET6, + AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error); + } else + hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error); +#else + hp = gethostbyname(hostname); + h_error = h_errno; +#endif + if (hp == NULL) { + switch (h_error) { + case HOST_NOT_FOUND: + case NO_DATA: + error = EAI_NODATA; + break; + case TRY_AGAIN: + error = EAI_AGAIN; + break; + case NO_RECOVERY: + default: + error = EAI_FAIL; + break; + } + goto bad; + } + + if ((hp->h_name == NULL) || (hp->h_name[0] == 0) || + (hp->h_addr_list[0] == NULL)) + ERR(EAI_FAIL); + + for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) { + switch (af) { +#ifdef INET6 + case AF_INET6: + afd = &afdl[N_INET6]; + break; +#endif +#ifndef INET6 + default: /* AF_UNSPEC */ +#endif + case AF_INET: + afd = &afdl[N_INET]; + break; +#ifdef INET6 + default: /* AF_UNSPEC */ + if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) { + ap += sizeof(struct in6_addr) - + sizeof(struct in_addr); + afd = &afdl[N_INET]; + } else + afd = &afdl[N_INET6]; + break; +#endif + } +#ifdef FAITH + if (translate && afd->a_af == AF_INET) { + struct in6_addr *in6; + + if (!get_ai(&cur->ai_next, pai, &afdl[N_INET6], ap, port)) + goto free; + in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr; + memcpy(&in6->s6_addr32[0], &faith_prefix, + sizeof(struct in6_addr) - sizeof(struct in_addr)); + memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr)); + } else +#endif /* FAITH */ + if (!get_ai(&cur->ai_next, pai, afd, ap, port)) + goto free; + if (cur == &sentinel) { + top = cur->ai_next; + GET_CANONNAME(top, hp->h_name); + } + cur = cur->ai_next; + } +#ifdef INET6 + freehostent(hp); +#endif + *res = top; + return SUCCESS; + free: + if (top) + freeaddrinfo(top); +#ifdef INET6 + if (hp) + freehostent(hp); +#endif + bad: + *res = NULL; + return error; +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/getnameinfo.c rsync-2.5.0/lib/getnameinfo.c --- rsync-2.4.6/lib/getnameinfo.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/getnameinfo.c Wed Nov 28 21:01:28 2001 @@ -0,0 +1,195 @@ +/* + * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. + * + * Changes Copyright (C) 2001 by Martin Pool + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Issues to be discussed: + * - Thread safe-ness must be checked + * - Return values. There seems to be no standard for return value (RFC2133) + * but INRIA implementation returns EAI_xxx defined for getaddrinfo(). + */ + +#include "rsync.h" +#include "lib/addrinfo.h" + +#define SUCCESS 0 +#define ANY 0 +#define YES 1 +#define NO 0 + +static struct afd { + int a_af; + int a_addrlen; + int a_socklen; + int a_off; +} afdl [] = { +#ifdef INET6 + {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6), + offsetof(struct sockaddr_in6, sin6_addr)}, +#endif + {PF_INET, sizeof(struct in_addr), sizeof(struct sockaddr_in), + offsetof(struct sockaddr_in, sin_addr)}, + {0, 0, 0}, +}; + +struct sockinet { + u_char si_len; + u_char si_family; + u_short si_port; +}; + +#define ENI_NOSOCKET 0 +#define ENI_NOSERVNAME 1 +#define ENI_NOHOSTNAME 2 +#define ENI_MEMORY 3 +#define ENI_SYSTEM 4 +#define ENI_FAMILY 5 +#define ENI_SALEN 6 + +int +getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) + const struct sockaddr *sa; + size_t salen; + char *host; + size_t hostlen; + char *serv; + size_t servlen; + int flags; +{ + extern int h_errno; + struct afd *afd; + struct servent *sp; + struct hostent *hp; + u_short port; + int family, i; + char *addr, *p; + u_long v4a; + u_char pfx; + int h_error; + char numserv[512]; + char numaddr[512]; + + if (sa == NULL) + return ENI_NOSOCKET; + +#ifdef HAVE_SOCKADDR_LEN + if (sa->sa_len != salen) return ENI_SALEN; +#endif /* HAVE_SOCKADDR_LEN */ + + family = sa->sa_family; + for (i = 0; afdl[i].a_af; i++) + if (afdl[i].a_af == family) { + afd = &afdl[i]; + goto found; + } + return ENI_FAMILY; + + found: + if (salen != afd->a_socklen) return ENI_SALEN; + + port = ((struct sockinet *)sa)->si_port; /* network byte order */ + addr = (char *)sa + afd->a_off; + + if (serv == NULL || servlen == 0) { + /* what we should do? */ + } else if (flags & NI_NUMERICSERV) { + snprintf(numserv, sizeof(numserv), "%d", ntohs(port)); + if (strlen(numserv) > servlen) + return ENI_MEMORY; + strcpy(serv, numserv); + } else { + sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp"); + if (sp) { + if (strlen(sp->s_name) > servlen) + return ENI_MEMORY; + strcpy(serv, sp->s_name); + } else + return ENI_NOSERVNAME; + } + + switch (sa->sa_family) { + case AF_INET: + v4a = ((struct sockaddr_in *)sa)->sin_addr.s_addr; + if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a)) + flags |= NI_NUMERICHOST; + v4a >>= IN_CLASSA_NSHIFT; + if (v4a == 0 || v4a == IN_LOOPBACKNET) + flags |= NI_NUMERICHOST; + break; +#ifdef INET6 + case AF_INET6: + pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0]; + if (pfx == 0 || pfx == 0xfe || pfx == 0xff) + flags |= NI_NUMERICHOST; + break; +#endif + } + if (host == NULL || hostlen == 0) { + /* what should we do? */ + } else if (flags & NI_NUMERICHOST) { + if (!inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))) + return ENI_SYSTEM; + if (strlen(numaddr) > hostlen) + return ENI_MEMORY; + strcpy(host, numaddr); + } else { +#ifdef INET6 + hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error); +#else + hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af); + h_error = h_errno; +#endif + + if (hp) { + if (flags & NI_NOFQDN) { + p = strchr(hp->h_name, '.'); + if (p) *p = '\0'; + } + if (strlen(hp->h_name) > hostlen) { +#ifdef INET6 + freehostent(hp); +#endif + return ENI_MEMORY; + } + strcpy(host, hp->h_name); +#ifdef INET6 + freehostent(hp); +#endif + } else { + if (flags & NI_NAMEREQD) + return ENI_NOHOSTNAME; + if (!inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))) + return ENI_NOHOSTNAME; + if (strlen(numaddr) > hostlen) + return ENI_MEMORY; + strcpy(host, numaddr); + } + } + return SUCCESS; +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/getopt.c rsync-2.5.0/lib/getopt.c --- rsync-2.4.6/lib/getopt.c Fri Jun 21 22:04:23 1996 +++ rsync-2.5.0/lib/getopt.c Wed Dec 31 16:00:00 1969 @@ -1,751 +0,0 @@ -#include "../rsync.h" -#ifndef HAVE_GETOPT_LONG - -/* Getopt for GNU. - NOTE: getopt is now part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu - before changing it! - - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* This tells Alpha OSF/1 not to define a getopt prototype in . - Ditto for AIX 3.2 and . */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined (_LIBC) || !defined (__GNU_LIBRARY__) - -/* This is for other GNU distributions with internationalized messages. - The GNU C Library itself does not yet support such messages. */ -#if HAVE_LIBINTL_H -# include -#else -# define gettext(msgid) (msgid) -#endif - -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As `getopt' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Setting the environment variable POSIXLY_CORRECT disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg = NULL; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* XXX 1003.2 says this must be 1 before any call. */ -int optind = 0; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static char *nextchar; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters. - - PERMUTE is the default. We permute the contents of ARGV as we scan, - so that eventually all the non-options are at the end. This allows options - to be given in any order, even with programs that were not written to - expect this. - - RETURN_IN_ORDER is an option available to programs that were written - to expect options and other ARGV-elements in any order and that care about - the ordering of the two. We describe each non-option ARGV-element - as if it were the argument of an option with character code 1. - Using `-' as the first character of the list of option characters - selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return EOF with `optind' != ARGC. */ - -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER -} ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; - -#ifdef __GNU_LIBRARY__ -/* We want to avoid inclusion of string.h with non-GNU libraries - because there are many ways it can cause trouble. - On some systems, it contains special magic macros that don't work - in GCC. */ -#include -#define my_index strchr -#else - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -char *getenv (); - -static char * -my_index (str, chr) - const char *str; - int chr; -{ - while (*str) - { - if (*str == chr) - return (char *) str; - str++; - } - return 0; -} - -/* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ -#ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -#if !defined (__STDC__) || !__STDC__ -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -#endif /* not __STDC__ */ -#endif /* __GNUC__ */ - -#endif /* not __GNU_LIBRARY__ */ - -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (argv) - char **argv; -{ - int bottom = first_nonopt; - int middle = last_nonopt; - int top = optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (optstring) - const char *optstring; -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - first_nonopt = last_nonopt = optind = 1; - - nextchar = NULL; - - posixly_correct = getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns `EOF'. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. - - If OPTSTRING starts with `-' or `+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with `--' instead of `-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of `struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; -{ - optarg = NULL; - - if (optind == 0) - optstring = _getopt_initialize (optstring); - - if (nextchar == NULL || *nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - if (ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (last_nonopt != optind) - first_nonopt = optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (optind < argc - && (argv[optind][0] != '-' || argv[optind][1] == '\0')) - optind++; - last_nonopt = optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (optind != argc && !strcmp (argv[optind], "--")) - { - optind++; - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; - - optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; - return EOF; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) - { - if (ordering == REQUIRE_ORDER) - return EOF; - optarg = argv[optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - nextchar = (argv[optind] + 1 - + (longopts != NULL && argv[optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound; - int option_index; - - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) - { - if (nameend - nextchar == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (opterr) - fprintf (stderr, gettext ("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); - nextchar += strlen (nextchar); - optind++; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - optarg = nameend + 1; - else - { - if (opterr) - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - gettext ("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - gettext ("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); - - nextchar += strlen (nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (optind < argc) - optarg = argv[optind++]; - else - { - if (opterr) - fprintf (stderr, - gettext ("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); - nextchar += strlen (nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - nextchar += strlen (nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) - { - if (opterr) - { - if (argv[optind][1] == '-') - /* --option */ - fprintf (stderr, gettext ("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); - else - /* +option or -option */ - fprintf (stderr, gettext ("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); - } - nextchar = (char *) ""; - optind++; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *nextchar++; - char *temp = my_index (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*nextchar == '\0') - ++optind; - - if (temp == NULL || c == ':') - { - if (opterr) - { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, gettext ("%s: illegal option -- %c\n"), - argv[0], c); - else - fprintf (stderr, gettext ("%s: invalid option -- %c\n"), - argv[0], c); - } - optopt = c; - return '?'; - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*nextchar != '\0') - { - optarg = nextchar; - optind++; - } - else - optarg = NULL; - nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*nextchar != '\0') - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr) - { - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, - gettext ("%s: option requires an argument -- %c\n"), - argv[0], c); - } - optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = NULL; - } - } - return c; - } -} - -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0); -} - -int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; -{ - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); -} - -#endif /* _LIBC or not __GNU_LIBRARY__. */ - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ - -int -main (argc, argv) - int argc; - char **argv; -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == EOF) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ -#else /* HAVE_GETOPT_LONG */ -void getopt_dummy(void) {} -#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/getopt.h rsync-2.5.0/lib/getopt.h --- rsync-2.4.6/lib/getopt.h Fri Jun 21 22:04:23 1996 +++ rsync-2.5.0/lib/getopt.h Wed Dec 31 16:00:00 1969 @@ -1,129 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef _GETOPT_H -#define _GETOPT_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -struct option -{ -#if defined (__STDC__) && __STDC__ - const char *name; -#else - char *name; -#endif - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; - -/* Names for the values of the `has_arg' field of `struct option'. */ - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ -/* Many other libraries have conflicting prototypes for getopt, with - differences in the consts, in stdlib.h. To avoid compilation - errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); - -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* _GETOPT_H */ diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/inet_ntop.c rsync-2.5.0/lib/inet_ntop.c --- rsync-2.4.6/lib/inet_ntop.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/inet_ntop.c Tue Nov 27 17:29:41 2001 @@ -0,0 +1,184 @@ +/* + * Copyright (C) 1996-2001 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + + +#include "rsync.h" + +#define NS_INT16SZ 2 +#define NS_IN6ADDRSZ 16 + +/* + * WARNING: Don't even consider trying to compile this on a system where + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. + */ + +static const char *inet_ntop4(const unsigned char *src, char *dst, + size_t size); + +#ifdef AF_INET6 +static const char *inet_ntop6(const unsigned char *src, char *dst, + size_t size); +#endif + +/* char * + * isc_net_ntop(af, src, dst, size) + * convert a network format address to presentation format. + * return: + * pointer to presentation format address (`dst'), or NULL (see errno). + * author: + * Paul Vixie, 1996. + */ +const char * +inet_ntop(int af, const void *src, char *dst, size_t size) +{ + switch (af) { + case AF_INET: + return (inet_ntop4(src, dst, size)); +#ifdef AF_INET6 + case AF_INET6: + return (inet_ntop6(src, dst, size)); +#endif + default: + errno = EAFNOSUPPORT; + return (NULL); + } + /* NOTREACHED */ +} + +/* const char * + * inet_ntop4(src, dst, size) + * format an IPv4 address + * return: + * `dst' (as a const) + * notes: + * (1) uses no statics + * (2) takes a unsigned char* not an in_addr as input + * author: + * Paul Vixie, 1996. + */ +static const char * +inet_ntop4(const unsigned char *src, char *dst, size_t size) +{ + static const char *fmt = "%u.%u.%u.%u"; + char tmp[sizeof "255.255.255.255"]; + + if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size) + { + errno = ENOSPC; + return (NULL); + } + strcpy(dst, tmp); + + return (dst); +} + +/* const char * + * isc_inet_ntop6(src, dst, size) + * convert IPv6 binary address into presentation (printable) format + * author: + * Paul Vixie, 1996. + */ +#ifdef AF_INET6 +static const char * +inet_ntop6(const unsigned char *src, char *dst, size_t size) +{ + /* + * Note that int32_t and int16_t need only be "at least" large enough + * to contain a value of the specified size. On some systems, like + * Crays, there is no such thing as an integer variable with 16 bits. + * Keep this in mind if you think this function should have been coded + * to use pointer overlays. All the world's not a VAX. + */ + char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; + struct { int base, len; } best, cur; + unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; + int i; + + /* + * Preprocess: + * Copy the input (bytewise) array into a wordwise array. + * Find the longest run of 0x00's in src[] for :: shorthanding. + */ + memset(words, '\0', sizeof words); + for (i = 0; i < NS_IN6ADDRSZ; i++) + words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); + best.base = -1; + cur.base = -1; + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { + if (words[i] == 0) { + if (cur.base == -1) + cur.base = i, cur.len = 1; + else + cur.len++; + } else { + if (cur.base != -1) { + if (best.base == -1 || cur.len > best.len) + best = cur; + cur.base = -1; + } + } + } + if (cur.base != -1) { + if (best.base == -1 || cur.len > best.len) + best = cur; + } + if (best.base != -1 && best.len < 2) + best.base = -1; + + /* + * Format the result. + */ + tp = tmp; + for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { + /* Are we inside the best run of 0x00's? */ + if (best.base != -1 && i >= best.base && + i < (best.base + best.len)) { + if (i == best.base) + *tp++ = ':'; + continue; + } + /* Are we following an initial run of 0x00s or any real hex? */ + if (i != 0) + *tp++ = ':'; + /* Is this address an encapsulated IPv4? */ + if (i == 6 && best.base == 0 && + (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { + if (!inet_ntop4(src+12, tp, + sizeof tmp - (tp - tmp))) + return (NULL); + tp += strlen(tp); + break; + } + tp += sprintf(tp, "%x", words[i]); + } + /* Was it a trailing run of 0x00's? */ + if (best.base != -1 && (best.base + best.len) == + (NS_IN6ADDRSZ / NS_INT16SZ)) + *tp++ = ':'; + *tp++ = '\0'; + + /* + * Check for overflow, copy, and we're done. + */ + if ((size_t)(tp - tmp) > size) { + errno = ENOSPC; + return (NULL); + } + strcpy(dst, tmp); + return (dst); +} +#endif /* AF_INET6 */ diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/inet_pton.c rsync-2.5.0/lib/inet_pton.c --- rsync-2.4.6/lib/inet_pton.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/inet_pton.c Tue Nov 27 17:29:41 2001 @@ -0,0 +1,210 @@ +/* + * Copyright (C) 1996-2001 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "rsync.h" + +#define NS_INT16SZ 2 +#define NS_INADDRSZ 4 +#define NS_IN6ADDRSZ 16 + +/* + * WARNING: Don't even consider trying to compile this on a system where + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. + */ + +static int inet_pton4(const char *src, unsigned char *dst); +static int inet_pton6(const char *src, unsigned char *dst); + +/* int + * isc_net_pton(af, src, dst) + * convert from presentation format (which usually means ASCII printable) + * to network format (which is usually some kind of binary format). + * return: + * 1 if the address was valid for the specified address family + * 0 if the address wasn't valid (`dst' is untouched in this case) + * -1 if some other error occurred (`dst' is untouched in this case, too) + * author: + * Paul Vixie, 1996. + */ +int +inet_pton(int af, + const char *src, + void *dst) +{ + switch (af) { + case AF_INET: + return (inet_pton4(src, dst)); +#ifdef INET6 + case AF_INET6: + return (inet_pton6(src, dst)); +#endif + default: + errno = EAFNOSUPPORT; + return (-1); + } + /* NOTREACHED */ +} + +/* int + * inet_pton4(src, dst) + * like inet_aton() but without all the hexadecimal and shorthand. + * return: + * 1 if `src' is a valid dotted quad, else 0. + * notice: + * does not touch `dst' unless it's returning 1. + * author: + * Paul Vixie, 1996. + */ +static int +inet_pton4(src, dst) + const char *src; + unsigned char *dst; +{ + static const char digits[] = "0123456789"; + int saw_digit, octets, ch; + unsigned char tmp[NS_INADDRSZ], *tp; + + saw_digit = 0; + octets = 0; + *(tp = tmp) = 0; + while ((ch = *src++) != '\0') { + const char *pch; + + if ((pch = strchr(digits, ch)) != NULL) { + unsigned int new = *tp * 10 + (pch - digits); + + if (new > 255) + return (0); + *tp = new; + if (! saw_digit) { + if (++octets > 4) + return (0); + saw_digit = 1; + } + } else if (ch == '.' && saw_digit) { + if (octets == 4) + return (0); + *++tp = 0; + saw_digit = 0; + } else + return (0); + } + if (octets < 4) + return (0); + memcpy(dst, tmp, NS_INADDRSZ); + return (1); +} + +/* int + * inet_pton6(src, dst) + * convert presentation level address to network order binary form. + * return: + * 1 if `src' is a valid [RFC1884 2.2] address, else 0. + * notice: + * (1) does not touch `dst' unless it's returning 1. + * (2) :: in a full address is silently ignored. + * credit: + * inspired by Mark Andrews. + * author: + * Paul Vixie, 1996. + */ +#ifdef INET6 +static int +inet_pton6(src, dst) + const char *src; + unsigned char *dst; +{ + static const char xdigits_l[] = "0123456789abcdef", + xdigits_u[] = "0123456789ABCDEF"; + unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; + const char *xdigits, *curtok; + int ch, saw_xdigit; + unsigned int val; + + memset((tp = tmp), '\0', NS_IN6ADDRSZ); + endp = tp + NS_IN6ADDRSZ; + colonp = NULL; + /* Leading :: requires some special handling. */ + if (*src == ':') + if (*++src != ':') + return (0); + curtok = src; + saw_xdigit = 0; + val = 0; + while ((ch = *src++) != '\0') { + const char *pch; + + if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) + pch = strchr((xdigits = xdigits_u), ch); + if (pch != NULL) { + val <<= 4; + val |= (pch - xdigits); + if (val > 0xffff) + return (0); + saw_xdigit = 1; + continue; + } + if (ch == ':') { + curtok = src; + if (!saw_xdigit) { + if (colonp) + return (0); + colonp = tp; + continue; + } + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) val & 0xff; + saw_xdigit = 0; + val = 0; + continue; + } + if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && + inet_pton4(curtok, tp) > 0) { + tp += NS_INADDRSZ; + saw_xdigit = 0; + break; /* '\0' was seen by inet_pton4(). */ + } + return (0); + } + if (saw_xdigit) { + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char) val & 0xff; + } + if (colonp != NULL) { + /* + * Since some memmove()'s erroneously fail to handle + * overlapping regions, we'll do the shift by hand. + */ + const int n = tp - colonp; + int i; + + for (i = 1; i <= n; i++) { + endp[- i] = colonp[n - i]; + colonp[n - i] = 0; + } + tp = endp; + } + if (tp != endp) + return (0); + memcpy(dst, tmp, NS_IN6ADDRSZ); + return (1); +} +#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/mdfour.c rsync-2.5.0/lib/mdfour.c --- rsync-2.4.6/lib/mdfour.c Sat Jan 29 03:35:04 2000 +++ rsync-2.5.0/lib/mdfour.c Thu Nov 29 16:21:10 2001 @@ -28,30 +28,23 @@ static struct mdfour *m; -#define F(X,Y,Z) (((X)&(Y)) | ((~(X))&(Z))) -#define G(X,Y,Z) (((X)&(Y)) | ((X)&(Z)) | ((Y)&(Z))) -#define H(X,Y,Z) ((X)^(Y)^(Z)) -#ifdef LARGE_INT32 -#define lshift(x,s) ((((x)<<(s))&0xFFFFFFFF) | (((x)>>(32-(s)))&0xFFFFFFFF)) -#else -#define lshift(x,s) (((x)<<(s)) | ((x)>>(32-(s)))) -#endif - -#define ROUND1(a,b,c,d,k,s) a = lshift((uint32)(a + F(b,c,d) + X[k]), s) -#define ROUND2(a,b,c,d,k,s) a = lshift((uint32)(a + G(b,c,d) + X[k] + 0x5A827999),s) -#define ROUND3(a,b,c,d,k,s) a = lshift((uint32)(a + H(b,c,d) + X[k] + 0x6ED9EBA1),s) +#define MASK32 (0xffffffff) + +#define F(X,Y,Z) ((((X)&(Y)) | ((~(X))&(Z)))) +#define G(X,Y,Z) ((((X)&(Y)) | ((X)&(Z)) | ((Y)&(Z)))) +#define H(X,Y,Z) (((X)^(Y)^(Z))) +#define lshift(x,s) (((((x)<<(s))&MASK32) | (((x)>>(32-(s)))&MASK32))) + +#define ROUND1(a,b,c,d,k,s) a = lshift((a + F(b,c,d) + M[k])&MASK32, s) +#define ROUND2(a,b,c,d,k,s) a = lshift((a + G(b,c,d) + M[k] + 0x5A827999)&MASK32,s) +#define ROUND3(a,b,c,d,k,s) a = lshift((a + H(b,c,d) + M[k] + 0x6ED9EBA1)&MASK32,s) /* this applies md4 to 64 byte chunks */ static void mdfour64(uint32 *M) { - int j; uint32 AA, BB, CC, DD; - uint32 X[16]; uint32 A,B,C,D; - for (j=0;j<16;j++) - X[j] = M[j]; - A = m->A; B = m->B; C = m->C; D = m->D; AA = A; BB = B; CC = C; DD = D; @@ -64,6 +57,7 @@ ROUND1(A,B,C,D, 12, 3); ROUND1(D,A,B,C, 13, 7); ROUND1(C,D,A,B, 14, 11); ROUND1(B,C,D,A, 15, 19); + ROUND2(A,B,C,D, 0, 3); ROUND2(D,A,B,C, 4, 5); ROUND2(C,D,A,B, 8, 9); ROUND2(B,C,D,A, 12, 13); ROUND2(A,B,C,D, 1, 3); ROUND2(D,A,B,C, 5, 5); @@ -82,15 +76,11 @@ ROUND3(A,B,C,D, 3, 3); ROUND3(D,A,B,C, 11, 9); ROUND3(C,D,A,B, 7, 11); ROUND3(B,C,D,A, 15, 15); - A += AA; B += BB; C += CC; D += DD; + A += AA; B += BB; + C += CC; D += DD; -#ifdef LARGE_INT32 - A &= 0xFFFFFFFF; B &= 0xFFFFFFFF; - C &= 0xFFFFFFFF; D &= 0xFFFFFFFF; -#endif - - for (j=0;j<16;j++) - X[j] = 0; + A &= MASK32; B &= MASK32; + C &= MASK32; D &= MASK32; m->A = A; m->B = B; m->C = C; m->D = D; } diff -u -r --new-file --exclude=CVS rsync-2.4.6/lib/permstring.c rsync-2.5.0/lib/permstring.c --- rsync-2.4.6/lib/permstring.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/lib/permstring.c Wed Nov 28 16:15:20 2001 @@ -0,0 +1,61 @@ +/* + Copyright (C) Andrew Tridgell 1996 + Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "rsync.h" + +/** + * Produce a string representation of Unix mode bits like that used by + * ls(1). + * + * @param buf buffer of at least 11 characters + **/ +void permstring(char *perms, + int mode) +{ + static const char *perm_map = "rwxrwxrwx"; + int i; + + strcpy(perms, "----------"); + + for (i=0;i<9;i++) { + if (mode & (1< -# include -#include - -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) - -/* Define this as a fall through, HAVE_STDARG_H is probably already set */ - -#define HAVE_VARARGS_H +#endif -/* varargs declarations: */ +#ifdef HAVE_STRINGS_H +#include +#endif +#ifdef HAVE_CTYPE_H +#include +#endif +#include +#include +#ifdef HAVE_STDLIB_H +#include +#endif -#if defined(HAVE_STDARG_H) -# include -# define HAVE_STDARGS /* let's hope that works everywhere (mj) */ -# define VA_LOCAL_DECL va_list ap -# define VA_START(f) va_start(ap, f) -# define VA_SHIFT(v,t) ; /* no-op for ANSI */ -# define VA_END va_end(ap) +#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) +/* only include stdio.h if we are not re-defining snprintf or vsnprintf */ +#include + /* make the compiler happy with an empty file */ + void dummy_snprintf(void) {} #else -# if defined(HAVE_VARARGS_H) -# include -# undef HAVE_STDARGS -# define VA_LOCAL_DECL va_list ap -# define VA_START(f) va_start(ap) /* f is ignored! */ -# define VA_SHIFT(v,t) v = va_arg(ap,t) -# define VA_END va_end(ap) -# else -/*XX ** NO VARARGS ** XX*/ -# endif -#endif #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double @@ -91,18 +88,21 @@ #define LDOUBLE double #endif -/*int snprintf (char *str, size_t count, const char *fmt, ...);*/ -/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ +#ifdef HAVE_LONG_LONG +#define LLONG long long +#else +#define LLONG long +#endif -static void dopr (char *buffer, size_t maxlen, const char *format, - va_list args); -static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, +static size_t dopr(char *buffer, size_t maxlen, const char *format, + va_list args); +static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); -static void fmtint (char *buffer, size_t *currlen, size_t maxlen, +static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags); -static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, +static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags); -static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); +static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); /* * dopr(): poor man's version of doprintf @@ -131,690 +131,807 @@ #define DP_C_SHORT 1 #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 +#define DP_C_LLONG 4 -#define char_to_int(p) (p - '0') -#define MAX(p,q) ((p >= q) ? p : q) +#define char_to_int(p) ((p)- '0') +#ifndef MAX +#define MAX(p,q) (((p) >= (q)) ? (p) : (q)) +#endif -static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) +static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args) { - char ch; - long value; - LDOUBLE fvalue; - char *strvalue; - int min; - int max; - int state; - int flags; - int cflags; - size_t currlen; - - state = DP_S_DEFAULT; - currlen = flags = cflags = min = 0; - max = -1; - ch = *format++; - - while (state != DP_S_DONE) - { - if ((ch == '\0') || (currlen >= maxlen)) - state = DP_S_DONE; - - switch(state) - { - case DP_S_DEFAULT: - if (ch == '%') - state = DP_S_FLAGS; - else - dopr_outch (buffer, &currlen, maxlen, ch); - ch = *format++; - break; - case DP_S_FLAGS: - switch (ch) - { - case '-': - flags |= DP_F_MINUS; - ch = *format++; - break; - case '+': - flags |= DP_F_PLUS; - ch = *format++; - break; - case ' ': - flags |= DP_F_SPACE; - ch = *format++; - break; - case '#': - flags |= DP_F_NUM; - ch = *format++; - break; - case '0': - flags |= DP_F_ZERO; - ch = *format++; - break; - default: - state = DP_S_MIN; - break; - } - break; - case DP_S_MIN: - if (isdigit((unsigned char)ch)) - { - min = 10*min + char_to_int (ch); - ch = *format++; - } - else if (ch == '*') - { - min = va_arg (args, int); - ch = *format++; - state = DP_S_DOT; - } - else - state = DP_S_DOT; - break; - case DP_S_DOT: - if (ch == '.') - { - state = DP_S_MAX; - ch = *format++; - } - else - state = DP_S_MOD; - break; - case DP_S_MAX: - if (isdigit((unsigned char)ch)) - { - if (max < 0) - max = 0; - max = 10*max + char_to_int (ch); - ch = *format++; - } - else if (ch == '*') - { - max = va_arg (args, int); + char ch; + LLONG value; + LDOUBLE fvalue; + char *strvalue; + int min; + int max; + int state; + int flags; + int cflags; + size_t currlen; + + state = DP_S_DEFAULT; + currlen = flags = cflags = min = 0; + max = -1; ch = *format++; - state = DP_S_MOD; - } - else - state = DP_S_MOD; - break; - case DP_S_MOD: - /* Currently, we don't support Long Long, bummer */ - switch (ch) - { - case 'h': - cflags = DP_C_SHORT; - ch = *format++; - break; - case 'l': - cflags = DP_C_LONG; - ch = *format++; - break; - case 'L': - cflags = DP_C_LDOUBLE; - ch = *format++; - break; - default: - break; - } - state = DP_S_CONV; - break; - case DP_S_CONV: - switch (ch) - { - case 'd': - case 'i': - if (cflags == DP_C_SHORT) - value = va_arg (args, short int); - else if (cflags == DP_C_LONG) - value = va_arg (args, long int); - else - value = va_arg (args, int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; - case 'o': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); - break; - case 'u': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; - case 'X': - flags |= DP_F_UP; - case 'x': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); - break; - case 'f': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - /* um, floating point? */ - fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); - break; - case 'E': - flags |= DP_F_UP; - case 'e': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - break; - case 'G': - flags |= DP_F_UP; - case 'g': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - break; - case 'c': - dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); - break; - case 's': - strvalue = va_arg (args, char *); - if (max < 0) - max = maxlen; /* ie, no max */ - fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); - break; - case 'p': - strvalue = va_arg (args, void *); - fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); - break; - case 'n': - if (cflags == DP_C_SHORT) - { - short int *num; - num = va_arg (args, short int *); - *num = currlen; - } - else if (cflags == DP_C_LONG) - { - long int *num; - num = va_arg (args, long int *); - *num = (long int)currlen; - } - else - { - int *num; - num = va_arg (args, int *); - *num = currlen; - } - break; - case '%': - dopr_outch (buffer, &currlen, maxlen, ch); - break; - case 'w': - /* not supported yet, treat as next char */ - ch = *format++; - break; - default: - /* Unknown, skip */ - break; - } - ch = *format++; - state = DP_S_DEFAULT; - flags = cflags = min = 0; - max = -1; - break; - case DP_S_DONE: - break; - default: - /* hmm? */ - break; /* some picky compilers need this */ - } - } - if (currlen < maxlen - 1) - buffer[currlen] = '\0'; - else - buffer[maxlen - 1] = '\0'; + + while (state != DP_S_DONE) { + if (ch == '\0') + state = DP_S_DONE; + + switch(state) { + case DP_S_DEFAULT: + if (ch == '%') + state = DP_S_FLAGS; + else + dopr_outch (buffer, &currlen, maxlen, ch); + ch = *format++; + break; + case DP_S_FLAGS: + switch (ch) { + case '-': + flags |= DP_F_MINUS; + ch = *format++; + break; + case '+': + flags |= DP_F_PLUS; + ch = *format++; + break; + case ' ': + flags |= DP_F_SPACE; + ch = *format++; + break; + case '#': + flags |= DP_F_NUM; + ch = *format++; + break; + case '0': + flags |= DP_F_ZERO; + ch = *format++; + break; + default: + state = DP_S_MIN; + break; + } + break; + case DP_S_MIN: + if (isdigit((unsigned char)ch)) { + min = 10*min + char_to_int (ch); + ch = *format++; + } else if (ch == '*') { + min = va_arg (args, int); + ch = *format++; + state = DP_S_DOT; + } else { + state = DP_S_DOT; + } + break; + case DP_S_DOT: + if (ch == '.') { + state = DP_S_MAX; + ch = *format++; + } else { + state = DP_S_MOD; + } + break; + case DP_S_MAX: + if (isdigit((unsigned char)ch)) { + if (max < 0) + max = 0; + max = 10*max + char_to_int (ch); + ch = *format++; + } else if (ch == '*') { + max = va_arg (args, int); + ch = *format++; + state = DP_S_MOD; + } else { + state = DP_S_MOD; + } + break; + case DP_S_MOD: + switch (ch) { + case 'h': + cflags = DP_C_SHORT; + ch = *format++; + break; + case 'l': + cflags = DP_C_LONG; + ch = *format++; + if (ch == 'l') { /* It's a long long */ + cflags = DP_C_LLONG; + ch = *format++; + } + break; + case 'L': + cflags = DP_C_LDOUBLE; + ch = *format++; + break; + default: + break; + } + state = DP_S_CONV; + break; + case DP_S_CONV: + switch (ch) { + case 'd': + case 'i': + if (cflags == DP_C_SHORT) + value = va_arg (args, int); + else if (cflags == DP_C_LONG) + value = va_arg (args, long int); + else if (cflags == DP_C_LLONG) + value = va_arg (args, LLONG); + else + value = va_arg (args, int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'o': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (long)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); + break; + case 'u': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; + case 'X': + flags |= DP_F_UP; + case 'x': + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + /* um, floating point? */ + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); + break; + case 'E': + flags |= DP_F_UP; + case 'e': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'G': + flags |= DP_F_UP; + case 'g': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; + case 'c': + dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); + break; + case 's': + strvalue = va_arg (args, char *); + if (max == -1) { + max = strlen(strvalue); + } + if (min > 0 && max >= 0 && min > max) max = min; + fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); + break; + case 'p': + strvalue = va_arg (args, void *); + fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); + break; + case 'n': + if (cflags == DP_C_SHORT) { + short int *num; + num = va_arg (args, short int *); + *num = currlen; + } else if (cflags == DP_C_LONG) { + long int *num; + num = va_arg (args, long int *); + *num = (long int)currlen; + } else if (cflags == DP_C_LLONG) { + LLONG *num; + num = va_arg (args, LLONG *); + *num = (LLONG)currlen; + } else { + int *num; + num = va_arg (args, int *); + *num = currlen; + } + break; + case '%': + dopr_outch (buffer, &currlen, maxlen, ch); + break; + case 'w': + /* not supported yet, treat as next char */ + ch = *format++; + break; + default: + /* Unknown, skip */ + break; + } + ch = *format++; + state = DP_S_DEFAULT; + flags = cflags = min = 0; + max = -1; + break; + case DP_S_DONE: + break; + default: + /* hmm? */ + break; /* some picky compilers need this */ + } + } + if (maxlen != 0) { + if (currlen < maxlen - 1) + buffer[currlen] = '\0'; + else if (maxlen > 0) + buffer[maxlen - 1] = '\0'; + } + + return currlen; } -static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, +static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) { - int padlen, strln; /* amount to pad */ - int cnt = 0; - - if (value == 0) - { - value = ""; - } - - for (strln = 0; value[strln]; ++strln); /* strlen */ - padlen = min - strln; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; /* Left Justify */ - - while ((padlen > 0) && (cnt < max)) - { - dopr_outch (buffer, currlen, maxlen, ' '); - --padlen; - ++cnt; - } - while (*value && (cnt < max)) - { - dopr_outch (buffer, currlen, maxlen, *value++); - ++cnt; - } - while ((padlen < 0) && (cnt < max)) - { - dopr_outch (buffer, currlen, maxlen, ' '); - ++padlen; - ++cnt; - } + int padlen, strln; /* amount to pad */ + int cnt = 0; + +#ifdef DEBUG_SNPRINTF + printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); +#endif + if (value == 0) { + value = ""; + } + + for (strln = 0; value[strln]; ++strln); /* strlen */ + padlen = min - strln; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justify */ + + while ((padlen > 0) && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + ++cnt; + } + while (*value && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, *value++); + ++cnt; + } + while ((padlen < 0) && (cnt < max)) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + ++cnt; + } } /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ -static void fmtint (char *buffer, size_t *currlen, size_t maxlen, +static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { - int signvalue = 0; - unsigned long uvalue; - char convert[20]; - int place = 0; - int spadlen = 0; /* amount to space pad */ - int zpadlen = 0; /* amount to zero pad */ - int caps = 0; - - if (max < 0) - max = 0; - - uvalue = value; - - if(!(flags & DP_F_UNSIGNED)) - { - if( value < 0 ) { - signvalue = '-'; - uvalue = -value; - } - else - if (flags & DP_F_PLUS) /* Do a sign (+/i) */ - signvalue = '+'; - else - if (flags & DP_F_SPACE) - signvalue = ' '; - } + int signvalue = 0; + unsigned long uvalue; + char convert[20]; + int place = 0; + int spadlen = 0; /* amount to space pad */ + int zpadlen = 0; /* amount to zero pad */ + int caps = 0; + + if (max < 0) + max = 0; + + uvalue = value; + + if(!(flags & DP_F_UNSIGNED)) { + if( value < 0 ) { + signvalue = '-'; + uvalue = -value; + } else { + if (flags & DP_F_PLUS) /* Do a sign (+/i) */ + signvalue = '+'; + else if (flags & DP_F_SPACE) + signvalue = ' '; + } + } - if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ - do { - convert[place++] = - (caps? "0123456789ABCDEF":"0123456789abcdef") - [uvalue % (unsigned)base ]; - uvalue = (uvalue / (unsigned)base ); - } while(uvalue && (place < 20)); - if (place == 20) place--; - convert[place] = 0; - - zpadlen = max - place; - spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); - if (zpadlen < 0) zpadlen = 0; - if (spadlen < 0) spadlen = 0; - if (flags & DP_F_ZERO) - { - zpadlen = MAX(zpadlen, spadlen); - spadlen = 0; - } - if (flags & DP_F_MINUS) - spadlen = -spadlen; /* Left Justifty */ + do { + convert[place++] = + (caps? "0123456789ABCDEF":"0123456789abcdef") + [uvalue % (unsigned)base ]; + uvalue = (uvalue / (unsigned)base ); + } while(uvalue && (place < 20)); + if (place == 20) place--; + convert[place] = 0; + + zpadlen = max - place; + spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); + if (zpadlen < 0) zpadlen = 0; + if (spadlen < 0) spadlen = 0; + if (flags & DP_F_ZERO) { + zpadlen = MAX(zpadlen, spadlen); + spadlen = 0; + } + if (flags & DP_F_MINUS) + spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF - printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", - zpadlen, spadlen, min, max, place); + printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", + zpadlen, spadlen, min, max, place); #endif - /* Spaces */ - while (spadlen > 0) - { - dopr_outch (buffer, currlen, maxlen, ' '); - --spadlen; - } - - /* Sign */ - if (signvalue) - dopr_outch (buffer, currlen, maxlen, signvalue); - - /* Zeros */ - if (zpadlen > 0) - { - while (zpadlen > 0) - { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } - } - - /* Digits */ - while (place > 0) - dopr_outch (buffer, currlen, maxlen, convert[--place]); + /* Spaces */ + while (spadlen > 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + --spadlen; + } + + /* Sign */ + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + /* Zeros */ + if (zpadlen > 0) { + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + } + + /* Digits */ + while (place > 0) + dopr_outch (buffer, currlen, maxlen, convert[--place]); - /* Left Justified spaces */ - while (spadlen < 0) { - dopr_outch (buffer, currlen, maxlen, ' '); - ++spadlen; - } + /* Left Justified spaces */ + while (spadlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++spadlen; + } } -static LDOUBLE abs_val (LDOUBLE value) +static LDOUBLE abs_val(LDOUBLE value) { - LDOUBLE result = value; + LDOUBLE result = value; - if (value < 0) - result = -value; + if (value < 0) + result = -value; + + return result; +} - return result; +static LDOUBLE POW10(int exp) +{ + LDOUBLE result = 1; + + while (exp) { + result *= 10; + exp--; + } + + return result; } -static LDOUBLE pow10 (int exp) +static LLONG ROUND(LDOUBLE value) { - LDOUBLE result = 1; + LLONG intpart; - while (exp) - { - result *= 10; - exp--; - } - - return result; + intpart = (LLONG)value; + value = value - intpart; + if (value >= 0.5) intpart++; + + return intpart; } -static long round (LDOUBLE value) +/* a replacement for modf that doesn't need the math library. Should + be portable, but slow */ +static double my_modf(double x0, double *iptr) { - long intpart; + int i; + long l; + double x = x0; + double f = 1.0; + + for (i=0;i<100;i++) { + l = (long)x; + if (l <= (x+1) && l >= (x-1)) break; + x *= 0.1; + f *= 10.0; + } + + if (i == 100) { + /* yikes! the number is beyond what we can handle. What do we do? */ + (*iptr) = 0; + return 0; + } - intpart = (long)value; - value = value - intpart; - if (value >= 0.5) - intpart++; + if (i != 0) { + double i2; + double ret; - return intpart; + ret = my_modf(x0-l*f, &i2); + (*iptr) = l*f + i2; + return ret; + } + + (*iptr) = l; + return x - (*iptr); } + static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) { - int signvalue = 0; - LDOUBLE ufvalue; - char iconvert[20]; - char fconvert[20]; - int iplace = 0; - int fplace = 0; - int padlen = 0; /* amount to pad */ - int zpadlen = 0; - int caps = 0; - long intpart; - long fracpart; + int signvalue = 0; + double ufvalue; + char iconvert[311]; + char fconvert[311]; + int iplace = 0; + int fplace = 0; + int padlen = 0; /* amount to pad */ + int zpadlen = 0; + int caps = 0; + int index; + double intpart; + double fracpart; + double temp; - /* - * AIX manpage says the default is 0, but Solaris says the default - * is 6, and sprintf on AIX defaults to 6 - */ - if (max < 0) - max = 6; - - ufvalue = abs_val (fvalue); - - if (fvalue < 0) - signvalue = '-'; - else - if (flags & DP_F_PLUS) /* Do a sign (+/i) */ - signvalue = '+'; - else - if (flags & DP_F_SPACE) - signvalue = ' '; - -#if 0 - if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ -#endif + /* + * AIX manpage says the default is 0, but Solaris says the default + * is 6, and sprintf on AIX defaults to 6 + */ + if (max < 0) + max = 6; - intpart = (long)ufvalue; + ufvalue = abs_val (fvalue); - /* - * Sorry, we only support 9 digits past the decimal because of our - * conversion method - */ - if (max > 9) - max = 9; - - /* We "cheat" by converting the fractional part to integer by - * multiplying by a factor of 10 - */ - fracpart = round ((pow10 (max)) * (ufvalue - intpart)); - - if (fracpart >= pow10 (max)) - { - intpart++; - fracpart -= pow10 (max); - } + if (fvalue < 0) { + signvalue = '-'; + } else { + if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ + signvalue = '+'; + } else { + if (flags & DP_F_SPACE) + signvalue = ' '; + } + } -#ifdef DEBUG_SNPRINTF - printf("fmtfp: %g %d.%d min=%d max=%d\n", - (double)fvalue, intpart, fracpart, min, max); +#if 0 + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif - /* Convert integer part */ - do { - iconvert[iplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10]; - intpart = (intpart / 10); - } while(intpart && (iplace < 20)); - if (iplace == 20) iplace--; - iconvert[iplace] = 0; - - /* Convert fractional part */ - do { - fconvert[fplace++] = - (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10]; - fracpart = (fracpart / 10); - } while(fracpart && (fplace < 20)); - if (fplace == 20) fplace--; - fconvert[fplace] = 0; - - /* -1 for decimal point, another -1 if we are printing a sign */ - padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); - zpadlen = max - fplace; - if (zpadlen < 0) - zpadlen = 0; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; /* Left Justifty */ - - if ((flags & DP_F_ZERO) && (padlen > 0)) - { - if (signvalue) - { - dopr_outch (buffer, currlen, maxlen, signvalue); - --padlen; - signvalue = 0; - } - while (padlen > 0) - { - dopr_outch (buffer, currlen, maxlen, '0'); - --padlen; - } - } - while (padlen > 0) - { - dopr_outch (buffer, currlen, maxlen, ' '); - --padlen; - } - if (signvalue) - dopr_outch (buffer, currlen, maxlen, signvalue); +#if 0 + if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ +#endif - while (iplace > 0) - dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); + /* + * Sorry, we only support 16 digits past the decimal because of our + * conversion method + */ + if (max > 16) + max = 16; + + /* We "cheat" by converting the fractional part to integer by + * multiplying by a factor of 10 + */ + + temp = ufvalue; + my_modf(temp, &intpart); + + fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); + + if (fracpart >= POW10(max)) { + intpart++; + fracpart -= POW10(max); + } + + + /* Convert integer part */ + do { + temp = intpart; + my_modf(intpart*0.1, &intpart); + temp = temp*0.1; + index = (int) ((temp -intpart +0.05)* 10.0); + /* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ + /* printf ("%llf, %f, %x\n", temp, intpart, index); */ + iconvert[iplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + } while (intpart && (iplace < 311)); + if (iplace == 311) iplace--; + iconvert[iplace] = 0; + /* Convert fractional part */ + if (fracpart) + { + do { + temp = fracpart; + my_modf(fracpart*0.1, &fracpart); + temp = temp*0.1; + index = (int) ((temp -fracpart +0.05)* 10.0); + /* index = (int) ((((temp/10) -fracpart) +0.05) *10); */ + /* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */ + fconvert[fplace++] = + (caps? "0123456789ABCDEF":"0123456789abcdef")[index]; + } while(fracpart && (fplace < 311)); + if (fplace == 311) fplace--; + } + fconvert[fplace] = 0; + + /* -1 for decimal point, another -1 if we are printing a sign */ + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + zpadlen = max - fplace; + if (zpadlen < 0) zpadlen = 0; + if (padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; /* Left Justifty */ + + if ((flags & DP_F_ZERO) && (padlen > 0)) { + if (signvalue) { + dopr_outch (buffer, currlen, maxlen, signvalue); + --padlen; + signvalue = 0; + } + while (padlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --padlen; + } + } + while (padlen > 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + --padlen; + } + if (signvalue) + dopr_outch (buffer, currlen, maxlen, signvalue); + + while (iplace > 0) + dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF - printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); + printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); #endif - /* - * Decimal point. This should probably use locale to find the correct - * char to print out. - */ - if (max > 0) { - dopr_outch (buffer, currlen, maxlen, '.'); - - while (fplace > 0) - dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); - } - - while (zpadlen > 0) - { - dopr_outch (buffer, currlen, maxlen, '0'); - --zpadlen; - } - - while (padlen < 0) - { - dopr_outch (buffer, currlen, maxlen, ' '); - ++padlen; - } + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0) { + dopr_outch (buffer, currlen, maxlen, '.'); + + while (fplace > 0) + dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); + } + + while (zpadlen > 0) { + dopr_outch (buffer, currlen, maxlen, '0'); + --zpadlen; + } + + while (padlen < 0) { + dopr_outch (buffer, currlen, maxlen, ' '); + ++padlen; + } +} + +static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) +{ + if (*currlen < maxlen) { + buffer[(*currlen)] = c; + } + (*currlen)++; } -static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) +#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) + int vsnprintf (char *str, size_t count, const char *fmt, va_list args) { - if (*currlen < maxlen) - buffer[(*currlen)++] = c; + return dopr(str, count, fmt, args); } -#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ +#endif -#ifndef HAVE_VSNPRINTF - int vsnprintf (char *str, size_t count, const char *fmt, va_list args) +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) + int snprintf(char *str,size_t count,const char *fmt,...) { - str[0] = 0; - dopr(str, count, fmt, args); - return(strlen(str)); -} -#endif /* !HAVE_VSNPRINTF */ - -#ifndef HAVE_SNPRINTF -/* VARARGS3 */ -#ifdef HAVE_STDARGS - int snprintf (char *str,size_t count,const char *fmt,...) -#else - int snprintf (va_alist) va_dcl + size_t ret; + va_list ap; + + va_start(ap, fmt); + ret = vsnprintf(str, count, fmt, ap); + va_end(ap); + return ret; +} #endif + +#endif + +#ifndef HAVE_VASPRINTF + int vasprintf(char **ptr, const char *format, va_list ap) { -#ifndef HAVE_STDARGS - char *str; - size_t count; - char *fmt; -#endif - VA_LOCAL_DECL; - - VA_START (fmt); - VA_SHIFT (str, char *); - VA_SHIFT (count, size_t ); - VA_SHIFT (fmt, char *); - (void) vsnprintf(str, count, fmt, ap); - VA_END; - return(strlen(str)); + int ret; + + ret = vsnprintf(NULL, 0, format, ap); + if (ret <= 0) return ret; + + (*ptr) = (char *)malloc(ret+1); + if (!*ptr) return -1; + ret = vsnprintf(*ptr, ret+1, format, ap); + + return ret; } +#endif -#else - /* keep compilers happy about empty files */ - void dummy_snprintf(void) {} -#endif /* !HAVE_SNPRINTF */ +#ifndef HAVE_ASPRINTF + int asprintf(char **ptr, const char *format, ...) +{ + va_list ap; + int ret; + + va_start(ap, format); + ret = vasprintf(ptr, format, ap); + va_end(ap); -#ifdef TEST_SNPRINTF -#ifndef LONG_STRING -#define LONG_STRING 1024 + return ret; +} #endif + +#ifdef TEST_SNPRINTF + + int sprintf(char *str,const char *fmt,...); + int main (void) { - char buf1[LONG_STRING]; - char buf2[LONG_STRING]; - char *fp_fmt[] = { - "%-1.5f", - "%1.5f", - "%123.9f", - "%10.5f", - "% 10.5f", - "%+22.9f", - "%+4.9f", - "%01.3f", - "%4f", - "%3.1f", - "%3.2f", - "%.0f", - "%.1f", - NULL - }; - double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 0}; - char *int_fmt[] = { - "%-1.5d", - "%1.5d", - "%123.9d", - "%5.5d", - "%10.5d", - "% 10.5d", - "%+22.33d", - "%01.3d", - "%4d", - NULL - }; - long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; - int x, y; - int fail = 0; - int num = 0; - - printf ("Testing snprintf format codes against system sprintf...\n"); - - for (x = 0; fp_fmt[x] != NULL ; x++) - for (y = 0; fp_nums[y] != 0 ; y++) - { - snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]); - sprintf (buf2, fp_fmt[x], fp_nums[y]); - if (strcmp (buf1, buf2)) - { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", - fp_fmt[x], buf1, buf2); - fail++; - } - num++; - } - - for (x = 0; int_fmt[x] != NULL ; x++) - for (y = 0; int_nums[y] != 0 ; y++) - { - snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]); - sprintf (buf2, int_fmt[x], int_nums[y]); - if (strcmp (buf1, buf2)) - { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", - int_fmt[x], buf1, buf2); - fail++; - } - num++; - } - printf ("%d tests failed out of %d.\n", fail, num); + char buf1[1024]; + char buf2[1024]; + char *fp_fmt[] = { + "%1.1f", + "%-1.5f", + "%1.5f", + "%123.9f", + "%10.5f", + "% 10.5f", + "%+22.9f", + "%+4.9f", + "%01.3f", + "%4f", + "%3.1f", + "%3.2f", + "%.0f", + "%f", + "-16.16f", + NULL + }; + double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, + 0.9996, 1.996, 4.136, 0}; + char *int_fmt[] = { + "%-1.5d", + "%1.5d", + "%123.9d", + "%5.5d", + "%10.5d", + "% 10.5d", + "%+22.33d", + "%01.3d", + "%4d", + "%d", + NULL + }; + long int_nums[] = { -1, 134, 91340, 341, 0203, 0}; + char *str_fmt[] = { + "10.5s", + "5.10s", + "10.1s", + "0.10s", + "10.0s", + "1.10s", + "%s", + "%.1s", + "%.10s", + "%10s", + NULL + }; + char *str_vals[] = {"hello", "a", "", "a longer string", NULL}; + int x, y; + int fail = 0; + int num = 0; + + printf ("Testing snprintf format codes against system sprintf...\n"); + + for (x = 0; fp_fmt[x] ; x++) { + for (y = 0; fp_nums[y] != 0 ; y++) { + int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); + int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); + sprintf (buf2, fp_fmt[x], fp_nums[y]); + if (strcmp (buf1, buf2)) { + printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", + fp_fmt[x], buf1, buf2); + fail++; + } + if (l1 != l2) { + printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, fp_fmt[x]); + fail++; + } + num++; + } + } + + for (x = 0; int_fmt[x] ; x++) { + for (y = 0; int_nums[y] != 0 ; y++) { + int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); + int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); + sprintf (buf2, int_fmt[x], int_nums[y]); + if (strcmp (buf1, buf2)) { + printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", + int_fmt[x], buf1, buf2); + fail++; + } + if (l1 != l2) { + printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, int_fmt[x]); + fail++; + } + num++; + } + } + + for (x = 0; str_fmt[x] ; x++) { + for (y = 0; str_vals[y] != 0 ; y++) { + int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]); + int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]); + sprintf (buf2, str_fmt[x], str_vals[y]); + if (strcmp (buf1, buf2)) { + printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n", + str_fmt[x], buf1, buf2); + fail++; + } + if (l1 != l2) { + printf("snprintf l1 != l2 (%d %d) %s\n", l1, l2, str_fmt[x]); + fail++; + } + num++; + } + } + + printf ("%d tests failed out of %d.\n", fail, num); + + printf("seeing how many digits we support\n"); + { + double v0 = 0.12345678901234567890123456789012345678901; + for (x=0; x<100; x++) { + snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x)); + sprintf(buf2, "%1.1f", v0*pow(10, x)); + if (strcmp(buf1, buf2)) { + printf("we seem to support %d digits\n", x-1); + break; + } + } + } + + return 0; } #endif /* SNPRINTF_TEST */ - diff -u -r --new-file --exclude=CVS rsync-2.4.6/loadparm.c rsync-2.5.0/loadparm.c --- rsync-2.4.6/loadparm.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/loadparm.c Thu Nov 29 16:21:08 2001 @@ -1,6 +1,11 @@ /* This is based on loadparm.c from Samba, written by Andrew Tridgell and Karl Auer */ +/* some fixes + * + * Copyright (C) 2001 by Martin Pool + */ + /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -379,14 +384,23 @@ copy_service(pservice,&sDefault); } -static void string_set(char **s, char *v) + +/** + * Assign a copy of @p v to @p *s, freeing any existing values and + * handling NULL strings. @p *v must be initialized when this is + * called, either to NULL or a malloc'd string. + **/ +static void string_set(char **s, const char *v) { if (!v) { *s = NULL; return; } + if (*s) + free(*s); *s = strdup(v); - if (!*s) exit_cleanup(RERR_MALLOC); + if (!*s) + exit_cleanup(RERR_MALLOC); } diff -u -r --new-file --exclude=CVS rsync-2.4.6/log.c rsync-2.5.0/log.c --- rsync-2.4.6/log.c Sat Jan 29 03:35:03 2000 +++ rsync-2.5.0/log.c Thu Nov 29 16:21:08 2001 @@ -1,5 +1,7 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux"; -*- + + Copyright (C) 1998-2001 by Andrew Tridgell + Copyright (C) 2000-2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,18 +19,121 @@ */ /* - logging and utility functions - + Logging and utility functions. tridge, May 1998 + + Mapping to human-readable messages added by Martin Pool + , Oct 2000. */ #include "rsync.h" +static char *logfname; static FILE *logfile; static int log_error_fd = -1; +int log_got_error=0; + +struct { + int code; + char const *name; +} const rerr_names[] = { + { RERR_SYNTAX , "syntax or usage error" }, + { RERR_PROTOCOL , "protocol incompatibility" }, + { RERR_FILESELECT , "errors selecting input/output files, dirs" }, + { RERR_UNSUPPORTED, "requested action not supported" }, + { RERR_SOCKETIO , "error in socket IO" }, + { RERR_FILEIO , "error in file IO" }, + { RERR_STREAMIO , "error in rsync protocol data stream" }, + { RERR_MESSAGEIO , "errors with program diagnostics" }, + { RERR_IPC , "error in IPC code" }, + { RERR_SIGNAL , "received SIGUSR1 or SIGINT" }, + { RERR_WAITCHILD , "some error returned by waitpid()" }, + { RERR_MALLOC , "error allocating core memory buffers" }, + { RERR_PARTIAL , "partial transfer" }, + { RERR_TIMEOUT , "timeout in data send/receive" }, + { RERR_CMD_FAILED , "remote shell failed" }, + { RERR_CMD_KILLED , "remote shell killed" }, + { RERR_CMD_RUN, "remote command could not be run" }, + { RERR_CMD_NOTFOUND, "remote command not found" }, + { 0, NULL } +}; + + + +/* + * Map from rsync error code to name, or return NULL. + */ +static char const *rerr_name(int code) +{ + int i; + for (i = 0; rerr_names[i].name; i++) { + if (rerr_names[i].code == code) + return rerr_names[i].name; + } + return NULL; +} + +struct err_list { + struct err_list *next; + char *buf; + int len; + int written; /* how many bytes we have written so far */ +}; + +static struct err_list *err_list_head; +static struct err_list *err_list_tail; + +/* add an error message to the pending error list */ +static void err_list_add(int code, char *buf, int len) +{ + struct err_list *el; + el = (struct err_list *)malloc(sizeof(*el)); + if (!el) exit_cleanup(RERR_MALLOC); + el->next = NULL; + el->buf = malloc(len+4); + if (!el->buf) exit_cleanup(RERR_MALLOC); + memcpy(el->buf+4, buf, len); + SIVAL(el->buf, 0, ((code+MPLEX_BASE)<<24) | len); + el->len = len+4; + el->written = 0; + if (err_list_tail) { + err_list_tail->next = el; + } else { + err_list_head = el; + } + err_list_tail = el; +} + + +/* try to push errors off the error list onto the wire */ +void err_list_push(void) +{ + if (log_error_fd == -1) return; + + while (err_list_head) { + struct err_list *el = err_list_head; + int n = write(log_error_fd, el->buf+el->written, el->len - el->written); + /* don't check for an error if the best way of handling the error is + to ignore it */ + if (n == -1) break; + if (n > 0) { + el->written += n; + } + if (el->written == el->len) { + free(el->buf); + err_list_head = el->next; + if (!err_list_head) err_list_tail = NULL; + free(el); + } + } +} + + static void logit(int priority, char *buf) { - if (logfile) { + if (logfname) { + if (!logfile) + log_open(); fprintf(logfile,"%s [%d] %s", timestring(time(NULL)), (int)getpid(), buf); fflush(logfile); @@ -37,12 +142,11 @@ } } -void log_open(void) +void log_init(void) { static int initialised; int options = LOG_PID; time_t t; - char *logf; if (initialised) return; initialised = 1; @@ -54,13 +158,13 @@ localtime(&t); /* optionally use a log file instead of syslog */ - logf = lp_log_file(); - if (logf && *logf) { - extern int orig_umask; - int old_umask = umask(022 | orig_umask); - logfile = fopen(logf, "a"); - umask(old_umask); - return; + logfname = lp_log_file(); + if (logfname) { + if (*logfname) { + log_open(); + return; + } + logfname = NULL; } #ifdef LOG_NDELAY @@ -78,11 +182,30 @@ #endif } +void log_open() +{ + if (logfname && !logfile) { + extern int orig_umask; + int old_umask = umask(022 | orig_umask); + logfile = fopen(logfname, "a"); + umask(old_umask); + } +} + +void log_close() +{ + if (logfile) { + fclose(logfile); + logfile = NULL; + } +} + /* setup the error file descriptor - used when we are a server that is receiving files */ void set_error_fd(int fd) { log_error_fd = fd; + set_nonblocking(log_error_fd); } /* this is the underlying (unformatted) rsync debugging function. Call @@ -106,12 +229,14 @@ return; } - /* first try to pass it off the our sibling */ - if (am_server && io_error_write(log_error_fd, code, buf, len)) { + /* first try to pass it off to our sibling */ + if (am_server && log_error_fd != -1) { + err_list_add(code, buf, len); + err_list_push(); return; } - /* then try to pass it to the other end */ + /* if that fails, try to pass it to the other end */ if (am_server && io_multiplex_write(code, buf, len)) { return; } @@ -125,7 +250,7 @@ depth++; - log_open(); + log_init(); logit(priority, buf); depth--; @@ -133,6 +258,7 @@ } if (code == FERROR) { + log_got_error = 1; f = stderr; } @@ -151,22 +277,86 @@ } -/* this is the rsync debugging function. Call it with FINFO, FERROR or FLOG */ - void rprintf(enum logcode code, const char *format, ...) +/* This is the rsync debugging function. Call it with FINFO, FERROR or + * FLOG. */ +void rprintf(enum logcode code, const char *format, ...) { va_list ap; char buf[1024]; int len; va_start(ap, format); - len = vslprintf(buf, sizeof(buf), format, ap); + len = vsnprintf(buf, sizeof(buf), format, ap); + va_end(ap); + + /* Deal with buffer overruns. Instead of panicking, just + * truncate the resulting string. Note that some vsnprintf()s + * return -1 on truncation, e.g., glibc 2.0.6 and earlier. */ + if (len > sizeof(buf)-1 || len < 0) { + const char ellipsis[] = "[...]"; + + /* Reset length, and zero-terminate the end of our buffer */ + len = sizeof(buf)-1; + buf[len] = '\0'; + + /* Copy the ellipsis to the end of the string, but give + * us one extra character: + * + * v--- null byte at buf[sizeof(buf)-1] + * abcdefghij0 + * -> abcd[...]00 <-- now two null bytes at end + * + * If the input format string has a trailing newline, + * we copy it into that extra null; if it doesn't, well, + * all we lose is one byte. */ + strncpy(buf+len-sizeof(ellipsis), ellipsis, sizeof(ellipsis)); + if (format[strlen(format)-1] == '\n') { + buf[len-1] = '\n'; + } + } + + rwrite(code, buf, len); +} + + +/* This is like rprintf, but it also tries to print some + * representation of the error code. Normally errcode = errno. + * + * Unlike rprintf, this always adds a newline and there should not be + * one in the format string. + * + * Note that since strerror might involve dynamically loading a + * message catalog we need to call it once before chroot-ing. */ +void rsyserr(enum logcode code, int errcode, const char *format, ...) +{ + va_list ap; + char buf[1024]; + int len, sys_len; + char *sysmsg; + + va_start(ap, format); + len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len > sizeof(buf)-1) exit_cleanup(RERR_MESSAGEIO); + sysmsg = strerror(errcode); + sys_len = strlen(sysmsg); + if (len + 3 + sys_len > sizeof(buf) - 1) + exit_cleanup(RERR_MESSAGEIO); + + strcpy(buf + len, ": "); + len += 2; + strcpy(buf + len, sysmsg); + len += sys_len; + strcpy(buf + len, "\n"); + len++; + rwrite(code, buf, len); } + + void rflush(enum logcode code) { FILE *f = NULL; @@ -226,18 +416,18 @@ case 'h': if (am_daemon) n = client_name(0); break; case 'a': if (am_daemon) n = client_addr(0); break; case 'l': - slprintf(buf2,sizeof(buf2),"%.0f", + snprintf(buf2,sizeof(buf2),"%.0f", (double)file->length); n = buf2; break; case 'p': - slprintf(buf2,sizeof(buf2),"%d", + snprintf(buf2,sizeof(buf2),"%d", (int)getpid()); n = buf2; break; case 'o': n = op; break; case 'f': - slprintf(buf2, sizeof(buf2), "%s/%s", + snprintf(buf2, sizeof(buf2), "%s/%s", file->basedir?file->basedir:"", f_name(file)); clean_fname(buf2); @@ -256,7 +446,7 @@ b = stats.total_read - initial_stats->total_read; } - slprintf(buf2,sizeof(buf2),"%.0f", (double)b); + snprintf(buf2,sizeof(buf2),"%.0f", (double)b); n = buf2; break; case 'c': @@ -267,7 +457,7 @@ b = stats.total_read - initial_stats->total_read; } - slprintf(buf2,sizeof(buf2),"%.0f", (double)b); + snprintf(buf2,sizeof(buf2),"%.0f", (double)b); n = buf2; break; } @@ -321,7 +511,15 @@ } } -/* called when the transfer is interrupted for some reason */ + + + +/* + * Called when the transfer is interrupted for some reason. + * + * Code is one of the RERR_* codes from errcode.h, or terminating + * successfully. + */ void log_exit(int code, const char *file, int line) { if (code == 0) { @@ -331,10 +529,19 @@ (double)stats.total_read, (double)stats.total_size); } else { - rprintf(FLOG,"transfer interrupted (code %d) at %s(%d)\n", - code, file, line); + const char *name; + + name = rerr_name(code); + if (!name) + name = "unexplained error"; + + rprintf(FERROR,"rsync error: %s (code %d) at %s(%d)\n", + name, code, file, line); } } + + + /* log the incoming transfer of a file for interactive use, this will be called at the end where the client was run diff -u -r --new-file --exclude=CVS rsync-2.4.6/main.c rsync-2.5.0/main.c --- rsync-2.4.6/main.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/main.c Thu Nov 29 16:21:08 2001 @@ -1,6 +1,8 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2001 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,6 +37,12 @@ msleep(20); io_flush(); } + + /* TODO: If the child exited on a signal, then log an + * appropriate error message. Perhaps we should also accept a + * message describing the purpose of the child. Also indicate + * this to the caller so that thhey know something went + * wrong. */ *status = WEXITSTATUS(*status); } @@ -118,16 +126,19 @@ } -static int do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int *f_out) +/* Start the remote shell. cmd may be NULL to use the default. */ +static pid_t do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int *f_out) { char *args[100]; - int i,argc=0, ret; + int i,argc=0; + pid_t ret; char *tok,*dir=NULL; extern int local_server; extern char *rsync_path; extern int blocking_io; + extern int read_batch; - if (!local_server) { + if (!read_batch && !local_server) { /* dw -- added read_batch */ if (!cmd) cmd = getenv(RSYNC_RSH_ENV); if (!cmd) @@ -178,6 +189,8 @@ } if (local_server) { + if (read_batch) + create_flist_from_batch(); ret = local_child(argc, args, f_in, f_out); } else { ret = piped_child(args,f_in,f_out); @@ -351,7 +364,8 @@ /* finally we go to sleep until our parent kills us with a USR2 signal. We sleep for a short time as on some OSes a signal won't interrupt a sleep! */ - while (1) msleep(20); + while (msleep(20)) + ; } close(recv_pipe[1]); @@ -389,6 +403,8 @@ extern int am_daemon; extern int module_id; extern int am_sender; + extern int read_batch; /* dw */ + extern struct file_list *batch_flist; /* dw */ if (verbose > 2) rprintf(FINFO,"server_recv(%d) starting pid=%d\n",argc,(int)getpid()); @@ -414,7 +430,10 @@ if (delete_mode && !delete_excluded) recv_exclude_list(f_in); - flist = recv_file_list(f_in); + if (read_batch) /* dw */ + flist = batch_flist; + else + flist = recv_file_list(f_in); if (!flist) { rprintf(FERROR,"server_recv: recv_file_list error\n"); exit_cleanup(RERR_FILESELECT); @@ -438,6 +457,7 @@ extern int cvs_exclude; extern int am_sender; extern int remote_version; + extern int read_batch; /* dw */ setup_protocol(f_out, f_in); @@ -448,9 +468,11 @@ io_start_multiplex_out(f_out); if (am_sender) { - recv_exclude_list(f_in); - if (cvs_exclude) + if (!read_batch) { /* dw */ + recv_exclude_list(f_in); + if (cvs_exclude) add_cvs_excludes(); + } do_server_sender(f_in, f_out, argc, argv); } else { do_server_recv(f_in, f_out, argc, argv); @@ -458,13 +480,26 @@ exit_cleanup(0); } -int client_run(int f_in, int f_out, int pid, int argc, char *argv[]) + +/* + * This is called once the connection has been negotiated. It is used + * for rsyncd, remote-shell, and local connections. + */ +int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) { struct file_list *flist; int status = 0, status2 = 0; char *local_name = NULL; extern int am_sender; extern int remote_version; + extern pid_t cleanup_child_pid; + extern int write_batch; /* dw */ + extern int read_batch; /* dw */ + extern struct file_list *batch_flist; /* dw */ + + cleanup_child_pid = pid; + if (read_batch) + flist = batch_flist; /* dw */ set_nonblocking(f_in); set_nonblocking(f_out); @@ -482,21 +517,22 @@ add_cvs_excludes(); if (delete_mode && !delete_excluded) send_exclude_list(f_out); - flist = send_file_list(f_out,argc,argv); + if (!read_batch) /* dw -- don't write to pipe */ + flist = send_file_list(f_out,argc,argv); if (verbose > 3) rprintf(FINFO,"file list sent\n"); send_files(flist,f_out,f_in); + if (remote_version >= 24) { + /* final goodbye message */ + read_int(f_in); + } if (pid != -1) { if (verbose > 3) - rprintf(FINFO,"client_run waiting on %d\n",pid); + rprintf(FINFO,"client_run waiting on %d\n", (int) pid); io_flush(); wait_process(pid, &status); } - if (remote_version >= 24) { - /* final goodbye message */ - read_int(f_in); - } report(-1); exit_cleanup(status); } @@ -506,11 +542,14 @@ list_only = 1; } - send_exclude_list(f_out); + if (!write_batch) /* dw */ + send_exclude_list(f_out); flist = recv_file_list(f_in); if (!flist || flist->count == 0) { - rprintf(FINFO,"client: nothing to do\n"); + rprintf(FINFO, "client: nothing to do: " + "perhaps you need to specify some filenames or " + "the --recursive option?\n"); exit_cleanup(0); } @@ -520,12 +559,12 @@ if (pid != -1) { if (verbose > 3) - rprintf(FINFO,"client_run2 waiting on %d\n",pid); + rprintf(FINFO,"client_run2 waiting on %d\n", (int) pid); io_flush(); wait_process(pid, &status); } - return status | status2; + return MAX(status, status2); } static char *find_colon(char *s) @@ -543,18 +582,49 @@ return p; } + +static int copy_argv (char *argv[]) +{ + int i; + + for (i = 0; argv[i]; i++) { + if (!(argv[i] = strdup(argv[i]))) { + rprintf (FERROR, "out of memory at %s(%d)\n", + __FILE__, __LINE__); + return RERR_MALLOC; + } + } + + return 0; +} + + +/* + * Start a client for either type of remote connection. Work out + * whether the arguments request a remote shell or rsyncd connection, + * and call the appropriate connection function, then run_client. + */ static int start_client(int argc, char *argv[]) { char *p; char *shell_machine = NULL; char *shell_path = NULL; char *shell_user = NULL; - int pid, ret; + int ret; + pid_t pid; int f_in,f_out; extern int local_server; extern int am_sender; extern char *shell_cmd; extern int rsync_port; + extern int whole_file; + extern int read_batch; + int rc; + + /* Don't clobber argv[] so that ps(1) can still show the right + command line. */ + if ((rc = copy_argv (argv))) + return rc; if (strncasecmp(URL_PREFIX, argv[0], strlen(URL_PREFIX)) == 0) { char *host, *path; @@ -575,7 +645,8 @@ return start_socket_client(host, path, argc-1, argv+1); } - p = find_colon(argv[0]); + if (!read_batch) { /* dw */ + p = find_colon(argv[0]); if (p) { if (p[1] == ':') { @@ -600,6 +671,8 @@ p = find_colon(argv[argc-1]); if (!p) { local_server = 1; + /* disable "rsync algorithm" when both sides local */ + whole_file = 1; } else if (p[1] == ':') { *p = 0; return start_socket_client(argv[argc-1], p+2, argc-1, argv); @@ -620,7 +693,12 @@ } argc--; } - + } else { + am_sender = 1; /* dw */ + local_server = 1; /* dw */ + shell_path = argv[argc-1]; /* dw */ + } + if (shell_machine) { p = strchr(shell_machine,'@'); if (p) { @@ -664,9 +742,17 @@ } static RETSIGTYPE sigusr2_handler(int val) { + extern int log_got_error; + if (log_got_error) _exit(RERR_PARTIAL); _exit(0); } +static RETSIGTYPE sigchld_handler(int val) { +#ifdef WNOHANG + while (waitpid(-1, NULL, WNOHANG) > 0) ; +#endif +} + int main(int argc,char *argv[]) { extern int am_root; @@ -674,9 +760,17 @@ extern int dry_run; extern int am_daemon; extern int am_server; + int ret; + extern int read_batch; /* dw */ + extern int write_batch; /* dw */ + extern char *batch_ext; /* dw */ + int orig_argc; /* dw */ + + orig_argc = argc; /* dw */ signal(SIGUSR1, sigusr1_handler); signal(SIGUSR2, sigusr2_handler); + signal(SIGCHLD, sigchld_handler); starttime = time(NULL); am_root = (getuid() == 0); @@ -692,15 +786,13 @@ carried across */ orig_umask = (int)umask(0); - if (!parse_arguments(argc, argv, 1)) { + if (!parse_arguments(&argc, (const char ***) &argv, 1)) { + /* FIXME: We ought to call the same error-handling + * code here, rather than relying on getopt. */ + option_error(); exit_cleanup(RERR_SYNTAX); } - argc -= optind; - argv += optind; - optind = 0; - - signal(SIGCHLD,SIG_IGN); signal(SIGINT,SIGNAL_CAST sig_int); signal(SIGPIPE,SIGNAL_CAST sig_int); signal(SIGHUP,SIGNAL_CAST sig_int); @@ -712,6 +804,15 @@ that implement getcwd that way "pwd" can't be found after chroot. */ push_dir(NULL,0); + if (write_batch) { /* dw */ + create_batch_file_ext(); + write_batch_argvs_file(orig_argc, argc, argv); + } + + if (read_batch) { /* dw */ + set_batch_file_ext(batch_ext); + } + if (am_daemon) { return daemon_main(); } @@ -737,6 +838,8 @@ start_server(STDIN_FILENO, STDOUT_FILENO, argc, argv); } - return start_client(argc, argv); + ret = start_client(argc, argv); + exit_cleanup(ret); + return ret; } diff -u -r --new-file --exclude=CVS rsync-2.4.6/match.c rsync-2.5.0/match.c --- rsync-2.4.6/match.c Sat Jan 29 03:35:03 2000 +++ rsync-2.5.0/match.c Thu Nov 29 16:21:08 2001 @@ -260,6 +260,7 @@ void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len) { char file_sum[MD4_SUM_LENGTH]; + extern int write_batch; /* dw */ last_match = 0; false_alarms = 0; @@ -295,6 +296,8 @@ if (verbose > 2) rprintf(FINFO,"sending file_sum\n"); write_buf(f,file_sum,MD4_SUM_LENGTH); + if (write_batch) /* dw */ + write_batch_delta_file(file_sum, MD4_SUM_LENGTH); } if (targets) { diff -u -r --new-file --exclude=CVS rsync-2.4.6/options.c rsync-2.5.0/options.c --- rsync-2.4.6/options.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/options.c Thu Nov 29 16:21:09 2001 @@ -1,5 +1,7 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1998-2001 by Andrew Tridgell + Copyright (C) 2000-2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,10 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* options parsing code */ - #include "rsync.h" - +#include "popt.h" int make_backups = 0; int whole_file = 0; @@ -52,7 +52,7 @@ int read_only = 0; int module_id = -1; int am_server = 0; -int am_sender=0; +int am_sender = 0; int recurse = 0; int am_daemon=0; int do_stats=0; @@ -74,6 +74,12 @@ #endif int blocking_io=0; +/** Global options set from command line. **/ +struct global_opts global_opts; + +int read_batch=0; /* dw */ +int write_batch=0; /* dw */ + char *backup_suffix = BACKUP_SUFFIX; char *tmpdir = NULL; char *compare_dest = NULL; @@ -81,7 +87,7 @@ char *shell_cmd = NULL; char *log_format = NULL; char *password_file = NULL; -char *rsync_path = RSYNC_NAME; +char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; int rsync_port = RSYNC_PORT; @@ -90,15 +96,58 @@ int always_checksum = 0; int list_only = 0; +char *batch_ext = NULL; + static int modify_window_set; +/** Local address to bind. As a character string because it's + * interpreted by the IPv6 layer: should be a numeric IP4 or ip6 + * address, or a hostname. **/ +char *bind_address; + + +static void print_rsync_version(int f) +{ + char const *got_socketpair = "no "; + char const *hardlinks = "no "; + char const *links = "no "; + char const *ipv6 = "no "; + +#ifdef HAVE_SOCKETPAIR + got_socketpair = ""; +#endif + +#if SUPPORT_HARD_LINKS + hardlinks = ""; +#endif + +#if SUPPORT_LINKS + links = ""; +#endif + +#if INET6 + ipv6 = ""; +#endif + + rprintf(f, "%s version %s protocol version %d\n", + RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); + rprintf(f, + "Copyright (C) 1996-2001 by Andrew Tridgell and others\n"); + rprintf(f, "\n"); + rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " + "%shard links, %ssymlinks, batchfiles, %sIPv6\n\n", + (int) (sizeof(OFF_T) * 8), + got_socketpair, hardlinks, links, ipv6); + +#ifdef NO_INT64 + rprintf(f, "WARNING: no 64-bit integers on this platform!\n"); +#endif +} -struct in_addr socket_address = {INADDR_ANY}; void usage(enum logcode F) { - rprintf(F,"rsync version %s Copyright Andrew Tridgell and Paul Mackerras\n\n", - VERSION); + print_rsync_version(F); rprintf(F,"rsync is a file transfer program capable of efficient remote update\nvia a fast differencing algorithm.\n\n"); @@ -172,15 +221,21 @@ rprintf(F," --log-format=FORMAT log file transfers using specified format\n"); rprintf(F," --password-file=FILE get password from FILE\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth, KBytes per second\n"); + rprintf(F," -f --read-batch=EXT read batch file\n"); + rprintf(F," -F --write-batch write batch file\n"); rprintf(F," -h, --help show this help screen\n"); +#ifdef INET6 + rprintf(F," -4 prefer IPv4\n"); + rprintf(F," -6 prefer IPv6\n"); +#endif rprintf(F,"\n"); rprintf(F,"\nPlease see the rsync(1) and rsyncd.conf(5) man pages for full documentation\n"); - rprintf(F,"See http://rsync.samba.org/ for updates and bug reports\n"); + rprintf(F,"See http://rsync.samba.org/ for updates, bug reports, and answers\n"); } -enum {OPT_VERSION, OPT_SUFFIX, OPT_SENDER, OPT_SERVER, OPT_EXCLUDE, +enum {OPT_VERSION = 1000, OPT_SUFFIX, OPT_SENDER, OPT_SERVER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, OPT_DELETE, OPT_DELETE_EXCLUDED, OPT_NUMERIC_IDS, OPT_RSYNC_PATH, OPT_FORCE, OPT_TIMEOUT, OPT_DAEMON, OPT_CONFIG, OPT_PORT, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_STATS, OPT_PARTIAL, OPT_PROGRESS, @@ -190,86 +245,99 @@ OPT_IGNORE_ERRORS, OPT_BWLIMIT, OPT_BLOCKING_IO, OPT_MODIFY_WINDOW}; -static char *short_options = "oblLWHpguDCtcahvqrRIxnSe:B:T:zP"; - -static struct option long_options[] = { - {"version", 0, 0, OPT_VERSION}, - {"server", 0, 0, OPT_SERVER}, - {"sender", 0, 0, OPT_SENDER}, - {"existing", 0, 0, OPT_EXISTING}, - {"delete", 0, 0, OPT_DELETE}, - {"delete-excluded", 0, 0, OPT_DELETE_EXCLUDED}, - {"force", 0, 0, OPT_FORCE}, - {"numeric-ids", 0, 0, OPT_NUMERIC_IDS}, - {"exclude", 1, 0, OPT_EXCLUDE}, - {"exclude-from",1, 0, OPT_EXCLUDE_FROM}, - {"include", 1, 0, OPT_INCLUDE}, - {"include-from",1, 0, OPT_INCLUDE_FROM}, - {"rsync-path", 1, 0, OPT_RSYNC_PATH}, - {"password-file", 1, 0, OPT_PASSWORD_FILE}, - {"one-file-system",0, 0, 'x'}, - {"ignore-times",0, 0, 'I'}, - {"size-only", 0, 0, OPT_SIZE_ONLY}, - {"modify-window",1, 0, OPT_MODIFY_WINDOW}, - {"help", 0, 0, 'h'}, - {"dry-run", 0, 0, 'n'}, - {"sparse", 0, 0, 'S'}, - {"cvs-exclude", 0, 0, 'C'}, - {"archive", 0, 0, 'a'}, - {"checksum", 0, 0, 'c'}, - {"backup", 0, 0, 'b'}, - {"update", 0, 0, 'u'}, - {"verbose", 0, 0, 'v'}, - {"quiet", 0, 0, 'q'}, - {"recursive", 0, 0, 'r'}, - {"relative", 0, 0, 'R'}, - {"devices", 0, 0, 'D'}, - {"perms", 0, 0, 'p'}, - {"links", 0, 0, 'l'}, - {"copy-links", 0, 0, 'L'}, - {"copy-unsafe-links", 0, 0, OPT_COPY_UNSAFE_LINKS}, - {"safe-links", 0, 0, OPT_SAFE_LINKS}, - {"whole-file", 0, 0, 'W'}, - {"hard-links", 0, 0, 'H'}, - {"owner", 0, 0, 'o'}, - {"group", 0, 0, 'g'}, - {"times", 0, 0, 't'}, - {"rsh", 1, 0, 'e'}, - {"suffix", 1, 0, OPT_SUFFIX}, - {"block-size", 1, 0, 'B'}, - {"timeout", 1, 0, OPT_TIMEOUT}, - {"temp-dir", 1, 0, 'T'}, - {"compare-dest", 1, 0, OPT_COMPARE_DEST}, - {"compress", 0, 0, 'z'}, - {"daemon", 0, 0, OPT_DAEMON}, - {"stats", 0, 0, OPT_STATS}, - {"progress", 0, 0, OPT_PROGRESS}, - {"partial", 0, 0, OPT_PARTIAL}, - {"delete-after",0, 0, OPT_DELETE_AFTER}, - {"ignore-errors",0, 0, OPT_IGNORE_ERRORS}, - {"blocking-io" ,0, 0, OPT_BLOCKING_IO}, - {"config", 1, 0, OPT_CONFIG}, - {"port", 1, 0, OPT_PORT}, - {"log-format", 1, 0, OPT_LOG_FORMAT}, - {"bwlimit", 1, 0, OPT_BWLIMIT}, - {"address", 1, 0, OPT_ADDRESS}, - {"max-delete", 1, 0, OPT_MAX_DELETE}, - {"backup-dir", 1, 0, OPT_BACKUP_DIR}, - {0,0,0,0}}; +static struct poptOption long_options[] = { + /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ + {"version", 0, POPT_ARG_NONE, 0, OPT_VERSION}, + {"suffix", 0, POPT_ARG_STRING, &backup_suffix}, + {"rsync-path", 0, POPT_ARG_STRING, &rsync_path}, + {"password-file", 0, POPT_ARG_STRING, &password_file}, + {"ignore-times", 'I', POPT_ARG_NONE, &ignore_times}, + {"size-only", 0, POPT_ARG_NONE, &size_only}, + {"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW}, + {"one-file-system", 'x', POPT_ARG_NONE, &one_file_system}, + {"delete", 0, POPT_ARG_NONE, &delete_mode}, + {"existing", 0, POPT_ARG_NONE, &only_existing}, + {"delete-after", 0, POPT_ARG_NONE, &delete_after}, + {"delete-excluded", 0, POPT_ARG_NONE, 0, OPT_DELETE_EXCLUDED}, + {"force", 0, POPT_ARG_NONE, &force_delete}, + {"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids}, + {"exclude", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE}, + {"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE}, + {"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM}, + {"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM}, + {"safe-links", 0, POPT_ARG_NONE, &safe_symlinks}, + {"help", 'h', POPT_ARG_NONE, 0, 'h'}, + {"backup", 'b', POPT_ARG_NONE, &make_backups}, + {"dry-run", 'n', POPT_ARG_NONE, &dry_run}, + {"sparse", 'S', POPT_ARG_NONE, &sparse_files}, + {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude}, + {"update", 'u', POPT_ARG_NONE, &update_only}, + {"links", 'l', POPT_ARG_NONE, &preserve_links}, + {"copy-links", 'L', POPT_ARG_NONE, ©_links}, + {"whole", 'W', POPT_ARG_NONE, &whole_file}, + {"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links}, + {"perms", 'p', POPT_ARG_NONE, &preserve_perms}, + {"owner", 'o', POPT_ARG_NONE, &preserve_uid}, + {"group", 'g', POPT_ARG_NONE, &preserve_gid}, + {"devices", 'D', POPT_ARG_NONE, &preserve_devices}, + {"times", 't', POPT_ARG_NONE, &preserve_times}, + {"checksum", 'c', POPT_ARG_NONE, &always_checksum}, + {"verbose", 'v', POPT_ARG_NONE, 0, 'v'}, + {"quiet", 'q', POPT_ARG_NONE, 0, 'q'}, + {"archive", 'a', POPT_ARG_NONE, 0, 'a'}, + {"server", 0, POPT_ARG_NONE, &am_server}, + {"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER}, + {"recursive", 'r', POPT_ARG_NONE, &recurse}, + {"relative", 'R', POPT_ARG_NONE, &relative_paths}, + {"rsh", 'e', POPT_ARG_STRING, &shell_cmd}, + {"block-size", 'B', POPT_ARG_INT, &block_size}, + {"max-delete", 0, POPT_ARG_INT, &max_delete}, + {"timeout", 0, POPT_ARG_INT, &io_timeout}, + {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir}, + {"compare-dest", 0, POPT_ARG_STRING, &compare_dest}, + /* TODO: Should this take an optional int giving the compression level? */ + {"compress", 'z', POPT_ARG_NONE, &do_compression}, + {"daemon", 0, POPT_ARG_NONE, &am_daemon}, + {"stats", 0, POPT_ARG_NONE, &do_stats}, + {"progress", 0, POPT_ARG_NONE, &do_progress}, + {"partial", 0, POPT_ARG_NONE, &keep_partial}, + {"ignore-errors", 0, POPT_ARG_NONE, &ignore_errors}, + {"blocking-io", 0, POPT_ARG_NONE, &blocking_io}, + {0, 'P', POPT_ARG_NONE, 0, 'P'}, + {"config", 0, POPT_ARG_STRING, &config_file}, + {"port", 0, POPT_ARG_INT, &rsync_port}, + {"log-format", 0, POPT_ARG_STRING, &log_format}, + {"bwlimit", 0, POPT_ARG_INT, &bwlimit}, + {"address", 0, POPT_ARG_STRING, &bind_address, 0}, + {"backup-dir", 0, POPT_ARG_STRING, &backup_dir}, + {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links}, + {"read-batch", 'f', POPT_ARG_STRING, &batch_ext, 'f'}, + {"write-batch", 'F', POPT_ARG_NONE, &write_batch, 0}, +#ifdef INET6 + {0, '4', POPT_ARG_VAL, &global_opts.af_hint, AF_INET }, + {0, '6', POPT_ARG_VAL, &global_opts.af_hint, AF_INET6 }, +#endif + {0,0,0,0} +}; static char err_buf[100]; + +/* We store the option error message, if any, so that we can log the + connection attempt (which requires parsing the options), and then + show the error later on. */ void option_error(void) { if (err_buf[0]) { - rprintf(FLOG,"%s", err_buf); - rprintf(FERROR,"%s", err_buf); + rprintf(FLOG, "%s", err_buf); + rprintf(FERROR, "%s: %s", RSYNC_NAME, err_buf); } else { - rprintf(FLOG,"Error parsing options - unsupported option?\n"); - rprintf(FERROR,"Error parsing options - unsupported option?\n"); + rprintf (FERROR, "Error parsing options: " + "option may be supported on client but not on server?\n"); + rprintf (FERROR, RSYNC_NAME ": Error parsing options: " + "option may be supported on client but not on server?\n"); } - exit_cleanup(RERR_UNSUPPORTED); } /* check to see if we should refuse this option */ @@ -279,19 +347,19 @@ char *p; const char *name; - for (i=0; long_options[i].name; i++) { + for (i=0; long_options[i].longName; i++) { if (long_options[i].val == opt) break; } - if (!long_options[i].name) return 0; + if (!long_options[i].longName) return 0; - name = long_options[i].name; + name = long_options[i].longName; len = strlen(name); while ((p = strstr(ref,name))) { if ((p==ref || p[-1]==' ') && (p[len] == ' ' || p[len] == 0)) { - slprintf(err_buf,sizeof(err_buf), + snprintf(err_buf,sizeof(err_buf), "The '%s' option is not supported by this server\n", name); return 1; } @@ -301,173 +369,93 @@ } -int parse_arguments(int argc, char *argv[], int frommain) +static int count_args(char const **argv) +{ + int i = 0; + + while (argv[i] != NULL) + i++; + + return i; +} + + +/* Process command line arguments. Called on both local and remote. + * Returns if all options are OK, otherwise fills in err_buf and + * returns 0. */ +int parse_arguments(int *argc, const char ***argv, int frommain) { int opt; - int option_index; char *ref = lp_refuse_options(module_id); + poptContext pc; + + /* TODO: Call poptReadDefaultConfig; handle errors. */ - while ((opt = getopt_long(argc, argv, - short_options, long_options, &option_index)) - != -1) { + /* The context leaks in case of an error, but if there's a + * problem we always exit anyhow. */ + pc = poptGetContext(RSYNC_NAME, *argc, *argv, long_options, 0); + while ((opt = poptGetNextOpt(pc)) != -1) { if (ref) { if (check_refuse_options(ref, opt)) return 0; } + /* most options are handled automatically by popt; + * only special cases are returned and listed here. */ + switch (opt) { case OPT_VERSION: - rprintf(FINFO,"rsync version %s protocol version %d\n\n", - VERSION,PROTOCOL_VERSION); - rprintf(FINFO,"Written by Andrew Tridgell and Paul Mackerras\n"); + print_rsync_version(FINFO); exit_cleanup(0); - case OPT_SUFFIX: - backup_suffix = optarg; - break; - - case OPT_RSYNC_PATH: - rsync_path = optarg; - break; - - case OPT_PASSWORD_FILE: - password_file =optarg; - break; - - case 'I': - ignore_times = 1; - break; - - case OPT_SIZE_ONLY: - size_only = 1; - break; - case OPT_MODIFY_WINDOW: - modify_window = atoi(optarg); + /* The value has already been set by popt, but + * we need to remember that we're using a + * non-default setting. */ modify_window_set = 1; break; - case 'x': - one_file_system=1; - break; - - case OPT_DELETE: - delete_mode = 1; - break; - - case OPT_EXISTING: - only_existing = 1; - break; - - case OPT_DELETE_AFTER: - delete_after = 1; - break; - case OPT_DELETE_EXCLUDED: delete_excluded = 1; delete_mode = 1; break; - case OPT_FORCE: - force_delete = 1; - break; - - case OPT_NUMERIC_IDS: - numeric_ids = 1; - break; - case OPT_EXCLUDE: - add_exclude(optarg, 0); + add_exclude(poptGetOptArg(pc), 0); break; case OPT_INCLUDE: - add_exclude(optarg, 1); + add_exclude(poptGetOptArg(pc), 1); break; case OPT_EXCLUDE_FROM: - add_exclude_file(optarg,1, 0); + add_exclude_file(poptGetOptArg(pc), 1, 0); break; case OPT_INCLUDE_FROM: - add_exclude_file(optarg,1, 1); - break; - - case OPT_COPY_UNSAFE_LINKS: - copy_unsafe_links=1; - break; - - case OPT_SAFE_LINKS: - safe_symlinks=1; + add_exclude_file(poptGetOptArg(pc), 1, 1); break; case 'h': usage(FINFO); exit_cleanup(0); - case 'b': - make_backups=1; - break; - - case 'n': - dry_run=1; - break; - - case 'S': - sparse_files=1; - break; - - case 'C': - cvs_exclude=1; - break; - - case 'u': - update_only=1; - break; - - case 'l': - preserve_links=1; - break; - - case 'L': - copy_links=1; - break; - - case 'W': - whole_file=1; - break; - case 'H': #if SUPPORT_HARD_LINKS preserve_hard_links=1; -#else - slprintf(err_buf,sizeof(err_buf),"hard links are not supported on this server\n"); +#else + /* FIXME: Don't say "server" if this is + * happening on the client. */ + /* FIXME: Why do we have the duplicated + * rprintf? Everybody who gets this message + * ought to send it to the client and also to + * the logs. */ + snprintf(err_buf,sizeof(err_buf), + "hard links are not supported on this %s\n", + am_server ? "server" : "client"); rprintf(FERROR,"ERROR: hard links not supported on this platform\n"); return 0; -#endif - break; - - case 'p': - preserve_perms=1; - break; - - case 'o': - preserve_uid=1; - break; - - case 'g': - preserve_gid=1; - break; - - case 'D': - preserve_devices=1; - break; - - case 't': - preserve_times=1; - break; - - case 'c': - always_checksum=1; +#endif /* SUPPORT_HARD_LINKS */ break; case 'v': @@ -490,10 +478,6 @@ preserve_devices=1; break; - case OPT_SERVER: - am_server = 1; - break; - case OPT_SENDER: if (!am_server) { usage(FERROR); @@ -502,111 +486,41 @@ am_sender = 1; break; - case 'r': - recurse = 1; - break; - - case 'R': - relative_paths = 1; - break; - - case 'e': - shell_cmd = optarg; - break; - - case 'B': - block_size = atoi(optarg); - break; - - case OPT_MAX_DELETE: - max_delete = atoi(optarg); - break; - - case OPT_TIMEOUT: - io_timeout = atoi(optarg); - break; - - case 'T': - tmpdir = optarg; - break; - - case OPT_COMPARE_DEST: - compare_dest = optarg; - break; - - case 'z': - do_compression = 1; - break; - - case OPT_DAEMON: - am_daemon = 1; - break; - - case OPT_STATS: - do_stats = 1; - break; - - case OPT_PROGRESS: - do_progress = 1; - break; - - case OPT_PARTIAL: - keep_partial = 1; - break; - - case OPT_IGNORE_ERRORS: - ignore_errors = 1; - break; - - case OPT_BLOCKING_IO: - blocking_io = 1; - break; - case 'P': do_progress = 1; keep_partial = 1; break; - case OPT_CONFIG: - config_file = optarg; - break; - case OPT_PORT: - rsync_port = atoi(optarg); - break; - - case OPT_LOG_FORMAT: - log_format = optarg; - break; - - case OPT_BWLIMIT: - bwlimit = atoi(optarg); - break; - - case OPT_ADDRESS: - { - struct in_addr *ia; - if ((ia = ip_address(optarg))) { - socket_address = *ia; - } - } - break; - - case OPT_BACKUP_DIR: - backup_dir = optarg; + case 'f': + /* The filename is stored for us by popt */ + read_batch = 1; break; default: - slprintf(err_buf,sizeof(err_buf),"unrecognised option\n"); - return 0; + /* FIXME: If --daemon is specified, then errors for later + * parameters seem to disappear. */ + snprintf(err_buf, sizeof(err_buf), + "%s%s: %s\n", + am_server ? "on remote machine: " : "", + poptBadOption(pc, POPT_BADOPTION_NOALIAS), + poptStrerror(opt)); + return 0; } } + + *argv = poptGetArgs(pc); + if (*argv) + *argc = count_args(*argv); + else + *argc = 0; + return 1; } -/* need to pass all the valid options from the client to the server */ - +/* Construct a filtered list of options to pass through from the + * client to the server */ void server_options(char **args,int *argc) { int ac = *argc; @@ -616,6 +530,7 @@ static char mdelete[30]; static char mwindow[30]; static char bw[50]; + static char fext[20]; /* dw */ int i, x; @@ -670,6 +585,8 @@ argstr[x++] = 'S'; if (do_compression) argstr[x++] = 'z'; + if (write_batch) + argstr[x++] = 'F'; /* dw */ /* this is a complete hack - blame Rusty @@ -683,22 +600,27 @@ if (x != 1) args[ac++] = argstr; if (block_size != BLOCK_SIZE) { - slprintf(bsize,sizeof(bsize),"-B%d",block_size); + snprintf(bsize,sizeof(bsize),"-B%d",block_size); args[ac++] = bsize; } if (max_delete && am_sender) { - slprintf(mdelete,sizeof(mdelete),"--max-delete=%d",max_delete); + snprintf(mdelete,sizeof(mdelete),"--max-delete=%d",max_delete); args[ac++] = mdelete; } + + if (batch_ext != NULL) { + sprintf(fext,"-f%s",batch_ext); + args[ac++] = fext; + } if (io_timeout) { - slprintf(iotime,sizeof(iotime),"--timeout=%d",io_timeout); + snprintf(iotime,sizeof(iotime),"--timeout=%d",io_timeout); args[ac++] = iotime; } if (bwlimit) { - slprintf(bw,sizeof(bw),"--bwlimit=%d",bwlimit); + snprintf(bw,sizeof(bw),"--bwlimit=%d",bwlimit); args[ac++] = bw; } @@ -717,7 +639,7 @@ args[ac++] = "--size-only"; if (modify_window_set) { - slprintf(mwindow,sizeof(mwindow),"--modify-window=%d", + snprintf(mwindow,sizeof(mwindow),"--modify-window=%d", modify_window); args[ac++] = mwindow; } diff -u -r --new-file --exclude=CVS rsync-2.4.6/packaging/lsb/rsync.spec rsync-2.5.0/packaging/lsb/rsync.spec --- rsync-2.4.6/packaging/lsb/rsync.spec Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/packaging/lsb/rsync.spec Thu Nov 29 16:31:23 2001 @@ -0,0 +1,84 @@ +Summary: Program for efficient remote updates of files. +Name: rsync +Version: 2.5.0 +Release: 1 +Copyright: GPL +Group: Applications/Networking +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.5.0.tar.gz +URL: http://samba.anu.edu.au/rsync/ +Packager: Andrew Tridgell +BuildRoot: /tmp/rsync + +%description +rsync is a replacement for rcp that has many more features. + +rsync uses the "rsync algorithm" which provides a very fast method for +bringing remote files into sync. It does this by sending just the +differences in the files across the link, without requiring that both +sets of files are present at one of the ends of the link beforehand. + +A technical report describing the rsync algorithm is included with +this package. + +%changelog +* Mon Sept 11 2000 John H Terpstra + Changed target paths to be Linux Standards Base compliant + +* Mon Jan 25 1999 Stefan Hornburg + quoted RPM_OPT_FLAGS for the sake of robustness +* Mon May 18 1998 Andrew Tridgell + reworked for auto-building when I release rsync (tridge@samba.anu.edu.au) + +* Sat May 16 1998 John H Terpstra + Upgraded to Rsync 2.0.6 + -new feature anonymous rsync + +* Mon Apr 6 1998 Douglas N. Arnold + +Upgrade to rsync version 1.7.2. + +* Sun Mar 1 1998 Douglas N. Arnold + +Built 1.6.9-1 based on the 1.6.3-2 spec file of John A. Martin. +Changes from 1.6.3-2 packaging: added latex and dvips commands +to create tech_report.ps. + +* Mon Aug 25 1997 John A. Martin + +Built 1.6.3-2 after finding no rsync-1.6.3-1.src.rpm although there +was an ftp://ftp.redhat.com/pub/contrib/alpha/rsync-1.6.3-1.alpha.rpm +showing no packager nor signature but giving +"Source RPM: rsync-1.6.3-1.src.rpm". + +Changes from 1.6.2-1 packaging: added '$RPM_OPT_FLAGS' to make, strip +to '%build', removed '%prefix'. + +* Thu Apr 10 1997 Michael De La Rue + +rsync-1.6.2-1 packaged. (This entry by jam to credit Michael for the +previous package(s).) + +%prep +%setup + +%build +./configure --prefix=/usr --mandir=/usr/share/man +make CFLAGS="$RPM_OPT_FLAGS" +strip rsync + +%install +mkdir -p $RPM_BUILD_ROOT/usr/{bin,share/man/{man1,man5}} +install -m755 rsync $RPM_BUILD_ROOT/usr/bin +install -m644 rsync.1 $RPM_BUILD_ROOT/usr/share/man/man1 +install -m644 rsyncd.conf.5 $RPM_BUILD_ROOT/usr/share/man/man5 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(-,root,root) /usr/bin/rsync +%attr(-,root,root) /usr/share/man/man1/rsync.1 +%attr(-,root,root) /usr/share/man/man5/rsyncd.conf.5 +%attr(-,root,root) %doc tech_report.tex +%attr(-,root,root) %doc README +%attr(-,root,root) %doc COPYING diff -u -r --new-file --exclude=CVS rsync-2.4.6/packaging/lsb/rsync.spec.tmpl rsync-2.5.0/packaging/lsb/rsync.spec.tmpl --- rsync-2.4.6/packaging/lsb/rsync.spec.tmpl Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/packaging/lsb/rsync.spec.tmpl Mon Sep 11 11:04:35 2000 @@ -0,0 +1,84 @@ +Summary: Program for efficient remote updates of files. +Name: rsync +Version: PVERSION +Release: PRELEASE +Copyright: GPL +Group: Applications/Networking +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-PVERSION.tar.gz +URL: http://samba.anu.edu.au/rsync/ +Packager: Andrew Tridgell +BuildRoot: /tmp/rsync + +%description +rsync is a replacement for rcp that has many more features. + +rsync uses the "rsync algorithm" which provides a very fast method for +bringing remote files into sync. It does this by sending just the +differences in the files across the link, without requiring that both +sets of files are present at one of the ends of the link beforehand. + +A technical report describing the rsync algorithm is included with +this package. + +%changelog +* Mon Sept 11 2000 John H Terpstra + Changed target paths to be Linux Standards Base compliant + +* Mon Jan 25 1999 Stefan Hornburg + quoted RPM_OPT_FLAGS for the sake of robustness +* Mon May 18 1998 Andrew Tridgell + reworked for auto-building when I release rsync (tridge@samba.anu.edu.au) + +* Sat May 16 1998 John H Terpstra + Upgraded to Rsync 2.0.6 + -new feature anonymous rsync + +* Mon Apr 6 1998 Douglas N. Arnold + +Upgrade to rsync version 1.7.2. + +* Sun Mar 1 1998 Douglas N. Arnold + +Built 1.6.9-1 based on the 1.6.3-2 spec file of John A. Martin. +Changes from 1.6.3-2 packaging: added latex and dvips commands +to create tech_report.ps. + +* Mon Aug 25 1997 John A. Martin + +Built 1.6.3-2 after finding no rsync-1.6.3-1.src.rpm although there +was an ftp://ftp.redhat.com/pub/contrib/alpha/rsync-1.6.3-1.alpha.rpm +showing no packager nor signature but giving +"Source RPM: rsync-1.6.3-1.src.rpm". + +Changes from 1.6.2-1 packaging: added '$RPM_OPT_FLAGS' to make, strip +to '%build', removed '%prefix'. + +* Thu Apr 10 1997 Michael De La Rue + +rsync-1.6.2-1 packaged. (This entry by jam to credit Michael for the +previous package(s).) + +%prep +%setup + +%build +./configure --prefix=/usr --mandir=/usr/share/man +make CFLAGS="$RPM_OPT_FLAGS" +strip rsync + +%install +mkdir -p $RPM_BUILD_ROOT/usr/{bin,share/man/{man1,man5}} +install -m755 rsync $RPM_BUILD_ROOT/usr/bin +install -m644 rsync.1 $RPM_BUILD_ROOT/usr/share/man/man1 +install -m644 rsyncd.conf.5 $RPM_BUILD_ROOT/usr/share/man/man5 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(-,root,root) /usr/bin/rsync +%attr(-,root,root) /usr/share/man/man1/rsync.1 +%attr(-,root,root) /usr/share/man/man5/rsyncd.conf.5 +%attr(-,root,root) %doc tech_report.tex +%attr(-,root,root) %doc README +%attr(-,root,root) %doc COPYING diff -u -r --new-file --exclude=CVS rsync-2.4.6/packaging/redhat/5.0/rsync.spec rsync-2.5.0/packaging/redhat/5.0/rsync.spec --- rsync-2.4.6/packaging/redhat/5.0/rsync.spec Tue Sep 5 19:46:59 2000 +++ rsync-2.5.0/packaging/redhat/5.0/rsync.spec Thu Nov 29 16:31:23 2001 @@ -1,10 +1,10 @@ Summary: Program for efficient remote updates of files. Name: rsync -Version: 2.4.6 +Version: 2.5.0 Release: 1 Copyright: GPL Group: Applications/Networking -Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.4.6.tar.gz +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.5.0.tar.gz URL: http://samba.anu.edu.au/rsync/ Packager: Andrew Tridgell BuildRoot: /tmp/rsync diff -u -r --new-file --exclude=CVS rsync-2.4.6/packaging/redhat/7.1/rsync.spec rsync-2.5.0/packaging/redhat/7.1/rsync.spec --- rsync-2.4.6/packaging/redhat/7.1/rsync.spec Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/packaging/redhat/7.1/rsync.spec Thu Nov 29 16:31:23 2001 @@ -0,0 +1,81 @@ +Summary: Program for efficient remote updates of files. +Name: rsync +Version: 2.5.0 +Release: 1 +Copyright: GPL +Group: Applications/Networking +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-2.5.0.tar.gz +URL: http://samba.anu.edu.au/rsync/ +Packager: Andrew Tridgell +BuildRoot: /tmp/rsync + +%description +rsync is a replacement for rcp that has many more features. + +rsync uses the "rsync algorithm" which provides a very fast method for +bringing remote files into sync. It does this by sending just the +differences in the files across the link, without requiring that both +sets of files are present at one of the ends of the link beforehand. + +A technical report describing the rsync algorithm is included with +this package. + +%changelog +* Mon Jan 25 1999 Stefan Hornburg + quoted RPM_OPT_FLAGS for the sake of robustness +* Mon May 18 1998 Andrew Tridgell + reworked for auto-building when I release rsync (tridge@samba.anu.edu.au) + +* Sat May 16 1998 John H Terpstra + Upgraded to Rsync 2.0.6 + -new feature anonymous rsync + +* Mon Apr 6 1998 Douglas N. Arnold + +Upgrade to rsync version 1.7.2. + +* Sun Mar 1 1998 Douglas N. Arnold + +Built 1.6.9-1 based on the 1.6.3-2 spec file of John A. Martin. +Changes from 1.6.3-2 packaging: added latex and dvips commands +to create tech_report.ps. + +* Mon Aug 25 1997 John A. Martin + +Built 1.6.3-2 after finding no rsync-1.6.3-1.src.rpm although there +was an ftp://ftp.redhat.com/pub/contrib/alpha/rsync-1.6.3-1.alpha.rpm +showing no packager nor signature but giving +"Source RPM: rsync-1.6.3-1.src.rpm". + +Changes from 1.6.2-1 packaging: added '$RPM_OPT_FLAGS' to make, strip +to '%build', removed '%prefix'. + +* Thu Apr 10 1997 Michael De La Rue + +rsync-1.6.2-1 packaged. (This entry by jam to credit Michael for the +previous package(s).) + +%prep +%setup + +%build +./configure --prefix=/usr +make CFLAGS="$RPM_OPT_FLAGS" +strip rsync + +%install +mkdir -p $RPM_BUILD_ROOT/usr/{bin,man/{man1,man5}} +install -m755 rsync $RPM_BUILD_ROOT/usr/bin +install -m644 rsync.1* $RPM_BUILD_ROOT/usr/man/man1 +install -m644 rsyncd.conf.5* $RPM_BUILD_ROOT/usr/man/man5 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(-,root,root) /usr/bin/rsync +%attr(-,root,root) /usr/man/man1/rsync.1* +%attr(-,root,root) /usr/man/man5/rsyncd.conf.5* +%attr(-,root,root) %doc tech_report.tex +%attr(-,root,root) %doc README +%attr(-,root,root) %doc COPYING diff -u -r --new-file --exclude=CVS rsync-2.4.6/packaging/redhat/7.1/rsync.spec.tmpl rsync-2.5.0/packaging/redhat/7.1/rsync.spec.tmpl --- rsync-2.4.6/packaging/redhat/7.1/rsync.spec.tmpl Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/packaging/redhat/7.1/rsync.spec.tmpl Thu Nov 29 16:29:20 2001 @@ -0,0 +1,81 @@ +Summary: Program for efficient remote updates of files. +Name: rsync +Version: PVERSION +Release: PRELEASE +Copyright: GPL +Group: Applications/Networking +Source: ftp://samba.anu.edu.au/pub/rsync/rsync-PVERSION.tar.gz +URL: http://samba.anu.edu.au/rsync/ +Packager: Andrew Tridgell +BuildRoot: /tmp/rsync + +%description +rsync is a replacement for rcp that has many more features. + +rsync uses the "rsync algorithm" which provides a very fast method for +bringing remote files into sync. It does this by sending just the +differences in the files across the link, without requiring that both +sets of files are present at one of the ends of the link beforehand. + +A technical report describing the rsync algorithm is included with +this package. + +%changelog +* Mon Jan 25 1999 Stefan Hornburg + quoted RPM_OPT_FLAGS for the sake of robustness +* Mon May 18 1998 Andrew Tridgell + reworked for auto-building when I release rsync (tridge@samba.anu.edu.au) + +* Sat May 16 1998 John H Terpstra + Upgraded to Rsync 2.0.6 + -new feature anonymous rsync + +* Mon Apr 6 1998 Douglas N. Arnold + +Upgrade to rsync version 1.7.2. + +* Sun Mar 1 1998 Douglas N. Arnold + +Built 1.6.9-1 based on the 1.6.3-2 spec file of John A. Martin. +Changes from 1.6.3-2 packaging: added latex and dvips commands +to create tech_report.ps. + +* Mon Aug 25 1997 John A. Martin + +Built 1.6.3-2 after finding no rsync-1.6.3-1.src.rpm although there +was an ftp://ftp.redhat.com/pub/contrib/alpha/rsync-1.6.3-1.alpha.rpm +showing no packager nor signature but giving +"Source RPM: rsync-1.6.3-1.src.rpm". + +Changes from 1.6.2-1 packaging: added '$RPM_OPT_FLAGS' to make, strip +to '%build', removed '%prefix'. + +* Thu Apr 10 1997 Michael De La Rue + +rsync-1.6.2-1 packaged. (This entry by jam to credit Michael for the +previous package(s).) + +%prep +%setup + +%build +./configure --prefix=/usr +make CFLAGS="$RPM_OPT_FLAGS" +strip rsync + +%install +mkdir -p $RPM_BUILD_ROOT/usr/{bin,man/{man1,man5}} +install -m755 rsync $RPM_BUILD_ROOT/usr/bin +install -m644 rsync.1* $RPM_BUILD_ROOT/usr/man/man1 +install -m644 rsyncd.conf.5* $RPM_BUILD_ROOT/usr/man/man5 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(-,root,root) /usr/bin/rsync +%attr(-,root,root) /usr/man/man1/rsync.1* +%attr(-,root,root) /usr/man/man5/rsyncd.conf.5* +%attr(-,root,root) %doc tech_report.tex +%attr(-,root,root) %doc README +%attr(-,root,root) %doc COPYING diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/.cvsignore rsync-2.5.0/popt/.cvsignore --- rsync-2.4.6/popt/.cvsignore Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/.cvsignore Thu Nov 22 23:37:26 2001 @@ -0,0 +1,9 @@ +ID +Makefile +config.cache +config.h +config.log +config.status +dummy +rsync +zlib/dummy diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/CHANGES rsync-2.5.0/popt/CHANGES --- rsync-2.4.6/popt/CHANGES Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/CHANGES Fri Feb 23 17:32:22 2001 @@ -0,0 +1,43 @@ +1.3 -> + - heavy dose of const's + - poptParseArgvString() now NULL terminates the list + +1.2.3 -> 1.3 + - added support for single - + - misc bug fixes + - portability improvements + +1.2.2 -> 1.2.3 + - fixed memset() in help message generation (Dale Hawkins) + - added extern "C" stuff to popt.h for C++ compilers (Dale Hawkins) + - const'ified poptParseArgvString (Jeff Garzik) + +1.2.1 -> 1.2.2 + - fixed bug in chaind alias happens which seems to have only + affected --triggers in rpm + - added POPT_ARG_VAL + - popt.3 installed by default + +1.2 -> 1.2.1 + - added POPT_ARG_INTL_DOMAIN (Elliot Lee) + - updated Makefile's to be more GNUish (Elliot Lee) + +1.1 -> 1.2 + - added popt.3 man page (Robert Lynch) + - don't use mmap anymore (its lack of portability isn't worth the + trouble) + - added test script + - added support for exec + - removed support for *_POPT_ALIASES env variable -- it was a bad + idea + - reorganized into multiple source files + - added automatic help generation, POPT_AUTOHELP + - added table callbacks + - added table inclusion + - updated man page for new features + - added test scripts + +1.0 -> 1.1 + - moved to autoconf (Fred Fish) + - added STRERROR replacement (Norbert Warmuth) + - added const keywords (Bruce Perens) diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/COPYING rsync-2.5.0/popt/COPYING --- rsync-2.4.6/popt/COPYING Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/COPYING Fri Feb 23 17:32:22 2001 @@ -0,0 +1,22 @@ +Copyright (c) 1998 Red Hat Software + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/README rsync-2.5.0/popt/README --- rsync-2.4.6/popt/README Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/README Fri Feb 23 17:32:22 2001 @@ -0,0 +1,18 @@ +This is the popt command line option parsing library. While it is similiar +to getopt(3), it contains a number of enhancements, including: + + 1) popt is fully reentrant + 2) popt can parse arbitrary argv[] style arrays while + getopt(2) makes this quite difficult + 3) popt allows users to alias command line arguments + 4) popt provides convience functions for parsting strings + into argv[] style arrays + +popt is used by rpm, the Red Hat install program, and many other Red Hat +utilities, all of which provide excellent examples of how to use popt. +Complete documentation on popt is available in popt.ps (included in this +tarball), which is excerpted with permission from the book "Linux +Application Development" by Michael K. Johnson and Erik Troan (availble +from Addison Wesley in May, 1998). + +Comments on popt should be addressed to ewt@redhat.com. diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/findme.c rsync-2.5.0/popt/findme.c --- rsync-2.4.6/popt/findme.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/findme.c Thu Mar 22 19:44:50 2001 @@ -0,0 +1,46 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#include "system.h" +#include "findme.h" + +const char * findProgramPath(const char * argv0) { + char * path = getenv("PATH"); + char * pathbuf; + char * start, * chptr; + char * buf, *local = NULL; + + /* If there is a / in the argv[0], it has to be an absolute + path */ + if (strchr(argv0, '/')) + return xstrdup(argv0); + + if (!path) return NULL; + + local = start = pathbuf = malloc(strlen(path) + 1); + buf = malloc(strlen(path) + strlen(argv0) + 2); + strcpy(pathbuf, path); + + chptr = NULL; + do { + if ((chptr = strchr(start, ':'))) + *chptr = '\0'; + sprintf(buf, "%s/%s", start, argv0); + + if (!access(buf, X_OK)) { + if (local) free(local); + return buf; + } + + if (chptr) + start = chptr + 1; + else + start = NULL; + } while (start && *start); + + free(buf); + if (local) free(local); + + return NULL; +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/findme.h rsync-2.5.0/popt/findme.h --- rsync-2.4.6/popt/findme.h Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/findme.h Fri Feb 23 17:32:22 2001 @@ -0,0 +1,10 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#ifndef H_FINDME +#define H_FINDME + +const char * findProgramPath(const char * argv0); + +#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/popt.c rsync-2.5.0/popt/popt.c --- rsync-2.4.6/popt/popt.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/popt.c Thu Mar 22 19:44:50 2001 @@ -0,0 +1,782 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#include "system.h" +#include "findme.h" +#include "poptint.h" + +#ifndef HAVE_STRERROR +static char * strerror(int errno) { + extern int sys_nerr; + extern char * sys_errlist[]; + + if ((0 <= errno) && (errno < sys_nerr)) + return sys_errlist[errno]; + else + return POPT_("unknown errno"); +} +#endif + +void poptSetExecPath(poptContext con, const char * path, int allowAbsolute) { + if (con->execPath) xfree(con->execPath); + con->execPath = xstrdup(path); + con->execAbsolute = allowAbsolute; +} + +static void invokeCallbacks(poptContext con, const struct poptOption * table, + int post) { + const struct poptOption * opt = table; + poptCallbackType cb; + + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { + invokeCallbacks(con, opt->arg, post); + } else if (((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) && + ((!post && (opt->argInfo & POPT_CBFLAG_PRE)) || + ( post && (opt->argInfo & POPT_CBFLAG_POST)))) { + cb = (poptCallbackType)opt->arg; + cb(con, post ? POPT_CALLBACK_REASON_POST : POPT_CALLBACK_REASON_PRE, + NULL, NULL, opt->descrip); + } + opt++; + } +} + +poptContext poptGetContext(const char * name, int argc, const char ** argv, + const struct poptOption * options, int flags) { + poptContext con = malloc(sizeof(*con)); + + memset(con, 0, sizeof(*con)); + + con->os = con->optionStack; + con->os->argc = argc; + con->os->argv = argv; + con->os->argb = NULL; + + if (!(flags & POPT_CONTEXT_KEEP_FIRST)) + con->os->next = 1; /* skip argv[0] */ + + con->leftovers = calloc( (argc + 1), sizeof(char *) ); + con->options = options; + con->aliases = NULL; + con->numAliases = 0; + con->flags = flags; + con->execs = NULL; + con->numExecs = 0; + con->finalArgvAlloced = argc * 2; + con->finalArgv = calloc( con->finalArgvAlloced, sizeof(*con->finalArgv) ); + con->execAbsolute = 1; + con->arg_strip = NULL; + + if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER")) + con->flags |= POPT_CONTEXT_POSIXMEHARDER; + + if (name) + con->appName = strcpy(malloc(strlen(name) + 1), name); + + invokeCallbacks(con, con->options, 0); + + return con; +} + +static void cleanOSE(struct optionStackEntry *os) +{ + if (os->nextArg) { + xfree(os->nextArg); + os->nextArg = NULL; + } + if (os->argv) { + xfree(os->argv); + os->argv = NULL; + } + if (os->argb) { + PBM_FREE(os->argb); + os->argb = NULL; + } +} + +void poptResetContext(poptContext con) { + int i; + + while (con->os > con->optionStack) { + cleanOSE(con->os--); + } + if (con->os->argb) { + PBM_FREE(con->os->argb); + con->os->argb = NULL; + } + con->os->currAlias = NULL; + con->os->nextCharArg = NULL; + con->os->nextArg = NULL; + con->os->next = 1; /* skip argv[0] */ + + con->numLeftovers = 0; + con->nextLeftover = 0; + con->restLeftover = 0; + con->doExec = NULL; + + for (i = 0; i < con->finalArgvCount; i++) { + if (con->finalArgv[i]) { + xfree(con->finalArgv[i]); + con->finalArgv[i] = NULL; + } + } + + con->finalArgvCount = 0; + + if (con->arg_strip) { + PBM_FREE(con->arg_strip); + con->arg_strip = NULL; + } +} + +/* Only one of longName, shortName may be set at a time */ +static int handleExec(poptContext con, char * longName, char shortName) { + int i; + + i = con->numExecs - 1; + if (longName) { + while (i >= 0 && (!con->execs[i].longName || + strcmp(con->execs[i].longName, longName))) i--; + } else { + while (i >= 0 && + con->execs[i].shortName != shortName) i--; + } + + if (i < 0) return 0; + + if (con->flags & POPT_CONTEXT_NO_EXEC) + return 1; + + if (con->doExec == NULL) { + con->doExec = con->execs + i; + return 1; + } + + /* We already have an exec to do; remember this option for next + time 'round */ + if ((con->finalArgvCount + 1) >= (con->finalArgvAlloced)) { + con->finalArgvAlloced += 10; + con->finalArgv = realloc(con->finalArgv, + sizeof(*con->finalArgv) * con->finalArgvAlloced); + } + + i = con->finalArgvCount++; + { char *s = malloc((longName ? strlen(longName) : 0) + 3); + if (longName) + sprintf(s, "--%s", longName); + else + sprintf(s, "-%c", shortName); + con->finalArgv[i] = s; + } + + return 1; +} + +/* Only one of longName, shortName may be set at a time */ +static int handleAlias(poptContext con, const char * longName, char shortName, + /*@keep@*/ const char * nextCharArg) { + int i; + + if (con->os->currAlias && con->os->currAlias->longName && longName && + !strcmp(con->os->currAlias->longName, longName)) + return 0; + if (con->os->currAlias && shortName && + shortName == con->os->currAlias->shortName) + return 0; + + i = con->numAliases - 1; + if (longName) { + while (i >= 0 && (!con->aliases[i].longName || + strcmp(con->aliases[i].longName, longName))) i--; + } else { + while (i >= 0 && + con->aliases[i].shortName != shortName) i--; + } + + if (i < 0) return 0; + + if ((con->os - con->optionStack + 1) == POPT_OPTION_DEPTH) + return POPT_ERROR_OPTSTOODEEP; + + if (nextCharArg && *nextCharArg) + con->os->nextCharArg = nextCharArg; + + con->os++; + con->os->next = 0; + con->os->stuffed = 0; + con->os->nextArg = NULL; + con->os->nextCharArg = NULL; + con->os->currAlias = con->aliases + i; + poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv, + &con->os->argc, &con->os->argv); + con->os->argb = NULL; + + return 1; +} + +static void execCommand(poptContext con) { + const char ** argv; + int pos = 0; + const char * script = con->doExec->script; + + argv = malloc(sizeof(*argv) * + (6 + con->numLeftovers + con->finalArgvCount)); + + if (!con->execAbsolute && strchr(script, '/')) return; + + if (!strchr(script, '/') && con->execPath) { + char *s = malloc(strlen(con->execPath) + strlen(script) + 2); + sprintf(s, "%s/%s", con->execPath, script); + argv[pos] = s; + } else { + argv[pos] = script; + } + pos++; + + argv[pos] = findProgramPath(con->os->argv[0]); + if (argv[pos]) pos++; + argv[pos++] = ";"; + + memcpy(argv + pos, con->finalArgv, sizeof(*argv) * con->finalArgvCount); + pos += con->finalArgvCount; + + if (con->numLeftovers) { + argv[pos++] = "--"; + memcpy(argv + pos, con->leftovers, sizeof(*argv) * con->numLeftovers); + pos += con->numLeftovers; + } + + argv[pos++] = NULL; + +#ifdef __hpux + setresuid(getuid(), getuid(),-1); +#else +/* + * XXX " ... on BSD systems setuid() should be preferred over setreuid()" + * XXX sez' Timur Bakeyev + * XXX from Norbert Warmuth + */ +#if defined(HAVE_SETUID) + setuid(getuid()); +#elif defined (HAVE_SETREUID) + setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */ +#else + ; /* Can't drop privileges */ +#endif +#endif + + execvp(argv[0], (char *const *)argv); +} + +/*@observer@*/ static const struct poptOption * +findOption(const struct poptOption * table, const char * longName, + char shortName, + /*@out@*/ poptCallbackType * callback, /*@out@*/ const void ** callbackData, + int singleDash) +{ + const struct poptOption * opt = table; + const struct poptOption * opt2; + const struct poptOption * cb = NULL; + + /* This happens when a single - is given */ + if (singleDash && !shortName && !*longName) + shortName = '-'; + + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { + opt2 = findOption(opt->arg, longName, shortName, callback, + callbackData, singleDash); + if (opt2) { + if (*callback && !*callbackData) + *callbackData = opt->descrip; + return opt2; + } + } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) { + cb = opt; + } else if (longName && opt->longName && + (!singleDash || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) && + !strcmp(longName, opt->longName)) { + break; + } else if (shortName && shortName == opt->shortName) { + break; + } + opt++; + } + + if (!opt->longName && !opt->shortName) return NULL; + *callbackData = NULL; + *callback = NULL; + if (cb) { + *callback = (poptCallbackType)cb->arg; + if (!(cb->argInfo & POPT_CBFLAG_INC_DATA)) + *callbackData = cb->descrip; + } + + return opt; +} + +static const char *findNextArg(poptContext con, unsigned argx, int delete) +{ + struct optionStackEntry * os = con->os; + const char * arg; + + do { + int i; + arg = NULL; + while (os->next == os->argc && os > con->optionStack) os--; + if (os->next == os->argc && os == con->optionStack) break; + for (i = os->next; i < os->argc; i++) { + if (os->argb && PBM_ISSET(i, os->argb)) continue; + if (*os->argv[i] == '-') continue; + if (--argx > 0) continue; + arg = os->argv[i]; + if (delete) { + if (os->argb == NULL) os->argb = PBM_ALLOC(os->argc); + PBM_SET(i, os->argb); + } + break; + } + if (os > con->optionStack) os--; + } while (arg == NULL); + return arg; +} + +static /*@only@*/ const char * expandNextArg(poptContext con, const char * s) +{ + const char *a; + size_t alen; + char *t, *te; + size_t tn = strlen(s) + 1; + char c; + + te = t = malloc(tn);; + while ((c = *s++) != '\0') { + switch (c) { +#if 0 /* XXX can't do this */ + case '\\': /* escape */ + c = *s++; + break; +#endif + case '!': + if (!(s[0] == '#' && s[1] == ':' && s[2] == '+')) + break; + if ((a = findNextArg(con, 1, 1)) == NULL) + break; + s += 3; + + alen = strlen(a); + tn += alen; + *te = '\0'; + t = realloc(t, tn); + te = t + strlen(t); + strncpy(te, a, alen); te += alen; + continue; + /*@notreached@*/ break; + default: + break; + } + *te++ = c; + } + *te = '\0'; + t = realloc(t, strlen(t)+1); /* XXX memory leak, hard to plug */ + return t; +} + +static void poptStripArg(poptContext con, int which) +{ + if(con->arg_strip == NULL) { + con->arg_strip = PBM_ALLOC(con->optionStack[0].argc); + } + PBM_SET(which, con->arg_strip); +} + +/* returns 'val' element, -1 on last item, POPT_ERROR_* on error */ +int poptGetNextOpt(poptContext con) +{ + const struct poptOption * opt = NULL; + int done = 0; + + /* looks a bit tricky to get rid of alloca properly in this fn */ +#if HAVE_ALLOCA_H +#define ALLOCA(x) alloca(x) +#else +#define ALLOCA(x) malloc(x) +#endif + + + while (!done) { + const char * origOptString = NULL; + poptCallbackType cb = NULL; + const void * cbData = NULL; + const char * longArg = NULL; + int canstrip = 0; + + while (!con->os->nextCharArg && con->os->next == con->os->argc + && con->os > con->optionStack) { + cleanOSE(con->os--); + } + if (!con->os->nextCharArg && con->os->next == con->os->argc) { + invokeCallbacks(con, con->options, 1); + if (con->doExec) execCommand(con); + return -1; + } + + /* Process next long option */ + if (!con->os->nextCharArg) { + char * localOptString, * optString; + int thisopt; + + if (con->os->argb && PBM_ISSET(con->os->next, con->os->argb)) { + con->os->next++; + continue; + } + thisopt=con->os->next; + origOptString = con->os->argv[con->os->next++]; + + if (con->restLeftover || *origOptString != '-') { + con->leftovers[con->numLeftovers++] = origOptString; + if (con->flags & POPT_CONTEXT_POSIXMEHARDER) + con->restLeftover = 1; + continue; + } + + /* Make a copy we can hack at */ + localOptString = optString = + strcpy(ALLOCA(strlen(origOptString) + 1), + origOptString); + + if (!optString[0]) + return POPT_ERROR_BADOPT; + + if (optString[1] == '-' && !optString[2]) { + con->restLeftover = 1; + continue; + } else { + char *oe; + int singleDash; + + optString++; + if (*optString == '-') + singleDash = 0, optString++; + else + singleDash = 1; + + /* XXX aliases with arg substitution need "--alias=arg" */ + if (handleAlias(con, optString, '\0', NULL)) + continue; + if (handleExec(con, optString, '\0')) + continue; + + /* Check for "--long=arg" option. */ + for (oe = optString; *oe && *oe != '='; oe++) + ; + if (*oe == '=') { + *oe++ = '\0'; + /* XXX longArg is mapped back to persistent storage. */ + longArg = origOptString + (oe - localOptString); + } + + opt = findOption(con->options, optString, '\0', &cb, &cbData, + singleDash); + if (!opt && !singleDash) + return POPT_ERROR_BADOPT; + } + + if (!opt) { + con->os->nextCharArg = origOptString + 1; + } else { + if(con->os == con->optionStack && + opt->argInfo & POPT_ARGFLAG_STRIP) { + canstrip = 1; + poptStripArg(con, thisopt); + } + } + } + + /* Process next short option */ + if (con->os->nextCharArg) { + origOptString = con->os->nextCharArg; + + con->os->nextCharArg = NULL; + + if (handleAlias(con, NULL, *origOptString, + origOptString + 1)) { + origOptString++; + continue; + } + if (handleExec(con, NULL, *origOptString)) + continue; + + opt = findOption(con->options, NULL, *origOptString, &cb, + &cbData, 0); + if (!opt) + return POPT_ERROR_BADOPT; + + origOptString++; + if (*origOptString) + con->os->nextCharArg = origOptString; + } + + if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE) { + *((int *)opt->arg) = 1; + } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_VAL) { + if (opt->arg) + *((int *) opt->arg) = opt->val; + } else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) { + if (con->os->nextArg) { + xfree(con->os->nextArg); + con->os->nextArg = NULL; + } + if (longArg) { + con->os->nextArg = expandNextArg(con, longArg); + } else if (con->os->nextCharArg) { + con->os->nextArg = expandNextArg(con, con->os->nextCharArg); + con->os->nextCharArg = NULL; + } else { + while (con->os->next == con->os->argc && + con->os > con->optionStack) { + cleanOSE(con->os--); + } + if (con->os->next == con->os->argc) + return POPT_ERROR_NOARG; + + /* make sure this isn't part of a short arg or the + result of an alias expansion */ + if(con->os == con->optionStack && + opt->argInfo & POPT_ARGFLAG_STRIP && + canstrip) { + poptStripArg(con, con->os->next); + } + + con->os->nextArg = expandNextArg(con, con->os->argv[con->os->next++]); + } + + if (opt->arg) { + long aLong; + char *end; + + switch (opt->argInfo & POPT_ARG_MASK) { + case POPT_ARG_STRING: + /* XXX memory leak, hard to plug */ + *((const char **) opt->arg) = xstrdup(con->os->nextArg); + break; + + case POPT_ARG_INT: + case POPT_ARG_LONG: + aLong = strtol(con->os->nextArg, &end, 0); + if (!(end && *end == '\0')) + return POPT_ERROR_BADNUMBER; + + if (aLong == LONG_MIN || aLong == LONG_MAX) + return POPT_ERROR_OVERFLOW; + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_LONG) { + *((long *) opt->arg) = aLong; + } else { + if (aLong > INT_MAX || aLong < INT_MIN) + return POPT_ERROR_OVERFLOW; + *((int *) opt->arg) = aLong; + } + break; + + default: + fprintf(stdout, POPT_("option type (%d) not implemented in popt\n"), + opt->argInfo & POPT_ARG_MASK); + exit(EXIT_FAILURE); + } + } + } + + if (cb) + cb(con, POPT_CALLBACK_REASON_OPTION, opt, con->os->nextArg, cbData); + else if (opt->val && ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL)) + done = 1; + + if ((con->finalArgvCount + 2) >= (con->finalArgvAlloced)) { + con->finalArgvAlloced += 10; + con->finalArgv = realloc(con->finalArgv, + sizeof(*con->finalArgv) * con->finalArgvAlloced); + } + + { char *s = malloc((opt->longName ? strlen(opt->longName) : 0) + 3); + if (opt->longName) + sprintf(s, "--%s", opt->longName); + else + sprintf(s, "-%c", opt->shortName); + con->finalArgv[con->finalArgvCount++] = s; + } + + if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE + && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL) { + con->finalArgv[con->finalArgvCount++] = xstrdup(con->os->nextArg); + } + } + + return opt->val; +} + +const char * poptGetOptArg(poptContext con) { + const char * ret = con->os->nextArg; + con->os->nextArg = NULL; + return ret; +} + +const char * poptGetArg(poptContext con) { + if (con->numLeftovers == con->nextLeftover) return NULL; + return con->leftovers[con->nextLeftover++]; +} + +const char * poptPeekArg(poptContext con) { + if (con->numLeftovers == con->nextLeftover) return NULL; + return con->leftovers[con->nextLeftover]; +} + +const char ** poptGetArgs(poptContext con) { + if (con->numLeftovers == con->nextLeftover) return NULL; + + /* some apps like [like RPM ;-) ] need this NULL terminated */ + con->leftovers[con->numLeftovers] = NULL; + + return (con->leftovers + con->nextLeftover); +} + +void poptFreeContext(poptContext con) { + int i; + + poptResetContext(con); + if (con->os->argb) free(con->os->argb); + + for (i = 0; i < con->numAliases; i++) { + if (con->aliases[i].longName) xfree(con->aliases[i].longName); + free(con->aliases[i].argv); + } + + for (i = 0; i < con->numExecs; i++) { + if (con->execs[i].longName) xfree(con->execs[i].longName); + xfree(con->execs[i].script); + } + if (con->execs) xfree(con->execs); + + free(con->leftovers); + free(con->finalArgv); + if (con->appName) xfree(con->appName); + if (con->aliases) free(con->aliases); + if (con->otherHelp) xfree(con->otherHelp); + if (con->execPath) xfree(con->execPath); + if (con->arg_strip) PBM_FREE(con->arg_strip); + + free(con); +} + +int poptAddAlias(poptContext con, struct poptAlias newAlias, + /*@unused@*/ int flags) +{ + int aliasNum = con->numAliases++; + struct poptAlias * alias; + + /* SunOS won't realloc(NULL, ...) */ + if (!con->aliases) + con->aliases = malloc(sizeof(newAlias) * con->numAliases); + else + con->aliases = realloc(con->aliases, + sizeof(newAlias) * con->numAliases); + alias = con->aliases + aliasNum; + + alias->longName = (newAlias.longName) + ? strcpy(malloc(strlen(newAlias.longName) + 1), newAlias.longName) + : NULL; + alias->shortName = newAlias.shortName; + alias->argc = newAlias.argc; + alias->argv = newAlias.argv; + + return 0; +} + +const char * poptBadOption(poptContext con, int flags) { + struct optionStackEntry * os; + + if (flags & POPT_BADOPTION_NOALIAS) + os = con->optionStack; + else + os = con->os; + + return os->argv[os->next - 1]; +} + +#define POPT_ERROR_NOARG -10 +#define POPT_ERROR_BADOPT -11 +#define POPT_ERROR_OPTSTOODEEP -13 +#define POPT_ERROR_BADQUOTE -15 /* only from poptParseArgString() */ +#define POPT_ERROR_ERRNO -16 /* only from poptParseArgString() */ + +const char *const poptStrerror(const int error) { + switch (error) { + case POPT_ERROR_NOARG: + return POPT_("missing argument"); + case POPT_ERROR_BADOPT: + return POPT_("unknown option"); + case POPT_ERROR_OPTSTOODEEP: + return POPT_("aliases nested too deeply"); + case POPT_ERROR_BADQUOTE: + return POPT_("error in paramter quoting"); + case POPT_ERROR_BADNUMBER: + return POPT_("invalid numeric value"); + case POPT_ERROR_OVERFLOW: + return POPT_("number too large or too small"); + case POPT_ERROR_ERRNO: + return strerror(errno); + default: + return POPT_("unknown error"); + } +} + +int poptStuffArgs(poptContext con, const char ** argv) { + int argc; + + if ((con->os - con->optionStack) == POPT_OPTION_DEPTH) + return POPT_ERROR_OPTSTOODEEP; + + for (argc = 0; argv[argc]; argc++) + ; + + con->os++; + con->os->next = 0; + con->os->nextArg = NULL; + con->os->nextCharArg = NULL; + con->os->currAlias = NULL; + poptDupArgv(argc, argv, &con->os->argc, &con->os->argv); + con->os->argb = NULL; + con->os->stuffed = 1; + + return 0; +} + +const char * poptGetInvocationName(poptContext con) { + return con->os->argv[0]; +} + +int poptStrippedArgv(poptContext con, int argc, char **argv) +{ + int i,j=1, numargs=argc; + + for(i=1; iarg_strip)) { + numargs--; + } + } + + for(i=1; iarg_strip)) { + continue; + } else { + if(j /* for FILE * */ + +#define POPT_OPTION_DEPTH 10 + +#define POPT_ARG_NONE 0 +#define POPT_ARG_STRING 1 +#define POPT_ARG_INT 2 +#define POPT_ARG_LONG 3 +#define POPT_ARG_INCLUDE_TABLE 4 /* arg points to table */ +#define POPT_ARG_CALLBACK 5 /* table-wide callback... must be + set first in table; arg points + to callback, descrip points to + callback data to pass */ +#define POPT_ARG_INTL_DOMAIN 6 /* set the translation domain + for this table and any + included tables; arg points + to the domain string */ +#define POPT_ARG_VAL 7 /* arg should take value val */ +#define POPT_ARG_MASK 0x0000FFFF +#define POPT_ARGFLAG_ONEDASH 0x80000000 /* allow -longoption */ +#define POPT_ARGFLAG_DOC_HIDDEN 0x40000000 /* don't show in help/usage */ +#define POPT_ARGFLAG_STRIP 0x20000000 /* strip this arg from argv (only applies to long args) */ +#define POPT_CBFLAG_PRE 0x80000000 /* call the callback before parse */ +#define POPT_CBFLAG_POST 0x40000000 /* call the callback after parse */ +#define POPT_CBFLAG_INC_DATA 0x20000000 /* use data from the include line, + not the subtable */ + +#define POPT_ERROR_NOARG -10 +#define POPT_ERROR_BADOPT -11 +#define POPT_ERROR_OPTSTOODEEP -13 +#define POPT_ERROR_BADQUOTE -15 /* only from poptParseArgString() */ +#define POPT_ERROR_ERRNO -16 /* only from poptParseArgString() */ +#define POPT_ERROR_BADNUMBER -17 +#define POPT_ERROR_OVERFLOW -18 + +/* poptBadOption() flags */ +#define POPT_BADOPTION_NOALIAS (1 << 0) /* don't go into an alias */ + +/* poptGetContext() flags */ +#define POPT_CONTEXT_NO_EXEC (1 << 0) /* ignore exec expansions */ +#define POPT_CONTEXT_KEEP_FIRST (1 << 1) /* pay attention to argv[0] */ +#define POPT_CONTEXT_POSIXMEHARDER (1 << 2) /* options can't follow args */ + +struct poptOption { + /*@observer@*/ /*@null@*/ const char * longName; /* may be NULL */ + char shortName; /* may be '\0' */ + int argInfo; + /*@shared@*/ /*@null@*/ void * arg; /* depends on argInfo */ + int val; /* 0 means don't return, just update flag */ + /*@shared@*/ /*@null@*/ const char * descrip; /* description for autohelp -- may be NULL */ + /*@shared@*/ /*@null@*/ const char * argDescrip; /* argument description for autohelp */ +}; + +struct poptAlias { + /*@owned@*/ /*@null@*/ const char * longName; /* may be NULL */ + char shortName; /* may be '\0' */ + int argc; + /*@owned@*/ const char ** argv; /* must be free()able */ +}; + +extern struct poptOption poptHelpOptions[]; +#define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions, \ + 0, "Help options", NULL }, + +typedef struct poptContext_s * poptContext; +#ifndef __cplusplus +typedef struct poptOption * poptOption; +#endif + +enum poptCallbackReason { POPT_CALLBACK_REASON_PRE, + POPT_CALLBACK_REASON_POST, + POPT_CALLBACK_REASON_OPTION }; +typedef void (*poptCallbackType)(poptContext con, + enum poptCallbackReason reason, + const struct poptOption * opt, + const char * arg, const void * data); + +/*@only@*/ poptContext poptGetContext(/*@keep@*/ const char * name, + int argc, /*@keep@*/ const char ** argv, + /*@keep@*/ const struct poptOption * options, int flags); +void poptResetContext(poptContext con); + +/* returns 'val' element, -1 on last item, POPT_ERROR_* on error */ +int poptGetNextOpt(poptContext con); +/* returns NULL if no argument is available */ +/*@observer@*/ /*@null@*/ const char * poptGetOptArg(poptContext con); +/* returns NULL if no more options are available */ +/*@observer@*/ /*@null@*/ const char * poptGetArg(poptContext con); +/*@observer@*/ /*@null@*/ const char * poptPeekArg(poptContext con); +/*@observer@*/ /*@null@*/ const char ** poptGetArgs(poptContext con); +/* returns the option which caused the most recent error */ +/*@observer@*/ const char * poptBadOption(poptContext con, int flags); +void poptFreeContext( /*@only@*/ poptContext con); +int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv); +int poptAddAlias(poptContext con, struct poptAlias alias, int flags); +int poptReadConfigFile(poptContext con, const char * fn); +/* like above, but reads /etc/popt and $HOME/.popt along with environment + vars */ +int poptReadDefaultConfig(poptContext con, int useEnv); +/* argv should be freed -- this allows ', ", and \ quoting, but ' is treated + the same as " and both may include \ quotes */ +int poptDupArgv(int argc, const char **argv, + /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr); +int poptParseArgvString(const char * s, + /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr); +/*@observer@*/ const char *const poptStrerror(const int error); +void poptSetExecPath(poptContext con, const char * path, int allowAbsolute); +void poptPrintHelp(poptContext con, FILE * f, int flags); +void poptPrintUsage(poptContext con, FILE * f, int flags); +void poptSetOtherOptionHelp(poptContext con, const char * text); +/*@observer@*/ const char * poptGetInvocationName(poptContext con); +/* shuffles argv pointers to remove stripped args, returns new argc */ +int poptStrippedArgv(poptContext con, int argc, char **argv); + +#ifdef __cplusplus +} +#endif + +#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/poptconfig.c rsync-2.5.0/popt/poptconfig.c --- rsync-2.4.6/popt/poptconfig.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/poptconfig.c Thu Mar 22 19:44:50 2001 @@ -0,0 +1,142 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#include "system.h" +#include "poptint.h" + +static void configLine(poptContext con, char * line) { + int nameLength = strlen(con->appName); + char * opt; + struct poptAlias alias; + char * entryType; + char * longName = NULL; + char shortName = '\0'; + + if (strncmp(line, con->appName, nameLength)) return; + line += nameLength; + if (!*line || !isspace(*line)) return; + while (*line && isspace(*line)) line++; + entryType = line; + + while (!*line || !isspace(*line)) line++; + *line++ = '\0'; + while (*line && isspace(*line)) line++; + if (!*line) return; + opt = line; + + while (!*line || !isspace(*line)) line++; + *line++ = '\0'; + while (*line && isspace(*line)) line++; + if (!*line) return; + + if (opt[0] == '-' && opt[1] == '-') + longName = opt + 2; + else if (opt[0] == '-' && !opt[2]) + shortName = opt[1]; + + if (!strcmp(entryType, "alias")) { + if (poptParseArgvString(line, &alias.argc, &alias.argv)) return; + alias.longName = longName, alias.shortName = shortName; + poptAddAlias(con, alias, 0); + } else if (!strcmp(entryType, "exec")) { + con->execs = realloc(con->execs, + sizeof(*con->execs) * (con->numExecs + 1)); + if (longName) + con->execs[con->numExecs].longName = xstrdup(longName); + else + con->execs[con->numExecs].longName = NULL; + + con->execs[con->numExecs].shortName = shortName; + con->execs[con->numExecs].script = xstrdup(line); + + con->numExecs++; + } +} + +int poptReadConfigFile(poptContext con, const char * fn) { + char * file=NULL, * chptr, * end; + char * buf=NULL, * dst; + int fd, rc; + int fileLength; + + fd = open(fn, O_RDONLY); + if (fd < 0) { + if (errno == ENOENT) + return 0; + else + return POPT_ERROR_ERRNO; + } + + fileLength = lseek(fd, 0, SEEK_END); + (void) lseek(fd, 0, 0); + + file = malloc(fileLength + 1); + if (read(fd, file, fileLength) != fileLength) { + rc = errno; + close(fd); + errno = rc; + if (file) free(file); + return POPT_ERROR_ERRNO; + } + close(fd); + + dst = buf = malloc(fileLength + 1); + + chptr = file; + end = (file + fileLength); + while (chptr < end) { + switch (*chptr) { + case '\n': + *dst = '\0'; + dst = buf; + while (*dst && isspace(*dst)) dst++; + if (*dst && *dst != '#') { + configLine(con, dst); + } + chptr++; + break; + case '\\': + *dst++ = *chptr++; + if (chptr < end) { + if (*chptr == '\n') + dst--, chptr++; + /* \ at the end of a line does not insert a \n */ + else + *dst++ = *chptr++; + } + break; + default: + *dst++ = *chptr++; + break; + } + } + + free(file); + free(buf); + + return 0; +} + +int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv) { + char * fn, * home; + int rc; + + if (!con->appName) return 0; + + rc = poptReadConfigFile(con, "/etc/popt"); + if (rc) return rc; + if (getuid() != geteuid()) return 0; + + if ((home = getenv("HOME"))) { + fn = malloc(strlen(home) + 20); + strcpy(fn, home); + strcat(fn, "/.popt"); + rc = poptReadConfigFile(con, fn); + free(fn); + if (rc) return rc; + } + + return 0; +} + diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/popthelp.c rsync-2.5.0/popt/popthelp.c --- rsync-2.4.6/popt/popthelp.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/popthelp.c Fri Feb 23 17:32:22 2001 @@ -0,0 +1,301 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#include "system.h" +#include "poptint.h" + +static void displayArgs(poptContext con, + /*@unused@*/ enum poptCallbackReason foo, + struct poptOption * key, + /*@unused@*/ const char * arg, /*@unused@*/ void * data) { + if (key->shortName== '?') + poptPrintHelp(con, stdout, 0); + else + poptPrintUsage(con, stdout, 0); + exit(0); +} + +struct poptOption poptHelpOptions[] = { + { NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL }, + { "help", '?', 0, NULL, '?', N_("Show this help message"), NULL }, + { "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL }, + { NULL, '\0', 0, NULL, 0, NULL, NULL } +} ; + + +/*@observer@*/ /*@null@*/ static const char *const +getTableTranslationDomain(const struct poptOption *table) +{ + const struct poptOption *opt; + + for(opt = table; + opt->longName || opt->shortName || opt->arg; + opt++) { + if(opt->argInfo == POPT_ARG_INTL_DOMAIN) + return opt->arg; + } + + return NULL; +} + +/*@observer@*/ /*@null@*/ static const char *const +getArgDescrip(const struct poptOption * opt, const char *translation_domain) +{ + if (!(opt->argInfo & POPT_ARG_MASK)) return NULL; + + if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2)) + if (opt->argDescrip) return POPT_(opt->argDescrip); + + if (opt->argDescrip) return D_(translation_domain, opt->argDescrip); + return POPT_("ARG"); +} + +static void singleOptionHelp(FILE * f, int maxLeftCol, + const struct poptOption * opt, + const char *translation_domain) { + int indentLength = maxLeftCol + 5; + int lineLength = 79 - indentLength; + const char * help = D_(translation_domain, opt->descrip); + int helpLength; + const char * ch; + char format[10]; + char * left; + const char * argDescrip = getArgDescrip(opt, translation_domain); + + left = malloc(maxLeftCol + 1); + *left = '\0'; + + if (opt->longName && opt->shortName) + sprintf(left, "-%c, --%s", opt->shortName, opt->longName); + else if (opt->shortName) + sprintf(left, "-%c", opt->shortName); + else if (opt->longName) + sprintf(left, "--%s", opt->longName); + if (!*left) return ; + if (argDescrip) { + strcat(left, "="); + strcat(left, argDescrip); + } + + if (help) + fprintf(f," %-*s ", maxLeftCol, left); + else { + fprintf(f," %s\n", left); + goto out; + } + + helpLength = strlen(help); + while (helpLength > lineLength) { + ch = help + lineLength - 1; + while (ch > help && !isspace(*ch)) ch--; + if (ch == help) break; /* give up */ + while (ch > (help + 1) && isspace(*ch)) ch--; + ch++; + + sprintf(format, "%%.%ds\n%%%ds", (int) (ch - help), indentLength); + fprintf(f, format, help, " "); + help = ch; + while (isspace(*help) && *help) help++; + helpLength = strlen(help); + } + + if (helpLength) fprintf(f, "%s\n", help); + +out: + free(left); +} + +static int maxArgWidth(const struct poptOption * opt, + const char * translation_domain) { + int max = 0; + int this; + const char * s; + + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { + this = maxArgWidth(opt->arg, translation_domain); + if (this > max) max = this; + } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) { + this = opt->shortName ? 2 : 0; + if (opt->longName) { + if (this) this += 2; + this += strlen(opt->longName) + 2; + } + + s = getArgDescrip(opt, translation_domain); + if (s) + this += strlen(s) + 1; + if (this > max) max = this; + } + + opt++; + } + + return max; +} + +static void singleTableHelp(FILE * f, const struct poptOption * table, + int left, + const char *translation_domain) { + const struct poptOption * opt; + const char *sub_transdom; + + opt = table; + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->longName || opt->shortName) && + !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) + singleOptionHelp(f, left, opt, translation_domain); + opt++; + } + + opt = table; + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { + sub_transdom = getTableTranslationDomain(opt->arg); + if(!sub_transdom) + sub_transdom = translation_domain; + + if (opt->descrip) + fprintf(f, "\n%s\n", D_(sub_transdom, opt->descrip)); + + singleTableHelp(f, opt->arg, left, sub_transdom); + } + opt++; + } +} + +static int showHelpIntro(poptContext con, FILE * f) { + int len = 6; + const char * fn; + + fprintf(f, POPT_("Usage:")); + if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) { + fn = con->optionStack->argv[0]; + if (strchr(fn, '/')) fn = strchr(fn, '/') + 1; + fprintf(f, " %s", fn); + len += strlen(fn) + 1; + } + + return len; +} + +void poptPrintHelp(poptContext con, FILE * f, /*@unused@*/ int flags) { + int leftColWidth; + + showHelpIntro(con, f); + if (con->otherHelp) + fprintf(f, " %s\n", con->otherHelp); + else + fprintf(f, " %s\n", POPT_("[OPTION...]")); + + leftColWidth = maxArgWidth(con->options, NULL); + singleTableHelp(f, con->options, leftColWidth, NULL); +} + +static int singleOptionUsage(FILE * f, int cursor, + const struct poptOption * opt, + const char *translation_domain) { + int len = 3; + char shortStr[2] = { '\0', '\0' }; + const char * item = shortStr; + const char * argDescrip = getArgDescrip(opt, translation_domain); + + if (opt->shortName) { + if (!(opt->argInfo & POPT_ARG_MASK)) + return cursor; /* we did these already */ + len++; + *shortStr = opt->shortName; + shortStr[1] = '\0'; + } else if (opt->longName) { + len += 1 + strlen(opt->longName); + item = opt->longName; + } + + if (len == 3) return cursor; + + if (argDescrip) + len += strlen(argDescrip) + 1; + + if ((cursor + len) > 79) { + fprintf(f, "\n "); + cursor = 7; + } + + fprintf(f, " [-%s%s%s%s]", opt->shortName ? "" : "-", item, + argDescrip ? (opt->shortName ? " " : "=") : "", + argDescrip ? argDescrip : ""); + + return cursor + len + 1; +} + +static int singleTableUsage(FILE * f, int cursor, const struct poptOption * table, + const char *translation_domain) { + const struct poptOption * opt; + + opt = table; + while (opt->longName || opt->shortName || opt->arg) { + if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN) + translation_domain = (const char *)opt->arg; + else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) + cursor = singleTableUsage(f, cursor, opt->arg, + translation_domain); + else if ((opt->longName || opt->shortName) && + !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) + cursor = singleOptionUsage(f, cursor, opt, translation_domain); + + opt++; + } + + return cursor; +} + +static int showShortOptions(const struct poptOption * opt, FILE * f, + char * str) { + char s[300]; /* this is larger then the ascii set, so + it should do just fine */ + + s[0] = '\0'; + if (str == NULL) { + memset(s, 0, sizeof(s)); + str = s; + } + + while (opt->longName || opt->shortName || opt->arg) { + if (opt->shortName && !(opt->argInfo & POPT_ARG_MASK)) + str[strlen(str)] = opt->shortName; + else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) + showShortOptions(opt->arg, f, str); + + opt++; + } + + if (s != str || !*s) + return 0; + + fprintf(f, " [-%s]", s); + return strlen(s) + 4; +} + +void poptPrintUsage(poptContext con, FILE * f, /*@unused@*/ int flags) { + int cursor; + + cursor = showHelpIntro(con, f); + cursor += showShortOptions(con->options, f, NULL); + singleTableUsage(f, cursor, con->options, NULL); + + if (con->otherHelp) { + cursor += strlen(con->otherHelp) + 1; + if (cursor > 79) fprintf(f, "\n "); + fprintf(f, " %s", con->otherHelp); + } + + fprintf(f, "\n"); +} + +void poptSetOtherOptionHelp(poptContext con, const char * text) { + if (con->otherHelp) xfree(con->otherHelp); + con->otherHelp = xstrdup(text); +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/poptint.h rsync-2.5.0/popt/poptint.h --- rsync-2.4.6/popt/poptint.h Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/poptint.h Fri Feb 23 17:32:22 2001 @@ -0,0 +1,87 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#ifndef H_POPTINT +#define H_POPTINT + +/* Bit mask macros. */ +typedef unsigned int __pbm_bits; +#define __PBM_NBITS (8 * sizeof (__pbm_bits)) +#define __PBM_IX(d) ((d) / __PBM_NBITS) +#define __PBM_MASK(d) ((__pbm_bits) 1 << ((d) % __PBM_NBITS)) +typedef struct { + __pbm_bits bits[1]; +} pbm_set; +#define __PBM_BITS(set) ((set)->bits) + +#define PBM_ALLOC(d) calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits)) +#define PBM_FREE(s) free(s); +#define PBM_SET(d, s) (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d)) +#define PBM_CLR(d, s) (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d)) +#define PBM_ISSET(d, s) ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0) + +struct optionStackEntry { + int argc; + /*@only@*/ const char ** argv; + /*@only@*/ pbm_set * argb; + int next; + /*@only@*/ const char * nextArg; + /*@keep@*/ const char * nextCharArg; + /*@dependent@*/ struct poptAlias * currAlias; + int stuffed; +}; + +struct execEntry { + const char * longName; + char shortName; + const char * script; +}; + +struct poptContext_s { + struct optionStackEntry optionStack[POPT_OPTION_DEPTH]; + /*@dependent@*/ struct optionStackEntry * os; + /*@owned@*/ const char ** leftovers; + int numLeftovers; + int nextLeftover; + /*@keep@*/ const struct poptOption * options; + int restLeftover; + /*@only@*/ const char * appName; + /*@only@*/ struct poptAlias * aliases; + int numAliases; + int flags; + struct execEntry * execs; + int numExecs; + /*@only@*/ const char ** finalArgv; + int finalArgvCount; + int finalArgvAlloced; + /*@dependent@*/ struct execEntry * doExec; + /*@only@*/ const char * execPath; + int execAbsolute; + /*@only@*/ const char * otherHelp; + pbm_set * arg_strip; +}; + +#define xfree(_a) free((void *)_a) + +#ifdef HAVE_LIBINTL_H +#include +#endif + +#if defined(HAVE_GETTEXT) && !defined(__LCLINT__) +#define _(foo) gettext(foo) +#else +#define _(foo) (foo) +#endif + +#if defined(HAVE_DGETTEXT) && !defined(__LCLINT__) +#define D_(dom, str) dgettext(dom, str) +#define POPT_(foo) D_("popt", foo) +#else +#define POPT_(foo) (foo) +#define D_(dom, str) (str) +#endif + +#define N_(foo) (foo) + +#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/poptparse.c rsync-2.5.0/popt/poptparse.c --- rsync-2.4.6/popt/poptparse.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/poptparse.c Thu Mar 22 19:44:50 2001 @@ -0,0 +1,102 @@ +/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING + file accompanying popt source distributions, available from + ftp://ftp.redhat.com/pub/code/popt */ + +#include "system.h" + +#define POPT_ARGV_ARRAY_GROW_DELTA 5 + +int poptDupArgv(int argc, const char **argv, + int * argcPtr, const char *** argvPtr) +{ + size_t nb = (argc + 1) * sizeof(*argv); + const char ** argv2; + char * dst; + int i; + + for (i = 0; i < argc; i++) { + if (argv[i] == NULL) + return POPT_ERROR_NOARG; + nb += strlen(argv[i]) + 1; + } + + dst = malloc(nb); + argv2 = (void *) dst; + dst += (argc + 1) * sizeof(*argv); + + for (i = 0; i < argc; i++) { + argv2[i] = dst; + dst += strlen(strcpy(dst, argv[i])) + 1; + } + argv2[argc] = NULL; + + *argvPtr = argv2; + *argcPtr = argc; + return 0; +} + +int poptParseArgvString(const char * s, int * argcPtr, const char *** argvPtr) +{ + const char * src; + char quote = '\0'; + int argvAlloced = POPT_ARGV_ARRAY_GROW_DELTA; + const char ** argv = malloc(sizeof(*argv) * argvAlloced); + int argc = 0; + int buflen = strlen(s) + 1; + char *buf0 = calloc(buflen, 1); + char *buf = buf0; + + argv[argc] = buf; + + for (src = s; *src; src++) { + if (quote == *src) { + quote = '\0'; + } else if (quote) { + if (*src == '\\') { + src++; + if (!*src) { + free(argv); + free(buf0); + return POPT_ERROR_BADQUOTE; + } + if (*src != quote) *buf++ = '\\'; + } + *buf++ = *src; + } else if (isspace(*src)) { + if (*argv[argc]) { + buf++, argc++; + if (argc == argvAlloced) { + argvAlloced += POPT_ARGV_ARRAY_GROW_DELTA; + argv = realloc(argv, sizeof(*argv) * argvAlloced); + } + argv[argc] = buf; + } + } else switch (*src) { + case '"': + case '\'': + quote = *src; + break; + case '\\': + src++; + if (!*src) { + free(argv); + free(buf0); + return POPT_ERROR_BADQUOTE; + } + /*@fallthrough@*/ + default: + *buf++ = *src; + break; + } + } + + if (strlen(argv[argc])) { + argc++, buf++; + } + + (void) poptDupArgv(argc, argv, argcPtr, argvPtr); + + free(argv); + free(buf0); + return 0; +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/popt/system.h rsync-2.5.0/popt/system.h --- rsync-2.4.6/popt/system.h Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/popt/system.h Fri Feb 23 17:32:22 2001 @@ -0,0 +1,55 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +#if HAVE_MCHECK_H +#include +#endif + +#include +#include +#include + +#if HAVE_UNISTD_H +#include +#endif + +#ifdef __NeXT +/* access macros are not declared in non posix mode in unistd.h - + don't try to use posix on NeXTstep 3.3 ! */ +#include +#endif + +/* AIX requires this to be the first thing in the file. */ +#ifndef __GNUC__ +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX +#pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#elif defined(__GNUC__) && defined(__STRICT_ANSI__) +#define alloca __builtin_alloca +#endif + +/*@only@*/ char * xstrdup (const char *str); + +#if HAVE_MCHECK_H && defined(__GNUC__) +#define vmefail() (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL) +#define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str))) +#else +#define xstrdup(_str) strdup(_str) +#endif /* HAVE_MCHECK_H && defined(__GNUC__) */ + + +#include "popt.h" diff -u -r --new-file --exclude=CVS rsync-2.4.6/proto.h rsync-2.5.0/proto.h --- rsync-2.4.6/proto.h Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/proto.h Thu Nov 29 16:21:09 2001 @@ -4,6 +4,26 @@ char *auth_server(int fd, int module, char *addr, char *leader); void auth_client(int fd, char *user, char *challenge); int make_backup(char *fname); +void create_batch_file_ext(); +void set_batch_file_ext(char *ext); +void write_batch_flist_file(char *buff, int bytes_to_write); +void write_batch_flist_info(int flist_count, struct file_struct **fptr); +void write_char_bufs(char *buf); +void write_batch_argvs_file(int orig_argc, int argc, char **argv); +struct file_list *create_flist_from_batch(); +int read_batch_flist_file(char *buff, int len); +unsigned char read_batch_flags(); +void read_batch_flist_info(struct file_struct **fptr); +void write_batch_csums_file(char *buff, int bytes_to_write); +void close_batch_csums_file() ; +void write_batch_csum_info(int *flist_entry, int flist_count, struct sum_struct *s); +int read_batch_csums_file(char *buff, int len); +void read_batch_csum_info(int flist_entry, struct sum_struct *s, int *checksums_match); +void write_batch_delta_file(char *buff, int bytes_to_write); +void close_batch_delta_file(); +int read_batch_delta_file(char *buff, int len); +void show_flist(int index, struct file_struct **fptr); +void show_argvs(int argc, char *argv[]); uint32 get_checksum1(char *buf1,int len); void get_checksum2(char *buf,int len,char *sum); void file_checksum(char *fname,char *sum,OFF_T size); @@ -20,14 +40,14 @@ int daemon_main(void); void setup_protocol(int f_out,int f_in); int claim_connection(char *fname,int max_connections); -int check_exclude(char *name,struct exclude_struct **local_exclude_list, +int check_exclude(char *name, struct exclude_struct **local_exclude_list, STRUCT_STAT *st); -void add_exclude_list(char *pattern,struct exclude_struct ***list, int include); -void add_exclude(char *pattern, int include); -struct exclude_struct **make_exclude_list(char *fname, +void add_exclude_list(const char *pattern, struct exclude_struct ***list, int include); +void add_exclude(const char *pattern, int include); +struct exclude_struct **make_exclude_list(const char *fname, struct exclude_struct **list1, int fatal, int include); -void add_exclude_file(char *fname,int fatal,int include); +void add_exclude_file(const char *fname, int fatal, int include); void send_exclude_list(int f); void recv_exclude_list(int f); char *get_exclude_tok(char *p); @@ -67,7 +87,6 @@ void io_start_buffering(int fd); void io_flush(void); void io_end_buffering(int fd); -void io_shutdown(void); void write_int(int f,int32 x); void write_longint(int f, int64 x); void write_buf(int f,char *buf,int len); @@ -77,7 +96,6 @@ void io_start_multiplex_out(int fd); void io_start_multiplex_in(int fd); int io_multiplex_write(enum logcode code, char *buf, int len); -int io_error_write(int f, enum logcode code, char *buf, int len); void io_multiplexing_close(void); char *lp_motd_file(void); char *lp_log_file(void); @@ -113,9 +131,14 @@ BOOL lp_load(char *pszFname, int globals_only); int lp_numservices(void); int lp_number(char *name); -void log_open(void); +void err_list_push(void); +void log_init(void); +void log_open(); +void log_close(); void set_error_fd(int fd); void rwrite(enum logcode code, char *buf, int len); +void rprintf(enum logcode code, const char *format, ...); +void rsyserr(enum logcode code, int errcode, const char *format, ...); void rflush(enum logcode code); void log_send(struct file_struct *file, struct stats *initial_stats); void log_recv(struct file_struct *file, struct stats *initial_stats); @@ -123,13 +146,13 @@ void log_transfer(struct file_struct *file, const char *fname); void wait_process(pid_t pid, int *status); void start_server(int f_in, int f_out, int argc, char *argv[]); -int client_run(int f_in, int f_out, int pid, int argc, char *argv[]); +int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]); int main(int argc,char *argv[]); void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len); void match_report(void); void usage(enum logcode F); void option_error(void); -int parse_arguments(int argc, char *argv[], int frommain); +int parse_arguments(int *argc, const char ***argv, int frommain); void server_options(char **args,int *argc); BOOL pm_process( char *FileName, BOOL (*sfunc)(char *), @@ -143,14 +166,19 @@ void sig_int(void); void finish_transfer(char *fname, char *fnametmp, struct file_struct *file); void send_files(struct file_list *flist,int f_out,int f_in); -int open_socket_out(char *host, int port, struct in_addr *address); +int open_socket_out(char *host, int port, const char *bind_address, + int af_hint); +int open_socket_out_wrapped (char *host, + int port, + const char *bind_address, + int af_hint); int is_a_socket(int fd); void start_accept_loop(int port, int (*fn)(int )); void set_socket_options(int fd, char *options); void become_daemon(void); char *client_addr(int fd); char *client_name(int fd); -struct in_addr *ip_address(const char *str); +int sock_exec(const char *prog); int do_unlink(char *fname); int do_symlink(char *fname1, char *fname2); int do_link(char *fname1, char *fname2); @@ -161,13 +189,14 @@ int do_chmod(const char *path, mode_t mode); int do_rename(char *fname1, char *fname2); int do_mkdir(char *fname, mode_t mode); -char *do_mktemp(char *template); +int do_mkstemp(char *template, mode_t perms); int do_stat(const char *fname, STRUCT_STAT *st); int do_lstat(const char *fname, STRUCT_STAT *st); int do_fstat(int fd, STRUCT_STAT *st); OFF_T do_lseek(int fd, OFF_T offset, int whence); void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset); char *d_name(struct dirent *di); +int main (int argc, char *argv[]); void set_compression(char *fname); void send_token(int f,int token,struct map_struct *buf,OFF_T offset, int n,int toklen); @@ -180,8 +209,8 @@ void set_nonblocking(int fd); void set_blocking(int fd); int fd_pair(int fd[2]); -int piped_child(char **command,int *f_in,int *f_out); -int local_child(int argc, char **argv,int *f_in,int *f_out); +pid_t piped_child(char **command,int *f_in,int *f_out); +pid_t local_child(int argc, char **argv,int *f_in,int *f_out); void out_of_memory(char *str); void overflow(char *str); int set_modtime(char *fname,time_t modtime); @@ -196,8 +225,6 @@ int lock_range(int fd, int offset, int len); void glob_expand(char *base1, char **argv, int *argc, int maxargs); void strlower(char *s); -int vslprintf(char *str, int n, const char *format, va_list ap); -int slprintf(char *str, int n, char *format, ...); void *Realloc(void *p, int size); void clean_fname(char *name); void sanitize_path(char *p, char *reldir); @@ -208,7 +235,7 @@ void show_progress(OFF_T ofs, OFF_T size); int unsafe_symlink(char *dest, char *src); char *timestring(time_t t); -void msleep(int t); +int msleep(int t); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); int sys_gettimeofday(struct timeval *tv); diff -u -r --new-file --exclude=CVS rsync-2.4.6/receiver.c rsync-2.5.0/receiver.c --- rsync-2.4.6/receiver.c Thu Mar 30 06:23:03 2000 +++ rsync-2.5.0/receiver.c Thu Nov 29 16:21:09 2001 @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2000 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 This program is free software; you can redistribute it and/or modify @@ -82,14 +83,15 @@ { if (!S_ISDIR(f->mode)) { if (robust_unlink(f_name(f)) != 0) { - rprintf(FERROR,"unlink %s : %s\n",f_name(f),strerror(errno)); + rprintf(FERROR,"delete_one: unlink %s: %s\n",f_name(f),strerror(errno)); } else if (verbose) { rprintf(FINFO,"deleting %s\n",f_name(f)); } } else { if (do_rmdir(f_name(f)) != 0) { if (errno != ENOTEMPTY && errno != EEXIST) - rprintf(FERROR,"rmdir %s : %s\n",f_name(f),strerror(errno)); + rprintf(FERROR,"delete_one: rmdir %s: %s\n", + f_name(f), strerror(errno)); } else if (verbose) { rprintf(FINFO,"deleting directory %s\n",f_name(f)); } @@ -177,7 +179,7 @@ rprintf(FERROR,"filename too long\n"); return 0; } - slprintf(fnametmp,MAXPATHLEN, "%s/.%s.XXXXXX",tmpdir,f); + snprintf(fnametmp,MAXPATHLEN, "%s/.%s.XXXXXX",tmpdir,f); return 1; } @@ -190,11 +192,11 @@ if (f) { *f = 0; - slprintf(fnametmp,MAXPATHLEN,"%s/.%s.XXXXXX", + snprintf(fnametmp,MAXPATHLEN,"%s/.%s.XXXXXX", fname,f+1); *f = '/'; } else { - slprintf(fnametmp,MAXPATHLEN,".%s.XXXXXX",fname); + snprintf(fnametmp,MAXPATHLEN,".%s.XXXXXX",fname); } return 1; @@ -302,6 +304,7 @@ int fd1,fd2; STRUCT_STAT st; char *fname; + char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; char *fnamecmp; char fnamecmpbuf[MAXPATHLEN]; @@ -369,7 +372,7 @@ if ((fd1 == -1) && (compare_dest != NULL)) { /* try the file at compare_dest instead */ - slprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s", + snprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s", compare_dest,fname); fnamecmp = fnamecmpbuf; fd1 = do_open(fnamecmp, O_RDONLY, 0); @@ -410,17 +413,7 @@ continue; } - /* mktemp is deliberately used here instead of mkstemp. - because O_EXCL is used on the open, the race condition - is not a problem or a security hole, and we want to - control the access permissions on the created file. */ - if (NULL == do_mktemp(fnametmp)) { - rprintf(FERROR,"mktemp %s failed\n",fnametmp); - receive_data(f_in,buf,-1,NULL,file->length); - if (buf) unmap_file(buf); - if (fd1 != -1) close(fd1); - continue; - } + strlcpy(template, fnametmp, sizeof(template)); /* we initially set the perms without the setuid/setgid bits to ensure that there is no race @@ -428,16 +421,21 @@ the lchown. Thanks to snabb@epipe.fi for pointing this out. We also set it initially without group access because of a similar race condition. */ - fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL, - file->mode & INITACCESSPERMS); + fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); + if (fd2 == -1) { + rprintf(FERROR,"mkstemp %s failed\n",fnametmp); + receive_data(f_in,buf,-1,NULL,file->length); + if (buf) unmap_file(buf); + continue; + } /* in most cases parent directories will already exist because their information should have been previously transferred, but that may not be the case with -R */ if (fd2 == -1 && relative_paths && errno == ENOENT && create_directory_path(fnametmp) == 0) { - fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL, - file->mode & INITACCESSPERMS); + strlcpy(fnametmp, template, sizeof(fnametmp)); + fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); } if (fd2 == -1) { rprintf(FERROR,"cannot create %s : %s\n",fnametmp,strerror(errno)); diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsync.1 rsync-2.5.0/rsync.1 --- rsync-2.4.6/rsync.1 Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/rsync.1 Thu Nov 29 16:21:09 2001 @@ -1,4 +1,4 @@ -.TH "rsync" "1" "1 Mar 1999" "" "" +.TH "rsync" "1" "29 May 2001" "" "" .SH "NAME" rsync \- faster, flexible replacement for rcp .SH "SYNOPSIS" @@ -139,7 +139,7 @@ using the --delete option\&. .PP You can also use rsync in local-only mode, where both the source and -destination don\'t have a \':\' in the name\&. In this case it behaves like +destination don\&'t have a \&':\&' in the name\&. In this case it behaves like an improved copy command\&. .PP .RS @@ -198,7 +198,7 @@ .PP Here are some examples of how I use rsync\&. .PP -To backup my wife\'s home directory, which consists of large MS Word +To backup my wife\&'s home directory, which consists of large MS Word files and mail folders, I use a cron job that runs .PP .RS @@ -214,7 +214,7 @@ .RS get: .br -rsync -avuzb --exclude \'*~\' samba:samba/ \&. +rsync -avuzb --exclude \&'*~\&' samba:samba/ \&. .PP put: .br @@ -225,7 +225,7 @@ .PP this allows me to sync with a CVS directory at the other end of the link\&. I then do cvs operations on the remote machine, which saves a -lot of time as the remote cvs protocol isn\'t very efficient\&. +lot of time as the remote cvs protocol isn\&'t very efficient\&. .PP I mirror a directory between my "old" and "new" ftp sites with the command @@ -242,7 +242,7 @@ to the detailed description below for a complete description\&. .PP -.DS +.nf -v, --verbose increase verbosity @@ -254,7 +254,7 @@ -b, --backup make backups (default ~ suffix) --backup-dir make backups into this directory --suffix=SUFFIX override backup suffix - -u, --update update only (don\'t overwrite newer files) + -u, --update update only (don\&'t overwrite newer files) -l, --links preserve soft links -L, --copy-links treat soft links like regular files --copy-unsafe-links copy links outside the source tree @@ -268,22 +268,22 @@ -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy whole files, no incremental checks - -x, --one-file-system don\'t cross filesystem boundaries + -x, --one-file-system don\&'t cross filesystem boundaries -B, --block-size=SIZE checksum blocking size (default 700) -e, --rsh=COMMAND specify rsh replacement --rsync-path=PATH specify path to rsync on the remote machine -C, --cvs-exclude auto ignore files in the same way CVS does --existing only update files that already exist - --delete delete files that don\'t exist on the sending side + --delete delete files that don\&'t exist on the sending side --delete-excluded also delete excluded files on the receiving side --delete-after delete after transferring, not before --ignore-errors delete even if there are IO errors - --max-delete=NUM don\'t delete more than NUM files + --max-delete=NUM don\&'t delete more than NUM files --partial keep partially transferred files --force force deletion of directories even if not empty - --numeric-ids don\'t map uid/gid values by user/group name + --numeric-ids don\&'t map uid/gid values by user/group name --timeout=TIME set IO timeout in seconds - -I, --ignore-times don\'t exclude files that match length and time + -I, --ignore-times don\&'t exclude files that match length and time --size-only only use file size when determining if a file should be transferred --modify-window=NUM Timestamp window (seconds) for file match (default=0) -T --temp-dir=DIR create temporary files in directory DIR @@ -292,8 +292,8 @@ -z, --compress compress file data --exclude=PATTERN exclude files matching PATTERN --exclude-from=FILE exclude patterns listed in FILE - --include=PATTERN don\'t exclude files matching PATTERN - --include-from=FILE don\'t exclude patterns listed in FILE + --include=PATTERN don\&'t exclude files matching PATTERN + --include-from=FILE don\&'t exclude patterns listed in FILE --version print version number --daemon run as a rsync daemon --address bind to the specified address @@ -305,9 +305,13 @@ --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE --bwlimit=KBPS limit I/O bandwidth, KBytes per second + -f, --read-batch=FILE read batch file + -F, --write-batch write batch file -h, --help show this help screen -.DE + + +.fi .PP @@ -316,7 +320,7 @@ rsync uses the GNU long options package\&. Many of the command line options have two variants, one short and one long\&. These are shown below, separated by commas\&. Some options only have a long variant\&. -The \'=\' for options that take a parameter is optional; whitespace +The \&'=\&' for options that take a parameter is optional; whitespace can be used instead\&. .PP .IP "\fB-h, --help\fP" @@ -370,12 +374,17 @@ receiver are skipped\&. This option can be quite slow\&. .IP .IP "\fB-a, --archive\fP" -This is equivalent to -rlptgoD\&. It is a quick way -of saying you want recursion and want to preserve everything\&. +This is equivalent to -rlptgoD\&. It is a quick +way of saying you want recursion and want to preserve almost +everything\&. +.IP +Note however that \fB-a\fP \fBdoes not preserve hardlinks\fP, because +finding multiply-linked files is expensive\&. You must separately +specify \fB-H\fP\&. .IP .IP "\fB-r, --recursive\fP" This tells rsync to copy directories -recursively\&. If you don\'t specify this then rsync won\'t copy +recursively\&. If you don\&'t specify this then rsync won\&'t copy directories at all\&. .IP .IP "\fB-R, --relative\fP" @@ -386,10 +395,10 @@ example, if you used the command .IP -.DS +.nf rsync foo/bar/foo\&.c remote:/tmp/ -.DE +.fi .IP @@ -397,10 +406,10 @@ machine\&. If instead you used .IP -.DS +.nf rsync -R foo/bar/foo\&.c remote:/tmp/ -.DE +.fi .IP @@ -459,8 +468,11 @@ .IP .IP "\fB-W, --whole-file\fP" With this option the incremental rsync algorithm -is not used and the whole file is sent as-is instead\&. This may be -useful when using rsync with a local machine\&. +is not used and the whole file is sent as-is instead\&. The transfer may be +faster if this option is used when the bandwidth between the source and +target machines is higher than the bandwidth to disk (especially when the +"disk" is actually a networked file system)\&. This is the default when both +the source and target are on the local machine\&. .IP .IP "\fB-p, --perms\fP" This option causes rsync to update the remote @@ -490,7 +502,7 @@ option is not used, the optimization that excludes files that have not been modified cannot be effective; in other words, a missing -t or -a will cause the next transfer to behave as if it used -I, and all files will have -their checksums compared and show up in log messages even if they haven\'t +their checksums compared and show up in log messages even if they haven\&'t changed\&. .IP .IP "\fB-n, --dry-run\fP" @@ -501,8 +513,8 @@ Try to handle sparse files efficiently so they take up less space on the destination\&. .IP -NOTE: Don\'t use this option when the destination is a Solaris "tmpfs" -filesystem\&. It doesn\'t seem to handle seeks over null regions +NOTE: Don\&'t use this option when the destination is a Solaris "tmpfs" +filesystem\&. It doesn\&'t seem to handle seeks over null regions correctly and ends up corrupting the files\&. .IP .IP "\fB-x, --one-file-system\fP" @@ -521,20 +533,20 @@ .IP .IP "\fB--delete\fP" This tells rsync to delete any files on the receiving -side that aren\'t on the sending side\&. Files that are excluded from +side that aren\&'t on the sending side\&. Files that are excluded from transfer are excluded from being deleted unless you use --delete-excluded\&. .IP This option has no effect if directory recursion is not selected\&. .IP This option can be dangerous if used incorrectly! It is a very good idea to run first using the dry run option (-n) to see what files would be -deleted to make sure important files aren\'t listed\&. +deleted to make sure important files aren\&'t listed\&. .IP If the sending side detects any IO 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 causing a massive deletion of files on the -destination\&. +destination\&. You can override this with the --ignore-errors option\&. .IP .IP "\fB--delete-excluded\fP" In addition to deleting the files on the @@ -547,6 +559,10 @@ the receiving filesystem\&. If you want to delete after transferring then use the --delete-after switch\&. .IP +.IP "\fB--ignore-errors\fP" +Tells --delete to go ahead and delete files +even when there are IO errors\&. +.IP .IP "\fB--force\fP" This options tells rsync to delete directories even if they are not empty\&. This applies to both the --delete option and to @@ -569,9 +585,11 @@ You can also choose the remote shell program using the RSYNC_RSH environment variable\&. .IP +See also the --blocking-io option which is affected by this option\&. +.IP .IP "\fB--rsync-path=PATH\fP" Use this to specify the path to the copy of -rsync on the remote machine\&. Useful when it\'s not in your path\&. Note +rsync on the remote machine\&. Useful when it\&'s not in your path\&. Note that this is the full path to the binary, not just the directory that the binary is in\&. .IP @@ -590,7 +608,7 @@ This option is similar to the --exclude option, but instead it adds all exclude patterns listed in the file FILE to the exclude list\&. Blank lines in FILE and lines starting with -\';\' or \'#\' are ignored\&. +\&';\&' or \&'#\&' are ignored\&. .IP .IP "\fB--include=PATTERN\fP" This option tells rsync to not exclude the @@ -606,7 +624,7 @@ .IP .IP "\fB-C, --cvs-exclude\fP" This is a useful shorthand for excluding a -broad range of files that you often don\'t want to transfer between +broad range of files that you often don\&'t want to transfer between systems\&. It uses the same algorithm that CVS uses to determine if a file should be ignored\&. .IP @@ -651,21 +669,21 @@ the temporary files in the receiving directory\&. .IP .IP "\fB--compare-dest=DIR\fP" -This option instructs rsync to use DIR as an -additional directory to compare destination files against when doing -transfers\&. 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 (for example by moving directories -around and removing the old directory, although this requires also doing -the transfer with -I to avoid skipping files that haven\'t changed)\&. This -option increases the usefulness of --partial because partially transferred -files will remain in the new temporary destination until they have a chance -to be completed\&. If DIR is a relative path, it is relative to the -destination directory\&. +This option instructs rsync to use DIR on +the destination machine as an additional directory to compare destination +files against when doing transfers\&. 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 (for +example by moving directories around and removing the old directory, +although this requires also doing the transfer with -I to avoid skipping +files that haven\&'t changed)\&. This option increases the usefulness of +--partial because partially transferred files will remain in the new +temporary destination until they have a chance to be completed\&. If DIR is +a relative path, it is relative to the destination directory\&. .IP .IP "\fB-z, --compress\fP" With this option, rsync compresses any data from -the source file(s) which it sends to the destination machine\&. This +the files that it sends to the destination machine\&. This option is useful on slow links\&. The compression method used is the same method that gzip uses\&. .IP @@ -719,10 +737,11 @@ rather than the default port 873\&. .IP .IP "\fB--blocking-io\fP" -This specifies whether rsync will use blocking -IO when launching a remote shell transport\&. You may find this is -needed for some remote shells that can\'t handle the default -non-blocking IO\&. +This tells rsync to use blocking IO when launching +a remote shell transport\&. If -e or --rsh are not specified or are set to +the default "rsh", this defaults to blocking IO, otherwise it defaults to +non-blocking IO\&. You may find the --blocking-io option is needed for some +remote shells that can\&'t handle non-blocking IO\&. Ssh prefers blocking IO\&. .IP .IP "\fB--log-format=FORMAT\fP" This allows you to specify exactly what the @@ -772,6 +791,13 @@ result is an average transfer rate equalling the specified limit\&. A value of zero specifies no limit\&. .IP +.IP "\fB--read-batch\fP" +Apply a previously generated change batch\&. +.IP +.IP "\fB--write-batch\fP" +Generate a set of files that can be transferred +as a batch update\&. +.IP .PP .SH "EXCLUDE PATTERNS" .PP @@ -781,7 +807,7 @@ rsync builds a ordered list of include/exclude options as specified on the command line\&. When a filename is encountered, rsync checks the name against each exclude/include pattern in turn\&. The first matching -pattern is acted on\&. If it is an exclude pattern than that file is +pattern is acted on\&. If it is an exclude pattern, then that file is skipped\&. If it is an include pattern then that filename is not skipped\&. If no matching include/exclude pattern is found then the filename is not skipped\&. @@ -821,7 +847,7 @@ .IP o if the pattern contains a / (not counting a trailing /) then it is matched against the full filename, including any leading -directory\&. If the pattern doesn\'t contain a / then it is matched +directory\&. If the pattern doesn\&'t contain a / then it is matched only against the final component of the filename\&. Again, remember that the algorithm is applied recursively so "full filename" can actually be any portion of a path\&. @@ -843,12 +869,12 @@ The +/- rules are most useful in exclude lists, allowing you to have a single exclude list that contains both include and exclude options\&. .PP -If you end an exclude list with --exclude \'*\', note that since the +If you end an exclude list with --exclude \&'*\&', note that since the algorithm is applied recursively that unless you explicitly include parent directories of files you want to include then the algorithm will stop at the parent directories and never see the files below -them\&. To include all directories, use --include \'*/\' before the ---exclude \'*\'\&. +them\&. To include all directories, use --include \&'*/\&' before the +--exclude \&'*\&'\&. .PP Here are some exclude/include examples: .PP @@ -872,6 +898,32 @@ only foo/bar\&.c (the foo/ directory must be explicitly included or it would be excluded by the "*") .PP +.SH "BATCH MODE" +.PP +The following call generates 4 files that encapsulate the information +for synchronizing the contents of \fBtarget_dir\fP with the updates found in +\fBsrc_dir\fP +.PP +.RS +$ rsync -F [other rsync options here] \e +.br +/somewhere/src_dir /somewhere/target_dir +.RE +.PP +The generated files are labeled with a common timestamp: +.PP +.IP o +\fBrsync_argvs\&.\fP command-line arguments +.IP o +\fBrsync_flist\&.\fP rsync internal file metadata +.IP o +\fBrsync_csums\&.\fP rsync checksums +.IP o +\fBrsync_delta\&.\fP data blocks for file update & change +.PP +See \fBhttp://www\&.ils\&.unc\&.edu/i2dsi/unc_rsync+\&.html\fP for papers and technical +reports\&. +.PP .SH "DIAGNOSTICS" .PP rsync occasionally produces error messages that may seem a little @@ -884,12 +936,12 @@ remote shell like this: .PP -.DS +.nf rsh remotehost /bin/true > out\&.dat -.DE +.fi .PP @@ -901,6 +953,44 @@ scripts (such as \&.cshrc or \&.profile) that contain output statements for non-interactive logins\&. .PP +If you are having trouble debugging include and exclude patterns, then +try specifying the -vv option\&. At this level of verbosity rsync will +show why each individual file is included or excluded\&. +.PP +.SH "EXIT VALUES" +.PP +.IP "\fBRERR_SYNTAX 1\fP" +Syntax or usage error +.IP "\fBRERR_PROTOCOL 2\fP" +Protocol incompatibility +.IP "\fBRERR_FILESELECT 3\fP" +Errors selecting input/output files, dirs +.IP +.IP "\fBRERR_UNSUPPORTED 4\fP" +Requested action not supported: an attempt +was made to manipulate 64-bit files on a platform that cannot support +them; or an option was speciifed that is supported by the client and +not by the server\&. +.IP +.IP "\fBRERR_SOCKETIO 10\fP" +Error in socket IO +.IP "\fBRERR_FILEIO 11\fP" +Error in file IO +.IP "\fBRERR_STREAMIO 12\fP" +Error in rsync protocol data stream +.IP "\fBRERR_MESSAGEIO 13\fP" +Errors with program diagnostics +.IP "\fBRERR_IPC 14\fP" +Error in IPC code +.IP "\fBRERR_SIGNAL 20\fP" +Received SIGUSR1 or SIGINT +.IP "\fBRERR_WAITCHILD 21\fP" +Some error returned by waitpid() +.IP "\fBRERR_MALLOC 22\fP" +Error allocating core memory buffers +.IP "\fBRERR_TIMEOUT 30\fP" +Timeout in data send/receive +.PP .SH "ENVIRONMENT VARIABLES" .PP .IP @@ -930,7 +1020,7 @@ are used to determine the default username sent to a rsync server\&. .IP .IP "\fBHOME\fP" -The HOME environment variable is used to find the user\'s +The HOME environment variable is used to find the user\&'s default \&.cvsignore file\&. .IP .PP @@ -965,7 +1055,9 @@ COPYING for details\&. .PP A WEB site is available at -http://rsync\&.samba\&.org/ +http://rsync\&.samba\&.org/\&. The site +includes an FAQ-O-Matic which may cover questions unanswered by this +manual page\&. .PP The primary ftp site for rsync is ftp://rsync\&.samba\&.org/pub/rsync\&. @@ -978,7 +1070,7 @@ .SH "THANKS" .PP Thanks to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell -and David Bell for helpful suggestions and testing of rsync\&. I\'ve +and David Bell for helpful suggestions and testing of rsync\&. I\&'ve probably missed some people, my apologies if I have\&. .PP .SH "AUTHOR" @@ -986,4 +1078,6 @@ rsync was written by Andrew Tridgell and Paul Mackerras\&. They may be contacted via email at tridge@samba\&.org and Paul\&.Mackerras@cs\&.anu\&.edu\&.au +.PP +rsync is now also maintained by Martin Pool .PP diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsync.c rsync-2.5.0/rsync.c --- rsync-2.4.6/rsync.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/rsync.c Thu Nov 29 16:21:09 2001 @@ -67,21 +67,21 @@ if (!S_ISDIR(st.st_mode)) { if (robust_unlink(fname) == 0 || errno == ENOENT) return 0; - rprintf(FERROR,"unlink(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: unlink(%s) : %s\n", fname, strerror(errno)); return -1; } if (do_rmdir(fname) == 0 || errno == ENOENT) return 0; if (!force_delete || !recurse || (errno != ENOTEMPTY && errno != EEXIST)) { - rprintf(FERROR,"rmdir(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: rmdir(%s) : %s\n", fname, strerror(errno)); return -1; } /* now we do a recsursive delete on the directory ... */ d = opendir(fname); if (!d) { - rprintf(FERROR,"opendir(%s): %s\n", + rprintf(FERROR,"delete_file: opendir(%s): %s\n", fname,strerror(errno)); return -1; } @@ -91,7 +91,7 @@ if (strcmp(dname,".")==0 || strcmp(dname,"..")==0) continue; - slprintf(buf, sizeof(buf), "%s/%s", fname, dname); + snprintf(buf, sizeof(buf), "%s/%s", fname, dname); if (verbose > 0) rprintf(FINFO,"deleting %s\n", buf); if (delete_file(buf) != 0) { @@ -103,7 +103,7 @@ closedir(d); if (do_rmdir(fname) != 0) { - rprintf(FERROR,"rmdir(%s) : %s\n", fname, strerror(errno)); + rprintf(FERROR,"delete_file: rmdir(%s) : %s\n", fname, strerror(errno)); return -1; } @@ -226,6 +226,7 @@ void sig_int(void) { + rprintf(FINFO,"\nrsync.c:sig_int() called.\n"); exit_cleanup(RERR_SIGNAL); } diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsync.h rsync-2.5.0/rsync.h --- rsync-2.4.6/rsync.h Sat Aug 19 06:10:39 2000 +++ rsync-2.5.0/rsync.h Thu Nov 29 16:21:09 2001 @@ -1,6 +1,7 @@ /* - Copyright (C) Andrew Tridgell 1996 + Copyright (C) by Andrew Tridgell 1996, 2000 Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + #define False 0 #define True 1 @@ -47,7 +49,18 @@ #define SAME_TIME (1<<7) /* update this if you make incompatible changes */ -#define PROTOCOL_VERSION 24 +#define PROTOCOL_VERSION 25 + +/* We refuse to interoperate with versions that are not in this range. + * Note that we assume we'll work with later versions: the onus is on + * people writing them to make sure that they don't send us anything + * we won't understand. + * + * There are two possible explanations for the limit at thirty: either + * to allow new major-rev versions that do not interoperate with us, + * and (more likely) so that we can detect an attempt to connect rsync + * to a non-rsync server, which is unlikely to begin by sending a byte + * between 15 and 30. */ #define MIN_PROTOCOL_VERSION 15 #define MAX_PROTOCOL_VERSION 30 @@ -63,7 +76,10 @@ #define MPLEX_BASE 7 -enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3}; +/* Log values. I *think* what these mean is: FLOG goes to the server + * logfile; FERROR and FINFO try to end up on the client, with + * different levels of filtering. */ +enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 }; #include "errcode.h" @@ -77,12 +93,6 @@ #include -#ifdef HAVE_GETOPT_LONG -#include -#else -#include "lib/getopt.h" -#endif - #ifdef HAVE_UNISTD_H #include #endif @@ -258,9 +268,11 @@ #endif #if HAVE_SHORT_INO_T -#define INO_T uint32 +# define INO_T uint32 +#elif HAVE_INO_T +# define INO_T ino_t #else -#define INO_T ino_t +# define INO_T unsigned #endif #ifndef MIN @@ -344,7 +356,6 @@ }; struct exclude_struct { - char *orig; char *pattern; int regular_exp; int fnmatch_flags; @@ -376,9 +387,27 @@ } #include "byteorder.h" -#include "version.h" #include "proto.h" #include "lib/mdfour.h" +#include "lib/permstring.h" + +/* We have replacement versions of these if they're missing. */ +#ifndef HAVE_ASPRINTF +int asprintf(char **ptr, const char *format, ...); +#endif + +#ifndef HAVE_VASPRINTF +int vasprintf(char **ptr, const char *format, va_list ap); +#endif + +#if !defined(HAVE_VSNPRINTF) && !defined(HAVE_C99_VSNPRINTF) +int vsnprintf (char *str, size_t count, const char *fmt, va_list args); +#endif + +#if !defined(HAVE_SNPRINTF) && !defined(HAVE_C99_VSNPRINTF) +int snprintf(char *str,size_t count,const char *fmt,...); +#endif + #if !HAVE_STRERROR extern char *sys_errlist[]; @@ -476,6 +505,13 @@ # define NONBLOCK_FLAG FNDELAY #endif +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK 0x7f000001 +#endif + +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif #define IS_DEVICE(mode) (S_ISCHR(mode) || S_ISBLK(mode) || S_ISSOCK(mode) || S_ISFIFO(mode)) @@ -497,6 +533,14 @@ #endif ; +/* This is just like rprintf, but it also tries to print some + * representation of the error code. Normally errcode = errno. */ +void rsyserr(enum logcode, int, const char *, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 3, 4))) +#endif + ; + #ifdef REPLACE_INET_NTOA #define inet_ntoa rep_inet_ntoa #endif @@ -515,3 +559,21 @@ #endif #define exit_cleanup(code) _exit_cleanup(code, __FILE__, __LINE__) + + +extern int verbose; + +extern struct global_opts { + /** Network address family. **/ + int af_hint; +} global_opts; + + +#ifndef HAVE_INET_NTOP +const char * +inet_ntop(int af, const void *src, char *dst, size_t size); +#endif /* !HAVE_INET_NTOP */ + +#ifndef HAVE_INET_PTON +int isc_net_pton(int af, const char *src, void *dst); +#endif diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsync.yo rsync-2.5.0/rsync.yo --- rsync-2.4.6/rsync.yo Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/rsync.yo Thu Nov 29 16:21:09 2001 @@ -1,5 +1,5 @@ mailto(rsync-bugs@samba.org) -manpage(rsync)(1)(1 Mar 1999)()() +manpage(rsync)(1)(29 May 2001)()() manpagename(rsync)(faster, flexible replacement for rcp) manpagesynopsis() @@ -276,7 +276,11 @@ --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE --bwlimit=KBPS limit I/O bandwidth, KBytes per second + -f, --read-batch=FILE read batch file + -F, --write-batch write batch file -h, --help show this help screen + + ) manpageoptions() @@ -330,8 +334,13 @@ which already exist and have the same checksum and size on the receiver are skipped. This option can be quite slow. -dit(bf(-a, --archive)) This is equivalent to -rlptgoD. It is a quick way -of saying you want recursion and want to preserve everything. +dit(bf(-a, --archive)) This is equivalent to -rlptgoD. It is a quick +way of saying you want recursion and want to preserve almost +everything. + +Note however that bf(-a) bf(does not preserve hardlinks), because +finding multiply-linked files is expensive. You must separately +specify bf(-H). dit(bf(-r, --recursive)) This tells rsync to copy directories recursively. If you don't specify this then rsync won't copy @@ -395,8 +404,11 @@ This option can be quite slow, so only use it if you need it. dit(bf(-W, --whole-file)) With this option the incremental rsync algorithm -is not used and the whole file is sent as-is instead. This may be -useful when using rsync with a local machine. +is not used and the whole file is sent as-is instead. The transfer may be +faster if this option is used when the bandwidth between the source and +target machines is higher than the bandwidth to disk (especially when the +"disk" is actually a networked file system). This is the default when both +the source and target are on the local machine. dit(bf(-p, --perms)) This option causes rsync to update the remote permissions to be the same as the local permissions. @@ -459,7 +471,7 @@ files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the -destination. +destination. You can override this with the --ignore-errors option. dit(bf(--delete-excluded)) In addition to deleting the files on the receiving side that are not on the sending side, this tells rsync to also @@ -470,6 +482,9 @@ the receiving filesystem. If you want to delete after transferring then use the --delete-after switch. +dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files +even when there are IO errors. + dit(bf(--force)) This options tells rsync to delete directories even if they are not empty. This applies to both the --delete option and to cases where rsync tries to copy a normal file but the destination @@ -489,6 +504,8 @@ You can also choose the remote shell program using the RSYNC_RSH environment variable. +See also the --blocking-io option which is affected by this option. + dit(bf(--rsync-path=PATH)) Use this to specify the path to the copy of rsync on the remote machine. Useful when it's not in your path. Note that this is the full path to the binary, not just the directory that @@ -560,20 +577,20 @@ transferred on the receiving side. The default behavior is to create the temporary files in the receiving directory. -dit(bf(--compare-dest=DIR)) This option instructs rsync to use DIR as an -additional directory to compare destination files against when doing -transfers. 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 (for example by moving directories -around and removing the old directory, although this requires also doing -the transfer with -I to avoid skipping files that haven't changed). This -option increases the usefulness of --partial because partially transferred -files will remain in the new temporary destination until they have a chance -to be completed. If DIR is a relative path, it is relative to the -destination directory. +dit(bf(--compare-dest=DIR)) This option instructs rsync to use DIR on +the destination machine as an additional directory to compare destination +files against when doing transfers. 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 (for +example by moving directories around and removing the old directory, +although this requires also doing the transfer with -I to avoid skipping +files that haven't changed). This option increases the usefulness of +--partial because partially transferred files will remain in the new +temporary destination until they have a chance to be completed. If DIR is +a relative path, it is relative to the destination directory. dit(bf(-z, --compress)) With this option, rsync compresses any data from -the source file(s) which it sends to the destination machine. This +the files that it sends to the destination machine. This option is useful on slow links. The compression method used is the same method that gzip uses. @@ -620,10 +637,11 @@ dit(bf(--port=PORT)) This specifies an alternate TCP port number to use rather than the default port 873. -dit(bf(--blocking-io)) This specifies whether rsync will use blocking -IO when launching a remote shell transport. You may find this is -needed for some remote shells that can't handle the default -non-blocking IO. +dit(bf(--blocking-io)) This tells rsync to use blocking IO when launching +a remote shell transport. If -e or --rsh are not specified or are set to +the default "rsh", this defaults to blocking IO, otherwise it defaults to +non-blocking IO. You may find the --blocking-io option is needed for some +remote shells that can't handle non-blocking IO. Ssh prefers blocking IO. dit(bf(--log-format=FORMAT)) This allows you to specify exactly what the rsync client logs to stdout on a per-file basis. The log format is @@ -666,6 +684,11 @@ result is an average transfer rate equalling the specified limit. A value of zero specifies no limit. +dit(bf(--read-batch)) Apply a previously generated change batch. + +dit(bf(--write-batch)) Generate a set of files that can be transferred +as a batch update. + enddit() manpagesection(EXCLUDE PATTERNS) @@ -676,7 +699,7 @@ rsync builds a ordered list of include/exclude options as specified on the command line. When a filename is encountered, rsync checks the name against each exclude/include pattern in turn. The first matching -pattern is acted on. If it is an exclude pattern than that file is +pattern is acted on. If it is an exclude pattern, then that file is skipped. If it is an include pattern then that filename is not skipped. If no matching include/exclude pattern is found then the filename is not skipped. @@ -756,6 +779,29 @@ it would be excluded by the "*") ) +manpagesection(BATCH MODE) + +The following call generates 4 files that encapsulate the information +for synchronizing the contents of bf(target_dir) with the updates found in +bf(src_dir) + +quote( +$ rsync -F [other rsync options here] \nl() + /somewhere/src_dir /somewhere/target_dir +) + +The generated files are labeled with a common timestamp: + +itemize( +it() bf(rsync_argvs.) command-line arguments +it() bf(rsync_flist.) rsync internal file metadata +it() bf(rsync_csums.) rsync checksums +it() bf(rsync_delta.) data blocks for file update & change +) + +See bf(http://www.ils.unc.edu/i2dsi/unc_rsync+.html) for papers and technical +reports. + manpagesection(DIAGNOSTICS) rsync occasionally produces error messages that may seem a little @@ -779,6 +825,33 @@ scripts (such as .cshrc or .profile) that contain output statements for non-interactive logins. +If you are having trouble debugging include and exclude patterns, then +try specifying the -vv option. At this level of verbosity rsync will +show why each individual file is included or excluded. + +manpagesection(EXIT VALUES) + +startdit() +dit(bf(RERR_SYNTAX 1)) Syntax or usage error +dit(bf(RERR_PROTOCOL 2)) Protocol incompatibility +dit(bf(RERR_FILESELECT 3)) Errors selecting input/output files, dirs + +dit(bf(RERR_UNSUPPORTED 4)) Requested action not supported: an attempt +was made to manipulate 64-bit files on a platform that cannot support +them; or an option was speciifed that is supported by the client and +not by the server. + +dit(bf(RERR_SOCKETIO 10)) Error in socket IO +dit(bf(RERR_FILEIO 11)) Error in file IO +dit(bf(RERR_STREAMIO 12)) Error in rsync protocol data stream +dit(bf(RERR_MESSAGEIO 13)) Errors with program diagnostics +dit(bf(RERR_IPC 14)) Error in IPC code +dit(bf(RERR_SIGNAL 20)) Received SIGUSR1 or SIGINT +dit(bf(RERR_WAITCHILD 21)) Some error returned by waitpid() +dit(bf(RERR_MALLOC 22)) Error allocating core memory buffers +dit(bf(RERR_TIMEOUT 30)) Timeout in data send/receive +enddit() + manpagesection(ENVIRONMENT VARIABLES) startdit() @@ -839,7 +912,9 @@ COPYING for details. A WEB site is available at -url(http://rsync.samba.org/)(http://rsync.samba.org/) +url(http://rsync.samba.org/)(http://rsync.samba.org/). The site +includes an FAQ-O-Matic which may cover questions unanswered by this +manual page. The primary ftp site for rsync is url(ftp://rsync.samba.org/pub/rsync)(ftp://rsync.samba.org/pub/rsync). @@ -861,4 +936,7 @@ rsync was written by Andrew Tridgell and Paul Mackerras. They may be contacted via email at tridge@samba.org and Paul.Mackerras@cs.anu.edu.au + +rsync is now also maintained by Martin Pool + diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsync3.txt rsync-2.5.0/rsync3.txt --- rsync-2.4.6/rsync3.txt Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/rsync3.txt Wed Sep 12 07:35:39 2001 @@ -0,0 +1,469 @@ +-*- indented-text -*- + +Notes towards a new version of rsync +Martin Pool , September 2001. + + +Good things about the current implementation: + + - Widely known and adopted. + + - Fast/efficient, especially for moderately small sets of files over + slow links (transoceanic or modem.) + + - Fairly reliable. + + - The choice of runnning over a plain TCP socket or tunneling over + ssh. + + - rsync operations are idempotent: you can always run the same + command twice to make sure it worked properly without any fear. + (Are there any exceptions?) + + - Small changes to files cause small deltas. + + - There is a way to evolve the protocol to some extent. + + - rdiff and rsync --write-batch allow generation of standalone patch + sets. rsync+ is pretty cheesy, though. xdelta seems cleaner. + + - Process triangle is creative, but seems to provoke OS bugs. + + - "Morning-after property": you don't need to know anything on the + local machine about the state of the remote machine, or about + transfers that have been done in the past. + + - You can easily push or pull simply by switching the order of + files. + + - The "modules" system has some neat features compared to + e.g. Apache's per-directory configuration. In particular, because + you can set a userid and chroot directory, there is strong + protection between different modules. I haven't seen any calls + for a more flexible system. + + +Bad things about the current implementation: + + - Persistent and hard-to-diagnose hang bugs remain + + - Protocol is sketchily documented, tied to this implementation, and + hard to modify/extend + + - Both the program and the protocol assume a single non-interactive + one-way transfer + + - A list of all files are held in memory for the entire transfer, + which cripples scalability to large file trees + + - Opening a new socket for every operation causes problems, + especially when running over SSH with password authentication. + + - Renamed files are not handled: the old file is removed, and the + new file created from scratch. + + - The versioning approach assumes that future versions of the + program know about all previous versions, and will do the right + thing. + + - People always get confused about ':' vs '::' + + - Error messages can be cryptic. + + - Default behaviour is not intuitive: in too many cases rsync will + happily do nothing. Perhaps -a should be the default? + + - People get confused by trailing slashes, though it's hard to think + of another reasonable way to make this necessary distinction + between a directory and its contents. + + +Protocol philosophy: + + *The* big difference between protocols like HTTP, FTP, and NFS is + that their fundamental operations are "read this file", "delete + this file", and "make this directory", whereas rsync is "make this + directory like this one". + + +Questionable features: + + These are neat, but not necessarily clean or worth preserving. + + - The remote rsync can be wrapped by some other program, such as in + tridge's rsync-mail scripts. The general feature of sending and + retrieving mail over rsync is good, but this is perhaps not the + right way to implement it. + + +Desirable features: + + These don't really require architectural changes; they're just + something to keep in mind. + + - Synchronize ACLs and extended attributes + + - Anonymous servers should be efficient + + - Code should be portable to non-UNIX systems + + - Should be possible to document the protocol in RFC form + + - --dry-run option + + - IPv6 support. Pretty straightforward. + + - Allow the basis and destination files to be different. For + example, you could use this when you have a CD-ROM and want to + download an updated image onto a hard drive. + + - Efficiently interrupt and restart a transfer. We can write a + checkpoint file that says where we're up to in the filesystem. + Alternatively, as long as transfers are idempotent, we can just + restart the whole thing. [NFSv4] + + - Scripting support. + + - Propagate atimes and do not modify them. This is very ugly on + Unix. It might be better to try to add O_NOATIME to kernels, and + call that. + + - Unicode. Probably just use UTF-8 for everything. + + - Open authentication system. Can we use PAM? Is SASL an adequate + mapping of PAM to the network, or useful in some other way? + + - Resume interrupted transfers without the --partial flag. We need + to leave the temporary file behind, and then know to use it. This + leaves a risk of large temporary files accumulating, which is not + good. Perhaps it should be off by default. + + - tcpwrappers support. Should be trivial; can already be done + through tcpd or inetd. + + - Socks support built in. It's not clear this is any better than + just linking against the socks library, though. + + - When run over SSH, invoke with predictable command-line arguments, + so that people can restrict what commands sshd will run. (Is this + really required?) + + - Comparison mode: give a list of which files are new, gone, or + different. Set return code depending on whether anything has + changed. + + - Internationalized messages (gettext?) + + - Optionally use real regexps rather than globs? + + - Show overall progress. Pretty hard to do, especially if we insist + on not scanning the directory tree up front. + + +Regression testing: + + - Support automatic testing. + + - Have hard internal timeouts against hangs. + + - Be deterministic. + + - Measure performance. + + +Hard links: + + At the moment, we can recreate hard links, but it's a bit + inefficient: it depends on holding a list of all files in the tree. + Every time we see a file with a linkcount >1, we need to search for + another known name that has the same (fsid,inum) tuple. We could do + that more efficiently by keeping a list of only files with + linkcount>1, and removing files from that list as all their names + become known. + + +Command-line options: + + We have rather a lot at the moment. We might get more if the tool + becomes more flexible. Do we need a .rc or configuration file? + That wouldn't really fit with its pattern of use: cp and tar don't + have them, though ssh does. + + +Scripting issues: + + - Perhaps support multiple scripting languages: candidates include + Perl, Python, Tcl, Scheme (guile?), sh, ... + + - Simply running a subprocess and looking at its stdout/exit code + might be sufficient, though it could also be pretty slow if it's + called often. + + - There are security issues about running remote code, at least if + it's not running in the users own account. So we can either + disallow it, or use some kind of sandbox system. + + - Python is a good language, but the syntax is not so good for + giving small fragments on the command line. + + - Tcl is broken Lisp. + + - Lots of sysadmins know Perl, though Perl can give some bizarre or + confusing errors. The built in stat operators and regexps might + be useful. + + - Sadly probably not enough people know Scheme. + + - sh is hard to embed. + + +Scripting hooks: + + - Whether to transfer a file + + - What basis file to use + + - Logging + + - Whether to allow transfers (for public servers) + + - Authentication + + - Locking + + - Cache + + - Generating backup path/name. + + - Post-processing of backups, e.g. to do compression. + + - After transfer, before replacement: so that we can spit out a diff + of what was changed, or kick off some kind of reconciliation + process. + + +VFS: + + Rather than talking straight to the filesystem, rsyncd talks through + an internal API. Samba has one. Is it useful? + + - Could be a tidy way to implement cached signatures. + + - Keep files compressed on disk? + + +Interactive interface: + + - Something like ncFTP, or integration into GNOME-vfs. Probably + hold a single socket connection open. + + - Can either call us as a separate process, or as a library. + + - The standalone process needs to produce output in a form easily + digestible by a calling program, like the --emacs feature some + have. Same goes for output: rpm outputs a series of hash symbols, + which are easier for a GUI to handle than "\r30% complete" + strings. + + - Yow! emacs support. (You could probably build that already, of + course.) I'd like to be able to write a simple script on a remote + machine that rsyncs it to my workstation, edits it there, then + pushes it back up. + + +Pie-in-the-sky features: + + These might have a severe impact on the protocol, and are not + clearly in our core requirements. It looks like in many of them + having scripting hooks will allow us + + - Transport over UDP multicast. The hard part is handling multiple + destinations which have different basis files. We can look at + multicast-TFTP for inspiration. + + - Conflict resolution. Possibly general scripting support will be + sufficient. + + - Integrate with locking. It's hard to see a good general solution, + because Unix systems have several locking mechanisms, and grabbing + the lock from programs that don't expect it could cause deadlocks, + timeouts, or other problems. Scripting support might help. + + - Replicate in place, rather than to a temporary file. This is + dangerous in the case of interruption, and it also means that the + delta can't refer to blocks that have already been overwritten. + On the other hand we could semi-trivially do this at first by + simply generating a delta with no copy instructions. + + - Replicate block devices. Most of the difficulties here are to do + with replication in place, though on some systems we will also + have to do I/O on block boundaries. + + - Peer to peer features. Flavour of the year. Can we think about + ways for clients to smoothly and voluntarily become servers for + content they receive? + + - Imagine a situation where the destination has a much faster link + to the cloud than the source. In this case, Mojo Nation downloads + interleaved blocks from several slower servers. The general + situation might be a way for a master rsync process to farm out + tasks to several subjobs. In this particular case they'd need + different sockets. This might be related to multicast. + + +Unlikely features: + + - Allow remote source and destination. If this can be cleanly + designed into the protocol, perhaps with the remote machine acting + as a kind of echo, then it's good. It's uncommon enough that we + don't want to shape the whole protocol around it, though. + + In fact, in a triangle of machines there are two possibilities: + all traffic passes from remote1 to remote2 through local, or local + just sets up the transfer and then remote1 talks to remote2. FTP + supports the second but it's not clearly good. There are some + security problems with being able to instruct one machine to open + a connection to another. + + +In favour of evolving the protocol: + + - Keeping compatibility with existing rsync servers will help with + adoption and testing. + + - We should at the very least be able to fall back to the new + protocol. + + - Error handling is not so good. + + +In favour of using a new protocol: + + - Maintaining compatibility might soak up development time that + would better go into improving a new protocol. + + - If we start from scratch, it can be documented as we go, and we + can avoid design decisions that make the protocol complex or + implementation-bound. + + +Error handling: + + - Errors should come back reliably, and be clearly associated with + the particular file that caused the problem. + + - Some errors ought to cause the whole transfer to abort; some are + just warnings. If any errors have occurred, then rsync ought to + return an error. + + +Concurrency: + + - We want to keep the CPU, filesystem, and network as full as + possible as much of the time as possible. + + - We can do nonblocking network IO, but not so for disk. + + - It makes sense to on the destination be generating signatures and + applying patches at the same time. + + - Can structure this with nonblocking, threads, separate processes, + etc. + + +Uses: + + - Mirroring software distributions: + + - Synchronizing laptop and desktop + + - NFS filesystem migration/replication. See + http://www.ietf.org/proceedings/00jul/00july-133.htm#P24510_1276764 + + - Sync with PDA + + - Network backup systems + + - CVS filemover + + +Conflict resolution: + + - Requires application-specific knowledge. We want to provide + policy, rather than mechanism. + + - Possibly allowing two-way migration across a single connection + would be useful. + + +Moved files: + + - There's no trivial way to detect renamed files, especially if they + move between directories. + + - If we had a picture of the remote directory from last time on + either machine, then the inode numbers might give us a hint about + files which may have been renamed. + + - Files that are renamed and not modified can be detected by + examining the directory listing, looking for files with the same + size/date as the origin. + + +Filesystem migration: + + NFSv4 probably wants to migrate file locks, but that's not really + our problem. + + +Atomic updates: + + The NFSv4 working group wants atomic migration. Most of the + responsibility for this lies on the NFS server or OS. + + If migrating a whole tree, then we could do a nearly-atomic rename + at the end. This ties in to having separate basis and destination + files. + + There's no way in Unix to replace a whole set of files atomically. + However, if we get them all onto the destination machine and then do + the updates quickly it would greatly reduce the window. + + +Scalability: + + We should aim to work well on machines in use in a year or two. + That probably means transfers of many millions of files in one + batch, and gigabytes or terabytes of data. + + For argument's sake: at the low end, we want to sync ten files for a + total of 10kb across a 1kB/s link. At the high end, we want to sync + 1e9 files for 1TB of data across a 1GB/s link. + + On the whole CPU usage is not normally a limiting factor, if only + because running over SSH burns a lot of cycles on encryption. + + Perhaps have resource throttling without relying on rlimit. + + +Streaming: + + A big attraction of rsync is that there are few round-trip delays: + basically only one to get started, and then everything is + pipelined. This is a problem with FTP, and NFS (at least up to + v3). NFSv4 can pipeline operations, but building on that is + probably a bit complicated. + + +Related work: + + - mirror.pl http://freshmeat.net/project/mirror/ + + - ProFTPd + + - Apache + + - http://freshmeat.net/search/?site=Freshmeat&q=mirror§ion=projects + + - BitTorrent -- p2p mirroring + http://bitconjurer.org/BitTorrent/ \ No newline at end of file diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsyncd.conf.5 rsync-2.5.0/rsyncd.conf.5 --- rsync-2.4.6/rsyncd.conf.5 Sat Aug 19 06:10:39 2000 +++ rsync-2.5.0/rsyncd.conf.5 Thu Nov 29 16:21:09 2001 @@ -44,7 +44,12 @@ .SH "LAUNCHING THE RSYNC DAEMON" .PP The rsync daemon is launched by specifying the --daemon option to -rsync\&. The daemon must run with root privileges\&. +rsync\&. +.PP +The daemon must run with root privileges if you wish to use chroot, to +bind to a port numbered under 1024 (as is the default 873), or to set +file ownership\&. Otherwise, it must just have permission to read and +write the appropriate data, log, and lock files\&. .PP You can launch it either via inetd or as a stand-alone daemon\&. If run as a daemon then just run the command "rsync --daemon" from a suitable @@ -137,7 +142,7 @@ the advantage of extra protection against possible implementation security holes, but it has the disadvantages of requiring super-user privileges and of not being able to follow symbolic links outside of the new root path -when reading\&. For writing when "use chroot" is false, for security reasons +when reading\&. When "use chroot" is false, for security reasons symlinks may only be relative paths pointing to other files within the root path, and leading slashes are removed from absolute paths\&. The default for "use chroot" is true\&. @@ -172,13 +177,14 @@ The "uid" option specifies the user name or user id that file transfers to and from that module should take place as when the daemon was run as root\&. In combination with the "gid" option this determines what -file permissions are available\&. The default is the user "nobody"\&. +file permissions are available\&. The default is uid -2, which is normally +the user "nobody"\&. .IP .IP "\fBgid\fP" The "gid" option specifies the group name or group id that file transfers to and from that module should take place as when the daemon -was run as root\&. This complements the "uid" option\&. The default is the -group "nobody"\&. +was run as root\&. This complements the "uid" option\&. The default is gid -2, +which is normally the group "nobody"\&. .IP .IP "\fBexclude\fP" The "exclude" option allows you to specify a space @@ -221,13 +227,14 @@ equivalent file\&. .IP .IP "\fBauth users\fP" -The "auth users" option specifies a comma -and space separated list of usernames that will be allowed to connect -to this module\&. The usernames do not need to exist on the local -system\&. If "auth users" is set then the client will be challenged to -supply a username and password to connect to the module\&. A challenge -response authentication protocol is used for this exchange\&. The plain -text usernames are passwords are stored in the file specified by the +The "auth users" option specifies a comma and +space separated list of usernames that will be allowed to connect to +this module\&. The usernames do not need to exist on the local +system\&. The usernames may also contain shell wildcard characters\&. If +"auth users" is set then the client will be challenged to supply a +username and password to connect to the module\&. A challenge response +authentication protocol is used for this exchange\&. The plain text +usernames are passwords are stored in the file specified by the "secrets file" option\&. The default is for all users to be able to connect without a password (this is called "anonymous rsync")\&. .IP @@ -243,7 +250,8 @@ you may find that passwords longer than 8 characters don\'t work\&. .IP There is no default for the "secrets file" option, you must choose a name -(such as \f(CW/etc/rsyncd\&.secrets\fP)\&. +(such as \f(CW/etc/rsyncd\&.secrets\fP)\&. The file must normally not be readable +by "other"; see "strict modes"\&. .IP .IP "\fBstrict modes\fP" The "strict modes" option determines whether or not @@ -394,10 +402,10 @@ of the patterns will not be compressed during transfer\&. .IP The default setting is -.DS +.nf *\&.gz *\&.tgz *\&.zip *\&.z *\&.rpm *\&.deb *\&.iso *\&.bz2 *\&.tbz -.DE +.fi .IP @@ -425,14 +433,14 @@ \f(CW/home/ftp\fP would be: .PP -.DS +.nf [ftp] path = /home/ftp comment = ftp export area -.DE +.fi .PP @@ -448,10 +456,10 @@ .br syslog facility = local5 .br -pid file = /etc/rsyncd\&.pid +pid file = /var/run/rsyncd\&.pid .PP -.DS +.nf [ftp] path = /var/ftp/pub @@ -475,7 +483,7 @@ auth users = tridge, susan secrets file = /etc/rsyncd\&.secrets -.DE +.fi .PP diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsyncd.conf.yo rsync-2.5.0/rsyncd.conf.yo --- rsync-2.4.6/rsyncd.conf.yo Sat Aug 19 06:10:39 2000 +++ rsync-2.5.0/rsyncd.conf.yo Thu Nov 29 16:21:09 2001 @@ -44,7 +44,12 @@ manpagesection(LAUNCHING THE RSYNC DAEMON) The rsync daemon is launched by specifying the --daemon option to -rsync. The daemon must run with root privileges. +rsync. + +The daemon must run with root privileges if you wish to use chroot, to +bind to a port numbered under 1024 (as is the default 873), or to set +file ownership. Otherwise, it must just have permission to read and +write the appropriate data, log, and lock files. You can launch it either via inetd or as a stand-alone daemon. If run as a daemon then just run the command "rsync --daemon" from a suitable @@ -129,7 +134,7 @@ the advantage of extra protection against possible implementation security holes, but it has the disadvantages of requiring super-user privileges and of not being able to follow symbolic links outside of the new root path -when reading. For writing when "use chroot" is false, for security reasons +when reading. When "use chroot" is false, for security reasons symlinks may only be relative paths pointing to other files within the root path, and leading slashes are removed from absolute paths. The default for "use chroot" is true. @@ -159,12 +164,13 @@ dit(bf(uid)) The "uid" option specifies the user name or user id that file transfers to and from that module should take place as when the daemon was run as root. In combination with the "gid" option this determines what -file permissions are available. The default is the user "nobody". +file permissions are available. The default is uid -2, which is normally +the user "nobody". dit(bf(gid)) The "gid" option specifies the group name or group id that file transfers to and from that module should take place as when the daemon -was run as root. This complements the "uid" option. The default is the -group "nobody". +was run as root. This complements the "uid" option. The default is gid -2, +which is normally the group "nobody". dit(bf(exclude)) The "exclude" option allows you to specify a space separated list of patterns to add to the exclude list. This is @@ -202,13 +208,14 @@ equivalent to the client specifying the --include-from option with a equivalent file. -dit(bf(auth users)) The "auth users" option specifies a comma -and space separated list of usernames that will be allowed to connect -to this module. The usernames do not need to exist on the local -system. If "auth users" is set then the client will be challenged to -supply a username and password to connect to the module. A challenge -response authentication protocol is used for this exchange. The plain -text usernames are passwords are stored in the file specified by the +dit(bf(auth users)) The "auth users" option specifies a comma and +space separated list of usernames that will be allowed to connect to +this module. The usernames do not need to exist on the local +system. The usernames may also contain shell wildcard characters. If +"auth users" is set then the client will be challenged to supply a +username and password to connect to the module. A challenge response +authentication protocol is used for this exchange. The plain text +usernames are passwords are stored in the file specified by the "secrets file" option. The default is for all users to be able to connect without a password (this is called "anonymous rsync"). @@ -223,7 +230,8 @@ you may find that passwords longer than 8 characters don't work. There is no default for the "secrets file" option, you must choose a name -(such as tt(/etc/rsyncd.secrets)). +(such as tt(/etc/rsyncd.secrets)). The file must normally not be readable +by "other"; see "strict modes". dit(bf(strict modes)) The "strict modes" option determines whether or not the permissions on the secrets file will be checked. If "strict modes" is @@ -390,7 +398,7 @@ use chroot = no nl() max connections = 4 nl() syslog facility = local5 nl() -pid file = /etc/rsyncd.pid +pid file = /var/run/rsyncd.pid verb([ftp] path = /var/ftp/pub diff -u -r --new-file --exclude=CVS rsync-2.4.6/rsyncsh.txt rsync-2.5.0/rsyncsh.txt --- rsync-2.4.6/rsyncsh.txt Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/rsyncsh.txt Thu Aug 30 00:11:46 2001 @@ -0,0 +1,26 @@ +rsyncsh +Copyright (C) 2001 by Martin Pool + +This is a quick hack to build an interactive shell around rsync, the +same way we have the ftp, lftp and ncftp programs for the FTP +protocol. The key application for this is connecting to a public +rsync server, such as rsync.kernel.org, change down through and list +directories, and finally pull down the file you want. + +rsync is somewhat ill-at-ease as an interactive operation, since every +network connection is used to carry out exactly one operation. rsync +kind of "forks across the network" passing the options and filenames +to operate upon, and the connection is closed when the transfer is +complete. (This might be fixed in the future, either by adapting the +current protocol to allow chained operations over a single socket, or +by writing a new protocol that better supports interactive use.) + +So, rsyncsh runs a new rsync command and opens a new socket for every +(network-based) command you type. + +This has two consequences. Firstly, there is more command latency +than is really desirable. More seriously, if the connection cannot be +done automatically, because for example it uses SSH with a password, +then you will need to enter the password every time. We might even +fix this in the future, though, by having a way to automatically feed +the password to SSH if it's entered once. diff -u -r --new-file --exclude=CVS rsync-2.4.6/runtests.sh rsync-2.5.0/runtests.sh --- rsync-2.4.6/runtests.sh Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/runtests.sh Fri Sep 7 00:57:10 2001 @@ -0,0 +1,220 @@ +#! /bin/sh + +# Copyright (C) 2001 by Martin Pool + +# 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., 675 Mass Ave, Cambridge, MA 02139, 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. + +# 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 created in the build directory to +# hold working files. + +# 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. + +# 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) + + + +# 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' + +if [ -n "$loglevel" ] && [ "$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 + +echo "============================================================" +echo "$0 running in `pwd`" +echo " rsync_bin=$rsync_bin" +echo " srcdir=$srcdir" + +if test ! -f $rsync_bin +then + echo "rsync_bin $rsync_bin is not a file" >&2 + exit 2 +fi + +if test ! -d $srcdir +then + echo "srcdir $srcdir is not a directory" >&2 + exit 2 +fi + +RSYNC="$rsync_bin" + +export rsync_bin RSYNC + +skipped=0 +missing=0 +passed=0 +failed=0 + +scratchdir=./testtmp +[ -d "$scratchdir" ] && rm -r "$scratchdir" +mkdir "$scratchdir" +scratchdir=`cd $scratchdir && pwd` +echo " scratchdir=$scratchdir" + +suitedir="$srcdir/testsuite" + +export scratchdir suitedir + +if [ "x$whichtests" = x ] +then + whichtests="*.test" +fi + +for testscript in $suitedir/$whichtests +do + testbase=`echo $testscript | sed 's!.*/!!'` + + echo "----- $testbase starting" + + if sh $RUNSHFLAGS "$testscript" + then + echo "----- $testbase completed succesfully" + passed=`expr $passed + 1` + else + case $? in + 77) + echo "----- $testbase skipped" + skipped=`expr $skipped + 1` + ;; + *) + echo "----- $testbase failed!" + failed=`expr $failed + 1` + if [ "x$nopersist" = "xyes" ] + then + exit 1 + fi + esac + fi +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" +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` +echo "overall result is $result" +exit $result diff -u -r --new-file --exclude=CVS rsync-2.4.6/sender.c rsync-2.5.0/sender.c --- rsync-2.4.6/sender.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/sender.c Thu Nov 29 16:21:09 2001 @@ -83,9 +83,9 @@ void send_files(struct file_list *flist,int f_out,int f_in) { - int fd; + int fd = -1; struct sum_struct *s; - struct map_struct *buf; + struct map_struct *buf = NULL; STRUCT_STAT st; char fname[MAXPATHLEN]; int i; @@ -93,6 +93,13 @@ int phase = 0; extern struct stats stats; struct stats initial_stats; + extern int write_batch; /* dw */ + extern int read_batch; /* dw */ + int checksums_match; /* dw */ + int buff_len; /* dw */ + char buff[CHUNK_SIZE]; /* dw */ + int j; /* dw */ + int done; /* dw */ if (verbose > 2) rprintf(FINFO,"send_files starting\n"); @@ -152,61 +159,113 @@ initial_stats = stats; s = receive_sums(f_in); + if (write_batch) /* dw */ + write_batch_csum_info(&i,flist->count,s); if (!s) { io_error = 1; rprintf(FERROR,"receive_sums failed\n"); return; } - fd = do_open(fname, O_RDONLY, 0); - if (fd == -1) { - io_error = 1; - rprintf(FERROR,"send_files failed to open %s: %s\n", - fname,strerror(errno)); - free_sums(s); - continue; - } + if (!read_batch) { + fd = do_open(fname, O_RDONLY, 0); + if (fd == -1) { + io_error = 1; + rprintf(FERROR,"send_files failed to open %s: %s\n", + fname,strerror(errno)); + free_sums(s); + continue; + } - /* map the local file */ - if (do_fstat(fd,&st) != 0) { - io_error = 1; - rprintf(FERROR,"fstat failed : %s\n",strerror(errno)); - free_sums(s); - close(fd); - return; - } + /* map the local file */ + if (do_fstat(fd,&st) != 0) { + io_error = 1; + rprintf(FERROR,"fstat failed : %s\n",strerror(errno)); + free_sums(s); + close(fd); + return; + } - if (st.st_size > 0) { - buf = map_file(fd,st.st_size); - } else { - buf = NULL; - } + if (st.st_size > 0) { + buf = map_file(fd,st.st_size); + } else { + buf = NULL; + } - if (verbose > 2) - rprintf(FINFO,"send_files mapped %s of size %.0f\n", - fname,(double)st.st_size); + if (verbose > 2) + rprintf(FINFO,"send_files mapped %s of size %.0f\n", + fname,(double)st.st_size); - write_int(f_out,i); + write_int(f_out,i); - write_int(f_out,s->count); - write_int(f_out,s->n); - write_int(f_out,s->remainder); + if (write_batch) + write_batch_delta_file((char *)&i,sizeof(i)); + + write_int(f_out,s->count); + write_int(f_out,s->n); + write_int(f_out,s->remainder); + } if (verbose > 2) - rprintf(FINFO,"calling match_sums %s\n",fname); + if (!read_batch) + rprintf(FINFO,"calling match_sums %s\n",fname); if (!am_server) { log_transfer(file, fname+offset); } set_compression(fname); - - match_sums(f_out,s,buf,st.st_size); - log_send(file, &initial_stats); - - if (buf) unmap_file(buf); - close(fd); + if (read_batch) { /* dw */ + /* read checksums originally computed on sender side */ + read_batch_csum_info(i, s, &checksums_match); + if (checksums_match) { + read_batch_delta_file( (char *) &j, sizeof(int) ); + if (j != i) { /* if flist index entries don't match*/ + rprintf(FINFO,"index mismatch in send_files\n"); + rprintf(FINFO,"read index = %d flist ndx = %d\n",j,i); + close_batch_delta_file(); + close_batch_csums_file(); + exit_cleanup(1); + } + else { + write_int(f_out,j); + write_int(f_out,s->count); + write_int(f_out,s->n); + write_int(f_out,s->remainder); + done=0; + while (!done) { + read_batch_delta_file( (char *) &buff_len, sizeof(int) ); + write_int(f_out,buff_len); + if (buff_len == 0) { + done = 1; + } + else { + if (buff_len > 0) { + read_batch_delta_file(buff, buff_len); + write_buf(f_out,buff,buff_len); + } + } + } /* end while */ + read_batch_delta_file( buff, MD4_SUM_LENGTH); + write_buf(f_out, buff, MD4_SUM_LENGTH); + + } /* j=i */ + } else { /* not checksum match */ + rprintf (FINFO,"readbatch & checksums don't match\n"); + rprintf (FINFO,"filename=%s is being skipped\n", + fname); + continue; + } + } else { + match_sums(f_out,s,buf,st.st_size); + log_send(file, &initial_stats); + } + + if (!read_batch) { /* dw */ + if (buf) unmap_file(buf); + close(fd); + } free_sums(s); @@ -220,6 +279,11 @@ match_report(); write_int(f_out,-1); + if (write_batch || read_batch) { /* dw */ + close_batch_csums_file(); + close_batch_delta_file(); + } + } diff -u -r --new-file --exclude=CVS rsync-2.4.6/shconfig.in rsync-2.5.0/shconfig.in --- rsync-2.4.6/shconfig.in Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/shconfig.in Wed Aug 29 00:33:27 2001 @@ -0,0 +1,12 @@ +#! /bin/sh + +# config.sh.in + +# This file is processed by config.status to produce config.status, +# containing autoconf-determined values needed by the test scripts. + +ECHO_T="@ECHO_T@" +ECHO_N="@ECHO_N@" +ECHO_C="@ECHO_C@" + +export ECHO_T ECHO_N ECHO_C diff -u -r --new-file --exclude=CVS rsync-2.4.6/socket.c rsync-2.5.0/socket.c --- rsync-2.4.6/socket.c Sat Jan 29 03:35:03 2000 +++ rsync-2.5.0/socket.c Thu Nov 29 16:21:09 2001 @@ -1,5 +1,7 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1992-2001 by Andrew Tridgell + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,31 +18,36 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - socket functions used in rsync - - */ +/** + * @file socket.c + * + * Socket functions used in rsync. + **/ #include "rsync.h" +#ifndef HAVE_GETADDRINFO +#include "lib/addrinfo.h" +#endif -/* establish a proxy connection on an open socket to a web roxy by using the CONNECT - method */ +/* Establish a proxy connection on an open socket to a web roxy by + * using the CONNECT method. */ static int establish_proxy_connection(int fd, char *host, int port) { char buffer[1024]; char *cp; - slprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\n\r\n", host, port); + snprintf(buffer, sizeof(buffer), "CONNECT %s:%d HTTP/1.0\r\n\r\n", host, port); if (write(fd, buffer, strlen(buffer)) != strlen(buffer)) { - rprintf(FERROR, "failed to write to proxy - %s\n", + rprintf(FERROR, "failed to write to proxy: %s\n", strerror(errno)); return -1; } for (cp = buffer; cp < &buffer[sizeof(buffer) - 1]; cp++) { if (read(fd, cp, 1) != 1) { - rprintf(FERROR, "failed to read from proxy\n"); + rprintf(FERROR, "failed to read from proxy: %s\n", + strerror(errno)); return -1; } if (*cp == '\n') @@ -71,7 +78,8 @@ for (cp = buffer; cp < &buffer[sizeof(buffer) - 1]; cp++) { if (read(fd, cp, 1) != 1) { - rprintf(FERROR, "failed to read from proxy\n"); + rprintf(FERROR, "failed to read from proxy: %s\n", + strerror(errno)); return -1; } if (*cp == '\n') @@ -86,24 +94,44 @@ } -/* open a socket to a tcp remote host with the specified port - based on code from Warren - proxy support by Stephen Rothwell */ -int open_socket_out(char *host, int port, struct in_addr *address) + +/** + * Open a socket to a tcp remote host with the specified port . + * + * Based on code from Warren. Proxy support by Stephen Rothwell. + * getaddrinfo() rewrite contributed by KAME.net. + * + * Now that we support IPv6 we need to look up the remote machine's + * address first, using @p af_hint to set a preference for the type + * of address. Then depending on whether it has v4 or v6 addresses we + * try to open a connection. + * + * The loop allows for machines with some addresses which may not be + * reachable, perhaps because we can't e.g. route ipv6 to that network + * but we can get ip4 packets through. + * + * @param bind_address Local address to use. Normally NULL to bind + * the wildcard address. + * + * @param af_hint Address family, e.g. AF_INET or AF_INET6. + **/ +int open_socket_out(char *host, int port, const char *bind_address, + int af_hint) { int type = SOCK_STREAM; - struct sockaddr_in sock_out; - struct sockaddr_in sock; - int res; - struct hostent *hp; + int error; + int s; + int result; + struct addrinfo hints, *res0, *res; + char portbuf[10]; char *h; - unsigned p; int proxied = 0; char buffer[1024]; char *cp; - /* if we have a RSYNC_PROXY env variable then redirect our connetcion via a web proxy - at the given address. The format is hostname:port */ + /* if we have a RSYNC_PROXY env variable then redirect our + * connetcion via a web proxy at the given address. The format + * is hostname:port */ h = getenv("RSYNC_PROXY"); proxied = (h != NULL) && (*h != '\0'); @@ -111,113 +139,212 @@ strlcpy(buffer, h, sizeof(buffer)); cp = strchr(buffer, ':'); if (cp == NULL) { - rprintf(FERROR, "invalid proxy specification\n"); + rprintf(FERROR, + "invalid proxy specification: should be HOST:PORT\n"); return -1; } *cp++ = '\0'; - p = atoi(cp); + strcpy(portbuf, cp); h = buffer; } else { + snprintf(portbuf, sizeof(portbuf), "%d", port); h = host; - p = port; } - res = socket(PF_INET, type, 0); - if (res == -1) { + memset(&hints, 0, sizeof(hints)); + hints.ai_family = af_hint; + hints.ai_socktype = type; + error = getaddrinfo(h, portbuf, &hints, &res0); + if (error) { + rprintf(FERROR, RSYNC_NAME ": getaddrinfo: %s %s: %s\n", + h, portbuf, gai_strerror(error)); return -1; } - hp = gethostbyname(h); - if (!hp) { - rprintf(FERROR,"unknown host: %s\n", h); - close(res); - return -1; - } + s = -1; + for (res = res0; res; res = res->ai_next) { + s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + if (s < 0) + continue; - memcpy(&sock_out.sin_addr, hp->h_addr, hp->h_length); - sock_out.sin_port = htons(p); - sock_out.sin_family = PF_INET; - - if (address) { - sock.sin_addr = *address; - sock.sin_port = 0; - sock.sin_family = hp->h_addrtype; - bind(res, (struct sockaddr * ) &sock,sizeof(sock)); - } + if (bind_address) { + struct addrinfo bhints, *bres; - if (connect(res,(struct sockaddr *)&sock_out,sizeof(sock_out))) { - rprintf(FERROR,"failed to connect to %s - %s\n", h, strerror(errno)); - close(res); - return -1; - } + memset(&bhints, 0, sizeof(bhints)); + bhints.ai_family = res->ai_family; + bhints.ai_socktype = type; + bhints.ai_flags = AI_PASSIVE; + error = getaddrinfo(bind_address, NULL, &bhints, &bres); + if (error) { + rprintf(FERROR, RSYNC_NAME ": getaddrinfo: bind address %s : %s\n", + bind_address, gai_strerror(error)); + continue; + } + if (bres->ai_next) { + rprintf(FERROR, RSYNC_NAME ": getaddrinfo: bind address %s resolved to multiple hosts\n", + bind_address); + freeaddrinfo(bres); + continue; + } + bind(s, bres->ai_addr, bres->ai_addrlen); + } - if (proxied && establish_proxy_connection(res, host, port) != 0) { - close(res); + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { + close(s); + s = -1; + continue; + } + if (proxied && + establish_proxy_connection(s, host, port) != 0) { + close(s); + s = -1; + continue; + } else + break; + } + freeaddrinfo(res0); + if (s < 0) { + rprintf(FERROR, RSYNC_NAME ": failed to connect to %s: %s\n", + h, strerror(errno)); return -1; } + return s; +} + - return res; +/** + * Open an outgoing socket, but allow for it to be intercepted by + * $RSYNC_CONNECT_PROG, which will execute a program across a TCP + * socketpair rather than really opening a socket. + * + * We use this primarily in testing to detect TCP flow bugs, but not + * cause security problems by really opening remote connections. + * + * This is based on the Samba LIBSMB_PROG feature. + * + * @param bind_address Local address to use. Normally NULL to get the stack default. + **/ +int open_socket_out_wrapped (char *host, + int port, + const char *bind_address, + int af_hint) +{ + char *prog; + + if ((prog = getenv ("RSYNC_CONNECT_PROG")) != NULL) + return sock_exec (prog); + else + return open_socket_out (host, port, bind_address, + af_hint); } -/**************************************************************************** -open a socket of the specified type, port and address for incoming data -****************************************************************************/ -static int open_socket_in(int type, int port, struct in_addr *address) + +/** + * Open a socket of the specified type, port and address for incoming data + * + * Try to be better about handling the results of getaddrinfo(): when + * opening an inbound socket, we might get several address results, + * e.g. for the machine's ipv4 and ipv6 name. + * + * If binding a wildcard, then any one of them should do. If an address + * was specified but it's insufficiently specific then that's not our + * fault. + * + * However, some of the advertized addresses may not work because e.g. we + * don't have IPv6 support in the kernel. In that case go on and try all + * addresses until one succeeds. + * + * @param bind_address Local address to bind, or NULL to allow it to + * default. + **/ +static int open_socket_in(int type, int port, const char *bind_address, + int af_hint) { - struct hostent *hp; - struct sockaddr_in sock; - char host_name[MAXHOSTNAMELEN]; - int res; int one=1; - - /* get my host name */ - if (gethostname(host_name, sizeof(host_name)) == -1) { - rprintf(FERROR,"gethostname failed\n"); - return -1; - } - - /* get host info */ - if ((hp = gethostbyname(host_name)) == 0) { - rprintf(FERROR,"gethostbyname: Unknown host %s\n",host_name); + int s; + struct addrinfo hints, *res, *resp; + char portbuf[10]; + int error; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = af_hint; + hints.ai_socktype = type; + hints.ai_flags = AI_PASSIVE; + snprintf(portbuf, sizeof(portbuf), "%d", port); + error = getaddrinfo(bind_address, portbuf, &hints, &res); + if (error) { + rprintf(FERROR, RSYNC_NAME ": getaddrinfo: bind address %s: %s\n", + bind_address, gai_strerror(error)); return -1; } - - memset((char *)&sock,0,sizeof(sock)); - memcpy((char *)&sock.sin_addr,(char *)hp->h_addr, hp->h_length); - sock.sin_port = htons(port); - sock.sin_family = hp->h_addrtype; - if (address) { - sock.sin_addr = *address; - } else { - sock.sin_addr.s_addr = INADDR_ANY; - } - res = socket(hp->h_addrtype, type, 0); - if (res == -1) { - rprintf(FERROR,"socket failed\n"); - return -1; + /* XXX: Do we need to care about getting multiple results + * back? I think probably not; if the user passed + * bind_address == NULL and we set AI_PASSIVE then we ought to + * get a wildcard result. */ + + resp = res; + while (1) { + s = socket(resp->ai_family, resp->ai_socktype, resp->ai_protocol); + + if (s >= 0) { + break; /* got a socket */ + } else if ((resp = resp->ai_next)) { + switch (errno) { + case EPROTONOSUPPORT: + case EAFNOSUPPORT: + case EPFNOSUPPORT: + /* See if there's another address that will work... */ + continue; + } + } + + rprintf(FERROR, RSYNC_NAME ": open inbound socket" + "(dom=%d, type=%d, proto=%d) failed: %s\n", + resp->ai_family, resp->ai_socktype, resp->ai_protocol, + strerror(errno)); + goto fail; } - setsockopt(res,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof(one)); + setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof(one)); /* now we've got a socket - we need to bind it */ - if (bind(res, (struct sockaddr * ) &sock,sizeof(sock)) == -1) { - rprintf(FERROR,"bind failed on port %d\n", port); - close(res); - return -1; + if (bind(s, res->ai_addr, res->ai_addrlen) < 0) { + rprintf(FERROR, RSYNC_NAME ": bind failed on port %d\n", port); + close(s); + goto fail; } - return res; + return s; + +fail: + freeaddrinfo(res); + return -1; } -/**************************************************************************** -determine if a file descriptor is in fact a socket -****************************************************************************/ +/* + * Determine if a file descriptor is in fact a socket + */ int is_a_socket(int fd) { - int v,l; + int v; + socklen_t l; l = sizeof(int); + + /* Parameters to getsockopt, setsockopt etc are very + * unstandardized across platforms, so don't be surprised if + * there are compiler warnings on e.g. SCO OpenSwerver or AIX. + * It seems they all eventually get the right idea. + * + * Debian says: ``The fifth argument of getsockopt and + * setsockopt is in reality an int [*] (and this is what BSD + * 4.* and libc4 and libc5 have). Some POSIX confusion + * resulted in the present socklen_t. The draft standard has + * not been adopted yet, but glibc2 already follows it and + * also has socklen_t [*]. See also accept(2).'' + * + * We now return to your regularly scheduled programming. */ return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } @@ -225,10 +352,11 @@ void start_accept_loop(int port, int (*fn)(int )) { int s; - extern struct in_addr socket_address; + extern char *bind_address; /* open an incoming socket */ - s = open_socket_in(SOCK_STREAM, port, &socket_address); + s = open_socket_in(SOCK_STREAM, port, bind_address, + global_opts.af_hint); if (s == -1) exit_cleanup(RERR_SOCKETIO); @@ -247,6 +375,11 @@ struct sockaddr addr; int in_addrlen = sizeof(addr); + /* close log file before the potentially very long select so + file can be trimmed by another process instead of growing + forever */ + log_close(); + FD_ZERO(&fds); FD_SET(s, &fds); @@ -256,7 +389,7 @@ if(!FD_ISSET(s, &fds)) continue; - fd = accept(s,&addr,&in_addrlen); + fd = accept(s,(struct sockaddr *)&addr,&in_addrlen); if (fd == -1) continue; @@ -271,7 +404,9 @@ if (fork()==0) { close(s); - + /* open log file in child before possibly giving + up privileges */ + log_open(); _exit(fn(fd)); } @@ -377,7 +512,8 @@ } if (ret != 0) - rprintf(FERROR,"Failed to set socket option %s\n",tok); + rprintf(FERROR, "failed to set socket option %s: %s\n", tok, + strerror(errno)); } free(options); @@ -414,14 +550,13 @@ } } -/******************************************************************* - return the IP addr of the client as a string - ******************************************************************/ +/** + * Return the IP addr of the client as a string + **/ char *client_addr(int fd) { - struct sockaddr sa; - struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa); - int length = sizeof(sa); + struct sockaddr ss; + int length = sizeof(ss); static char addr_buf[100]; static int initialised; @@ -429,28 +564,29 @@ initialised = 1; - if (getpeername(fd, &sa, &length)) { + if (getpeername(fd, &ss, &length)) { exit_cleanup(RERR_SOCKETIO); } - - strlcpy(addr_buf,(char *)inet_ntoa(sockin->sin_addr), sizeof(addr_buf)); + + getnameinfo(&ss, length, + addr_buf, sizeof(addr_buf), NULL, 0, NI_NUMERICHOST); return addr_buf; } -/******************************************************************* - return the DNS name of the client - ******************************************************************/ +/** + * Return the DNS name of the client + **/ char *client_name(int fd) { - struct sockaddr sa; - struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa); - int length = sizeof(sa); + struct sockaddr ss; + int length = sizeof(ss); static char name_buf[100]; - struct hostent *hp; - char **p; + static char port_buf[100]; char *def = "UNKNOWN"; static int initialised; + struct addrinfo hints, *res, *res0; + int error; if (initialised) return name_buf; @@ -458,70 +594,178 @@ strcpy(name_buf,def); - if (getpeername(fd, &sa, &length)) { + if (getpeername(fd, (struct sockaddr *)&ss, &length)) { + /* FIXME: Can we really not continue? */ + rprintf(FERROR, RSYNC_NAME ": getpeername on fd%d failed: %s\n", + fd, strerror(errno)); exit_cleanup(RERR_SOCKETIO); } - /* Look up the remote host name. */ - if ((hp = gethostbyaddr((char *) &sockin->sin_addr, - sizeof(sockin->sin_addr), - AF_INET))) { - strlcpy(name_buf,(char *)hp->h_name,sizeof(name_buf)); +#ifdef INET6 + if (ss.sa_family == AF_INET6 && + IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&ss)->sin6_addr)) { + struct sockaddr_in6 sin6; + struct sockaddr_in *sin; + + memcpy(&sin6, &ss, sizeof(sin6)); + sin = (struct sockaddr_in *)&ss; + memset(sin, 0, sizeof(*sin)); + sin->sin_family = AF_INET; + length = sizeof(struct sockaddr_in); +#ifdef HAVE_SOCKADDR_LEN + sin->sin_len = length; +#endif + sin->sin_port = sin6.sin6_port; + memcpy(&sin->sin_addr, &sin6.sin6_addr.s6_addr[12], + sizeof(sin->sin_addr)); + } +#endif + + /* reverse lookup */ + if (getnameinfo((struct sockaddr *)&ss, length, + name_buf, sizeof(name_buf), port_buf, sizeof(port_buf), + NI_NAMEREQD | NI_NUMERICSERV) != 0) { + strcpy(name_buf, def); + rprintf(FERROR, "reverse name lookup failed\n"); + } + + /* forward lookup */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + hints.ai_flags = AI_CANONNAME; + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo(name_buf, port_buf, &hints, &res0); + if (error) { + strcpy(name_buf, def); + rprintf(FERROR, + RSYNC_NAME ": forward name lookup for %s failed: %s\n", + port_buf, + gai_strerror(error)); + return name_buf; + } + + /* XXX sin6_flowinfo and other fields */ + for (res = res0; res; res = res->ai_next) { + if (res->ai_family != ss.sa_family) + continue; + if (res->ai_addrlen != length) + continue; + if (memcmp(res->ai_addr, &ss, res->ai_addrlen) == 0) + break; } + /* TODO: Do a forward lookup as well to prevent spoofing */ - /* do a forward lookup as well to prevent spoofing */ - hp = gethostbyname(name_buf); - if (!hp) { - strcpy(name_buf,def); - rprintf(FERROR,"reverse name lookup failed\n"); - } else { - for (p=hp->h_addr_list;*p;p++) { - if (memcmp(*p, &sockin->sin_addr, hp->h_length) == 0) { - break; - } - } - if (!*p) { - strcpy(name_buf,def); - rprintf(FERROR,"reverse name lookup mismatch - spoofed address?\n"); - } + if (res == NULL) { + strcpy(name_buf, def); + rprintf(FERROR, RSYNC_NAME ": " + "reverse name lookup mismatch on fd%d - spoofed address?\n", + fd); } + freeaddrinfo(res0); return name_buf; } + /******************************************************************* -convert a string to an IP address. The string can be a name or -dotted decimal number - ******************************************************************/ -struct in_addr *ip_address(const char *str) +this is like socketpair but uses tcp. It is used by the Samba +regression test code +The function guarantees that nobody else can attach to the socket, +or if they do that this function fails and the socket gets closed +returns 0 on success, -1 on failure +the resulting file descriptors are symmetrical + ******************************************************************/ +static int socketpair_tcp(int fd[2]) { - static struct in_addr ret; - struct hostent *hp; + int listener; + struct sockaddr_in sock; + struct sockaddr_in sock2; + socklen_t socklen = sizeof(sock); + int connect_done = 0; + + fd[0] = fd[1] = listener = -1; - /* try as an IP address */ - if (inet_aton(str, &ret) != 0) { - return &ret; - } + memset(&sock, 0, sizeof(sock)); + + if ((listener = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto failed; - /* otherwise assume it's a network name of some sort and use - gethostbyname */ - if ((hp = gethostbyname(str)) == 0) { - rprintf(FERROR, "gethostbyname: Unknown host. %s\n",str); - return NULL; - } + memset(&sock2, 0, sizeof(sock2)); +#ifdef HAVE_SOCK_SIN_LEN + sock2.sin_len = sizeof(sock2); +#endif + sock2.sin_family = PF_INET; + + bind(listener, (struct sockaddr *)&sock2, sizeof(sock2)); + + if (listen(listener, 1) != 0) goto failed; + + if (getsockname(listener, (struct sockaddr *)&sock, &socklen) != 0) goto failed; + + if ((fd[1] = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto failed; + + set_nonblocking(fd[1]); - if (hp->h_addr == NULL) { - rprintf(FERROR, "gethostbyname: host address is invalid for host %s\n",str); - return NULL; + sock.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + if (connect(fd[1],(struct sockaddr *)&sock,sizeof(sock)) == -1) { + if (errno != EINPROGRESS) goto failed; + } else { + connect_done = 1; } - if (hp->h_length > sizeof(ret)) { - rprintf(FERROR, "gethostbyname: host address is too large\n"); - return NULL; + if ((fd[0] = accept(listener, (struct sockaddr *)&sock, &socklen)) == -1) goto failed; + + close(listener); + if (connect_done == 0) { + if (connect(fd[1],(struct sockaddr *)&sock,sizeof(sock)) != 0 + && errno != EISCONN) goto failed; } - memcpy(&ret.s_addr, hp->h_addr, hp->h_length); + set_blocking (fd[1]); - return(&ret); + /* all OK! */ + return 0; + + failed: + if (fd[0] != -1) close(fd[0]); + if (fd[1] != -1) close(fd[1]); + if (listener != -1) close(listener); + return -1; } + + +/******************************************************************* +run a program on a local tcp socket, this is used to launch smbd +when regression testing +the return value is a socket which is attached to a subprocess +running "prog". stdin and stdout are attached. stderr is left +attached to the original stderr + ******************************************************************/ +int sock_exec(const char *prog) +{ + int fd[2]; + if (socketpair_tcp(fd) != 0) { + rprintf (FERROR, RSYNC_NAME + ": socketpair_tcp failed (%s)\n", + strerror(errno)); + return -1; + } + if (fork() == 0) { + close(fd[0]); + close(0); + close(1); + dup(fd[1]); + dup(fd[1]); + if (verbose > 3) + fprintf (stderr, + RSYNC_NAME ": execute socket program \"%s\"\n", + prog); + exit (system (prog)); + } + close (fd[1]); + return fd[0]; +} + + + diff -u -r --new-file --exclude=CVS rsync-2.4.6/syscall.c rsync-2.5.0/syscall.c --- rsync-2.4.6/syscall.c Sat Jan 29 03:35:03 2000 +++ rsync-2.5.0/syscall.c Thu Nov 29 16:21:09 2001 @@ -113,11 +113,27 @@ return mkdir(fname, mode); } -char *do_mktemp(char *template) +/* like mkstemp but forces permissions */ +int do_mkstemp(char *template, mode_t perms) { - if (dry_run) return NULL; - if (read_only) {errno = EROFS; return NULL;} - return mktemp(template); + if (dry_run) return -1; + if (read_only) {errno = EROFS; return -1;} + +#if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) + { + int fd = mkstemp(template); + if (fd == -1) return -1; + if (fchmod(fd, perms) != 0) { + close(fd); + unlink(template); + return -1; + } + return fd; + } +#else + if (!mktemp(template)) return -1; + return open(template, O_RDWR|O_EXCL|O_CREAT, perms); +#endif } int do_stat(const char *fname, STRUCT_STAT *st) diff -u -r --new-file --exclude=CVS rsync-2.4.6/test.sh rsync-2.5.0/test.sh --- rsync-2.4.6/test.sh Sat Jan 29 17:02:02 2000 +++ rsync-2.5.0/test.sh Thu Nov 29 16:21:10 2001 @@ -54,9 +54,13 @@ ps ax > ${FROM}/pslist echo -n "This file has no trailing lf" > ${FROM}/nolf ln -s nolf ${FROM}/nolf-symlink -cat /etc/inittab /etc/services /etc/resolv.conf > ${FROM}/${F1} + +# Gather some random text. We need files that will exist and be +# publicly readable on all platforms: hopefully this will work. +cat /etc/*tab /etc/services /etc/*.conf /etc/*rc > ${FROM}/${F1} + mkdir ${FROM}/dir -cp ${FROM}/${F1} ${FROM}/dir +cp ${FROM}/${F1} ${FROM}/dir/ mkdir ${FROM}/dir/subdir mkdir ${FROM}/dir/subdir/subsubdir ls -ltr /etc > ${FROM}/dir/subdir/subsubdir/etc-ltr-list diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/00-hello.test rsync-2.5.0/testsuite/00-hello.test --- rsync-2.4.6/testsuite/00-hello.test Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/00-hello.test Thu Aug 30 22:45:49 2001 @@ -0,0 +1,5 @@ +#! /bin/sh + +echo $0 running + +"$rsync_bin" --version || exit 1 diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/README rsync-2.5.0/testsuite/README --- rsync-2.4.6/testsuite/README Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/README Thu Aug 16 02:08:30 2001 @@ -0,0 +1,7 @@ +This directory contains automatic test cases for rsync. You can run +them yourself if you want, preferably by doing "make check" in the +top-level source directory. (Not implemented yet.) + +They also run automatically on the build farm, and you can see the +results on http://build.samba.org/. That's controlled by the file +./runlist. diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/daemon.test rsync-2.5.0/testsuite/daemon.test --- rsync-2.4.6/testsuite/daemon.test Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/daemon.test Wed Sep 5 23:30:09 2001 @@ -0,0 +1,32 @@ +#!/bin/sh + +# Copyright (C) 2001 by Martin Pool + +# This program is distributable under the terms of the GNU GPL (see +# COPYING) + +# We don't really want to start the server listening, because that +# might interfere with the security or operation of the test machine. +# Instead we use the fake-connect feature to dynamically assign a pair +# of ports. + +# Having started the server we try some basic operations against it: + +# getting a list of module +# listing files in a module +# retrieving a module +# uploading to a module +# checking the log file +# password authentication + +# TODO: Put the common framework in a common file, so that we can have +# subtests fail and keep going. + +. "$suitedir/rsync.fns" + +build_rsyncd_conf + +RSYNC_CONNECT_PROG="$rsync_bin --config=$conf --daemon" +export RSYNC_CONNECT_PROG + +$rsync_bin -v localhost:: diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/hands.test rsync-2.5.0/testsuite/hands.test --- rsync-2.4.6/testsuite/hands.test Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/hands.test Wed Sep 5 23:21:15 2001 @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright (C) 1998,1999 Philip Hands +# Copyright (C) 2001 by Martin Pool +# +# This program is distributable under the terms of the GNU GPL (see COPYING) + +. "$suitedir/rsync.fns" + +hands_setup + +# Main script starts here + +runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}' + +ln ${FROM}/filelist ${FROM}/dir +runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' + +rm ${TO}/text +runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' + +echo "extra line" >> ${TO}/text +runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' + +cp ${FROM}/text ${TO}/ThisShouldGo +runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' + +checkforlogs ${LOG}.? diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/longdir.test rsync-2.5.0/testsuite/longdir.test --- rsync-2.4.6/testsuite/longdir.test Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/longdir.test Mon Nov 26 23:32:42 2001 @@ -0,0 +1,19 @@ +#!/bin/sh + +# Copyright (C) 1998,1999 Philip Hands +# Copyright (C) 2001 by Martin Pool +# +# This program is distributable under the terms of the GNU GPL (see COPYING) + +. "$suitedir/rsync.fns" + +set -x + +hands_setup + +LONGDIR=${FROM}/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job + +makepath ${LONGDIR} +date > ${LONGDIR}/1 +ls -la / > ${LONGDIR}/2 +checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO} diff -u -r --new-file --exclude=CVS rsync-2.4.6/testsuite/rsync.fns rsync-2.5.0/testsuite/rsync.fns --- rsync-2.4.6/testsuite/rsync.fns Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/testsuite/rsync.fns Mon Nov 26 23:59:34 2001 @@ -0,0 +1,206 @@ +#! /bin/sh + +# Copyright (C) 2001 by Martin Pool + +# General-purpose test functions for rsync. + +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. + + +TMP="$scratchdir" +FROM=${TMP}/from +TO=${TMP}/to +LOG=${TMP}/log +RSYNC="$rsync_bin" + +runtest() { + echo $ECHO_N "Test $1: $ECHO_C" + if eval "$2" + then + echo "${ECHO_T} done." + return 0 + else + echo "${ECHO_T} failed!" + return 1 + fi +} + +printmsg() { + echo "$1" +} + + +rsync_ls_lR() { + find "$@" -print | sort | xargs $TLS +} + + +#################### +# Build test directories TO and FROM, with FROM full of files. + +hands_setup() { + # Clean before creation + rm -rf $FROM + rm -rf $TO + + [ -d $FROM ] || mkdir $FROM + [ -d $TO ] || mkdir $TO + + # On some BSD systems, the umask affects the mode of created + # symlinks, even though the mode apparently has no effect on how + # the links behave in the future, and it cannot be changed using + # chmod! rsync always sets its umask to 000 so that it can + # accurately recreate permissions, but this script is probably run + # with a different umask. + + # This causes a little problem that "ls -l" of the two will not be + # the same. So, we need to set our umask before doing any creations. + + # set up test data + touch ${FROM}/empty + mkdir ${FROM}/emptydir + + # a hundred lines of text or so + rsync_ls_lR ${srcdir} > ${FROM}/filelist + + # This might fail on systems that don't have -n + echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf + umask 0 + ln -s nolf ${FROM}/nolf-symlink + umask 022 + + cat $srcdir/*.c > ${FROM}/text + mkdir ${FROM}/dir + cp ${FROM}/text ${FROM}/dir + mkdir ${FROM}/dir/subdir + mkdir ${FROM}/dir/subdir/subsubdir + ls -ltr /etc > ${FROM}/dir/subdir/subsubdir/etc-ltr-list + mkdir ${FROM}/dir/subdir/subsubdir2 + ls -lt /bin > ${FROM}/dir/subdir/subsubdir2/bin-lt-list + +# echo testing head: +# ls -lR ${srcdir} | head -10 || echo failed +} + + + + +#################### +# Many machines do not have "mkdir -p", so we have to build up long paths. +# How boring. +makepath () { + echo " makepath $1" + p="$1" + ( + # Absolut Unix. + if echo $p | grep '^/' >/dev/null + then + cd / + fi + + # This will break if $1 contains a space. + for c in `echo $p | tr '/' ' '` + do + if [ -d "$c" ] || mkdir "$c" + then + cd "$c" || return $? + else + echo "failed to create $c" >&2; return $? + fi + done + ) +} + + + +########################### +# Run a test (in '$1') then compare directories $2 and $3 to see if +# there are any difference. If there are, explain them. + +checkit() { + log=${LOG} + failed= + # the log accumulates all output; we only display it if there + # is a problem. + + echo "Running: \"$1\"" >${log} + echo "">>${log} + eval "$1" >>${log} 2>&1 + status=$? + if [ $status != 0 ]; then + failed="YES"; + fi + + echo "-------------">>${log} + echo "check how the files compare with diff:">>${log} + echo "">>${log} + diff -cr $2 $3 >>${log} 2>&1 || failed=YES + echo "-------------">>${log} + echo "check how the directory listings compare with diff:">>${log} + echo "">>${log} + ( cd "$2" && rsync_ls_lR ) > ${TMP}/ls-from 2>>${log} + ( cd "$3" && rsync_ls_lR ) > ${TMP}/ls-to 2>>${log} + diff -c ${TMP}/ls-from ${TMP}/ls-to >>${log} 2>&1 || failed=YES + if [ -z "${failed}" ] ; then + rm $log + return 0 + else + cat ${log} + rm ${log} + return 1 + fi +} + + +# In fact, we need a more general feature of capturing all stderr/log files, +# and dumping them if something goes wrong. + +checkforlogs() { + # skip it if we're under debian-test + if test -n "${Debian}" ; then return 0 ; fi + + if [ -f $1 -a -s $1 ] ; then + echo "Failures have occurred. $1 follows:" >&2 + cat $1 >&2 + exit 1 + fi +} + + +build_rsyncd_conf() { + # Build an appropriate configuration file + conf="$scratchdir/test-rsyncd.conf" + echo "building configuration $conf" + + port=2612 + pidfile="$scratchdir/rsyncd.pid" + logfile="$scratchdir/rsyncd.log" + + cat >$conf < +# Copyright (C) 2001 by Martin Pool + +# 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 + +. "$suitedir/rsync.fns" + +if [ "x$rsync_enable_ssh_tests" != xyes ] +then + echo "Skipping SSH tests because \$rsync_enable_ssh_tests is not set" + exit 77 +fi + +if ! type ssh >/dev/null ; then + echo "Skipping SSH tests because ssh is not in the path" + exit 77 +fi + +if ! [ "`ssh -o'BatchMode yes' localhost echo yes`" = "yes" ]; then + echo "Skipping SSH tests because ssh conection to localhost not authorised" + exit 77 +fi + +runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' + +mv ${TO}/${F1} ${TO}/ThisShouldGo + +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' diff -u -r --new-file --exclude=CVS rsync-2.4.6/tls.c rsync-2.5.0/tls.c --- rsync-2.4.6/tls.c Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/tls.c Mon Nov 26 23:56:33 2001 @@ -0,0 +1,133 @@ +/* -*- c-file-style: "linux" -*- + * + * Copyright (C) 2001 by Martin Pool + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/** + * \section tls + * + * tls -- Trivial recursive ls, for comparing two directories after + * running an rsync. + * + * The problem with using the system's own ls is that some features + * have little quirks that make directories look different when for + * our purposes they're the same -- for example, the BSD braindamage + * about setting the mode on symlinks based on your current umask. + * + * All the filenames must be given on the command line -- tls does not + * even read directories, let alone recurse. The typical usage is + * "find|sort|xargs tls". + * + * The format is not exactly the same as any particular Unix ls(1). + * + * A key requirement for this program is that the output be "very + * reproducible." So we mask away information that can accidentally + * change. + **/ + + + +#include "rsync.h" + +#define PROGRAM "tls" + +/* These are to make syscall.o shut up. */ +int dry_run = 0; +int read_only = 1; +int list_only = 0; + + +static void failed (char const *what, + char const *where) +{ + fprintf (stderr, PROGRAM ": %s %s: %s\n", + what, where, strerror (errno)); + exit (1); +} + + + +static void list_file (const char *fname) +{ + struct stat buf; + char permbuf[PERMSTRING_SIZE]; + struct tm *mt; + char datebuf[50]; + char linkbuf[4096]; + + if (do_lstat(fname, &buf) == -1) + failed ("stat", fname); + + /* The size of anything but a regular file is probably not + * worth thinking about. */ + if (!S_ISREG(buf.st_mode)) + buf.st_size = 0; + + /* On some BSD platforms the mode bits of a symlink are + * undefined. Also it tends not to be possible to reset a + * symlink's mtime, so we have to ignore it too. */ + if (S_ISLNK(buf.st_mode)) { + buf.st_mode &= ~0777; + buf.st_mtime = (time_t)0; + buf.st_uid = buf.st_gid = 0; + strcpy(linkbuf, " -> "); + readlink(fname, linkbuf+4, sizeof(linkbuf) - 4); + } else { + linkbuf[0] = 0; + } + + permstring(permbuf, buf.st_mode); + + if (buf.st_mtime) { + mt = gmtime(&buf.st_mtime); + + sprintf(datebuf, "%04d-%02d-%02d %02d:%02d:%02d", + mt->tm_year + 1900, + mt->tm_mon + 1, + mt->tm_mday, + mt->tm_hour, + mt->tm_min, + mt->tm_sec); + } else { + strcpy(datebuf, " "); + } + + /* TODO: Perhaps escape special characters in fname? */ + + + /* NB: need to pass size as a double because it might be be + * too large for a long. */ + printf("%s %12.0f %6d.%-6d %s %s%s\n", + permbuf, (double) buf.st_size, + buf.st_uid, buf.st_gid, + datebuf, fname, linkbuf); +} + + +int main (int argc, char *argv[]) +{ + if (argc < 2) { + fprintf (stderr, "usage: " PROGRAM " DIR ...\n" + "Trivial file listing program for portably checking rsync\n"); + return 1; + } + + for (argv++; *argv; argv++) { + list_file (*argv); + } + + return 0; +} diff -u -r --new-file --exclude=CVS rsync-2.4.6/token.c rsync-2.5.0/token.c --- rsync-2.4.6/token.c Wed Nov 25 08:24:41 1998 +++ rsync-2.5.0/token.c Thu Nov 29 16:21:10 2001 @@ -90,18 +90,29 @@ static void simple_send_token(int f,int token, struct map_struct *buf,OFF_T offset,int n) { + extern int write_batch; /* dw */ + int hold_int; /* dw */ + if (n > 0) { int l = 0; while (l < n) { int n1 = MIN(CHUNK_SIZE,n-l); write_int(f,n1); write_buf(f,map_ptr(buf,offset+l,n1),n1); + if (write_batch) { + write_batch_delta_file( (char *) &n1, sizeof(int) ); + write_batch_delta_file(map_ptr(buf,offset+l,n1),n1); + } l += n1; } } /* a -2 token means to send data only and no token */ if (token != -2) { write_int(f,-(token+1)); + if (write_batch) { + hold_int = -(token+1); + write_batch_delta_file( (char *) &hold_int, sizeof(int) ); + } } } @@ -134,6 +145,8 @@ { int n, r; static int init_done, flush_pending; + extern int write_batch; /* dw */ + char temp_byte; /* dw */ if (last_token == -1) { /* initialization */ @@ -166,13 +179,27 @@ n = last_token - run_start; if (r >= 0 && r <= 63) { write_byte(f, (n==0? TOKEN_REL: TOKENRUN_REL) + r); + if (write_batch) { /* dw */ + temp_byte = (char)( (n==0? TOKEN_REL: TOKENRUN_REL) + r); + write_batch_delta_file(&temp_byte,sizeof(char)); + } } else { write_byte(f, (n==0? TOKEN_LONG: TOKENRUN_LONG)); write_int(f, run_start); + if (write_batch) { /* dw */ + temp_byte = (char)(n==0? TOKEN_LONG: TOKENRUN_LONG); + write_batch_delta_file(&temp_byte,sizeof(temp_byte)); + write_batch_delta_file((char *)&run_start,sizeof(run_start)); + } } if (n != 0) { write_byte(f, n); write_byte(f, n >> 8); + if (write_batch) { /* dw */ + write_batch_delta_file((char *)&n,sizeof(char)); + temp_byte = (char) n >> 8; + write_batch_delta_file(&temp_byte,sizeof(temp_byte)); + } } last_run_end = last_token; run_start = token; @@ -231,6 +258,8 @@ obuf[0] = DEFLATED_DATA + (n >> 8); obuf[1] = n; write_buf(f, obuf, n+2); + if (write_batch) /* dw */ + write_batch_delta_file(obuf,n+2); } } } while (nb != 0 || tx_strm.avail_out == 0); @@ -240,6 +269,10 @@ if (token == -1) { /* end of file - clean up */ write_byte(f, END_FLAG); + if (write_batch) { /* dw */ + temp_byte = END_FLAG; + write_batch_delta_file((char *)&temp_byte,sizeof(temp_byte)); + } } else if (token != -2) { /* add the data in the current block to the compressor's diff -u -r --new-file --exclude=CVS rsync-2.4.6/util.c rsync-2.5.0/util.c --- rsync-2.4.6/util.c Tue Sep 5 19:46:43 2000 +++ rsync-2.5.0/util.c Thu Nov 29 16:21:10 2001 @@ -1,6 +1,8 @@ -/* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2000 by Andrew Tridgell + Copyright (C) Paul Mackerras 1996 + Copyright (C) 2001 by Martin Pool This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,9 +94,9 @@ used to cope with badly broken rsh implementations like the one on solaris. */ -int piped_child(char **command,int *f_in,int *f_out) +pid_t piped_child(char **command,int *f_in,int *f_out) { - int pid; + pid_t pid; int to_child_pipe[2]; int from_child_pipe[2]; extern int blocking_io; @@ -107,7 +109,7 @@ pid = do_fork(); - if (pid < 0) { + if (pid == -1) { rprintf(FERROR,"fork: %s\n",strerror(errno)); exit_cleanup(RERR_IPC); } @@ -147,11 +149,12 @@ return pid; } -int local_child(int argc, char **argv,int *f_in,int *f_out) +pid_t local_child(int argc, char **argv,int *f_in,int *f_out) { - int pid; + pid_t pid; int to_child_pipe[2]; int from_child_pipe[2]; + extern int read_batch; /* dw */ if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { @@ -161,7 +164,7 @@ pid = do_fork(); - if (pid < 0) { + if (pid == -1) { rprintf(FERROR,"fork: %s\n",strerror(errno)); exit_cleanup(RERR_IPC); } @@ -170,7 +173,10 @@ extern int am_sender; extern int am_server; - am_sender = !am_sender; + if (read_batch) + am_sender = 0; + else + am_sender = !am_sender; am_server = 1; if (dup2(to_child_pipe[0], STDIN_FILENO) < 0 || @@ -557,10 +563,7 @@ s = strdup(s); if (!s) out_of_memory("glob_expand"); - base = (char *)malloc(strlen(base1)+3); - if (!base) out_of_memory("glob_expand"); - - sprintf(base," %s/", base1); + if (asprintf(&base," %s/", base1) <= 0) out_of_memory("glob_expand"); q = s; while ((p = strstr(q,base)) && ((*argc) < maxargs)) { @@ -587,33 +590,6 @@ } } -/* this is like vsnprintf but it always null terminates, so you - can fit at most n-1 chars in */ -int vslprintf(char *str, int n, const char *format, va_list ap) -{ - int ret = vsnprintf(str, n, format, ap); - if (ret >= n || ret < 0) { - str[n-1] = 0; - return -1; - } - str[ret] = 0; - return ret; -} - - -/* like snprintf but always null terminates */ -int slprintf(char *str, int n, char *format, ...) -{ - va_list ap; - int ret; - - va_start(ap, format); - ret = vslprintf(str,n,format,ap); - va_end(ap); - return ret; -} - - void *Realloc(void *p, int size) { if (!p) return (void *)malloc(size); @@ -930,10 +906,13 @@ } -/******************************************************************* -sleep for a specified number of milliseconds -********************************************************************/ -void msleep(int t) +/** + * Sleep for a specified number of milliseconds. + * + * Always returns TRUE. (In the future it might return FALSE if + * interrupted.) + **/ +int msleep(int t) { int tdiff=0; struct timeval tval,t1,t2; @@ -952,6 +931,8 @@ tdiff = (t2.tv_sec - t1.tv_sec)*1000 + (t2.tv_usec - t1.tv_usec)/1000; } + + return True; } @@ -963,7 +944,6 @@ *******************************************************************/ int cmp_modtime(time_t file1, time_t file2) { - time_t diff; extern int modify_window; if (file2 > file1) { @@ -987,9 +967,9 @@ { static int (*fn)(); int ret; - char cmd[1024]; + char *cmd; - sprintf(cmd, "/usr/X11R6/bin/xterm -display :0 -T Panic -n Panic -e /bin/sh -c 'cat /tmp/ierrs.*.%d ; gdb /proc/%d/exe %d'", + asprintf(&cmd, "/usr/X11R6/bin/xterm -display :0 -T Panic -n Panic -e /bin/sh -c 'cat /tmp/ierrs.*.%d ; gdb /proc/%d/exe %d'", getpid(), getpid(), getpid()); if (!fn) { @@ -1001,6 +981,8 @@ ret = fn(a1, a2, a3, a4, a5, a6); system(cmd); + + free(cmd); return ret; } diff -u -r --new-file --exclude=CVS rsync-2.4.6/version.h rsync-2.5.0/version.h --- rsync-2.4.6/version.h Tue Sep 5 19:46:58 2000 +++ rsync-2.5.0/version.h Wed Dec 31 16:00:00 1969 @@ -1 +0,0 @@ -#define VERSION "2.4.6" diff -u -r --new-file --exclude=CVS rsync-2.4.6/zlib/.cvsignore rsync-2.5.0/zlib/.cvsignore --- rsync-2.4.6/zlib/.cvsignore Wed Dec 31 16:00:00 1969 +++ rsync-2.5.0/zlib/.cvsignore Sun Jan 7 19:39:40 2001 @@ -0,0 +1 @@ +dummy