diff -urN --exclude=patches rsync-2.6.8/COPYING rsync-2.6.9/COPYING --- rsync-2.6.8/COPYING 2005-04-17 01:25:50.000000000 -0700 +++ rsync-2.6.9/COPYING 2006-04-25 16:51:12.000000000 -0700 @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -313,7 +313,7 @@ If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff -urN --exclude=patches rsync-2.6.8/Makefile.in rsync-2.6.9/Makefile.in --- rsync-2.6.8/Makefile.in 2006-04-17 10:37:13.000000000 -0700 +++ rsync-2.6.9/Makefile.in 2006-10-24 08:09:57.000000000 -0700 @@ -2,6 +2,7 @@ # Makefile prefix=@prefix@ +datarootdir=@datarootdir@ exec_prefix=@exec_prefix@ bindir=@bindir@ mandir=@mandir@ @@ -142,7 +143,7 @@ # might lose in the future where POSIX diverges from old sh. check: all $(CHECK_PROGS) - POSIXLY_CORRECT=1 TOOLDIR=`pwd` rsync_bin=`pwd`/rsync$(EXEEXT) srcdir="$(srcdir)" $(srcdir)/runtests.sh + rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh wildtest.o: wildtest.c lib/wildmatch.c rsync.h wildtest$(EXEEXT): wildtest.o lib/compat.o diff -urN --exclude=patches rsync-2.6.8/NEWS rsync-2.6.9/NEWS --- rsync-2.6.8/NEWS 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/NEWS 2006-11-06 20:39:47.000000000 -0800 @@ -1,67 +1,158 @@ -NEWS for rsync 2.6.8 (22 Apr 2006) +NEWS for rsync 2.6.9 (6 Nov 2006) Protocol: 29 (unchanged) -Changes since 2.6.7: +Changes since 2.6.8: BUG FIXES: - - Fixed a bug in the exclude code where an anchored exclude without any - wildcards fails to match an absolute source arg, but only when --relative - is in effect. - - - Improved the I/O code for the generator to fix a potential hang when the - receiver gets an EOF on the socket but the generator's select() call - never indicates that the socket is writable for it to be notified about - the EOF. (This can happen when using stunnel). - - - Fixed a problem with the file-reading code where a failed read (such as - that caused by a bad sector) would not advance the file's read-position - beyond the failed read's data. - - - Fixed a logging bug where the "log file" directive was not being honored - in a single-use daemon (one spawned by a remote-shell connection or by - init). - - - If rsync cannot honor the --delete option, we output an error and exit - instead of silently ignoring the option. - - - Fixed a bug in the --link-dest code that prevented special files (such as - fifos) from being linked. - - - The ability to hard-link symlinks and special files is now determined at - configure time instead of at runtime. This fixes a bug with --link-dest - creating a hard-link to a symlink's referent on a BSD system. + - If rsync is interrupted via a handled signal (such as SIGINT), it will + once again clean-up its temp file from the destination dir. - ENHANCEMENTS: - - - In daemon mode, if rsync fails to bind to the requested port, the - error(s) returned by socket() and/or bind() are now logged. - - - When we output a fatal error, we now output the version of rsync in the - message. + - Fixed an overzealous sanitizing bug in the handling of the --link-dest, + --copy-dest, and --compare-dest options to a daemon without chroot: if + the copy's destination dir is deeper than the top of the module's path, + these options now accept a safe number of parent-dir (../) references + (since these options are relative to the destination dir). The old code + incorrectly chopped off all "../" prefixes for these options, no matter + how deep the destination directory was in the module's hierarchy. + + - Fixed a bug where a deferred info/error/log message could get sent + directly to the sender instead of being handled by rwrite() in the + generator. This fixes an "unexpected tag 3" fatal error, and should + also fix a potential problem where a deferred info/error message from + the receiver might bypass the log file and get sent only to the client + process. (These problems could only affect an rsync daemon that was + receiving files.) + + - Fixed a bug when --inplace was combined with a --*-dest option and we + update a file's data using an alternate basis file. The code now + notices that it needs to copy the matching data from the basis file + instead of (wrongly) assuming that it was already present in the file. + + - Fixed a bug where using --dry-run with a --*-dest option with a path + relative to a directory that does not yet exist: the affected option + gets its proper path value so that the output of the dry-run is right. + + - Fixed a bug in the %f logfile escape when receiving files: the + destination path is now included in the output (e.g. you can now tell + when a user specifies a subdir inside a module). + + - If the receiving side fails to create a directory, it will now skip + trying to update everything that is inside that directory. + + - If --link-dest is specified with --checksum but without --times, rsync + will now allow a hard-link to be created to a matching link-dest file + even when the file's modify-time doesn't match the server's file. + + - The daemon now calls more timezone-using functions prior to doing a + chroot. This should help some C libraries to generate proper timestamps + from inside a chrooted daemon (and to not try to access /etc/timezone + over and over again). + + - Fixed a bug in the handling of an absolute --partial-dir=ABS_PATH option: + it now deletes an alternate basis file from the partial-dir that was used + to successfully update a destination file. + + - Fixed a bug in the handling of --delete-excluded when using a per-dir + merge file: the merge file is now honored on the receiving side, and + only its unqualified include/exclude commands are ignored (just as is + done for global include/excludes). + + - Fixed a recent bug where --delete was not working when transferring from + the root (/) of the filesystem with --relative enabled. + + - Fixed a recent bug where an --exclude='*' could affect the root (/) of + the filesystem with --relative enabled. + + - When --inplace creates a file, it is now created with owner read/write + permissions (0600) instead of no permissions at all. This avoids a + problem continuing a transfer that was interrupted (since --inplace + will not update a file that has no write permissions). + + - If either --remove-source-files or --remove-sent-files is enabled and we + are unable to remove the source file, rsync now outputs an error. + + - Fixed a bug in the daemon's "incoming chmod" rule: newly-created + directories no longer get the 'F' (file) rules applied to them. + + - Fixed an infinite loop bug when a filter rule was rejected due to being + overly long. + + - When the server receives a --partial-dir option from the client, it no + longer runs the client-side code that adds an assumed filter rule (since + the client will be sending us the rules in the usual manner, and they + may have chosen to override the auto-added rule). - - Improved the documentation for the --owner and --group options. + ENHANCEMENTS: - - The rsyncstats script in "support" has an improved line-parsing regex - that is easier to read and also makes it to parse syslog-generated lines. + - Added the --log-file=FILE and --log-file-format=FORMAT options. These + can be used to tell any rsync to output what it is doing to a log file. + They work with a client rsync, a non-daemon server rsync (see the man + page for instructions), and also allows the overriding of rsyncd.conf + settings when starting a daemon. + + - The --log-format option was renamed to be --out-format to avoid confusing + it with affecting the log-file output. (The old option remains as an + alias for the new to preserve backward compatibility.) + + - Made "log file" and "syslog facility" settable on a per-module basis in + the daemon's config file. + + - Added the --remove-source-files option as a replacement for the (now + deprecated) --remove-sent-files option. This new option removes all + non-dirs from the source directories, even if the file was already + up-to-date. This fixes a problem where interrupting an rsync that + was using --remove-sent-files and restarting it could leave behind + a file that the earlier rsync synchronized, but didn't get to remove. + (The deprecated --remove-sent-files is still understood for now, and + still behaves in the same way as before.) + + - Added the option --no-motd to suppress the message-of-the-day output + from a daemon when doing a copy. (See the manpage for a caveat.) + + - Added a new environment variable to the pre-/post-xfer exec commands (in + the daemon's config file): RSYNC_PID. This value will be the same in + both the pre- and post-xfer commands, so it can be used if the pre-xfer + command wants to cache some arg/request info for the post-xfer command. + + INTERNAL: + + - Did a code audit using IBM's code-checker program and made several + changes, including: replacing most of the strcpy() and sprintf() + calls with strlcpy(), snprintf(), and memcpy(), adding a 0-value to + an enum that had been intermingling a literal 0 with the defined enum + values, silencing some uninitialized memory checks, marking some + functions with a "noreturn" attribute, and changing an "if" that + could never succeed on some platforms into a pre-processor directive + that conditionally compiles the code. + + - Fixed a potential bug in f_name_cmp() when both the args are a + top-level "." dir (which doesn't happen in normal operations). + + - Changed exit_cleanup() so that it can never return instead of exit. + The old code might return if it found the exit_cleanup() function + was being called recursively. The new code is segmented so that + any recursive calls move on to the next step of the exit-processing. - - A new script in "support": file-attr-restore, can be used to restore the - attributes of a file-set (the permissions, ownership, and group info) - taken from the cached output of a "find ARG... -ls" command. + - The macro WIFEXITED(stat) will now be defined if the OS didn't already + define it. DEVELOPER RELATED: - - Removed the unused function write_int_named(), the unused variable - io_read_phase, and the rarely used variable io_write_phase. This also - elides the confusing 'phase "unknown"' part of one error message. - - - Removed two unused configure checks and two related (also unused) - compatibility functions. + - The acls.diff and xattrs.diff patches have received a bunch of work to + make them much closer to being acceptable in the main distribution. + The xattrs patch also has some preliminary Mac OS X compatibility code + that allows Macs and non-macs to exchange extended attributes. + + - A new diff in the patches dir, fake-root.diff, allows rsync to + maintain a backup hierarchy with full owner, group, and device info + without actually running as root. It does this using a special + extended attribute, so it depends on xattrs.diff (which depends on + acls.diff). - - The xattrs.diff patch received a security fix that prevents a potential - buffer overflow in the receive_xattr() code. + - The rsync.yo and rsyncd.conf.yo files have been updated to work + better with the latest yodl 2.x releases. - - The acls.diff patch has been improved quite a bit, with more to come. + - Updated config.guess and config.sub to their 2006-02-23 version. - - A new patch was added: log-file.diff. This contains an early version of - a future option, --log-file=FILE, that will allow any rsync to log its - actions to a file (something that only a daemon supports at present). + - Updated various files to include the latest FSF address and to have + consistent opening comments. diff -urN --exclude=patches rsync-2.6.8/OLDNEWS rsync-2.6.9/OLDNEWS --- rsync-2.6.8/OLDNEWS 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/OLDNEWS 2006-11-06 20:39:47.000000000 -0800 @@ -1,3 +1,72 @@ +NEWS for rsync 2.6.8 (22 Apr 2006) +Protocol: 29 (unchanged) +Changes since 2.6.7: + + BUG FIXES: + + - Fixed a bug in the exclude code where an anchored exclude without any + wildcards fails to match an absolute source arg, but only when --relative + is in effect. + + - Improved the I/O code for the generator to fix a potential hang when the + receiver gets an EOF on the socket but the generator's select() call + never indicates that the socket is writable for it to be notified about + the EOF. (This can happen when using stunnel). + + - Fixed a problem with the file-reading code where a failed read (such as + that caused by a bad sector) would not advance the file's read-position + beyond the failed read's data. + + - Fixed a logging bug where the "log file" directive was not being honored + in a single-use daemon (one spawned by a remote-shell connection or by + init). + + - If rsync cannot honor the --delete option, we output an error and exit + instead of silently ignoring the option. + + - Fixed a bug in the --link-dest code that prevented special files (such as + fifos) from being linked. + + - The ability to hard-link symlinks and special files is now determined at + configure time instead of at runtime. This fixes a bug with --link-dest + creating a hard-link to a symlink's referent on a BSD system. + + ENHANCEMENTS: + + - In daemon mode, if rsync fails to bind to the requested port, the + error(s) returned by socket() and/or bind() are now logged. + + - When we output a fatal error, we now output the version of rsync in the + message. + + - Improved the documentation for the --owner and --group options. + + - The rsyncstats script in "support" has an improved line-parsing regex + that is easier to read and also makes it to parse syslog-generated lines. + + - A new script in "support": file-attr-restore, can be used to restore the + attributes of a file-set (the permissions, ownership, and group info) + taken from the cached output of a "find ARG... -ls" command. + + DEVELOPER RELATED: + + - Removed the unused function write_int_named(), the unused variable + io_read_phase, and the rarely used variable io_write_phase. This also + elides the confusing 'phase "unknown"' part of one error message. + + - Removed two unused configure checks and two related (also unused) + compatibility functions. + + - The xattrs.diff patch received a security fix that prevents a potential + buffer overflow in the receive_xattr() code. + + - The acls.diff patch has been improved quite a bit, with more to come. + + - A new patch was added: log-file.diff. This contains an early version of + a future option, --log-file=FILE, that will allow any rsync to log its + actions to a file (something that only a daemon supports at present). + + NEWS for rsync 2.6.7 (11 Mar 2006) Protocol: 29 (unchanged) Changes since 2.6.6: @@ -1621,7 +1690,7 @@ * The --suffix option can now be used with --backup-dir. (Michael Zimmerman) - * Combining "::" syntax with the -rsh/-e option now uses the + * Combining "::" syntax with the --rsh/-e option now uses the specified remote-shell as a transport to talk to a (newly-spawned) server-daemon. This allows someone to use daemon features, such as modules, over a secure protocol, such as ssh. (JD Paul) @@ -2013,6 +2082,7 @@ Partial Protocol History RELEASE DATE VER. DATE OF COMMIT* PROTOCOL + 06 Nov 2006 2.6.9 29 22 Apr 2006 2.6.8 29 11 Mar 2006 2.6.7 29 28 Jul 2005 2.6.6 29 diff -urN --exclude=patches rsync-2.6.8/access.c rsync-2.6.9/access.c --- rsync-2.6.8/access.c 2005-11-10 08:42:46.000000000 -0800 +++ rsync-2.6.9/access.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,29 +1,26 @@ -/* - Copyright (C) Andrew Tridgell 1998 - - 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. -*/ - /* - hosts allow/deny code for rsync - - */ + * Routines to authenticate access to a daemon (hosts allow/deny). + * + * Copyright (C) 1998 Andrew Tridgell + * Copyright (C) 2004, 2005 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" - static int match_hostname(char *host, char *tok) { if (!host || !*host) diff -urN --exclude=patches rsync-2.6.8/authenticate.c rsync-2.6.9/authenticate.c --- rsync-2.6.8/authenticate.c 2006-03-06 10:22:20.000000000 -0800 +++ rsync-2.6.9/authenticate.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,23 +1,24 @@ -/* -*- 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. -*/ +/* + * Support rsync daemon authentication. + * + * Copyright (C) 1998-2000 Andrew Tridgell + * Copyright (C) 2002, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ -/* support rsync authentication */ #include "rsync.h" extern char *password_file; diff -urN --exclude=patches rsync-2.6.8/backup.c rsync-2.6.9/backup.c --- rsync-2.6.8/backup.c 2006-02-24 08:43:44.000000000 -0800 +++ rsync-2.6.9/backup.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,22 +1,23 @@ /* - Copyright (C) Andrew Tridgell 1999 - - 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. -*/ - -/* backup handling code */ + * Backup handling code. + * + * Copyright (C) 1999 Andrew Tridgell + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" diff -urN --exclude=patches rsync-2.6.8/batch.c rsync-2.6.9/batch.c --- rsync-2.6.8/batch.c 2006-01-24 13:40:43.000000000 -0800 +++ rsync-2.6.9/batch.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,9 +1,24 @@ -/* -*- c-file-style: "linux" -*- - - Weiss 1/1999 - Batch utilities for rsync. - -*/ +/* + * Support for the batch-file options. + * + * Copyright (C) 1999 Weiss + * Copyright (C) 2004 Chris Shoemaker + * Copyright (C) 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" #include "zlib/zlib.h" diff -urN --exclude=patches rsync-2.6.8/byteorder.h rsync-2.6.9/byteorder.h --- rsync-2.6.8/byteorder.h 1996-06-21 22:04:20.000000000 -0700 +++ rsync-2.6.9/byteorder.h 2006-04-25 16:51:12.000000000 -0700 @@ -1,25 +1,26 @@ -/* - simple byteorder handling - Copyright (C) Andrew Tridgell 1992-1995 - - 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. -*/ +/* + * Simple byteorder handling. + * + * Copyright (C) 1992-1995 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #undef CAREFUL_ALIGNMENT -/* we know that the x86 can handle misalignment and has the "right" +/* we know that the x86 can handle misalignment and has the "right" byteorder */ #ifdef __i386__ #define CAREFUL_ALIGNMENT 0 diff -urN --exclude=patches rsync-2.6.8/case_N.h rsync-2.6.9/case_N.h --- rsync-2.6.8/case_N.h 1969-12-31 16:00:00.000000000 -0800 +++ rsync-2.6.9/case_N.h 2006-10-15 08:57:27.000000000 -0700 @@ -0,0 +1,80 @@ +/* + * End-of-run cleanup helper code used by cleanup.c. + * + * Copyright (C) 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* This is included by cleanup.c multiple times, once for every segement in + * the _exit_cleanup() code. This produces the next "case N:" statement in + * sequence and increments the cleanup_step variable by 1. This ensures that + * our case statements never get out of whack due to added/removed steps. */ + +#if !defined EXIT_CLEANUP_CASE_0 +#define EXIT_CLEANUP_CASE_0 + case 0: +#elif !defined EXIT_CLEANUP_CASE_1 +#define EXIT_CLEANUP_CASE_1 + case 1: +#elif !defined EXIT_CLEANUP_CASE_2 +#define EXIT_CLEANUP_CASE_2 + case 2: +#elif !defined EXIT_CLEANUP_CASE_3 +#define EXIT_CLEANUP_CASE_3 + case 3: +#elif !defined EXIT_CLEANUP_CASE_4 +#define EXIT_CLEANUP_CASE_4 + case 4: +#elif !defined EXIT_CLEANUP_CASE_5 +#define EXIT_CLEANUP_CASE_5 + case 5: +#elif !defined EXIT_CLEANUP_CASE_6 +#define EXIT_CLEANUP_CASE_6 + case 6: +#elif !defined EXIT_CLEANUP_CASE_7 +#define EXIT_CLEANUP_CASE_7 + case 7: +#elif !defined EXIT_CLEANUP_CASE_8 +#define EXIT_CLEANUP_CASE_8 + case 8: +#elif !defined EXIT_CLEANUP_CASE_9 +#define EXIT_CLEANUP_CASE_9 + case 9: +#elif !defined EXIT_CLEANUP_CASE_10 +#define EXIT_CLEANUP_CASE_10 + case 10: +#elif !defined EXIT_CLEANUP_CASE_11 +#define EXIT_CLEANUP_CASE_11 + case 11: +#elif !defined EXIT_CLEANUP_CASE_12 +#define EXIT_CLEANUP_CASE_12 + case 12: +#elif !defined EXIT_CLEANUP_CASE_13 +#define EXIT_CLEANUP_CASE_13 + case 13: +#elif !defined EXIT_CLEANUP_CASE_14 +#define EXIT_CLEANUP_CASE_14 + case 14: +#elif !defined EXIT_CLEANUP_CASE_15 +#define EXIT_CLEANUP_CASE_15 + case 15: +#elif !defined EXIT_CLEANUP_CASE_16 +#define EXIT_CLEANUP_CASE_16 + case 16: +#else +#error Need to add more case statements! +#endif + cleanup_step++; diff -urN --exclude=patches rsync-2.6.8/checksum.c rsync-2.6.9/checksum.c --- rsync-2.6.8/checksum.c 2005-01-01 13:08:05.000000000 -0800 +++ rsync-2.6.9/checksum.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,21 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ + * Routines to support checksumming of bytes. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2004, 2005 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" diff -urN --exclude=patches rsync-2.6.8/chmod.c rsync-2.6.9/chmod.c --- rsync-2.6.8/chmod.c 2006-02-23 17:56:18.000000000 -0800 +++ rsync-2.6.9/chmod.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,3 +1,24 @@ +/* + * Implement the core of the --chmod option. + * + * Copyright (C) 2002 Scott Howard + * Copyright (C) 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + #include "rsync.h" extern mode_t orig_umask; diff -urN --exclude=patches rsync-2.6.8/cleanup.c rsync-2.6.9/cleanup.c --- rsync-2.6.8/cleanup.c 2006-02-03 10:46:38.000000000 -0800 +++ rsync-2.6.9/cleanup.c 2006-10-15 08:43:26.000000000 -0700 @@ -1,30 +1,35 @@ -/* -*- c-file-style: "linux" -*- - - Copyright (C) 1996-2000 by Andrew Tridgell - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2002 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. -*/ +/* + * End-of-run cleanup routines. + * + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" +extern int am_server; +extern int am_daemon; extern int io_error; extern int keep_partial; extern int log_got_error; extern char *partial_dir; +extern char *logfile_name; #ifdef HAVE_SIGACTION static struct sigaction sigact; @@ -87,83 +92,117 @@ * * @param code one of the RERR_* codes from errcode.h. **/ -void _exit_cleanup(int code, const char *file, int line) +NORETURN void _exit_cleanup(int code, const char *file, int line) { - int ocode = code; - static int inside_cleanup = 0; - - if (inside_cleanup > 10) { - /* prevent the occasional infinite recursion */ - return; - } - inside_cleanup++; + static int cleanup_step = 0; + static int exit_code = 0; + static int unmodified_code = 0; SIGACTION(SIGUSR1, SIG_IGN); SIGACTION(SIGUSR2, SIG_IGN); - if (verbose > 3) { - rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n", - code, file, line); - } + if (exit_code) /* Preserve first error code when recursing. */ + code = exit_code; - if (cleanup_child_pid != -1) { - int status; - if (wait_process(cleanup_child_pid, &status, WNOHANG) - == cleanup_child_pid) { - status = WEXITSTATUS(status); - if (status > code) - code = status; + /* Some of our actions might cause a recursive call back here, so we + * keep track of where we are in the cleanup and never repeat a step. */ + switch (cleanup_step) { +#include "case_N.h" /* case 0: cleanup_step++; */ + + exit_code = unmodified_code = code; + + if (verbose > 3) { + rprintf(FINFO, + "_exit_cleanup(code=%d, file=%s, line=%d): entered\n", + code, file, line); } - } - if (cleanup_got_literal && cleanup_fname && keep_partial - && handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) { - char *fname = cleanup_fname; - cleanup_fname = NULL; - if (cleanup_fd_r != -1) - close(cleanup_fd_r); - if (cleanup_fd_w != -1) { - flush_write_file(cleanup_fd_w); - close(cleanup_fd_w); + /* FALLTHROUGH */ +#include "case_N.h" + + if (cleanup_child_pid != -1) { + int status; + int pid = wait_process(cleanup_child_pid, &status, WNOHANG); + if (pid == cleanup_child_pid) { + status = WEXITSTATUS(status); + if (status > code) + code = exit_code = status; + } } - finish_transfer(cleanup_new_fname, fname, NULL, - cleanup_file, 0, !partial_dir); - } - io_flush(FULL_FLUSH); - if (cleanup_fname) - do_unlink(cleanup_fname); - if (code) - kill_all(SIGUSR1); - if (cleanup_pid && cleanup_pid == getpid()) { - char *pidf = lp_pid_file(); - if (pidf && *pidf) - unlink(lp_pid_file()); - } - if (code == 0) { - if (io_error & IOERR_DEL_LIMIT) - code = RERR_DEL_LIMIT; - if (io_error & IOERR_VANISHED) - code = RERR_VANISHED; - if (io_error & IOERR_GENERAL || log_got_error) - code = RERR_PARTIAL; - } + /* FALLTHROUGH */ +#include "case_N.h" + + if (cleanup_got_literal && cleanup_fname && cleanup_new_fname + && keep_partial && handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) { + char *fname = cleanup_fname; + cleanup_fname = NULL; + if (cleanup_fd_r != -1) + close(cleanup_fd_r); + if (cleanup_fd_w != -1) { + flush_write_file(cleanup_fd_w); + close(cleanup_fd_w); + } + finish_transfer(cleanup_new_fname, fname, NULL, + cleanup_file, 0, !partial_dir); + } + + /* FALLTHROUGH */ +#include "case_N.h" + + io_flush(FULL_FLUSH); + + /* FALLTHROUGH */ +#include "case_N.h" + + if (cleanup_fname) + do_unlink(cleanup_fname); + if (code) + kill_all(SIGUSR1); + if (cleanup_pid && cleanup_pid == getpid()) { + char *pidf = lp_pid_file(); + if (pidf && *pidf) + unlink(lp_pid_file()); + } + + if (code == 0) { + if (io_error & IOERR_DEL_LIMIT) + code = exit_code = RERR_DEL_LIMIT; + if (io_error & IOERR_VANISHED) + code = exit_code = RERR_VANISHED; + if (io_error & IOERR_GENERAL || log_got_error) + code = exit_code = RERR_PARTIAL; + } + + if (code || am_daemon || (logfile_name && (am_server || !verbose))) + log_exit(code, file, line); + + /* FALLTHROUGH */ +#include "case_N.h" + + if (verbose > 2) { + rprintf(FINFO, + "_exit_cleanup(code=%d, file=%s, line=%d): " + "about to call exit(%d)\n", + unmodified_code, file, line, code); + } + + /* FALLTHROUGH */ +#include "case_N.h" - if (code) - log_exit(code, file, line); + close_all(); - if (verbose > 2) { - rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n", - ocode, file, line, code); + /* FALLTHROUGH */ + default: + break; } - close_all(); exit(code); } void cleanup_disable(void) { - cleanup_fname = NULL; + cleanup_fname = cleanup_new_fname = NULL; cleanup_got_literal = 0; } @@ -171,8 +210,8 @@ void cleanup_set(char *fnametmp, char *fname, struct file_struct *file, int fd_r, int fd_w) { - cleanup_fname = fname ? fnametmp : NULL; - cleanup_new_fname = fname; + cleanup_fname = fnametmp; + cleanup_new_fname = fname; /* can be NULL on a partial-dir failure */ cleanup_file = file; cleanup_fd_r = fd_r; cleanup_fd_w = fd_w; diff -urN --exclude=patches rsync-2.6.8/clientname.c rsync-2.6.9/clientname.c --- rsync-2.6.8/clientname.c 2006-02-24 08:43:44.000000000 -0800 +++ rsync-2.6.9/clientname.c 2006-10-13 16:17:27.000000000 -0700 @@ -1,35 +1,31 @@ -/* -*- c-file-style: "linux" -*- - - rsync -- fast file replication program - - Copyright (C) 1992-2001 by Andrew Tridgell - Copyright (C) 2001, 2002 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. -*/ - -/** - * @file clientname.c - * +/* * Functions for looking up the remote name or addr of a socket. * + * Copyright (C) 1992-2001 Andrew Tridgell + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2002, 2003, 2004 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* * This file is now converted to use the new-style getaddrinfo() * interface, which supports IPv6 but is also supported on recent * IPv4-only machines. On systems that don't have that interface, we * emulate it using the KAME implementation. - **/ + */ #include "rsync.h" @@ -54,7 +50,7 @@ initialised = 1; if (am_server) { /* daemon over --rsh mode */ - strcpy(addr_buf, "0.0.0.0"); + strlcpy(addr_buf, "0.0.0.0", sizeof addr_buf); if ((ssh_info = getenv("SSH_CONNECTION")) != NULL || (ssh_info = getenv("SSH_CLIENT")) != NULL || (ssh_info = getenv("SSH2_CLIENT")) != NULL) { @@ -103,7 +99,7 @@ if (initialised) return name_buf; - strcpy(name_buf, default_name); + strlcpy(name_buf, default_name, sizeof name_buf); initialised = 1; memset(&ss, 0, sizeof ss); @@ -137,6 +133,8 @@ memcpy(&ss, answer->ai_addr, ss_len); break; #endif + default: + exit_cleanup(RERR_SOCKETIO); } freeaddrinfo(answer); } else { @@ -146,7 +144,7 @@ if (lookup_name(fd, &ss, ss_len, name_buf, sizeof name_buf, port_buf, sizeof port_buf) == 0) - check_name(fd, &ss, name_buf); + check_name(fd, &ss, name_buf, sizeof name_buf); return name_buf; } @@ -210,18 +208,18 @@ **/ int lookup_name(int fd, const struct sockaddr_storage *ss, socklen_t ss_len, - char *name_buf, size_t name_buf_len, - char *port_buf, size_t port_buf_len) + char *name_buf, size_t name_buf_size, + char *port_buf, size_t port_buf_size) { int name_err; /* reverse lookup */ name_err = getnameinfo((struct sockaddr *) ss, ss_len, - name_buf, name_buf_len, - port_buf, port_buf_len, + name_buf, name_buf_size, + port_buf, port_buf_size, NI_NAMEREQD | NI_NUMERICSERV); if (name_err != 0) { - strcpy(name_buf, default_name); + strlcpy(name_buf, default_name, name_buf_size); rprintf(FLOG, "name lookup failed for %s: %s\n", client_addr(fd), gai_strerror(name_err)); return name_err; @@ -302,7 +300,7 @@ **/ int check_name(int fd, const struct sockaddr_storage *ss, - char *name_buf) + char *name_buf, size_t name_buf_size) { struct addrinfo hints, *res, *res0; int error; @@ -316,7 +314,7 @@ if (error) { rprintf(FLOG, "forward name lookup for %s failed: %s\n", name_buf, gai_strerror(error)); - strcpy(name_buf, default_name); + strlcpy(name_buf, default_name, name_buf_size); return error; } @@ -332,13 +330,13 @@ * address that was the same as ss. */ rprintf(FLOG, "no known address for \"%s\": " "spoofed address?\n", name_buf); - strcpy(name_buf, default_name); + strlcpy(name_buf, default_name, name_buf_size); } else if (res == NULL) { /* We hit the end of the list without finding an * address that was the same as ss. */ rprintf(FLOG, "%s is not a known address for \"%s\": " "spoofed address?\n", client_addr(fd), name_buf); - strcpy(name_buf, default_name); + strlcpy(name_buf, default_name, name_buf_size); } freeaddrinfo(res0); diff -urN --exclude=patches rsync-2.6.8/clientserver.c rsync-2.6.9/clientserver.c --- rsync-2.6.8/clientserver.c 2006-04-10 17:28:02.000000000 -0700 +++ rsync-2.6.9/clientserver.c 2006-10-23 17:36:42.000000000 -0700 @@ -1,7 +1,9 @@ -/* -*- c-file-style: "linux"; -*- +/* + * The socket based protocol for setting up a connection with rsyncd. * - * Copyright (C) 1998-2001 by Andrew Tridgell - * Copyright (C) 2001-2002 by Martin Pool + * Copyright (C) 1998-2001 Andrew Tridgell + * Copyright (C) 2001-2002 Martin Pool + * Copyright (C) 2002, 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -13,22 +15,16 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @file - * - * The socket based protocol for setting up a connection with - * rsyncd. - **/ - #include "rsync.h" extern int verbose; extern int quiet; +extern int output_motd; extern int list_only; extern int am_sender; extern int am_server; @@ -44,10 +40,13 @@ extern int io_timeout; extern int no_detach; extern int default_af_hint; +extern int logfile_format_has_i; +extern int logfile_format_has_o_or_i; extern mode_t orig_umask; extern char *bind_address; extern char *sockopts; extern char *config_file; +extern char *logfile_format; extern char *files_from; extern char *tmpdir; extern struct chmod_mode_struct *chmod_modes; @@ -55,8 +54,6 @@ char *auth_user; int read_only = 0; -int daemon_log_format_has_i = 0; -int daemon_log_format_has_o_or_i = 0; int module_id = -1; struct chmod_mode_struct *daemon_chmod_modes; @@ -113,7 +110,7 @@ return ret ? ret : client_run(fd, fd, -1, argc, argv); } -int start_inband_exchange(char *user, char *path, int f_in, int f_out, +int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc) { int i; @@ -209,7 +206,10 @@ return -1; } - rprintf(FINFO, "%s\n", line); + /* This might be a MOTD line or a module listing, but there is + * no way to differentiate it. The manpage mentions this. */ + if (output_motd) + rprintf(FINFO, "%s\n", line); } kluge_around_eof = 0; @@ -328,13 +328,12 @@ if (lp_read_only(i)) read_only = 1; - if (lp_transfer_logging(i)) { - if (log_format_has(lp_log_format(i), 'i')) - daemon_log_format_has_i = 1; - if (daemon_log_format_has_i - || log_format_has(lp_log_format(i), 'o')) - daemon_log_format_has_o_or_i = 1; - } + if (lp_transfer_logging(i) && !logfile_format) + logfile_format = lp_log_format(i); + if (log_format_has(logfile_format, 'i')) + logfile_format_has_i = 1; + if (logfile_format_has_i || log_format_has(logfile_format, 'o')) + logfile_format_has_o_or_i = 1; am_root = (MY_UID() == 0); @@ -394,7 +393,7 @@ parse_rule(&server_filter_list, p, MATCHFLG_WORD_SPLIT, XFLG_ABS_IF_SLASH | XFLG_OLD_PREFIXES); - log_init(); + log_init(1); #ifdef HAVE_PUTENV if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) { @@ -423,17 +422,18 @@ return -1; } if (pid) { - char *ret1, *ret2; + if (asprintf(&p, "RSYNC_PID=%ld", (long)pid) > 0) + putenv(p); if (wait_process(pid, &status, 0) < 0) status = -1; - if (asprintf(&ret1, "RSYNC_RAW_STATUS=%d", status) > 0) - putenv(ret1); + if (asprintf(&p, "RSYNC_RAW_STATUS=%d", status) > 0) + putenv(p); if (WIFEXITED(status)) status = WEXITSTATUS(status); else status = -1; - if (asprintf(&ret2, "RSYNC_EXIT_STATUS=%d", status) > 0) - putenv(ret2); + if (asprintf(&p, "RSYNC_EXIT_STATUS=%d", status) > 0) + putenv(p); system(lp_postxfer_exec(i)); _exit(status); } @@ -443,6 +443,8 @@ * send us the user's request via a pipe. */ if (*lp_prexfer_exec(i)) { int fds[2]; + if (asprintf(&p, "RSYNC_PID=%ld", (long)getpid()) > 0) + putenv(p); if (pipe(fds) < 0 || (pre_exec_pid = fork()) < 0) { rsyserr(FLOG, errno, "pre-xfer exec preparation failed"); io_printf(f_out, "@ERROR: pre-xfer exec preparation failed\n"); @@ -456,9 +458,8 @@ len = read_arg_from_pipe(fds[0], buf, BIGPATHBUFLEN); if (len <= 0) _exit(1); - if (asprintf(&p, "RSYNC_REQUEST=%s", buf) < 0) - out_of_memory("rsync_module"); - putenv(p); + if (asprintf(&p, "RSYNC_REQUEST=%s", buf) > 0) + putenv(p); for (j = 0; ; j++) { len = read_arg_from_pipe(fds[0], buf, BIGPATHBUFLEN); @@ -467,9 +468,8 @@ break; _exit(1); } - if (asprintf(&p, "RSYNC_ARG%d=%s", j, buf) < 0) - out_of_memory("rsync_module"); - putenv(p); + if (asprintf(&p, "RSYNC_ARG%d=%s", j, buf) > 0) + putenv(p); } close(fds[0]); close(STDIN_FILENO); @@ -507,7 +507,7 @@ return -1; } - if (!push_dir("/")) { + if (!push_dir("/", 0)) { rsyserr(FLOG, errno, "chdir %s failed\n", lp_path(i)); io_printf(f_out, "@ERROR: chdir failed\n"); @@ -515,7 +515,7 @@ } } else { - if (!push_dir(lp_path(i))) { + if (!push_dir(lp_path(i), 0)) { rsyserr(FLOG, errno, "chdir %s failed\n", lp_path(i)); io_printf(f_out, "@ERROR: chdir failed\n"); @@ -841,7 +841,7 @@ if (bind_address == NULL && *lp_bind_address()) bind_address = lp_bind_address(); - log_init(); + log_init(0); rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n", RSYNC_VERSION, rsync_port); diff -urN --exclude=patches rsync-2.6.8/compat.c rsync-2.6.9/compat.c --- rsync-2.6.8/compat.c 2006-02-24 08:43:44.000000000 -0800 +++ rsync-2.6.9/compat.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,27 +1,24 @@ -/* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ - -/** - * @file compat.c - * +/* * Compatibility routines for older rsync protocol versions. - **/ + * + * Copyright (C) Andrew Tridgell 1996 + * Copyright (C) Paul Mackerras 1996 + * Copyright (C) 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" diff -urN --exclude=patches rsync-2.6.8/config.guess rsync-2.6.9/config.guess --- rsync-2.6.8/config.guess 2004-03-05 23:00:47.000000000 -0800 +++ rsync-2.6.9/config.guess 2006-11-01 18:01:25.000000000 -0800 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2003-10-03' +timestamp='2006-07-02' # 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 @@ -17,13 +18,15 @@ # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +56,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +69,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +126,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,50 +199,32 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -277,42 +262,49 @@ "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -320,32 +312,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -354,10 +346,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -369,10 +361,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # 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 @@ -383,37 +375,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -437,32 +432,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -478,29 +474,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????: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 ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -508,7 +504,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -523,14 +519,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -544,28 +544,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; 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 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -627,9 +627,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -637,11 +647,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -669,153 +679,179 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; 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 "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/FreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; 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 # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -832,8 +868,12 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -851,15 +891,22 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -873,7 +920,7 @@ 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 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -881,25 +928,28 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; 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 @@ -917,15 +967,15 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # 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 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -942,7 +992,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -952,16 +1002,23 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; 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 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -969,24 +1026,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; 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 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; 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 @@ -994,15 +1054,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. 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 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1094,68 +1155,72 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1163,22 +1228,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1189,28 +1257,47 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1242,7 +1329,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1331,11 +1418,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1344,22 +1432,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1370,7 +1458,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff -urN --exclude=patches rsync-2.6.8/config.h.in rsync-2.6.9/config.h.in --- rsync-2.6.8/config.h.in 2006-04-17 10:54:00.000000000 -0700 +++ rsync-2.6.9/config.h.in 2006-11-06 20:39:47.000000000 -0800 @@ -176,10 +176,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H -/* Define to 1 if long double works and has more range or precision than - double. */ +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ #undef HAVE_LONG_DOUBLE +/* Define to 1 if the type `long double' works and has more range or precision + than `double'. */ +#undef HAVE_LONG_DOUBLE_WIDER + /* Define to 1 if you have the `lseek64' function. */ #undef HAVE_LSEEK64 @@ -418,6 +422,9 @@ . */ #undef MAJOR_IN_SYSMACROS +/* Define to 1 if makedev() takes 3 args */ +#undef MAKEDEV_TAKES_3_ARGS + /* Define to 1 if mknod() can create FIFOs. */ #undef MKNOD_CREATES_FIFOS @@ -466,27 +473,27 @@ /* Define to 1 if "signed char" is a valid type */ #undef SIGNED_CHAR_OK -/* The size of a `int', as computed by sizeof. */ +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `long long', as computed by sizeof. */ +/* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of a `off64_t', as computed by sizeof. */ +/* The size of `off64_t', as computed by sizeof. */ #undef SIZEOF_OFF64_T -/* The size of a `off_t', as computed by sizeof. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T -/* The size of a `short', as computed by sizeof. */ +/* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. + automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @@ -523,13 +530,13 @@ /* Define to `int' if does not define. */ #undef mode_t -/* Define to `long' if does not define. */ +/* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* type to use in place of socklen_t if not defined */ diff -urN --exclude=patches rsync-2.6.8/config.sub rsync-2.6.9/config.sub --- rsync-2.6.8/config.sub 2004-03-05 23:00:16.000000000 -0800 +++ rsync-2.6.9/config.sub 2006-11-01 18:01:25.000000000 -0800 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2003-08-18' +timestamp='2006-07-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +22,15 @@ # # 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., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # 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 . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -70,7 +72,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -83,11 +85,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +101,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,7 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -144,7 +148,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -169,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -229,14 +241,16 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m68000 | m68k | m88k | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -245,6 +259,7 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -253,20 +268,23 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -277,6 +295,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -296,10 +317,10 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ @@ -307,9 +328,9 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -318,6 +339,7 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -325,24 +347,28 @@ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -362,6 +388,9 @@ basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -379,6 +408,9 @@ amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -438,12 +470,27 @@ basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -466,6 +513,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -644,10 +695,6 @@ 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 @@ -660,6 +707,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -728,10 +778,6 @@ np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -739,9 +785,12 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -768,6 +817,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -824,6 +879,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -963,6 +1022,10 @@ tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -1006,6 +1069,10 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1036,6 +1103,9 @@ romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1052,13 +1122,10 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1131,19 +1198,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -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* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1161,7 +1232,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1182,6 +1253,9 @@ -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1203,6 +1277,9 @@ -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1225,6 +1302,9 @@ -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1261,6 +1341,9 @@ -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; -none) ;; *) @@ -1283,6 +1366,9 @@ # system, and we'll never get to this point. case $basic_machine in + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1292,9 +1378,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1338,9 +1424,15 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1473,9 +1565,15 @@ -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1500,7 +1598,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -urN --exclude=patches rsync-2.6.8/configure rsync-2.6.9/configure --- rsync-2.6.8/configure 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/configure 2006-11-06 20:39:47.000000000 -0800 @@ -1,8 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.60a. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -16,11 +17,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -29,8 +54,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +104,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +124,386 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# 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 -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -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= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi 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='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 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 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +512,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +533,27 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # 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 +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= 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} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -275,42 +565,120 @@ # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS RSYNC_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA HAVE_REMSH LIBOBJS ALLOCA OBJ_SAVE OBJ_RESTORE CC_SHOBJ_FLAG BUILD_POPT LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +RSYNC_VERSION +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +HAVE_REMSH +LIBOBJS +ALLOCA +OBJ_SAVE +OBJ_RESTORE +CC_SHOBJ_FLAG +BUILD_POPT +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -337,34 +705,48 @@ # 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. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,12 +768,18 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. @@ -399,7 +787,17 @@ { 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" ;; + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` @@ -408,11 +806,7 @@ { 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- \ @@ -439,6 +833,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +863,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +937,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -590,11 +1003,7 @@ { 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 - *=*) 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=`expr "x$ac_option" : 'x-*without-\(.*\)'` @@ -603,7 +1012,7 @@ { 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" ;; + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -634,8 +1043,7 @@ 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'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -655,27 +1063,19 @@ { (exit 1); exit 1; }; } fi -# 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 directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -702,76 +1102,78 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # 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_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 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 - -# +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# # Report the --help message. # if test "$ac_init_help" = "long"; then @@ -798,9 +1200,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -818,15 +1217,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -861,132 +1267,103 @@ --with-rsyncd-conf=PATH set configuration file for rsync server to PATH (default: /etc/rsyncd.conf) --with-rsh=CMD set remote shell command to CMD (default: ssh) + --with-nobody-group=GROUP + set the default unprivileged group (default nobody + or nogroup) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + CPPFLAGS C/C++/Objective 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. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd "$ac_popdir" + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.60a -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60a. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1005,7 +1382,7 @@ /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` +/usr/bin/hostinfo = `(/usr/bin/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` @@ -1019,6 +1396,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1040,7 +1418,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1051,7 +1428,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1073,9 +1450,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1086,8 +1461,8 @@ # 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. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1100,20 +1475,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "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" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1124,22 +1513,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1151,26 +1546,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 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 +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1201,14 +1594,17 @@ # 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 - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1224,8 +1620,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1237,12 +1633,11 @@ # 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 +for ac_var in $ac_precious_vars; 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" + 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:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1267,8 +1662,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1285,12 +1679,6 @@ { (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 - @@ -1307,14 +1695,19 @@ +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_config_headers="$ac_config_headers config.h" +ac_config_headers="$ac_config_headers config.h" -RSYNC_VERSION=2.6.8 +RSYNC_VERSION=2.6.9 { echo "$as_me:$LINENO: Configuring rsync $RSYNC_VERSION" >&5 echo "$as_me: Configuring rsync $RSYNC_VERSION" >&6;} @@ -1328,104 +1721,154 @@ LDFLAGS=${LDFLAGS-""} ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: 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;} + { { echo "$as_me:$LINENO: 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. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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" && + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: 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:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac 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/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac 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/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac 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/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -1443,8 +1886,8 @@ 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:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1457,32 +1900,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: 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 "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1495,36 +1940,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi 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. + 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:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1537,74 +1997,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: 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:$LINENO: 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 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + 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 "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1618,7 +2038,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1629,6 +2049,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1646,22 +2067,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe 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:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1674,36 +2096,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe 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:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -1716,29 +2140,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1751,21 +2191,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1790,47 +2244,77 @@ # 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:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $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. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].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, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1842,19 +2326,21 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1873,22 +2359,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1899,9 +2390,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1915,14 +2405,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1942,14 +2432,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1967,12 +2463,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: 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 +{ echo "$as_me:$LINENO: 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 @@ -1995,23 +2491,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2020,24 +2529,139 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2053,23 +2677,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2078,12 +2715,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: 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 elif test $ac_cv_prog_cc_g = yes; then @@ -2099,12 +2744,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2138,12 +2783,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2158,201 +2808,74 @@ 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__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -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:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# 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:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - '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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err 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 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2364,8 +2887,8 @@ 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:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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= @@ -2399,8 +2922,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2425,9 +2953,10 @@ # 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 + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2437,8 +2966,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2465,6 +2999,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2482,8 +3017,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2506,8 +3041,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2532,9 +3072,10 @@ # 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 + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2544,8 +3085,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2572,6 +3118,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2593,19 +3140,166 @@ 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:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" # Find a good install program. We prefer a C program (faster), @@ -2621,8 +3315,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2644,7 +3338,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2663,21 +3357,22 @@ ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then 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 + # As a last resort, use the slow shell script. Don't cache a + # value 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. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: 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. @@ -2687,109 +3382,484 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + case $ac_cv_prog_cc_stdc in + no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; + *) { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C99... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c99+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +#include +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; +struct incomplete_array +{ + int datasize; + double data[]; +}; +struct named_init { + int number; + const wchar_t *name; + double average; +}; -cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF +typedef const char *ccp; +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} -if test x"$ac_cv_prog_cc_stdc" = x"no"; then - { echo "$as_me:$LINENO: 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 +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); -# We must decide this before testing the compiler. + const char *str; + int number; + float fnumber; -# Please allow this to default to yes, so that your users have more -# chance of getting a useful stack trace if problems occur. + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} -echo "$as_me:$LINENO: 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" +int +main () +{ -fi; + // Check bool. + _Bool success = false; -if test x"$enable_debug" = x"no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - CFLAGS=${CFLAGS-"-O"} -else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - # leave CFLAGS alone; AC_PROG_CC will try to include -g if it can - fi + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); -# Check whether --enable-profile or --disable-profile was given. -if test "${enable_profile+set}" = set; then - enableval="$enable_profile" + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; -fi; -if test x"$enable_profile" = x"yes"; then - CFLAGS="$CFLAGS -pg" -fi + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + ni.number = 58; -# Specifically, this turns on panic_action handling. -# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; -fi; -if test x"$enable_maintainer_mode" = x"yes"; then - CFLAGS="$CFLAGS -DMAINTAINER_MODE" -fi + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -c99 -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_c99=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# This is needed for our included version of popt. Kind of silly, but -# I don't want our version too far out of sync. -CFLAGS="$CFLAGS -DHAVE_CONFIG_H" -# If GCC, turn on warnings. -if test x"$GCC" = x"yes"; then - CFLAGS="$CFLAGS -Wall -W" fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC -# 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" +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else - RSYNC_PATH="rsync" -fi; - - -cat >>confdefs.h <<_ACEOF -#define RSYNC_PATH "$RSYNC_PATH" + { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - - -# Check whether --with-rsyncd-conf or --without-rsyncd-conf was given. -if test "${with_rsyncd_conf+set}" = set; then - withval="$with_rsyncd_conf" - if test ! -z "$with_rsyncd_conf" ; then - case $with_rsyncd_conf in - yes|no) - RSYNCD_SYSCONF="/etc/rsyncd.conf" - ;; - /*) - RSYNCD_SYSCONF="$with_rsyncd_conf" - ;; - *) +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end 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; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +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 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 +else + ac_cv_prog_cc_stdc=no +fi + + +fi + + ;; +esac + { echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 +echo $ECHO_N "checking for $CC option to accept ISO Standard C... $ECHO_C" >&6; } + if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi + + case $ac_cv_prog_cc_stdc in + no) { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + '') { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + *) { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6; } ;; +esac + + + + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + +if test x"$ac_cv_prog_cc_stdc" = x"no"; then + { echo "$as_me:$LINENO: 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 + +# We must decide this before testing the compiler. + +# Please allow this to default to yes, so that your users have more +# chance of getting a useful stack trace if problems occur. + +{ echo "$as_me:$LINENO: checking whether to include debugging symbols" >&5 +echo $ECHO_N "checking whether to include debugging symbols... $ECHO_C" >&6; } +# Check whether --enable-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:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + CFLAGS=${CFLAGS-"-O"} +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + # leave CFLAGS alone; AC_PROG_CC will try to include -g if it can + fi + + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then + enableval=$enable_profile; +fi + +if test x"$enable_profile" = x"yes"; then + CFLAGS="$CFLAGS -pg" +fi + + +# Specifically, this turns on panic_action handling. +# Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval=$enable_maintainer_mode; +fi + +if test x"$enable_maintainer_mode" = x"yes"; then + CFLAGS="$CFLAGS -DMAINTAINER_MODE" +fi + + +# This is needed for our included version of popt. Kind of silly, but +# I don't want our version too far out of sync. +CFLAGS="$CFLAGS -DHAVE_CONFIG_H" + +# If GCC, turn on warnings. +if test x"$GCC" = x"yes"; then + CFLAGS="$CFLAGS -Wall -W" +fi + + +# Check whether --with-included-popt was given. +if test "${with_included_popt+set}" = set; then + withval=$with_included_popt; +fi + + + +# Check whether --with-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 <<_ACEOF +#define RSYNC_PATH "$RSYNC_PATH" +_ACEOF + + + +# Check whether --with-rsyncd-conf was given. +if test "${with_rsyncd_conf+set}" = set; then + withval=$with_rsyncd_conf; if test ! -z "$with_rsyncd_conf" ; then + case $with_rsyncd_conf in + yes|no) + RSYNCD_SYSCONF="/etc/rsyncd.conf" + ;; + /*) + RSYNCD_SYSCONF="$with_rsyncd_conf" + ;; + *) { { echo "$as_me:$LINENO: error: You must specify an absolute path to --with-rsyncd-conf=PATH" >&5 echo "$as_me: error: You must specify an absolute path to --with-rsyncd-conf=PATH" >&2;} { (exit 1); exit 1; }; } @@ -2800,7 +3870,8 @@ fi else RSYNCD_SYSCONF="/etc/rsyncd.conf" -fi; +fi + cat >>confdefs.h <<_ACEOF @@ -2809,16 +3880,16 @@ -# Check whether --with-rsh or --without-rsh was given. +# Check whether --with-rsh was given. if test "${with_rsh+set}" = set; then - withval="$with_rsh" + withval=$with_rsh; +fi -fi; # Extract the first word of "remsh", so it can be a program name with args. set dummy remsh; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -2831,26 +3902,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_REMSH="1" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_REMSH" && ac_cv_prog_HAVE_REMSH="0" fi fi HAVE_REMSH=$ac_cv_prog_HAVE_REMSH if test -n "$HAVE_REMSH"; then - echo "$as_me:$LINENO: result: $HAVE_REMSH" >&5 -echo "${ECHO_T}$HAVE_REMSH" >&6 + { echo "$as_me:$LINENO: result: $HAVE_REMSH" >&5 +echo "${ECHO_T}$HAVE_REMSH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test x$HAVE_REMSH = x1; then cat >>confdefs.h <<\_ACEOF @@ -2870,17 +3943,27 @@ _ACEOF -echo "$as_me:$LINENO: checking the group for user \"nobody\"" >&5 -echo $ECHO_N "checking the group for user \"nobody\"... $ECHO_C" >&6 -if grep '^nobody:' /etc/group >/dev/null 2>&1; then - NOBODY_GROUP=nobody -elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then - NOBODY_GROUP=nogroup -else - NOBODY_GROUP=nobody # test for others? + +# Check whether --with-nobody-group was given. +if test "${with_nobody_group+set}" = set; then + withval=$with_nobody_group; NOBODY_GROUP="$with_nobody_group" +fi + + +if test x"$with_nobody_group" = x; then + { echo "$as_me:$LINENO: checking the group for user \"nobody\"" >&5 +echo $ECHO_N "checking the group for user \"nobody\"... $ECHO_C" >&6; } + if grep '^nobody:' /etc/group >/dev/null 2>&1; then + NOBODY_GROUP=nobody + elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then + NOBODY_GROUP=nogroup + else + NOBODY_GROUP=nobody # test for others? + fi + { echo "$as_me:$LINENO: result: $NOBODY_GROUP" >&5 +echo "${ECHO_T}$NOBODY_GROUP" >&6; } fi -echo "$as_me:$LINENO: result: $NOBODY_GROUP" >&5 -echo "${ECHO_T}$NOBODY_GROUP" >&6 + cat >>confdefs.h <<_ACEOF #define NOBODY_USER "nobody" @@ -2895,8 +3978,8 @@ # arrgh. libc in some old debian version screwed up the largefile # stuff, getting byte range locking wrong -echo "$as_me:$LINENO: checking for broken largefile support" >&5 -echo $ECHO_N "checking for broken largefile support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for broken largefile support" >&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 @@ -2945,13 +4028,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2964,21 +4056,23 @@ ( exit $ac_status ) rsync_cv_HAVE_BROKEN_LARGEFILE=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_BROKEN_LARGEFILE" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_BROKEN_LARGEFILE" >&6 +{ echo "$as_me:$LINENO: 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. + # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" + enableval=$enable_largefile; +fi -fi; if test "$enable_largefile" != no; then - echo "$as_me:$LINENO: 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 + { echo "$as_me:$LINENO: 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 @@ -2986,8 +4080,8 @@ 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. + # 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 /* confdefs.h. */ _ACEOF @@ -3011,24 +4105,37 @@ return 0; } _ACEOF - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3037,27 +4144,42 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3066,22 +4188,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&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:$LINENO: 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 + { echo "$as_me:$LINENO: 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 @@ -3111,23 +4235,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3136,8 +4273,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3163,23 +4302,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3188,13 +4340,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +{ echo "$as_me:$LINENO: 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 cat >>confdefs.h <<_ACEOF @@ -3203,8 +4357,8 @@ fi rm -f conftest* - echo "$as_me:$LINENO: 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 + { echo "$as_me:$LINENO: 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 @@ -3234,23 +4388,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3259,8 +4426,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3286,23 +4455,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3311,13 +4493,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext break done fi -echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF @@ -3334,14 +4518,14 @@ ipv6lib=none ipv6trylibc=yes -# Check whether --enable-ipv6 or --disable-ipv6 was given. +# Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then - enableval="$enable_ipv6" + enableval=$enable_ipv6; +fi -fi; if test x"$enable_ipv6" != x"no"; then - echo "$as_me:$LINENO: checking ipv6 stack type" >&5 -echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking ipv6 stack type" >&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) @@ -3525,16 +4709,15 @@ break fi done - echo "$as_me:$LINENO: result: $ipv6type" >&5 -echo "${ECHO_T}$ipv6type" >&6 + { echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6; } - echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 -echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: 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_func_search_save_LIBS=$LIBS -ac_cv_search_getaddrinfo=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3542,149 +4725,402 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 getaddrinfo (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' inet6; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_getaddrinfo="none required" + ac_cv_search_getaddrinfo=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err 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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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 getaddrinfo (); -int -main () -{ -getaddrinfo (); - ; - return 0; -} +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_getaddrinfo+set}" = set; then + break +fi +done +if test "${ac_cv_search_getaddrinfo+set}" = set; then + : +else + ac_cv_search_getaddrinfo=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6; } +ac_res=$ac_cv_search_getaddrinfo +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +# Check whether --enable-locale was given. +if test "${enable_locale+set}" = set; then + enableval=$enable_locale; +fi + + + +if test x"$enable_locale" != x"no"; then + cat >>confdefs.h <<\_ACEOF +#define CONFIG_LOCALE 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + +fi + +{ echo "$as_me:$LINENO: checking whether to call shutdown on all sockets" >&5 +echo $ECHO_N "checking whether to call shutdown on all sockets... $ECHO_C" >&6; } +case $host_os in + *cygwin* ) { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define SHUTDOWN_ALL_SOCKETS 1 +_ACEOF + + ;; + * ) { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; };; +esac + +{ echo "$as_me:$LINENO: 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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_getaddrinfo="-l$ac_lib" -break + ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done + +rm -f core conftest.err conftest.$ac_objext 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end 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 -LIBS=$ac_func_search_save_LIBS +rm -f conftest* + fi -echo "$as_me:$LINENO: 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" +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi +rm -f conftest* fi -# Check whether --enable-locale or --disable-locale was given. -if test "${enable_locale+set}" = set; then - enableval="$enable_locale" +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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#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 -fi; +#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)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -if test x"$enable_locale" != x"no"; then - cat >>confdefs.h <<\_ACEOF -#define CONFIG_LOCALE 1 + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 _ACEOF fi -echo "$as_me:$LINENO: checking whether to call shutdown on all sockets" >&5 -echo $ECHO_N "checking whether to call shutdown on all sockets... $ECHO_C" >&6 -case $host_os in - *cygwin* ) echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -cat >>confdefs.h <<\_ACEOF -#define SHUTDOWN_ALL_SOCKETS 1 + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default - ;; - * ) echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;; +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -3701,7 +5137,8 @@ int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -3710,23 +5147,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3752,23 +5202,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3777,14 +5240,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -3794,11 +5258,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -3809,23 +5273,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3844,8 +5321,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3853,27 +5332,41 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3886,13 +5379,16 @@ ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -3918,9 +5414,9 @@ 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:$LINENO: 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 "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3942,23 +5438,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3967,12 +5476,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 @@ -3984,13 +5495,12 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3998,124 +5508,99 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" + ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4123,120 +5608,96 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" + ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi -echo "$as_me:$LINENO: 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 +{ echo "$as_me:$LINENO: 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 @@ -4260,23 +5721,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4285,12 +5759,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -4299,8 +5774,8 @@ fi -echo "$as_me:$LINENO: 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 +{ echo "$as_me:$LINENO: 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 @@ -4313,7 +5788,7 @@ #include #include #ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) @@ -4330,23 +5805,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4355,12 +5843,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_sys_wait_h=no + ac_cv_header_sys_wait_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -4369,242 +5858,6 @@ fi -echo "$as_me:$LINENO: 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext 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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#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:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: 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 -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: 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 <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - @@ -4643,18 +5896,19 @@ netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4665,23 +5919,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4690,15 +5957,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4707,8 +5975,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4732,9 +6005,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4758,25 +6032,19 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4788,8 +6056,8 @@ done -echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 +echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; } if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4809,23 +6077,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4834,28 +6115,29 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_sys_types_h_makedev=no + ac_cv_header_sys_types_h_makedev=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 +echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; } if test $ac_cv_header_sys_types_h_makedev = no; then if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4866,23 +6148,36 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4891,15 +6186,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4908,8 +6204,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -4933,9 +6234,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4959,25 +6261,18 @@ echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_mkdev_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } fi if test $ac_cv_header_sys_mkdev_h = yes; then @@ -4992,17 +6287,17 @@ if test $ac_cv_header_sys_mkdev_h = no; then if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5013,23 +6308,36 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5038,15 +6346,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5055,8 +6364,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -5080,9 +6394,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5106,25 +6421,18 @@ echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sysmacros_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } fi if test $ac_cv_header_sys_sysmacros_h = yes; then @@ -5140,8 +6448,87 @@ fi -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if makedev takes 3 args" >&5 +echo $ECHO_N "checking if makedev takes 3 args... $ECHO_C" >&6; } +if test "${rsync_cv_MAKEDEV_TAKES_3_ARGS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test "$cross_compiling" = yes; then + rsync_cv_MAKEDEV_TAKES_3_ARGS=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifdef MAJOR_IN_MKDEV +#include +# if !defined makedev && (defined mkdev || defined _WIN32 || defined __WIN32__) +# define makedev mkdev +# endif +#elif defined MAJOR_IN_SYSMACROS +#include +#endif + +int main(void) +{ + dev_t dev = makedev(0, 5, 7); + if (major(dev) != 5 || minor(dev) != 7) + exit(1); + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rsync_cv_MAKEDEV_TAKES_3_ARGS=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rsync_cv_MAKEDEV_TAKES_3_ARGS=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $rsync_cv_MAKEDEV_TAKES_3_ARGS" >&5 +echo "${ECHO_T}$rsync_cv_MAKEDEV_TAKES_3_ARGS" >&6; } +if test x"$rsync_cv_MAKEDEV_TAKES_3_ARGS" = x"yes"; then + +cat >>confdefs.h <<\_ACEOF +#define MAKEDEV_TAKES_3_ARGS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: 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 @@ -5152,35 +6539,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int ac__type_new_; int main () { -if ((int *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (int)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5189,23 +6590,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_int=no + ac_cv_type_int=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: 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 - if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -5215,10 +6616,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -5226,23 +6629,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5255,10 +6671,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5266,23 +6684,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5291,30 +6722,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -5322,23 +6756,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5351,10 +6798,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -5362,23 +6811,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5387,24 +6849,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -5415,10 +6880,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5426,23 +6893,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5451,24 +6931,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5476,8 +6956,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } + typedef int ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -5486,35 +6968,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5525,29 +7016,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -5558,35 +7052,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long ac__type_new_; int main () { -if ((long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5595,23 +7103,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no + ac_cv_type_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: 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 - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -5621,10 +7129,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -5632,23 +7142,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5661,10 +7184,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5672,23 +7197,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5697,30 +7235,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -5728,23 +7269,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5757,10 +7311,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -5768,23 +7324,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5793,24 +7362,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -5821,10 +7393,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5832,23 +7406,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5857,24 +7444,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5882,8 +7469,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } + typedef long ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -5892,35 +7481,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5931,29 +7529,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF -echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6; } if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5964,35 +7565,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long long ac__type_new_; int main () { -if ((long long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6001,23 +7616,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_long=no + ac_cv_type_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6; } -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6027,10 +7642,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -6038,23 +7655,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6067,10 +7697,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6078,23 +7710,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6103,30 +7748,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -6134,23 +7782,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6163,10 +7824,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6174,23 +7837,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6199,24 +7875,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -6227,10 +7906,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6238,23 +7919,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6263,24 +7957,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +'') if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6288,8 +7982,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } + typedef long long ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -6298,35 +7994,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6337,29 +8042,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long_long=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF -echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -6370,35 +8078,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef short ac__type_new_; int main () { -if ((short *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (short)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6407,23 +8129,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_short=no + ac_cv_type_short=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6; } -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: 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 - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6433,10 +8155,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -6444,23 +8168,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6473,10 +8210,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6484,23 +8223,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6509,30 +8261,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -6540,23 +8295,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6569,10 +8337,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6580,23 +8350,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6605,24 +8388,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -6633,10 +8419,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6644,23 +8432,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6669,24 +8470,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +'') if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_short=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6694,8 +8495,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } + typedef short ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -6704,35 +8507,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (short))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (short)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6743,29 +8555,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_short=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_short=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -6776,35 +8591,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if ((off_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (off_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6813,23 +8642,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off_t=no + ac_cv_type_off_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -echo "$as_me:$LINENO: checking size of off_t" >&5 -echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of off_t" >&5 +echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_off_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6839,10 +8668,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -6850,23 +8681,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6879,10 +8723,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6890,23 +8736,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6915,30 +8774,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -6946,23 +8808,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6975,10 +8850,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6986,23 +8863,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7011,24 +8901,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -7039,10 +8932,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7050,23 +8945,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7075,24 +8983,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_off_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 +'') if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t), 77 +echo "$as_me: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7100,8 +9008,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (off_t)); } -unsigned long ulongval () { return (long) (sizeof (off_t)); } + typedef off_t ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -7110,35 +9020,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (off_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (off_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (off_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7149,29 +9068,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 +if test "$ac_cv_type_off_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t), 77 +echo "$as_me: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_off_t=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF -echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${ac_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7182,35 +9104,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off64_t ac__type_new_; int main () { -if ((off64_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (off64_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7219,23 +9155,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off64_t=no + ac_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5 -echo "${ECHO_T}$ac_cv_type_off64_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5 +echo "${ECHO_T}$ac_cv_type_off64_t" >&6; } -echo "$as_me:$LINENO: checking size of off64_t" >&5 -echo $ECHO_N "checking size of off64_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of off64_t" >&5 +echo $ECHO_N "checking size of off64_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_off64_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -7245,10 +9181,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off64_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off64_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -7256,23 +9194,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7285,10 +9236,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off64_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off64_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7296,23 +9249,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7321,30 +9287,33 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off64_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off64_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -7352,23 +9321,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7381,10 +9363,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off64_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off64_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7392,23 +9376,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7417,24 +9414,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err 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` @@ -7445,10 +9445,12 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef off64_t ac__type_sizeof_; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (off64_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7456,23 +9458,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7481,24 +9496,24 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_off64_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t), 77 +'') if test "$ac_cv_type_off64_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off64_t), 77 +echo "$as_me: error: cannot compute sizeof (off64_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off64_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 -echo "$as_me: error: internal error: not reached in cross-compile" >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7506,8 +9521,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (off64_t)); } -unsigned long ulongval () { return (long) (sizeof (off64_t)); } + typedef off64_t ac__type_sizeof_; + +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -7516,35 +9533,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (off64_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (off64_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (off64_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7555,30 +9581,33 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t), 77 +if test "$ac_cv_type_off64_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off64_t), 77 +echo "$as_me: error: cannot compute sizeof (off64_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_off64_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_off64_t=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off64_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off64_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off64_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_off64_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t _ACEOF -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7598,38 +9627,54 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -7647,9 +9692,11 @@ ;; esac -echo "$as_me:$LINENO: checking for working long double with more range or precision than double" >&5 -echo $ECHO_N "checking for working long double with more range or precision than double... $ECHO_C" >&6 -if test "${ac_cv_c_long_double+set}" = set; then + + + { echo "$as_me:$LINENO: checking for long double with more range or precision than double" >&5 +echo $ECHO_N "checking for long double with more range or precision than double... $ECHO_C" >&6; } +if test "${ac_cv_type_long_double_wider+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7659,13 +9706,27 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - long double foo = 0.0; + long double const a[] = + { + 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON, + LDBL_MIN, LDBL_MAX, LDBL_EPSILON + }; + long double + f (long double x) + { + return ((x + (unsigned long int) 10) * (-1 / x) + a[0] + + (x ? f (x) : 'c')); + } + int main () { -static int test_array [1 - 2 * !(/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug. */ - (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) - | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG))]; +static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) + + (DBL_MANT_DIG < LDBL_MANT_DIG) + - (LDBL_MAX_EXP < DBL_MAX_EXP) + - (LDBL_MANT_DIG < DBL_MANT_DIG))) + && (int) LDBL_EPSILON == 0 + )]; test_array [0] = 0 ; @@ -7673,48 +9734,71 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_long_double=yes + ac_cv_type_long_double_wider=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_long_double=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_long_double" >&5 -echo "${ECHO_T}$ac_cv_c_long_double" >&6 -if test $ac_cv_c_long_double = yes; then + ac_cv_type_long_double_wider=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double_wider" >&5 +echo "${ECHO_T}$ac_cv_type_long_double_wider" >&6; } + if test $ac_cv_type_long_double_wider = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_DOUBLE_WIDER 1 +_ACEOF + + fi + + ac_cv_c_long_double=$ac_cv_type_long_double_wider + if test $ac_cv_c_long_double = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 _ACEOF -fi + fi -echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7726,63 +9810,69 @@ /* end confdefs.h. */ #include #include -#ifdef signal -# undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif int main () { -int i; +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_signal=void + ac_cv_type_signal=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_signal=int + ac_cv_type_signal=void fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7804,8 +9894,8 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -7819,8 +9909,8 @@ fi -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7831,35 +9921,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7868,12 +9972,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7884,8 +9989,8 @@ fi -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7896,35 +10001,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if ((off_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (off_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7933,24 +10052,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off_t=no + ac_cv_type_off_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 +{ echo "$as_me:$LINENO: 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 cat >>confdefs.h <<_ACEOF -#define off_t long +#define off_t long int _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -7961,35 +10081,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7998,24 +10132,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: 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 cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -8026,35 +10161,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8063,12 +10212,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: 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 @@ -8079,8 +10229,8 @@ fi -echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -8094,7 +10244,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ -#include +$ac_includes_default #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) @@ -8104,7 +10254,7 @@ { gid_t gidset[NGID]; int i, n; - union { gid_t gval; long lval; } val; + union { gid_t gval; long int lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) @@ -8112,18 +10262,28 @@ n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8136,8 +10296,10 @@ ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8158,16 +10320,16 @@ fi fi -echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups _ACEOF -echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&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 @@ -8189,23 +10351,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8214,7 +10389,7 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8232,23 +10407,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8257,14 +10445,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_rdev=no + ac_cv_member_struct_stat_st_rdev=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF @@ -8276,8 +10466,8 @@ - echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: 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 @@ -8290,35 +10480,49 @@ #include #include +typedef socklen_t ac__type_new_; int main () { -if ((socklen_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (socklen_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8327,18 +10531,19 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_socklen_t=no + ac_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: checking for socklen_t equivalent" >&5 -echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + { echo "$as_me:$LINENO: 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 @@ -8372,23 +10577,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8400,8 +10618,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done @@ -8413,8 +10633,8 @@ fi - echo "$as_me:$LINENO: result: $rsync_cv_socklen_t_equiv" >&5 -echo "${ECHO_T}$rsync_cv_socklen_t_equiv" >&6 + { echo "$as_me:$LINENO: result: $rsync_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$rsync_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define socklen_t $rsync_cv_socklen_t_equiv @@ -8424,8 +10644,8 @@ -echo "$as_me:$LINENO: checking for errno in errno.h" >&5 -echo $ECHO_N "checking for errno in errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for errno in errno.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 @@ -8446,23 +10666,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8471,12 +10704,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rsync_cv_have_errno_decl=no + rsync_cv_have_errno_decl=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $rsync_cv_errno" >&5 -echo "${ECHO_T}$rsync_cv_errno" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_errno" >&5 +echo "${ECHO_T}$rsync_cv_errno" >&6; } if test x"$rsync_cv_errno" = x"yes"; then cat >>confdefs.h <<\_ACEOF @@ -8497,9 +10731,9 @@ for ac_func in connect do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -8525,52 +10759,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8579,13 +10820,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -8598,8 +10841,8 @@ case "$LIBS" in *-lnsl*) ;; *) -echo "$as_me:$LINENO: checking for printf in -lnsl_s" >&5 -echo $ECHO_N "checking for printf in -lnsl_s... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -8612,39 +10855,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 printf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8653,14 +10909,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_s_printf=no + ac_cv_lib_nsl_s_printf=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_printf" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_s_printf" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBNSL_S 1 @@ -8674,8 +10931,8 @@ case "$LIBS" in *-lnsl*) ;; *) -echo "$as_me:$LINENO: checking for printf in -lnsl" >&5 -echo $ECHO_N "checking for printf in -lnsl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for printf in -lnsl" >&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 @@ -8688,39 +10945,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 printf (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8729,14 +10999,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_printf=no + ac_cv_lib_nsl_printf=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_printf" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_printf" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBNSL 1 @@ -8750,8 +11021,8 @@ case "$LIBS" in *-lsocket*) ;; *) -echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for connect in -lsocket" >&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 @@ -8764,39 +11035,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8805,14 +11089,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_connect=no + ac_cv_lib_socket_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBSOCKET 1 @@ -8826,8 +11111,8 @@ case "$LIBS" in *-linet*) ;; *) -echo "$as_me:$LINENO: checking for connect in -linet" >&5 -echo $ECHO_N "checking for connect in -linet... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -8840,39 +11125,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8881,14 +11179,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_connect=no + ac_cv_lib_inet_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_connect" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBINET 1 @@ -8911,13 +11210,12 @@ fi fi -echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5 -echo $ECHO_N "checking for library containing inet_ntop... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for library containing inet_ntop" >&5 +echo $ECHO_N "checking for library containing inet_ntop... $ECHO_C" >&6; } if test "${ac_cv_search_inet_ntop+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_inet_ntop=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8925,126 +11223,101 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 inet_ntop (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_inet_ntop="none required" + ac_cv_search_inet_ntop=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_inet_ntop" = no; then - for ac_lib in resolv; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_inet_ntop="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_inet_ntop+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_inet_ntop+set}" = set; then + : +else + ac_cv_search_inet_ntop=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5 -echo "${ECHO_T}$ac_cv_search_inet_ntop" >&6 -if test "$ac_cv_search_inet_ntop" != no; then - test "$ac_cv_search_inet_ntop" = "none required" || LIBS="$ac_cv_search_inet_ntop $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_inet_ntop" >&5 +echo "${ECHO_T}$ac_cv_search_inet_ntop" >&6; } +ac_res=$ac_cv_search_inet_ntop +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # Solaris and HP-UX weirdness: # Search for libiconv_open (not iconv_open) to discover if -liconv is needed! -echo "$as_me:$LINENO: checking for library containing libiconv_open" >&5 -echo $ECHO_N "checking for library containing libiconv_open... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for library containing libiconv_open" >&5 +echo $ECHO_N "checking for library containing libiconv_open... $ECHO_C" >&6; } if test "${ac_cv_search_libiconv_open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_libiconv_open=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9052,113 +11325,89 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 libiconv_open (); int main () { -libiconv_open (); +return libiconv_open (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' iconv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_libiconv_open="none required" + ac_cv_search_libiconv_open=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_libiconv_open" = no; then - for ac_lib in iconv; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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 libiconv_open (); -int -main () -{ -libiconv_open (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_libiconv_open="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_libiconv_open+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_libiconv_open+set}" = set; then + : +else + ac_cv_search_libiconv_open=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_libiconv_open" >&5 -echo "${ECHO_T}$ac_cv_search_libiconv_open" >&6 -if test "$ac_cv_search_libiconv_open" != no; then - test "$ac_cv_search_libiconv_open" = "none required" || LIBS="$ac_cv_search_libiconv_open $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_libiconv_open" >&5 +echo "${ECHO_T}$ac_cv_search_libiconv_open" >&6; } +ac_res=$ac_cv_search_libiconv_open +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -9168,9 +11417,9 @@ for ac_func in inet_ntop do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9196,52 +11445,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9250,25 +11506,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "lib/inet_ntop.$ac_objext" | \ - *" lib/inet_ntop.$ac_objext" | \ - "lib/inet_ntop.$ac_objext "* | \ + case " $LIBOBJS " in *" lib/inet_ntop.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/inet_ntop.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/inet_ntop.$ac_objext" + ;; esac fi @@ -9278,9 +11534,9 @@ for ac_func in inet_pton do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9306,52 +11562,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9360,25 +11623,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "lib/inet_pton.$ac_objext" | \ - *" lib/inet_pton.$ac_objext" | \ - "lib/inet_pton.$ac_objext "* | \ + case " $LIBOBJS " in *" lib/inet_pton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/inet_pton.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/inet_pton.$ac_objext" + ;; esac fi @@ -9387,8 +11650,8 @@ # Irix 6.5 has getaddrinfo but not the corresponding defines, so use # builtin getaddrinfo if one of the defines don't exist -echo "$as_me:$LINENO: checking whether defines needed by getaddrinfo exist" >&5 -echo $ECHO_N "checking whether defines needed by getaddrinfo exist... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether defines needed by getaddrinfo exist" >&5 +echo $ECHO_N "checking whether defines needed by getaddrinfo exist... $ECHO_C" >&6; } if test "${rsync_cv_HAVE_GETADDR_DEFINES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9416,8 +11679,8 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_GETADDR_DEFINES" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_GETADDR_DEFINES" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_HAVE_GETADDR_DEFINES" >&5 +echo "${ECHO_T}$rsync_cv_HAVE_GETADDR_DEFINES" >&6; } if test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes"; then # Tru64 UNIX has getaddrinfo() but has it renamed in libc as # something else so we must include to get the @@ -9426,9 +11689,9 @@ for ac_func in getaddrinfo do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9454,52 +11717,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9508,21 +11778,23 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - echo "$as_me:$LINENO: checking for getaddrinfo by including " >&5 -echo $ECHO_N "checking for getaddrinfo by including ... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getaddrinfo by including " >&5 +echo $ECHO_N "checking for getaddrinfo by including ... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9541,28 +11813,41 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GETADDRINFO 1 @@ -9572,18 +11857,17 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - case $LIBOBJS in - "lib/getaddrinfo.$ac_objext" | \ - *" lib/getaddrinfo.$ac_objext" | \ - "lib/getaddrinfo.$ac_objext "* | \ + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + case " $LIBOBJS " in *" lib/getaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/getaddrinfo.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/getaddrinfo.$ac_objext" + ;; esac fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi done @@ -9592,9 +11876,9 @@ for ac_func in getnameinfo do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9620,52 +11904,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9674,51 +11965,47 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "lib/getnameinfo.$ac_objext" | \ - *" lib/getnameinfo.$ac_objext" | \ - "lib/getnameinfo.$ac_objext "* | \ + case " $LIBOBJS " in *" lib/getnameinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/getnameinfo.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/getnameinfo.$ac_objext" + ;; esac fi done else - case $LIBOBJS in - "lib/getaddrinfo.$ac_objext" | \ - *" lib/getaddrinfo.$ac_objext" | \ - "lib/getaddrinfo.$ac_objext "* | \ + case " $LIBOBJS " in *" lib/getaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/getaddrinfo.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/getaddrinfo.$ac_objext" + ;; esac - case $LIBOBJS in - "lib/getnameinfo.$ac_objext" | \ - *" lib/getnameinfo.$ac_objext" | \ - "lib/getnameinfo.$ac_objext "* | \ + case " $LIBOBJS " in *" lib/getnameinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lib/getnameinfo.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS lib/getnameinfo.$ac_objext" + ;; esac fi -echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5 -echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&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 @@ -9744,23 +12031,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9769,7 +12069,7 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9791,23 +12091,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9816,14 +12129,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_sockaddr_sa_len=no + ac_cv_member_struct_sockaddr_sa_len=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -9833,8 +12148,8 @@ fi -echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 -echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 +echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6; } if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9861,23 +12176,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9886,7 +12214,7 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9909,23 +12237,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9934,14 +12275,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_sockaddr_in_sin_len=no + ac_cv_member_struct_sockaddr_in_sin_len=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in_sin_len" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 +echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } if test $ac_cv_member_struct_sockaddr_in_sin_len = yes; then cat >>confdefs.h <<\_ACEOF @@ -9951,8 +12294,8 @@ fi -echo "$as_me:$LINENO: checking for struct sockaddr_un.sun_len" >&5 -echo $ECHO_N "checking for struct sockaddr_un.sun_len... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct sockaddr_un.sun_len" >&5 +echo $ECHO_N "checking for struct sockaddr_un.sun_len... $ECHO_C" >&6; } if test "${ac_cv_member_struct_sockaddr_un_sun_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9979,23 +12322,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10004,7 +12360,7 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10027,23 +12383,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10052,14 +12421,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_sockaddr_un_sun_len=no + ac_cv_member_struct_sockaddr_un_sun_len=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_un_sun_len" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_un_sun_len" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_un_sun_len" >&5 +echo "${ECHO_T}$ac_cv_member_struct_sockaddr_un_sun_len" >&6; } if test $ac_cv_member_struct_sockaddr_un_sun_len = yes; then cat >>confdefs.h <<\_ACEOF @@ -10069,8 +12440,8 @@ fi -echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5 -echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5 +echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10088,28 +12459,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_STORAGE 1 @@ -10119,13 +12503,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5 -echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5 +echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6; } if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10152,23 +12537,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10177,7 +12575,7 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10200,23 +12598,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10225,14 +12636,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no + ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5 +echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; } if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then cat >>confdefs.h <<\_ACEOF @@ -10242,8 +12655,8 @@ fi -echo "$as_me:$LINENO: checking struct stat64" >&5 -echo $ECHO_N "checking struct stat64... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking struct stat64" >&5 +echo $ECHO_N "checking struct stat64... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10275,28 +12688,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_STAT64 1 @@ -10306,10 +12732,11 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # if we can't find strcasecmp, look in -lresolv (for Unixware at least) # @@ -10317,9 +12744,9 @@ for ac_func in strcasecmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10345,52 +12772,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10399,13 +12833,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10416,8 +12852,8 @@ if test x"$ac_cv_func_strcasecmp" = x"no"; then -echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5 -echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -10430,39 +12866,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 strcasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10471,14 +12920,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_resolv_strcasecmp=no + ac_cv_lib_resolv_strcasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBRESOLV 1 @@ -10491,8 +12941,8 @@ fi -echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5 -echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -10512,23 +12962,32 @@ main () { struct stat s, t; - 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 ! (stat ("conftest.data", &s) == 0 + && utime ("conftest.data", 0) == 0 + && stat ("conftest.data", &t) == 0 + && t.st_mtime >= s.st_mtime + && t.st_mtime - s.st_mtime < 120); ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10541,12 +13000,13 @@ ( exit $ac_status ) ac_cv_func_utime_null=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core *.core + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_utime_null" >&5 -echo "${ECHO_T}$ac_cv_func_utime_null" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -10558,8 +13018,8 @@ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo "$as_me:$LINENO: checking for working alloca.h" >&5 -echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10574,28 +13034,42 @@ main () { char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10604,13 +13078,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_working_alloca_h=no + ac_cv_working_alloca_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -10619,8 +13094,8 @@ fi -echo "$as_me:$LINENO: checking for alloca" >&5 -echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10637,7 +13112,7 @@ # include # define alloca _alloca # else -# if HAVE_ALLOCA_H +# ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX @@ -10655,28 +13130,42 @@ main () { char *p = (char *) alloca (1); + if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10685,13 +13174,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_alloca_works=no + ac_cv_func_alloca_works=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then @@ -10705,15 +13195,15 @@ # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. -ALLOCA=alloca.$ac_objext +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF -echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10723,7 +13213,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined(CRAY) && ! defined(CRAY2) +#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray @@ -10739,14 +13229,14 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -echo "${ECHO_T}$ac_cv_os_cray" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10772,52 +13262,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10826,13 +13323,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @@ -10845,8 +13344,8 @@ done fi -echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10859,6 +13358,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int find_stack_direction () { @@ -10876,17 +13376,26 @@ int main () { - exit (find_stack_direction () < 0); + return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10899,11 +13408,13 @@ ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction @@ -10972,9 +13483,9 @@ sigaction sigprocmask do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11000,52 +13511,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11054,13 +13572,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -11075,9 +13595,9 @@ for ac_func in getpgrp tcgetpgrp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11103,52 +13623,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 (); /* 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) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11157,13 +13684,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -11173,8 +13702,8 @@ done if test $ac_cv_func_getpgrp = yes; then - echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 -echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 +echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; } if test "${ac_cv_func_getpgrp_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11195,23 +13724,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11220,13 +13762,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpgrp_void=yes + ac_cv_func_getpgrp_void=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 -echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; } if test $ac_cv_func_getpgrp_void = yes; then cat >>confdefs.h <<\_ACEOF @@ -11237,8 +13780,8 @@ fi -echo "$as_me:$LINENO: checking whether chown() modifies symlinks" >&5 -echo $ECHO_N "checking whether chown() modifies symlinks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether chown() modifies symlinks" >&5 +echo $ECHO_N "checking whether chown() modifies symlinks... $ECHO_C" >&6; } if test "${rsync_cv_chown_modifies_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11267,13 +13810,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11286,11 +13838,13 @@ ( exit $ac_status ) rsync_cv_chown_modifies_symlink=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_chown_modifies_symlink" >&5 -echo "${ECHO_T}$rsync_cv_chown_modifies_symlink" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_chown_modifies_symlink" >&5 +echo "${ECHO_T}$rsync_cv_chown_modifies_symlink" >&6; } if test $rsync_cv_chown_modifies_symlink = yes; then cat >>confdefs.h <<\_ACEOF @@ -11299,8 +13853,8 @@ fi -echo "$as_me:$LINENO: checking whether link() can hard-link symlinks" >&5 -echo $ECHO_N "checking whether link() can hard-link symlinks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether link() can hard-link symlinks" >&5 +echo $ECHO_N "checking whether link() can hard-link symlinks... $ECHO_C" >&6; } if test "${rsync_cv_can_hardlink_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11329,13 +13883,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11348,11 +13911,13 @@ ( exit $ac_status ) rsync_cv_can_hardlink_symlink=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_can_hardlink_symlink" >&5 -echo "${ECHO_T}$rsync_cv_can_hardlink_symlink" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_can_hardlink_symlink" >&5 +echo "${ECHO_T}$rsync_cv_can_hardlink_symlink" >&6; } if test $rsync_cv_can_hardlink_symlink = yes; then cat >>confdefs.h <<\_ACEOF @@ -11361,8 +13926,8 @@ fi -echo "$as_me:$LINENO: checking whether link() can hard-link special files" >&5 -echo $ECHO_N "checking whether link() can hard-link special files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether link() can hard-link special files" >&5 +echo $ECHO_N "checking whether link() can hard-link special files... $ECHO_C" >&6; } if test "${rsync_cv_can_hardlink_special+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11391,13 +13956,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11410,11 +13984,13 @@ ( exit $ac_status ) rsync_cv_can_hardlink_special=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_can_hardlink_special" >&5 -echo "${ECHO_T}$rsync_cv_can_hardlink_special" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_can_hardlink_special" >&5 +echo "${ECHO_T}$rsync_cv_can_hardlink_special" >&6; } if test $rsync_cv_can_hardlink_special = yes; then cat >>confdefs.h <<\_ACEOF @@ -11423,8 +13999,8 @@ fi -echo "$as_me:$LINENO: checking for working socketpair" >&5 -echo $ECHO_N "checking for working socketpair... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11448,13 +14024,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11467,11 +14052,13 @@ ( exit $ac_status ) rsync_cv_HAVE_SOCKETPAIR=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_SOCKETPAIR" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_SOCKETPAIR" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -11482,8 +14069,8 @@ if test x"$with_included_popt" != x"yes"; then -echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5 -echo $ECHO_N "checking for poptGetContext in -lpopt... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&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 @@ -11496,39 +14083,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #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 poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11537,14 +14137,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_popt_poptGetContext=no + ac_cv_lib_popt_poptGetContext=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5 -echo "${ECHO_T}$ac_cv_lib_popt_poptGetContext" >&6 +{ echo "$as_me:$LINENO: 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 <<_ACEOF #define HAVE_LIBPOPT 1 @@ -11558,11 +14159,11 @@ fi -echo "$as_me:$LINENO: checking whether to use included libpopt" >&5 -echo $ECHO_N "checking whether to use included libpopt... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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:$LINENO: result: $srcdir/popt" >&5 -echo "${ECHO_T}$srcdir/popt" >&6 + { echo "$as_me:$LINENO: result: $srcdir/popt" >&5 +echo "${ECHO_T}$srcdir/popt" >&6; } BUILD_POPT='$(popt_OBJS)' CFLAGS="$CFLAGS -I$srcdir/popt" if test x"$ALLOCA" != x @@ -11573,12 +14174,12 @@ echo "$as_me: WARNING: included libpopt will use malloc, not alloca (which wastes a small amount of memory)" >&2;} fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo "$as_me:$LINENO: checking for unsigned char" >&5 -echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for unsigned char" >&5 +echo $ECHO_N "checking for unsigned char... $ECHO_C" >&6; } if test "${rsync_cv_SIGNED_CHAR_OK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11599,23 +14200,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11624,12 +14238,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rsync_cv_SIGNED_CHAR_OK=no + rsync_cv_SIGNED_CHAR_OK=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $rsync_cv_SIGNED_CHAR_OK" >&5 -echo "${ECHO_T}$rsync_cv_SIGNED_CHAR_OK" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_SIGNED_CHAR_OK" >&5 +echo "${ECHO_T}$rsync_cv_SIGNED_CHAR_OK" >&6; } if test x"$rsync_cv_SIGNED_CHAR_OK" = x"yes"; then cat >>confdefs.h <<\_ACEOF @@ -11638,8 +14253,8 @@ fi -echo "$as_me:$LINENO: checking for broken readdir" >&5 -echo $ECHO_N "checking for broken readdir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11660,13 +14275,22 @@ di->d_name[0] == 0) exit(0); exit(1);} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11679,11 +14303,13 @@ ( exit $ac_status ) rsync_cv_HAVE_BROKEN_READDIR=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_BROKEN_READDIR" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_BROKEN_READDIR" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -11692,8 +14318,8 @@ fi -echo "$as_me:$LINENO: checking for utimbuf" >&5 -echo $ECHO_N "checking for utimbuf... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11715,23 +14341,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11740,12 +14379,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rsync_cv_HAVE_UTIMBUF=no + rsync_cv_HAVE_UTIMBUF=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_UTIMBUF" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_UTIMBUF" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -11754,8 +14394,8 @@ fi -echo "$as_me:$LINENO: checking if gettimeofday takes tz argument" >&5 -echo $ECHO_N "checking if gettimeofday takes tz argument... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11777,23 +14417,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11802,12 +14455,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rsync_cv_HAVE_GETTIMEOFDAY_TZ=no + rsync_cv_HAVE_GETTIMEOFDAY_TZ=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_GETTIMEOFDAY_TZ" >&6 +{ echo "$as_me:$LINENO: 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"no"; then cat >>confdefs.h <<\_ACEOF @@ -11816,8 +14470,8 @@ fi -echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5 -echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11852,13 +14506,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11871,11 +14534,13 @@ ( exit $ac_status ) rsync_cv_HAVE_C99_VSNPRINTF=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_C99_VSNPRINTF" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_C99_VSNPRINTF" >&6 +{ echo "$as_me:$LINENO: 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 <<\_ACEOF @@ -11885,8 +14550,8 @@ fi -echo "$as_me:$LINENO: checking for secure mkstemp" >&5 -echo $ECHO_N "checking for secure mkstemp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -11916,13 +14581,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11935,11 +14609,13 @@ ( exit $ac_status ) rsync_cv_HAVE_SECURE_MKSTEMP=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_HAVE_SECURE_MKSTEMP" >&5 -echo "${ECHO_T}$rsync_cv_HAVE_SECURE_MKSTEMP" >&6 +{ echo "$as_me:$LINENO: 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 case $target_os in hpux*) @@ -11957,8 +14633,8 @@ fi -echo "$as_me:$LINENO: checking if mknod creates FIFOs" >&5 -echo $ECHO_N "checking if mknod creates FIFOs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if mknod creates FIFOs" >&5 +echo $ECHO_N "checking if mknod creates FIFOs... $ECHO_C" >&6; } if test "${rsync_cv_MKNOD_CREATES_FIFOS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11982,13 +14658,22 @@ return 0;} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12001,11 +14686,13 @@ ( exit $ac_status ) rsync_cv_MKNOD_CREATES_FIFOS=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_MKNOD_CREATES_FIFOS" >&5 -echo "${ECHO_T}$rsync_cv_MKNOD_CREATES_FIFOS" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_MKNOD_CREATES_FIFOS" >&5 +echo "${ECHO_T}$rsync_cv_MKNOD_CREATES_FIFOS" >&6; } if test x"$rsync_cv_MKNOD_CREATES_FIFOS" = x"yes"; then cat >>confdefs.h <<\_ACEOF @@ -12014,8 +14701,8 @@ fi -echo "$as_me:$LINENO: checking if mknod creates sockets" >&5 -echo $ECHO_N "checking if mknod creates sockets... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if mknod creates sockets" >&5 +echo $ECHO_N "checking if mknod creates sockets... $ECHO_C" >&6; } if test "${rsync_cv_MKNOD_CREATES_SOCKETS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12039,13 +14726,22 @@ return 0;} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12058,11 +14754,13 @@ ( exit $ac_status ) rsync_cv_MKNOD_CREATES_SOCKETS=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $rsync_cv_MKNOD_CREATES_SOCKETS" >&5 -echo "${ECHO_T}$rsync_cv_MKNOD_CREATES_SOCKETS" >&6 +{ echo "$as_me:$LINENO: result: $rsync_cv_MKNOD_CREATES_SOCKETS" >&5 +echo "${ECHO_T}$rsync_cv_MKNOD_CREATES_SOCKETS" >&6; } if test x"$rsync_cv_MKNOD_CREATES_SOCKETS" = x"yes"; then cat >>confdefs.h <<\_ACEOF @@ -12074,8 +14772,8 @@ # # The following test was mostly taken from the tcl/tk plus patches # -echo "$as_me:$LINENO: checking whether -c -o works" >&5 -echo $ECHO_N "checking whether -c -o works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: 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 @@ -12093,8 +14791,8 @@ rm -rf conftest* fi -echo "$as_me:$LINENO: result: $rsync_cv_DASHC_WORKS_WITH_DASHO" >&5 -echo "${ECHO_T}$rsync_cv_DASHC_WORKS_WITH_DASHO" >&6 +{ echo "$as_me:$LINENO: 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="#" @@ -12110,7 +14808,7 @@ - ac_config_files="$ac_config_files Makefile lib/dummy zlib/dummy popt/dummy shconfig" +ac_config_files="$ac_config_files Makefile lib/dummy zlib/dummy popt/dummy shconfig" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -12130,39 +14828,58 @@ # 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. +# So, we kill variables containing newlines. # 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. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}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" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -12171,32 +14888,18 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# 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[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -12234,11 +14937,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -12247,8 +14974,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -12262,178 +15024,140 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# 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 - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -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= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi 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='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 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 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -12442,7 +15166,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -12451,31 +15187,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60a. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12483,30 +15202,19 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_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 +config_files="$ac_config_files" +config_headers="$ac_config_headers" -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 +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -12514,7 +15222,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -12530,19 +15238,21 @@ $config_headers Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.60a, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -12553,39 +15263,24 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: 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 ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -12595,18 +15290,24 @@ $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { 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 ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: 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;} + -*) { 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" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -12622,33 +15323,47 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 - - - +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. 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" ;; + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "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" ;; + *) { { echo "$as_me:$LINENO: 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 @@ -12659,571 +15374,523 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for 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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;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,@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,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;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,@EGREP@,$EGREP,;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,@ALLOCA@,$ALLOCA,;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 -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # 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 - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - 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 +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +RSYNC_VERSION!$RSYNC_VERSION$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +HAVE_REMSH!$HAVE_REMSH$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +ALLOCA!$ALLOCA$ac_delim +OBJ_SAVE!$OBJ_SAVE$ac_delim +OBJ_RESTORE!$OBJ_RESTORE$ac_delim +CC_SHOBJ_FLAG!$CC_SHOBJ_FLAG$ac_delim +BUILD_POPT!$BUILD_POPT$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# 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[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -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 - - | *:- | *:-:* ) # 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 ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + 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 $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated 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:$LINENO: 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:$LINENO: 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; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;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 -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# 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=' ' -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=',;t' +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" 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 ;; + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # 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:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - 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:$LINENO: 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 - -_ACEOF - -# 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 <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# 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 +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines -# This sed command replaces #undef with comments. This is necessary, for +# Remove the space that was appended to ease matching. +# Then replace #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.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' -# 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 grep "^[ ]*#[ ]*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 +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_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 + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines -echo ' fi # grep' >>$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 grep . conftest.undefs >/dev/null -do - # 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 $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 +rm -f conftest.defines conftest.tail +echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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 $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + echo "/* $configure_input */" + cat "$ac_result" fi -done -_ACEOF + rm -f "$tmp/out12" + ;; + + + esac + +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -13253,9 +15920,9 @@ fi -echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 -echo "$as_me:$LINENO: result: rsync ${RSYNC_VERSION} configuration successful" >&5 -echo "${ECHO_T} rsync ${RSYNC_VERSION} configuration successful" >&6 -echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } +{ echo "$as_me:$LINENO: result: rsync ${RSYNC_VERSION} configuration successful" >&5 +echo "${ECHO_T} rsync ${RSYNC_VERSION} configuration successful" >&6; } +{ echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } diff -urN --exclude=patches rsync-2.6.8/configure.in rsync-2.6.9/configure.in --- rsync-2.6.8/configure.in 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/configure.in 2006-11-06 20:39:47.000000000 -0800 @@ -5,7 +5,7 @@ AC_CONFIG_HEADER(config.h) AC_PREREQ(2.59) -RSYNC_VERSION=2.6.8 +RSYNC_VERSION=2.6.9 AC_SUBST(RSYNC_VERSION) AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION]) @@ -123,15 +123,23 @@ fi AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [default -e command]) -AC_MSG_CHECKING([the group for user "nobody"]) -if grep '^nobody:' /etc/group >/dev/null 2>&1; then - NOBODY_GROUP=nobody -elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then - NOBODY_GROUP=nogroup -else - NOBODY_GROUP=nobody # test for others? +AC_ARG_WITH(nobody-group, + AC_HELP_STRING([--with-nobody-group=GROUP], + [set the default unprivileged group (default nobody or nogroup)]), + [ NOBODY_GROUP="$with_nobody_group" ]) + +if test x"$with_nobody_group" = x; then + AC_MSG_CHECKING([the group for user "nobody"]) + if grep '^nobody:' /etc/group >/dev/null 2>&1; then + NOBODY_GROUP=nobody + elif grep '^nogroup:' /etc/group >/dev/null 2>&1; then + NOBODY_GROUP=nogroup + else + NOBODY_GROUP=nobody # test for others? + fi + AC_MSG_RESULT($NOBODY_GROUP) fi -AC_MSG_RESULT($NOBODY_GROUP) + AC_DEFINE_UNQUOTED(NOBODY_USER, "nobody", [unprivileged user--e.g. nobody]) AC_DEFINE_UNQUOTED(NOBODY_GROUP, "$NOBODY_GROUP", [unprivileged group for unprivileged user]) @@ -302,6 +310,31 @@ netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h) AC_HEADER_MAJOR +AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[ +AC_TRY_RUN([ +#include +#ifdef MAJOR_IN_MKDEV +#include +# if !defined makedev && (defined mkdev || defined _WIN32 || defined __WIN32__) +# define makedev mkdev +# endif +#elif defined MAJOR_IN_SYSMACROS +#include +#endif + +int main(void) +{ + dev_t dev = makedev(0, 5, 7); + if (major(dev) != 5 || minor(dev) != 7) + exit(1); + return 0; +} +], +rsync_cv_MAKEDEV_TAKES_3_ARGS=yes,rsync_cv_MAKEDEV_TAKES_3_ARGS=no,rsync_cv_MAKEDEV_TAKES_3_ARGS=no)]) +if test x"$rsync_cv_MAKEDEV_TAKES_3_ARGS" = x"yes"; then + AC_DEFINE(MAKEDEV_TAKES_3_ARGS, 1, [Define to 1 if makedev() takes 3 args]) +fi + AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) diff -urN --exclude=patches rsync-2.6.8/connection.c rsync-2.6.9/connection.c --- rsync-2.6.8/connection.c 1998-07-16 22:37:19.000000000 -0700 +++ rsync-2.6.9/connection.c 2006-04-25 16:51:12.000000000 -0700 @@ -1,25 +1,25 @@ -/* - Copyright (C) Andrew Tridgell 1998 - - 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. -*/ +/* + * Support the max connections option. + * + * Copyright (C) 1998 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ -/* support the max connections option */ #include "rsync.h" - /**************************************************************************** simple routine to do connection counting ****************************************************************************/ @@ -39,7 +39,7 @@ /* find a free spot */ for (i=0;i - * Copyright (C) 1996 by Paul Mackerras - * Copyright (C) 2002 by Martin Pool + * Copyright (C) 1996-2001 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -14,16 +16,11 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/* 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; @@ -301,29 +298,28 @@ strlcpy(to, merge_file, *len_ptr + 1); merge_file = to; } - if (!sanitize_path(fn, merge_file, r, dirbuf_depth)) { + if (!sanitize_path(fn, merge_file, r, dirbuf_depth, NULL)) { rprintf(FERROR, "merge-file name overflows: %s\n", merge_file); return NULL; } + fn_len = strlen(fn); } else { strlcpy(fn, merge_file, len_ptr ? *len_ptr + 1 : MAXPATHLEN); - clean_fname(fn, 1); + fn_len = clean_fname(fn, 1); } - - fn_len = strlen(fn); - if (fn == buf) - goto done; - if (dirbuf_len + fn_len >= MAXPATHLEN) { - rprintf(FERROR, "merge-file name overflows: %s\n", fn); - return NULL; + /* If the name isn't in buf yet, it's wasn't absolute. */ + if (fn != buf) { + if (dirbuf_len + fn_len >= MAXPATHLEN) { + rprintf(FERROR, "merge-file name overflows: %s\n", fn); + return NULL; + } + memcpy(buf, dirbuf + prefix_skip, dirbuf_len - prefix_skip); + memcpy(buf + dirbuf_len - prefix_skip, fn, fn_len + 1); + fn_len = clean_fname(buf, 1); } - memcpy(buf, dirbuf + prefix_skip, dirbuf_len - prefix_skip); - memcpy(buf + dirbuf_len - prefix_skip, fn, fn_len + 1); - fn_len = clean_fname(buf, 1); - done: if (len_ptr) *len_ptr = fn_len; return buf; @@ -503,6 +499,8 @@ char *p, *pattern = ex->pattern; const char *strings[16]; /* more than enough */ + if (*name == '/') + name++; if (!*name) return 0; @@ -534,8 +532,6 @@ if (*pattern == '/') { anchored_match = 1; pattern++; - if (strings[0][0] == '/') - strings[0]++; } if (!anchored_match && ex->u.slash_cnt @@ -560,7 +556,7 @@ if (litmatch_array(pattern, strings, slash_handling)) return ret_match; } else if (anchored_match) { - if (strcmp(strings[0], pattern) == 0) + if (strcmp(name, pattern) == 0) return ret_match; } else { int l1 = strlen(name); @@ -850,13 +846,22 @@ exit_cleanup(RERR_SYNTAX); } + /* --delete-excluded turns an un-modified include/exclude into a + * sender-side rule. We also affect per-dir merge files that take + * no prefixes as a simple optimization. */ + if (delete_excluded + && !(new_mflags & (MATCHFLG_RECEIVER_SIDE|MATCHFLG_SENDER_SIDE)) + && (!(new_mflags & MATCHFLG_PERDIR_MERGE) + || new_mflags & MATCHFLG_NO_PREFIXES)) + new_mflags |= MATCHFLG_SENDER_SIDE; + *len_ptr = len; *mflags_ptr = new_mflags; return (const char *)s; } -static char default_cvsignore[] = +static char default_cvsignore[] = /* These default ignored items come from the CVS manual. */ "RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS" " .make.state .nse_depinfo *~ #* .#* ,* _$* *$" @@ -864,7 +869,7 @@ " *.a *.olb *.o *.obj *.so *.exe" " *.Z *.elc *.ln core" /* The rest we added to suit ourself. */ - " .svn/"; + " .svn/ .bzr/"; static void get_cvs_excludes(uint32 mflags) { @@ -901,12 +906,14 @@ &pat_len, &new_mflags); if (!cp) break; + + pattern = cp + pat_len; + if (pat_len >= MAXPATHLEN) { - rprintf(FERROR, "discarding over-long filter: %s\n", - cp); + rprintf(FERROR, "discarding over-long filter: %.*s\n", + (int)pat_len, cp); continue; } - pattern = cp + pat_len; if (new_mflags & MATCHFLG_CLEAR_LIST) { if (verbose > 2) { @@ -926,11 +933,9 @@ } len = pat_len; if (new_mflags & MATCHFLG_EXCLUDE_SELF) { - const char *name = strrchr(cp, '/'); - if (name) - len -= ++name - cp; - else - name = cp; + const char *name = cp + len; + while (name > cp && name[-1] != '/') name--; + len -= name - cp; add_rule(listp, name, len, 0, 0); new_mflags &= ~MATCHFLG_EXCLUDE_SELF; len = pat_len; @@ -1101,11 +1106,20 @@ int elide = 0; char *p; + /* Note we need to check delete_excluded here in addition to + * the code in parse_rule_tok() because some rules may have + * been added before we found the --delete-excluded option. + * We must also elide any CVS merge-file rules to avoid a + * backward compatibility problem, and we elide any no-prefix + * merge files as an optimization (since they can only have + * include/exclude rules). */ if (ent->match_flags & MATCHFLG_SENDER_SIDE) elide = am_sender ? 1 : -1; if (ent->match_flags & MATCHFLG_RECEIVER_SIDE) elide = elide ? 0 : am_sender ? -1 : 1; - else if (delete_excluded && !elide) + else if (delete_excluded && !elide + && (!(ent->match_flags & MATCHFLG_PERDIR_MERGE) + || ent->match_flags & MATCHFLG_NO_PREFIXES)) elide = am_sender ? 1 : -1; if (elide < 0) { if (prev) diff -urN --exclude=patches rsync-2.6.8/fileio.c rsync-2.6.9/fileio.c --- rsync-2.6.8/fileio.c 2006-04-08 09:37:50.000000000 -0700 +++ rsync-2.6.9/fileio.c 2006-04-25 16:51:13.000000000 -0700 @@ -1,25 +1,25 @@ /* - Copyright (C) Andrew Tridgell 1998 - Copyright (C) 2002 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. -*/ + * File IO utilities used in rsync. + * + * Copyright (C) 1998 Andrew Tridgell + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ -/* - File IO utilities used in rsync - */ #include "rsync.h" #ifndef ENODATA diff -urN --exclude=patches rsync-2.6.8/flist.c rsync-2.6.9/flist.c --- rsync-2.6.8/flist.c 2006-04-21 09:36:30.000000000 -0700 +++ rsync-2.6.9/flist.c 2006-10-13 18:17:36.000000000 -0700 @@ -1,29 +1,25 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2001, 2002 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. -*/ - -/** @file flist.c - * Generate and receive file lists + * Generate and receive file lists. * - * @sa http://lists.samba.org/pipermail/rsync/2000-June/002351.html + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2002, 2003, 2004, 2005, 2006 Wayne Davison * - **/ + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" @@ -94,15 +90,15 @@ static void start_filelist_progress(char *kind) { - rprintf(FINFO, "%s ... ", kind); + rprintf(FCLIENT, "%s ... ", kind); if (verbose > 1 || do_progress) - rprintf(FINFO, "\n"); + rprintf(FCLIENT, "\n"); rflush(FINFO); } static void emit_filelist_progress(int count) { - rprintf(FINFO, " %d files...\r", count); + rprintf(FCLIENT, " %d files...\r", count); } static void maybe_emit_filelist_progress(int count) @@ -153,61 +149,53 @@ } } -/** - * Stat either a symlink or its referent, depending on the settings of - * copy_links, copy_unsafe_links, etc. - * - * @retval -1 on error - * - * @retval 0 for success +/* Stat either a symlink or its referent, depending on the settings of + * copy_links, copy_unsafe_links, etc. Returns -1 on error, 0 on success. * - * @post If @p path is a symlink, then @p linkbuf (of size @c - * MAXPATHLEN) contains the symlink target. + * If path is the name of a symlink, then the linkbuf buffer (which must hold + * MAXPATHLEN chars) will be set to the symlink's target string. * - * @post @p buffer contains information about the link or the - * referrent as appropriate, if they exist. - **/ -static int readlink_stat(const char *path, STRUCT_STAT *buffer, char *linkbuf) + * The stat structure pointed to by stp will contain information about the + * link or the referent as appropriate, if they exist. */ +static int readlink_stat(const char *path, STRUCT_STAT *stp, char *linkbuf) { #ifdef SUPPORT_LINKS - if (copy_links) - return do_stat(path, buffer); - if (link_stat(path, buffer, copy_dirlinks) < 0) + if (link_stat(path, stp, copy_dirlinks) < 0) return -1; - if (S_ISLNK(buffer->st_mode)) { - int l = readlink((char *)path, linkbuf, MAXPATHLEN - 1); - if (l == -1) + if (S_ISLNK(stp->st_mode)) { + int llen = readlink(path, linkbuf, MAXPATHLEN - 1); + if (llen < 0) return -1; - linkbuf[l] = 0; + linkbuf[llen] = '\0'; if (copy_unsafe_links && unsafe_symlink(linkbuf, path)) { if (verbose > 1) { rprintf(FINFO,"copying unsafe symlink \"%s\" -> \"%s\"\n", path, linkbuf); } - return do_stat(path, buffer); + return do_stat(path, stp); } } return 0; #else - return do_stat(path, buffer); + return do_stat(path, stp); #endif } -int link_stat(const char *path, STRUCT_STAT *buffer, int follow_dirlinks) +int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks) { #ifdef SUPPORT_LINKS if (copy_links) - return do_stat(path, buffer); - if (do_lstat(path, buffer) < 0) + return do_stat(path, stp); + if (do_lstat(path, stp) < 0) return -1; - if (follow_dirlinks && S_ISLNK(buffer->st_mode)) { + if (follow_dirlinks && S_ISLNK(stp->st_mode)) { STRUCT_STAT st; if (do_stat(path, &st) == 0 && S_ISDIR(st.st_mode)) - *buffer = st; + *stp = st; } return 0; #else - return do_stat(path, buffer); + return do_stat(path, stp); #endif } @@ -245,17 +233,21 @@ static int to_wire_mode(mode_t mode) { #ifdef SUPPORT_LINKS - if (S_ISLNK(mode) && (_S_IFLNK != 0120000)) +#if _S_IFLNK != 0120000 + if (S_ISLNK(mode)) return (mode & ~(_S_IFMT)) | 0120000; #endif - return (int)mode; +#endif + return mode; } static mode_t from_wire_mode(int mode) { - if ((mode & (_S_IFMT)) == 0120000 && (_S_IFLNK != 0120000)) +#if _S_IFLNK != 0120000 + if ((mode & (_S_IFMT)) == 0120000) return (mode & ~(_S_IFMT)) | _S_IFLNK; - return (mode_t)mode; +#endif + return mode; } static void send_directory(int f, struct file_list *flist, @@ -294,7 +286,7 @@ flist->malloced); if (verbose >= 2 && flist->malloced != FLIST_START) { - rprintf(FINFO, "[%s] expand file_list to %.0f bytes, did%s move\n", + rprintf(FCLIENT, "[%s] expand file_list to %.0f bytes, did%s move\n", who_am_i(), (double)sizeof flist->files[0] * flist->malloced, (new_ptr == flist->files) ? " not" : ""); @@ -326,7 +318,7 @@ if (!file) { write_byte(f, 0); modtime = 0, mode = 0; - dev = 0, rdev = makedev(0, 0); + dev = 0, rdev = MAKEDEV(0, 0); rdev_major = 0; uid = 0, gid = 0; *lastname = '\0'; @@ -358,7 +350,7 @@ flags |= XMIT_RDEV_MINOR_IS_SMALL; } } else if (protocol_version < 28) - rdev = makedev(0, 0); + rdev = MAKEDEV(0, 0); if (file->uid == uid) flags |= XMIT_SAME_UID; else @@ -458,7 +450,7 @@ #endif #ifdef SUPPORT_HARD_LINKS - if (flags & XMIT_HAS_IDEV_DATA) { + if (file->link_u.idev) { if (protocol_version < 26) { /* 32-bit dev_t and ino_t */ write_int(f, dev); @@ -509,7 +501,7 @@ if (!flist) { modtime = 0, mode = 0; - dev = 0, rdev = makedev(0, 0); + dev = 0, rdev = MAKEDEV(0, 0); rdev_major = 0; uid = 0, gid = 0; *lastname = '\0'; @@ -542,7 +534,7 @@ clean_fname(thisname, 0); if (sanitize_paths) - sanitize_path(thisname, thisname, "", 0); + sanitize_path(thisname, thisname, "", 0, NULL); if ((basename = strrchr(thisname, '/')) != NULL) { dirname_len = ++basename - thisname; /* counts future '\0' */ @@ -586,10 +578,10 @@ rdev_minor = read_byte(f); else rdev_minor = read_int(f); - rdev = makedev(rdev_major, rdev_minor); + rdev = MAKEDEV(rdev_major, rdev_minor); } } else if (protocol_version < 28) - rdev = makedev(0, 0); + rdev = MAKEDEV(0, 0); #ifdef SUPPORT_LINKS if (preserve_links && S_ISLNK(mode)) { @@ -668,7 +660,7 @@ file->u.link = bp; read_sbuf(f, bp, linkname_len - 1); if (sanitize_paths) - sanitize_path(bp, bp, "", lastdir_depth); + sanitize_path(bp, bp, "", lastdir_depth, NULL); bp += linkname_len; } #endif @@ -749,13 +741,14 @@ } clean_fname(thisname, 0); if (sanitize_paths) - sanitize_path(thisname, thisname, "", 0); + sanitize_path(thisname, thisname, "", 0, NULL); memset(sum, 0, SUM_LENGTH); - if (stp && S_ISDIR(stp->st_mode)) + if (stp && S_ISDIR(stp->st_mode)) { st = *stp; /* Needed for "symlink/." with --relative. */ - else if (readlink_stat(thisname, &st, linkname) != 0) { + *linkname = '\0'; /* make IBM code checker happy */ + } else if (readlink_stat(thisname, &st, linkname) != 0) { int save_errno = errno; /* See if file is excluded before reporting an error. */ if (filter_level != NO_FILTERS @@ -853,7 +846,7 @@ ? MD4_SUM_LENGTH : 0; alloc_len = file_struct_len + dirname_len + basename_len - + linkname_len + sum_len; + + linkname_len + sum_len; if (flist) bp = pool_alloc(flist->file_pool, alloc_len, "make_file"); else { @@ -1072,6 +1065,7 @@ int64 start_write; int use_ff_fd = 0; + rprintf(FLOG, "building file list\n"); if (show_filelist_p()) start_filelist_progress("building file list"); @@ -1082,7 +1076,7 @@ io_start_buffering_out(); if (filesfrom_fd >= 0) { - if (argv[0] && !push_dir(argv[0])) { + if (argv[0] && !push_dir(argv[0], 0)) { rsyserr(FERROR, errno, "push_dir %s failed", full_fname(argv[0])); exit_cleanup(RERR_FILESELECT); @@ -1098,13 +1092,13 @@ if (use_ff_fd) { if (read_filesfrom_line(filesfrom_fd, fbuf) == 0) break; - sanitize_path(fbuf, fbuf, "", 0); + sanitize_path(fbuf, fbuf, "", 0, NULL); } else { if (argc-- == 0) break; strlcpy(fbuf, *argv++, MAXPATHLEN); if (sanitize_paths) - sanitize_path(fbuf, fbuf, "", 0); + sanitize_path(fbuf, fbuf, "", 0, NULL); } len = strlen(fbuf); @@ -1192,6 +1186,8 @@ } else break; } + if (len == 1 && fn[0] == '/') + fn[len++] = '.'; fn[len] = '\0'; /* Reject a ".." dir in the active part of the path. */ for (p = fn; (p = strstr(p, "..")) != NULL; p += 2) { @@ -1216,7 +1212,7 @@ strlcpy(olddir, curr_dir, sizeof olddir); - if (!push_dir(dir)) { + if (!push_dir(dir, 0)) { io_error |= IOERR_GENERAL; rsyserr(FERROR, errno, "push_dir %s failed", full_fname(dir)); @@ -1338,6 +1334,7 @@ unsigned short flags; int64 start_read; + rprintf(FLOG, "receiving file list\n"); if (show_filelist_p()) start_filelist_progress("receiving file list"); @@ -1700,15 +1697,15 @@ for (i = 0; i < flist->count; i++) { file = flist->files[i]; if ((am_root || am_sender) && preserve_uid) - sprintf(uidbuf, " uid=%ld", (long)file->uid); + snprintf(uidbuf, sizeof uidbuf, " uid=%ld", (long)file->uid); else *uidbuf = '\0'; if (preserve_gid && file->gid != GID_NONE) - sprintf(gidbuf, " gid=%ld", (long)file->gid); + snprintf(gidbuf, sizeof gidbuf, " gid=%ld", (long)file->gid); else *gidbuf = '\0'; if (!am_sender) - sprintf(depthbuf, "%d", file->dir.depth); + snprintf(depthbuf, sizeof depthbuf, "%d", file->dir.depth); rprintf(FINFO, "[%s] i=%d %s %s%s%s%s mode=0%o len=%.0f%s%s flags=%x\n", who, i, am_sender ? NS(file->dir.root) : depthbuf, file->dirname ? file->dirname : "", @@ -1765,10 +1762,6 @@ c1 = (uchar*)""; } else state1 = s_BASE; - } else if (!*c1) { - type1 = t_path; - state1 = s_SLASH; - c1 = (uchar*)"/"; } else { type1 = t_path; state1 = s_DIR; @@ -1782,10 +1775,6 @@ c2 = (uchar*)""; } else state2 = s_BASE; - } else if (!*c2) { - type2 = t_path; - state2 = s_SLASH; - c2 = (uchar*)"/"; } else { type2 = t_path; state2 = s_DIR; @@ -1794,9 +1783,7 @@ if (type1 != type2) return type1 == t_PATH ? 1 : -1; - while (1) { - if ((dif = (int)*c1++ - (int)*c2++) != 0) - break; + do { if (!*c1) { switch (state1) { case s_DIR: @@ -1859,7 +1846,7 @@ if (type1 != type2) return type1 == t_PATH ? 1 : -1; } - } + } while ((dif = (int)*c1++ - (int)*c2++) == 0); return dif; } @@ -1886,9 +1873,9 @@ int len = strlen(f->dirname); memcpy(fbuf, f->dirname, len); fbuf[len] = '/'; - strcpy(fbuf + len + 1, f->basename); + strlcpy(fbuf + len + 1, f->basename, MAXPATHLEN - (len + 1)); } else - strcpy(fbuf, f->basename); + strlcpy(fbuf, f->basename, MAXPATHLEN); return fbuf; } diff -urN --exclude=patches rsync-2.6.8/generator.c rsync-2.6.9/generator.c --- rsync-2.6.8/generator.c 2006-04-17 23:38:58.000000000 -0700 +++ rsync-2.6.9/generator.c 2006-10-22 15:36:36.000000000 -0700 @@ -1,38 +1,37 @@ -/* -*- c-file-style: "linux" -*- - - rsync -- fast file replication program - - Copyright (C) 1996-2000 by Andrew Tridgell - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2002 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. -*/ +/* + * Routines that are exclusive to the generator process. + * + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" extern int verbose; extern int dry_run; extern int do_xfers; -extern int log_format_has_i; -extern int daemon_log_format_has_i; +extern int stdout_format_has_i; +extern int logfile_format_has_i; extern int am_root; extern int am_server; extern int am_daemon; extern int do_progress; -extern int recurse; extern int relative_paths; extern int implied_dirs; extern int keep_dirlinks; @@ -51,7 +50,7 @@ extern int delete_after; extern int module_id; extern int ignore_errors; -extern int remove_sent_files; +extern int remove_source_files; extern int delay_updates; extern int update_only; extern int ignore_existing; @@ -79,6 +78,7 @@ extern int link_dest; extern int whole_file; extern int list_only; +extern int new_root_dir; extern int read_batch; extern int safe_symlinks; extern long block_size; /* "long" because popt can't set an int32. */ @@ -291,8 +291,8 @@ STRUCT_STAT st; int j; - if (dry_run > 1 /* destination doesn't exist yet */ - || list_only) + /* dry_run is incremented when the destination doesn't exist yet. */ + if (dry_run > 1 || list_only) return; for (j = 0; j < flist->count; j++) { @@ -358,7 +358,7 @@ iflags &= 0xffff; if ((iflags & SIGNIFICANT_ITEM_FLAGS || verbose > 1 - || log_format_has_i > 1 || (xname && *xname)) && !read_batch) { + || stdout_format_has_i > 1 || (xname && *xname)) && !read_batch) { if (protocol_version >= 29) { if (ndx >= 0) write_int(sock_f_out, ndx); @@ -367,8 +367,10 @@ write_byte(sock_f_out, fnamecmp_type); if (iflags & ITEM_XNAME_FOLLOWS) write_vstring(sock_f_out, xname, strlen(xname)); - } else if (ndx >= 0) - log_item(file, &stats, iflags, xname); + } else if (ndx >= 0) { + enum logcode code = logfile_format_has_i ? FINFO : FCLIENT; + log_item(code, file, &stats, iflags, xname); + } } } @@ -451,7 +453,7 @@ int64 l; int b = BLOCKSUM_BIAS; for (l = len; l >>= 1; b += 2) {} - for (c = blength; c >>= 1 && b; b--) {} + for (c = blength; (c >>= 1) && b; b--) {} /* add a bit, subtract rollsum, round up. */ s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */ s2length = MAX(s2length, csum_length); @@ -628,7 +630,7 @@ case 2: if (!unchanged_attrs(file, stp)) continue; - if ((always_checksum || ignore_times) + if (always_checksum && preserve_times && cmp_time(stp->st_mtime, file->modtime)) continue; best_match = j; @@ -645,29 +647,31 @@ j = best_match; pathjoin(cmpbuf, MAXPATHLEN, basis_dir[j], fname); if (link_stat(cmpbuf, stp, 0) < 0) - match_level = 0; + return -1; } -#ifdef HAVE_LINK if (match_level == 3 && !copy_dest) { +#ifdef SUPPORT_HARD_LINKS if (link_dest) { if (hard_link_one(file, ndx, fname, 0, stp, cmpbuf, 1, itemizing && verbose > 1, code) < 0) goto try_a_copy; - if (preserve_hard_links && file->link_u.links) + if (preserve_hard_links && file->link_u.links) { + if (dry_run) + file->link_u.links->link_dest_used = j + 1; hard_link_cluster(file, ndx, itemizing, code); - } else if (itemizing) + } + } else +#endif + if (itemizing) itemize(file, ndx, 0, stp, 0, 0, NULL); if (verbose > 1 && maybe_ATTRS_REPORT) { - code = daemon_log_format_has_i || dry_run - ? FCLIENT : FINFO; - rprintf(code, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is uptodate\n", fname); } return -2; } -#endif if (match_level >= 2) { try_a_copy: /* Copy the file locally. */ @@ -684,8 +688,7 @@ if (maybe_ATTRS_REPORT && ((!itemizing && verbose && match_level == 2) || (verbose > 1 && match_level == 3))) { - code = daemon_log_format_has_i || dry_run - ? FCLIENT : FINFO; + code = match_level == 3 ? FCLIENT : FINFO; rprintf(code, "%s%s\n", fname, match_level == 3 ? " is uptodate" : ""); } @@ -731,9 +734,10 @@ } else { rprintf(FERROR, "internal: try_dests_non() called with invalid mode (%o)\n", - file->mode); + (int)file->mode); exit_cleanup(RERR_UNSUPPORTED); } +#ifdef SUPPORT_HARD_LINKS if (link_dest #ifndef CAN_HARDLINK_SYMLINK && !S_ISLNK(file->mode) @@ -751,16 +755,15 @@ if (preserve_hard_links && file->link_u.links) hard_link_cluster(file, ndx, itemizing, code); } - if (itemizing && log_format_has_i && verbose > 1) { +#endif + if (itemizing && stdout_format_has_i && verbose > 1) { int changes = compare_dest ? 0 : ITEM_LOCAL_CHANGE + (link_dest ? ITEM_XNAME_FOLLOWS : 0); char *lp = link_dest ? "" : NULL; itemize(file, ndx, 0, &st, changes, 0, lp); } if (verbose > 1 && maybe_ATTRS_REPORT) { - code = daemon_log_format_has_i || dry_run - ? FCLIENT : FINFO; - rprintf(code, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is uptodate\n", fname); } return -2; } while (basis_dir[++i] != NULL); @@ -807,7 +810,8 @@ fuzzy_dirlist = NULL; } if (missing_below >= 0) { - dry_run--; + if (dry_run) + dry_run--; missing_below = -1; } parent_dirname = ""; @@ -837,9 +841,13 @@ } } - if (missing_below >= 0 && file->dir.depth <= missing_below) { - dry_run--; - missing_below = -1; + if (missing_below >= 0) { + if (file->dir.depth <= missing_below) { + if (dry_run) + dry_run--; + missing_below = -1; + } else if (!dry_run) + return; } if (dry_run > 1) { statret = -1; @@ -906,8 +914,14 @@ dry_run++; } if (itemizing && f_out != -1) { - itemize(file, ndx, statret, &st, - statret ? ITEM_LOCAL_CHANGE : 0, 0, NULL); + int sr = statret; + if (new_root_dir) { + if (*fname == '.' && fname[1] == '\0') + sr = -1; + new_root_dir = 0; + } + itemize(file, ndx, sr, &st, + sr ? ITEM_LOCAL_CHANGE : 0, 0, NULL); } if (statret != 0 && do_mkdir(fname,file->mode) < 0 && errno != EEXIST) { if (!relative_paths || errno != ENOENT @@ -916,10 +930,18 @@ rsyserr(FERROR, errno, "recv_generator: mkdir %s failed", full_fname(fname)); + file->flags |= FLAG_MISSING; + if (ndx+1 < the_file_list->count + && the_file_list->files[ndx+1]->dir.depth > file->dir.depth) { + rprintf(FERROR, + "*** Skipping everything below this failed directory ***\n"); + missing_below = file->dir.depth; + } + return; } } if (set_file_attrs(fname, file, statret ? NULL : &st, 0) - && verbose && code && f_out != -1) + && verbose && code != FNONE && f_out != -1) rprintf(code, "%s/\n", fname); if (delete_during && f_out != -1 && !phase && dry_run < 2 && (file->flags & FLAG_DEL_HERE)) @@ -967,6 +989,8 @@ itemizing, code); } + if (remove_source_files == 1) + goto return_with_success; return; } } @@ -986,7 +1010,8 @@ #endif if (!copy_dest) return; - itemizing = code = 0; + itemizing = 0; + code = FNONE; } } if (preserve_hard_links && file->link_u.links @@ -1002,17 +1027,17 @@ itemize(file, ndx, statret, &st, ITEM_LOCAL_CHANGE, 0, NULL); } - if (code && verbose) { + if (code != FNONE && verbose) { rprintf(code, "%s -> %s\n", fname, file->u.link); } - if (remove_sent_files && !dry_run) { - char numbuf[4]; - SIVAL(numbuf, 0, ndx); - send_msg(MSG_SUCCESS, numbuf, 4); - } if (preserve_hard_links && file->link_u.links) hard_link_cluster(file, ndx, itemizing, code); + /* This does not check remove_source_files == 1 + * because this is one of the items that the old + * --remove-sent-files option would remove. */ + if (remove_source_files) + goto return_with_success; } #endif return; @@ -1030,7 +1055,8 @@ #endif if (!copy_dest) return; - itemizing = code = 0; + itemizing = 0; + code = FNONE; } } if (statret != 0 @@ -1060,12 +1086,14 @@ itemize(file, ndx, statret, &st, ITEM_LOCAL_CHANGE, 0, NULL); } - if (code && verbose) + if (code != FNONE && verbose) rprintf(code, "%s\n", fname); if (preserve_hard_links && file->link_u.links) { hard_link_cluster(file, ndx, itemizing, code); } + if (remove_source_files == 1) + goto return_with_success; } } else { if (itemizing) @@ -1073,6 +1101,8 @@ set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT); if (preserve_hard_links && file->link_u.links) hard_link_cluster(file, ndx, itemizing, code); + if (remove_source_files == 1) + goto return_with_success; } return; } @@ -1127,9 +1157,12 @@ if (statret != 0 && basis_dir[0] != NULL) { int j = try_dests_reg(file, fname, ndx, fnamecmpbuf, &st, itemizing, maybe_ATTRS_REPORT, code); - if (j == -2) + if (j == -2) { + if (remove_source_files == 1) + goto return_with_success; return; - if (j != -1) { + } + if (j >= 0) { fnamecmp = fnamecmpbuf; fnamecmp_type = j; statret = 0; @@ -1194,6 +1227,14 @@ set_file_attrs(fname, file, &st, maybe_ATTRS_REPORT); if (preserve_hard_links && file->link_u.links) hard_link_cluster(file, ndx, itemizing, code); + if (remove_source_files != 1) + return; + return_with_success: + if (!dry_run) { + char numbuf[4]; + SIVAL(numbuf, 0, ndx); + send_msg(MSG_SUCCESS, numbuf, 4); + } return; } @@ -1266,8 +1307,8 @@ rprintf(FINFO, "generating and sending sums for %d\n", ndx); notify_others: - if (remove_sent_files && !delay_updates && !phase) - increment_active_files(ndx, itemizing, code); + if (remove_source_files && !delay_updates && !phase) + increment_active_files(ndx, itemizing, code); write_int(f_out, ndx); if (itemizing) { int iflags = ITEM_TRANSFER; @@ -1326,16 +1367,16 @@ if (protocol_version >= 29) { itemizing = 1; - maybe_ATTRS_REPORT = log_format_has_i ? 0 : ATTRS_REPORT; - code = daemon_log_format_has_i ? 0 : FLOG; + maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT; + code = logfile_format_has_i ? FNONE : FLOG; } else if (am_daemon) { - itemizing = daemon_log_format_has_i && do_xfers; + itemizing = logfile_format_has_i && do_xfers; maybe_ATTRS_REPORT = ATTRS_REPORT; code = itemizing || !do_xfers ? FCLIENT : FINFO; } else if (!am_server) { - itemizing = log_format_has_i; - maybe_ATTRS_REPORT = log_format_has_i ? 0 : ATTRS_REPORT; - code = itemizing ? 0 : FINFO; + itemizing = stdout_format_has_i; + maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT; + code = itemizing ? FNONE : FINFO; } else { itemizing = 0; maybe_ATTRS_REPORT = ATTRS_REPORT; @@ -1476,6 +1517,16 @@ continue; if (!need_retouch_dir_times && file->mode & S_IWUSR) continue; + if (file->flags & FLAG_MISSING) { + int missing = file->dir.depth; + while (++i < flist->count) { + file = flist->files[i]; + if (file->dir.depth <= missing) + break; + } + i--; + continue; + } recv_generator(f_name(file, NULL), file, i, itemizing, maybe_ATTRS_REPORT, code, -1); if (allowed_lull && !(++j % lull_mod)) diff -urN --exclude=patches rsync-2.6.8/getgroups.c rsync-2.6.9/getgroups.c --- rsync-2.6.8/getgroups.c 2005-02-13 16:53:43.000000000 -0800 +++ rsync-2.6.9/getgroups.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,28 +1,24 @@ /* - * Copyright (C) 2002 by Martin Pool - * + * Print out the gids of all groups for the current user. This is like + * `id -G` on Linux, but it's too hard to find a portable equivalent. + * + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003, 2004 Wayne Davison + * * 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. - */ - -/** - * @file getgroups.c * - * Print out the gids of all groups for the current user. This is - * like `id -G` on Linux, but it's too hard to find a portable - * equivalent. - **/ + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" @@ -63,6 +59,6 @@ if (!gid_in_list) printf("%lu", (unsigned long)gid); printf("\n"); - + return 0; } diff -urN --exclude=patches rsync-2.6.8/hlink.c rsync-2.6.9/hlink.c --- rsync-2.6.8/hlink.c 2006-02-24 08:43:44.000000000 -0800 +++ rsync-2.6.9/hlink.c 2006-10-17 11:49:04.000000000 -0700 @@ -1,29 +1,34 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2002 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. -*/ + * Routines to support hard-linking. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" extern int verbose; +extern int do_xfers; extern int link_dest; extern int make_backups; -extern int log_format_has_i; +extern int remove_source_files; +extern int stdout_format_has_i; extern char *basis_dir[]; extern struct file_list *the_file_list; @@ -50,14 +55,14 @@ return f_name_cmp(f1, f2); } -static int *hlink_list; -static int hlink_count; +static int32 *hlink_list; +static int32 hlink_count; /* Analyze the data in the hlink_list[], remove items that aren't multiply * linked, and replace the dev+inode data with the hlindex+next linked list. */ static void link_idev_data(void) { - int cur, from, to, start; + int32 cur, from, to, start; alloc_pool_t hlink_pool; alloc_pool_t idev_pool = the_file_list->hlink_pool; @@ -78,6 +83,7 @@ FPTR(cur)->F_HLINDEX = to; FPTR(cur)->F_NEXT = hlink_list[++from]; + FPTR(cur)->link_u.links->link_dest_used = 0; } pool_free(idev_pool, 0, FPTR(cur)->link_u.idev); if (from > start) { @@ -89,6 +95,7 @@ FPTR(cur)->F_HLINDEX = to; FPTR(cur)->F_NEXT = head; FPTR(cur)->flags |= FLAG_HLINK_EOL; + FPTR(cur)->link_u.links->link_dest_used = 0; hlink_list[to++] = head; } else FPTR(cur)->link_u.links = NULL; @@ -101,7 +108,7 @@ hlink_pool = NULL; } else { hlink_count = to; - hlink_list = realloc_array(hlink_list, int, hlink_count); + hlink_list = realloc_array(hlink_list, int32, hlink_count); if (!hlink_list) out_of_memory("init_hard_links"); } @@ -118,7 +125,7 @@ if (hlink_list) free(hlink_list); - if (!(hlink_list = new_array(int, the_file_list->count))) + if (!(hlink_list = new_array(int32, the_file_list->count))) out_of_memory("init_hard_links"); hlink_count = 0; @@ -180,13 +187,19 @@ head = hlink_list[file->F_HLINDEX]; if (ndx != head) { struct file_struct *head_file = FPTR(head); - if (!log_format_has_i && verbose > 1) { + if (!stdout_format_has_i && verbose > 1) { rprintf(FINFO, "\"%s\" is a hard link\n", f_name(file, NULL)); } if (head_file->F_HLINDEX == FINISHED_LINK) { STRUCT_STAT st2, st3; - char *toname = f_name(head_file, NULL); + char toname[MAXPATHLEN]; + int ldu = head_file->link_u.links->link_dest_used; + if (ldu) { + pathjoin(toname, MAXPATHLEN, basis_dir[ldu-1], + f_name(head_file, NULL)); + } else + f_name(head_file, toname); if (link_stat(toname, &st2, 0) < 0) { rsyserr(FERROR, errno, "stat %s failed", full_fname(toname)); @@ -205,8 +218,10 @@ continue; statret = 1; st = &st3; - if (verbose < 2 || !log_format_has_i) - itemizing = code = 0; + if (verbose < 2 || !stdout_format_has_i) { + itemizing = 0; + code = FNONE; + } break; } if (!unchanged_file(cmpbuf, file, &st3)) @@ -219,6 +234,11 @@ } maybe_hard_link(file, ndx, fname, statret, st, toname, &st2, itemizing, code); + if (remove_source_files == 1 && do_xfers) { + char numbuf[4]; + SIVAL(numbuf, 0, ndx); + send_msg(MSG_SUCCESS, numbuf, 4); + } file->F_HLINDEX = FINISHED_LINK; } else file->F_HLINDEX = SKIPPED_LINK; @@ -250,7 +270,7 @@ ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, terse ? "" : toname); } - if (code && verbose && !terse) + if (code != FNONE && verbose && !terse) rprintf(code, "%s => %s\n", fname, toname); return 0; } @@ -284,6 +304,11 @@ statret = link_stat(hlink2, &st2, 0); maybe_hard_link(file, ndx, hlink2, statret, &st2, hlink1, &st1, itemizing, code); + if (remove_source_files == 1 && do_xfers) { + char numbuf[4]; + SIVAL(numbuf, 0, ndx); + send_msg(MSG_SUCCESS, numbuf, 4); + } file->F_HLINDEX = FINISHED_LINK; } while (!(file->flags & FLAG_HLINK_EOL)); #endif diff -urN --exclude=patches rsync-2.6.8/io.c rsync-2.6.9/io.c --- rsync-2.6.8/io.c 2006-04-21 09:40:19.000000000 -0700 +++ rsync-2.6.9/io.c 2006-09-30 15:11:20.000000000 -0700 @@ -1,8 +1,10 @@ -/* -*- c-file-style: "linux" -*- +/* + * Socket and pipe I/O utilities used in rsync. * - * Copyright (C) 1996-2001 by Andrew Tridgell - * Copyright (C) Paul Mackerras 1996 - * Copyright (C) 2001, 2002 by Martin Pool + * Copyright (C) 1996-2001 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -14,25 +16,17 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @file io.c - * - * Socket and pipe I/O utilities used in rsync. - * - * rsync provides its own multiplexing system, which is used to send - * stderr and stdout over a single socket. We need this because - * stdout normally carries the binary data stream, and stderr all our - * error messages. +/* Rsync provides its own multiplexing system, which is used to send + * stderr and stdout over a single socket. * * For historical reasons this is off during the start of the * connection, but it's switched on quite early using - * io_start_multiplex_out() and io_start_multiplex_in(). - **/ + * io_start_multiplex_out() and io_start_multiplex_in(). */ #include "rsync.h" @@ -52,7 +46,7 @@ extern int csum_length; extern int checksum_seed; extern int protocol_version; -extern int remove_sent_files; +extern int remove_source_files; extern int preserve_hard_links; extern char *filesfrom_host; extern struct stats stats; @@ -263,7 +257,7 @@ exit_cleanup(RERR_STREAMIO); } read_loop(fd, buf, 4); - if (remove_sent_files) + if (remove_source_files) decrement_active_files(IVAL(buf,0)); flist_ndx_push(&redo_list, IVAL(buf,0)); break; @@ -273,10 +267,7 @@ exit_cleanup(RERR_STREAMIO); } read_loop(fd, buf, len); - if (defer_forwarding_messages) - msg_list_add(&msg2sndr, MSG_DELETED, buf, len); - else - io_multiplex_write(MSG_DELETED, buf, len); + send_msg(MSG_DELETED, buf, len); break; case MSG_SUCCESS: if (len != 4 || !am_generator) { @@ -284,12 +275,9 @@ exit_cleanup(RERR_STREAMIO); } read_loop(fd, buf, len); - if (remove_sent_files) { + if (remove_source_files) { decrement_active_files(IVAL(buf,0)); - if (defer_forwarding_messages) - msg_list_add(&msg2sndr, MSG_SUCCESS, buf, len); - else - io_multiplex_write(MSG_SUCCESS, buf, len); + send_msg(MSG_SUCCESS, buf, len); } if (preserve_hard_links) flist_ndx_push(&hlink_list, IVAL(buf,0)); @@ -309,10 +297,7 @@ if (n >= sizeof buf) n = sizeof buf - 1; read_loop(fd, buf, n); - if (am_generator && am_server && defer_forwarding_messages) - msg_list_add(&msg2sndr, tag, buf, n); - else - rwrite((enum logcode)tag, buf, n); + rwrite(tag, buf, n); len -= n; } break; @@ -326,7 +311,7 @@ } /* This is used by the generator to limit how many file transfers can - * be active at once when --remove-sent-files is specified. Without + * be active at once when --remove-source-files is specified. Without * this, sender-side deletions were mostly happening at the end. */ void increment_active_files(int ndx, int itemizing, enum logcode code) { @@ -386,14 +371,19 @@ return 1; } -void send_msg(enum msgcode code, char *buf, int len) +int send_msg(enum msgcode code, char *buf, int len) { if (msg_fd_out < 0) { - io_multiplex_write(code, buf, len); - return; + if (!defer_forwarding_messages) + return io_multiplex_write(code, buf, len); + if (!io_multiplexing_out) + return 0; + msg_list_add(&msg2sndr, code, buf, len); + return 1; } msg_list_add(&msg2genr, code, buf, len); msg2genr_flush(NORMAL_FLUSH); + return 1; } int get_redo_num(int itemizing, enum logcode code) @@ -643,13 +633,19 @@ if (cnt < 0 && (errno == EWOULDBLOCK || errno == EINTR || errno == EAGAIN)) { struct timeval tv; - fd_set fds; - FD_ZERO(&fds); - FD_SET(fd, &fds); + fd_set r_fds, e_fds; + FD_ZERO(&r_fds); + FD_SET(fd, &r_fds); + FD_ZERO(&e_fds); + FD_SET(fd, &e_fds); tv.tv_sec = select_timeout; tv.tv_usec = 0; - if (!select(fd+1, &fds, NULL, NULL, &tv)) + if (!select(fd+1, &r_fds, NULL, &e_fds, &tv)) check_timeout(); + if (FD_ISSET(fd, &e_fds)) { + rsyserr(FINFO, errno, + "select exception on fd %d", fd); + } continue; } if (cnt != 1) @@ -1001,7 +997,7 @@ static void sleep_for_bwlimit(int bytes_written) { static struct timeval prior_tv; - static long total_written = 0; + static long total_written = 0; struct timeval tv, start_tv; long elapsed_usec, sleep_usec; @@ -1010,7 +1006,7 @@ if (!bwlimit_writemax) return; - total_written += bytes_written; + total_written += bytes_written; gettimeofday(&start_tv, NULL); if (prior_tv.tv_sec) { @@ -1046,7 +1042,7 @@ static void writefd_unbuffered(int fd,char *buf,size_t len) { size_t n, total = 0; - fd_set w_fds, r_fds; + fd_set w_fds, r_fds, e_fds; int maxfd, count, cnt, using_r_fds; int defer_save = defer_forwarding_messages; struct timeval tv; @@ -1055,12 +1051,14 @@ while (total < len) { FD_ZERO(&w_fds); - FD_SET(fd,&w_fds); + FD_SET(fd, &w_fds); + FD_ZERO(&e_fds); + FD_SET(fd, &e_fds); maxfd = fd; if (msg_fd_in >= 0) { FD_ZERO(&r_fds); - FD_SET(msg_fd_in,&r_fds); + FD_SET(msg_fd_in, &r_fds); if (msg_fd_in > maxfd) maxfd = msg_fd_in; using_r_fds = 1; @@ -1072,7 +1070,7 @@ errno = 0; count = select(maxfd + 1, using_r_fds ? &r_fds : NULL, - &w_fds, NULL, &tv); + &w_fds, &e_fds, &tv); if (count <= 0) { if (count < 0 && errno == EBADF) @@ -1081,6 +1079,11 @@ continue; } + if (FD_ISSET(fd, &e_fds)) { + rsyserr(FINFO, errno, + "select exception on fd %d", fd); + } + if (using_r_fds && FD_ISSET(msg_fd_in, &r_fds)) read_msg_fd(); diff -urN --exclude=patches rsync-2.6.8/lib/compat.c rsync-2.6.9/lib/compat.c --- rsync-2.6.8/lib/compat.c 2006-04-13 09:52:15.000000000 -0700 +++ rsync-2.6.9/lib/compat.c 2006-10-13 16:17:37.000000000 -0700 @@ -1,42 +1,35 @@ -/* - Copyright (C) Andrew Tridgell 1998 - Copyright (C) 2002 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. -*/ - -/** - * @file compat.c +/* + * Reimplementations of standard functions for platforms that don't have them. * - * Reimplementations of standard functions for platforms that don't - * have them. - **/ - - + * Copyright (C) 1998 Andrew Tridgell + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" - #ifndef HAVE_STRDUP char *strdup(char *s) { - int l = strlen(s) + 1; - char *ret = (char *)malloc(l); - if (ret) - strcpy(ret,s); - return ret; + int len = strlen(s) + 1; + char *ret = (char *)malloc(len); + if (ret) + memcpy(ret, s, len); + return ret; } #endif @@ -86,7 +79,7 @@ /** * Find the first ocurrence in @p s of any character in @p accept. * - * Derived from glibc + * Derived from glibc **/ char *strpbrk(const char *s, const char *accept) { @@ -105,7 +98,7 @@ #ifndef HAVE_STRLCPY /** - * Like strncpy but does not 0 fill the buffer and always null + * Like strncpy but does not 0 fill the buffer and always null * terminates. * * @param bufsize is the size of the destination buffer. @@ -128,7 +121,7 @@ #ifndef HAVE_STRLCAT /** - * Like strncat() but does not 0 fill the buffer and always null + * Like strncat() but does not 0 fill the buffer and always null * terminates. * * @param bufsize length of the buffer, which should be one more than diff -urN --exclude=patches rsync-2.6.8/lib/getaddrinfo.c rsync-2.6.9/lib/getaddrinfo.c --- rsync-2.6.8/lib/getaddrinfo.c 2005-02-13 16:53:44.000000000 -0800 +++ rsync-2.6.9/lib/getaddrinfo.c 2006-10-27 14:14:28.000000000 -0700 @@ -1,7 +1,7 @@ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * - * Changes Copyright (C) 2001 by Martin Pool + * Changes Copyright (C) 2001 Martin Pool * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -64,13 +64,15 @@ #endif /* ndef NO_DATA */ static const char in_addrany[] = { 0, 0, 0, 0 }; +static const char in_loopback[] = { 127, 0, 0, 1 }; +#ifdef INET6 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 }; +#endif struct sockinet { u_char si_len; @@ -137,8 +139,9 @@ #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));\ + int name_size = strlen(str) + 1;\ + if (((ai)->ai_canonname = (char *)malloc(name_size)) != NULL) {\ + memcpy((ai)->ai_canonname, (str), name_size);\ } else {\ error = EAI_MEMORY;\ goto free;\ diff -urN --exclude=patches rsync-2.6.8/lib/getnameinfo.c rsync-2.6.9/lib/getnameinfo.c --- rsync-2.6.8/lib/getnameinfo.c 2005-02-13 16:53:44.000000000 -0800 +++ rsync-2.6.9/lib/getnameinfo.c 2006-11-03 23:22:00.000000000 -0800 @@ -1,7 +1,7 @@ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * - * Changes Copyright (C) 2001 by Martin Pool + * Changes Copyright (C) 2001 Martin Pool * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -91,9 +91,8 @@ u_long v4a; #ifdef INET6 u_char pfx; -#endif int h_error; - char numserv[512]; +#endif char numaddr[512]; if (sa == NULL) @@ -112,7 +111,8 @@ return ENI_FAMILY; found: - if (salen != afd->a_socklen) return ENI_SALEN; + if (salen != (size_t)afd->a_socklen) + return ENI_SALEN; port = ((struct sockinet *)sa)->si_port; /* network byte order */ addr = (char *)sa + afd->a_off; @@ -120,16 +120,13 @@ 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) + if ((size_t)snprintf(serv, servlen+1, "%d", ntohs(port)) > servlen) return ENI_MEMORY; - strcpy(serv, numserv); } else { sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp"); if (sp) { - if (strlen(sp->s_name) > servlen) + if (strlcpy(serv, sp->s_name, servlen + 1) > servlen) return ENI_MEMORY; - strcpy(serv, sp->s_name); } else return ENI_NOSERVNAME; } @@ -156,15 +153,14 @@ } else if (flags & NI_NUMERICHOST) { if (!inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))) return ENI_SYSTEM; - if (strlen(numaddr) > hostlen) + if (strlcpy(host, numaddr, hostlen + 1) > 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; + /*h_error = h_errno;*/ #endif if (hp) { @@ -172,13 +168,12 @@ p = strchr(hp->h_name, '.'); if (p) *p = '\0'; } - if (strlen(hp->h_name) > hostlen) { + if (strlcpy(host, hp->h_name, hostlen + 1) > hostlen) { #ifdef INET6 freehostent(hp); #endif return ENI_MEMORY; } - strcpy(host, hp->h_name); #ifdef INET6 freehostent(hp); #endif @@ -187,9 +182,8 @@ return ENI_NOHOSTNAME; if (!inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))) return ENI_NOHOSTNAME; - if (strlen(numaddr) > hostlen) + if (strlcpy(host, numaddr, hostlen + 1) > hostlen) return ENI_MEMORY; - strcpy(host, numaddr); } } return SUCCESS; diff -urN --exclude=patches rsync-2.6.8/lib/inet_ntop.c rsync-2.6.9/lib/inet_ntop.c --- rsync-2.6.8/lib/inet_ntop.c 2001-11-27 17:29:41.000000000 -0800 +++ rsync-2.6.9/lib/inet_ntop.c 2006-10-16 11:11:24.000000000 -0700 @@ -75,13 +75,14 @@ { static const char *fmt = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; + size_t len; - if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size) - { + len = snprintf(tmp, sizeof tmp, fmt, src[0], src[1], src[2], src[3]); + if (len >= size) { errno = ENOSPC; return (NULL); } - strcpy(dst, tmp); + memcpy(dst, tmp, len + 1); return (dst); } @@ -106,7 +107,7 @@ 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; + int i, inc; /* * Preprocess: @@ -157,13 +158,14 @@ /* 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))) + if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp))) return (NULL); tp += strlen(tp); break; } - tp += sprintf(tp, "%x", words[i]); + inc = snprintf(tp, 5, "%x", words[i]); + assert(inc < 5); + tp += inc; } /* Was it a trailing run of 0x00's? */ if (best.base != -1 && (best.base + best.len) == @@ -178,7 +180,7 @@ errno = ENOSPC; return (NULL); } - strcpy(dst, tmp); + memcpy(dst, tmp, tp - tmp); return (dst); } #endif /* AF_INET6 */ diff -urN --exclude=patches rsync-2.6.8/lib/mdfour.c rsync-2.6.9/lib/mdfour.c --- rsync-2.6.8/lib/mdfour.c 2005-01-10 12:52:08.000000000 -0800 +++ rsync-2.6.9/lib/mdfour.c 2006-04-25 16:51:16.000000000 -0700 @@ -1,30 +1,31 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. - a implementation of MD4 designed for use in the SMB authentication protocol - Copyright (C) Andrew Tridgell 1997-1998. - - 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. -*/ + * Unix SMB/Netbios implementation. + * Version 1.9. + * An implementation of MD4 designed for use in the SMB authentication protocol. + * + * Copyright (C) 1997-1998 Andrew Tridgell + * Copyright (C) 2005 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" /* NOTE: This code makes no attempt to be fast! - - It assumes that a int is at least 32 bits long -*/ + * + * It assumes that a int is at least 32 bits long. */ static struct mdfour *m; diff -urN --exclude=patches rsync-2.6.8/lib/mdfour.h rsync-2.6.9/lib/mdfour.h --- rsync-2.6.8/lib/mdfour.h 2003-04-09 18:50:12.000000000 -0700 +++ rsync-2.6.9/lib/mdfour.h 2006-04-25 16:51:16.000000000 -0700 @@ -1,23 +1,24 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. - a implementation of MD4 designed for use in the SMB authentication protocol - Copyright (C) Andrew Tridgell 1997-1998. - - 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. -*/ + * Unix SMB/Netbios implementation. + * Version 1.9. + * An implementation of MD4 designed for use in the SMB authentication protocol. + * + * Copyright (C) 1997-1998 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ struct mdfour { uint32 A, B, C, D; @@ -29,7 +30,3 @@ void mdfour_update(struct mdfour *md, unsigned char *in, uint32 n); void mdfour_result(struct mdfour *md, unsigned char *out); void mdfour(unsigned char *out, unsigned char *in, int n); - - - - diff -urN --exclude=patches rsync-2.6.8/lib/permstring.c rsync-2.6.9/lib/permstring.c --- rsync-2.6.8/lib/permstring.c 2006-01-29 16:39:59.000000000 -0800 +++ rsync-2.6.9/lib/permstring.c 2006-10-13 16:17:34.000000000 -0700 @@ -1,40 +1,40 @@ -/* - 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. -*/ +/* + * A single utility routine. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001 Martin Pool + * Copyright (C) 2003, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 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 - **/ +/* Produce a string representation of Unix mode bits like that used by ls(1). + * The "buf" buffer must be at least 11 characters. */ void permstring(char *perms, mode_t mode) { static const char *perm_map = "rwxrwxrwx"; int i; - strcpy(perms, "----------"); - - for (i=0;i<9;i++) { - if (mode & (1<live) FDEXTSTAT(pool->live); - strcpy(buf, " FREE BOUND\n"); + strlcpy(buf, " FREE BOUND\n", sizeof buf); write(fd, buf, strlen(buf)); for (cur = pool->free; cur; cur = cur->next) diff -urN --exclude=patches rsync-2.6.8/loadparm.c rsync-2.6.9/loadparm.c --- rsync-2.6.8/loadparm.c 2006-04-06 00:28:22.000000000 -0700 +++ rsync-2.6.9/loadparm.c 2006-10-12 23:49:44.000000000 -0700 @@ -1,26 +1,26 @@ /* This is based on loadparm.c from Samba, written by Andrew Tridgell and Karl Auer */ -/* some fixes +/* + * 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. * - * Copyright (C) 2001, 2002 by Martin Pool + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/* - 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. -*/ +/* some fixes + * + * Copyright (C) 2001, 2002 Martin Pool + */ /* * Load parameters. @@ -57,6 +57,10 @@ typedef char pstring[1024]; #define pstrcpy(a,b) strlcpy(a,b,sizeof(pstring)) +#ifndef LOG_DAEMON +#define LOG_DAEMON 0 +#endif + /* the following are used by loadparm for option lists */ typedef enum { @@ -99,13 +103,11 @@ typedef struct { char *bind_address; - char *log_file; char *motd_file; char *pid_file; char *socket_options; int rsync_port; - int syslog_facility; } global; static global Globals; @@ -131,6 +133,7 @@ char *include_from; char *incoming_chmod; char *lock_file; + char *log_file; char *log_format; char *name; char *outgoing_chmod; @@ -144,6 +147,7 @@ int max_connections; int max_verbosity; + int syslog_facility; int timeout; BOOL ignore_errors; @@ -176,6 +180,7 @@ /* include_from; */ NULL, /* incoming_chmod; */ NULL, /* lock_file; */ DEFAULT_LOCK_FILE, + /* log_file; */ NULL, /* log_format; */ "%o %h [%a] %m (%u) %f %l", /* name; */ NULL, /* outgoing_chmod; */ NULL, @@ -189,6 +194,7 @@ /* max_connections; */ 0, /* max_verbosity; */ 1, + /* syslog_facility; */ LOG_DAEMON, /* timeout; */ 0, /* ignore_errors; */ False, @@ -282,12 +288,10 @@ static struct parm_struct parm_table[] = { {"address", P_STRING, P_GLOBAL,&Globals.bind_address, NULL,0}, - {"log file", P_STRING, P_GLOBAL,&Globals.log_file, NULL,0}, {"motd file", P_STRING, P_GLOBAL,&Globals.motd_file, NULL,0}, {"pid file", P_STRING, P_GLOBAL,&Globals.pid_file, NULL,0}, {"port", P_INTEGER,P_GLOBAL,&Globals.rsync_port, NULL,0}, {"socket options", P_STRING, P_GLOBAL,&Globals.socket_options, NULL,0}, - {"syslog facility", P_ENUM, P_GLOBAL,&Globals.syslog_facility,enum_facilities,0}, {"auth users", P_STRING, P_LOCAL, &sDefault.auth_users, NULL,0}, {"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL,0}, @@ -305,6 +309,7 @@ {"incoming chmod", P_STRING, P_LOCAL, &sDefault.incoming_chmod, NULL,0}, {"list", P_BOOL, P_LOCAL, &sDefault.list, NULL,0}, {"lock file", P_STRING, P_LOCAL, &sDefault.lock_file, NULL,0}, + {"log file", P_STRING, P_LOCAL, &sDefault.log_file, NULL,0}, {"log format", P_STRING, P_LOCAL, &sDefault.log_format, NULL,0}, {"max connections", P_INTEGER,P_LOCAL, &sDefault.max_connections, NULL,0}, {"max verbosity", P_INTEGER,P_LOCAL, &sDefault.max_verbosity, NULL,0}, @@ -319,6 +324,7 @@ {"refuse options", P_STRING, P_LOCAL, &sDefault.refuse_options, NULL,0}, {"secrets file", P_STRING, P_LOCAL, &sDefault.secrets_file, NULL,0}, {"strict modes", P_BOOL, P_LOCAL, &sDefault.strict_modes, NULL,0}, + {"syslog facility", P_ENUM, P_LOCAL, &sDefault.syslog_facility,enum_facilities,0}, {"temp dir", P_PATH, P_LOCAL, &sDefault.temp_dir, NULL,0}, {"timeout", P_INTEGER,P_LOCAL, &sDefault.timeout, NULL,0}, {"transfer logging", P_BOOL, P_LOCAL, &sDefault.transfer_logging, NULL,0}, @@ -330,18 +336,15 @@ /*************************************************************************** -Initialise the global parameter structure. +* Initialise the global parameter structure. ***************************************************************************/ static void init_globals(void) { memset(&Globals, 0, sizeof Globals); -#ifdef LOG_DAEMON - Globals.syslog_facility = LOG_DAEMON; -#endif } /*************************************************************************** -Initialise the sDefault parameter structure. +* Initialise the sDefault parameter structure. ***************************************************************************/ static void init_locals(void) { @@ -373,13 +376,11 @@ FN_GLOBAL_STRING(lp_bind_address, &Globals.bind_address) -FN_GLOBAL_STRING(lp_log_file, &Globals.log_file) FN_GLOBAL_STRING(lp_motd_file, &Globals.motd_file) FN_GLOBAL_STRING(lp_pid_file, &Globals.pid_file) FN_GLOBAL_STRING(lp_socket_options, &Globals.socket_options) FN_GLOBAL_INTEGER(lp_rsync_port, &Globals.rsync_port) -FN_GLOBAL_INTEGER(lp_syslog_facility, &Globals.syslog_facility) FN_LOCAL_STRING(lp_auth_users, auth_users) FN_LOCAL_STRING(lp_comment, comment) @@ -394,6 +395,7 @@ FN_LOCAL_STRING(lp_include_from, include_from) FN_LOCAL_STRING(lp_incoming_chmod, incoming_chmod) FN_LOCAL_STRING(lp_lock_file, lock_file) +FN_LOCAL_STRING(lp_log_file, log_file) FN_LOCAL_STRING(lp_log_format, log_format) FN_LOCAL_STRING(lp_name, name) FN_LOCAL_STRING(lp_outgoing_chmod, outgoing_chmod) @@ -402,6 +404,7 @@ FN_LOCAL_STRING(lp_prexfer_exec, prexfer_exec) FN_LOCAL_STRING(lp_refuse_options, refuse_options) FN_LOCAL_STRING(lp_secrets_file, secrets_file) +FN_LOCAL_INTEGER(lp_syslog_facility, syslog_facility) FN_LOCAL_STRING(lp_temp_dir, temp_dir) FN_LOCAL_STRING(lp_uid, uid) @@ -429,7 +432,7 @@ /*************************************************************************** -initialise a service to the defaults +* initialise a service to the defaults ***************************************************************************/ static void init_service(service *pservice) { @@ -463,8 +466,8 @@ /*************************************************************************** -add a new service to the services array initialising it with the given -service +* add a new service to the services array initialising it with the given +* service ***************************************************************************/ static int add_a_service(service *pservice, char *name) { @@ -503,7 +506,7 @@ } /*************************************************************************** -Do a case-insensitive, whitespace-ignoring string compare. +* Do a case-insensitive, whitespace-ignoring string compare. ***************************************************************************/ static int strwicmp(char *psz1, char *psz2) { @@ -535,8 +538,8 @@ } /*************************************************************************** -Map a parameter's string representation to something we can use. -Returns False if the parameter string is not recognised, else TRUE. +* Map a parameter's string representation to something we can use. +* Returns False if the parameter string is not recognised, else TRUE. ***************************************************************************/ static int map_parameter(char *parmname) { @@ -555,9 +558,9 @@ /*************************************************************************** -Set a boolean variable from the text value stored in the passed string. -Returns True in success, False if the passed string does not correctly -represent a boolean. +* Set a boolean variable from the text value stored in the passed string. +* Returns True in success, False if the passed string does not correctly +* represent a boolean. ***************************************************************************/ static BOOL set_boolean(BOOL *pb, char *parmvalue) { @@ -583,7 +586,7 @@ } /*************************************************************************** -Find a service by name. Otherwise works like get_service. +* Find a service by name. Otherwise works like get_service. ***************************************************************************/ static int getservicebyname(char *name, service *pserviceDest) { @@ -603,8 +606,7 @@ /*************************************************************************** -Copy a service structure to another - +* Copy a service structure to another ***************************************************************************/ static void copy_service(service *pserviceDest, service *pserviceSource) @@ -649,8 +651,8 @@ /*************************************************************************** -Process a parameter for a particular service number. If snum < 0 -then assume we are in the globals +* Process a parameter for a particular service number. If snum < 0 +* then assume we are in the globals ***************************************************************************/ static BOOL lp_do_parameter(int snum, char *parmname, char *parmvalue) { @@ -741,7 +743,7 @@ } /*************************************************************************** -Process a parameter. +* Process a parameter. ***************************************************************************/ static BOOL do_parameter(char *parmname, char *parmvalue) { @@ -749,9 +751,9 @@ } /*************************************************************************** -Process a new section (service). At this stage all sections are services. -Later we'll have special sections that permit server parameters to be set. -Returns True on success, False on failure. +* Process a new section (service). At this stage all sections are services. +* Later we'll have special sections that permit server parameters to be set. +* Returns True on success, False on failure. ***************************************************************************/ static BOOL do_section(char *sectionname) { @@ -796,8 +798,8 @@ /*************************************************************************** -Load the services array from the services file. Return True on success, -False on failure. +* Load the services array from the services file. Return True on success, +* False on failure. ***************************************************************************/ BOOL lp_load(char *pszFname, int globals_only) { @@ -828,7 +830,7 @@ /*************************************************************************** -return the max number of services +* return the max number of services ***************************************************************************/ int lp_numservices(void) { @@ -836,10 +838,10 @@ } /*************************************************************************** -Return the number of the service with the given name, or -1 if it doesn't -exist. Note that this is a DIFFERENT ANIMAL from the internal function -getservicebyname()! This works ONLY if all services have been loaded, and -does not copy the found service. +* Return the number of the service with the given name, or -1 if it doesn't +* exist. Note that this is a DIFFERENT ANIMAL from the internal function +* getservicebyname()! This works ONLY if all services have been loaded, and +* does not copy the found service. ***************************************************************************/ int lp_number(char *name) { diff -urN --exclude=patches rsync-2.6.8/log.c rsync-2.6.9/log.c --- rsync-2.6.8/log.c 2006-04-08 09:04:34.000000000 -0700 +++ rsync-2.6.9/log.c 2006-10-14 11:51:21.000000000 -0700 @@ -1,30 +1,25 @@ -/* -*- 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 - 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. -*/ - /* - Logging and utility functions. - tridge, May 1998 + * Logging and utility functions. + * + * Copyright (C) 1998-2001 Andrew Tridgell + * Copyright (C) 2000-2001 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ - Mapping to human-readable messages added by Martin Pool - , Oct 2000. - */ #include "rsync.h" #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H #include @@ -42,20 +37,24 @@ extern int allow_8bit_chars; extern int protocol_version; extern int preserve_times; -extern int log_format_has_i; -extern int log_format_has_o_or_i; -extern int daemon_log_format_has_o_or_i; +extern int stdout_format_has_i; +extern int stdout_format_has_o_or_i; +extern int logfile_format_has_i; +extern int logfile_format_has_o_or_i; extern mode_t orig_umask; extern char *auth_user; -extern char *log_format; +extern char *stdout_format; +extern char *logfile_format; +extern char *logfile_name; #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H extern iconv_t ic_chck; #endif +extern char curr_dir[]; +extern unsigned int module_dirlen; static int log_initialised; static int logfile_was_closed; -static char *logfname; -static FILE *logfile; +static FILE *logfile_fp; struct stats stats; int log_got_error = 0; @@ -91,7 +90,6 @@ { 0, NULL } }; - /* * Map from rsync error code to name, or return NULL. */ @@ -109,10 +107,10 @@ { if (logfile_was_closed) logfile_reopen(); - if (logfile) { - fprintf(logfile,"%s [%d] %s", + if (logfile_fp) { + fprintf(logfile_fp, "%s [%d] %s", timestring(time(NULL)), (int)getpid(), buf); - fflush(logfile); + fflush(logfile_fp); } else { syslog(priority, "%s", buf); } @@ -132,7 +130,7 @@ #endif #ifdef LOG_DAEMON - openlog("rsyncd", options, lp_syslog_facility()); + openlog("rsyncd", options, lp_syslog_facility(module_id)); #else openlog("rsyncd", options); #endif @@ -145,35 +143,49 @@ static void logfile_open(void) { mode_t old_umask = umask(022 | orig_umask); - logfile = fopen(logfname, "a"); + logfile_fp = fopen(logfile_name, "a"); umask(old_umask); - if (!logfile) { + if (!logfile_fp) { int fopen_errno = errno; /* Rsync falls back to using syslog on failure. */ syslog_init(); rsyserr(FERROR, fopen_errno, - "failed to open log-file %s", logfname); + "failed to open log-file %s", logfile_name); rprintf(FINFO, "Ignoring \"log file\" setting.\n"); } } -void log_init(void) +void log_init(int restart) { - time_t t; - - if (log_initialised) - return; - log_initialised = 1; + if (log_initialised) { + if (!restart) + return; + if (strcmp(logfile_name, lp_log_file(module_id)) != 0) { + if (logfile_fp) { + fclose(logfile_fp); + logfile_fp = NULL; + } else + closelog(); + logfile_name = NULL; + } else if (*logfile_name) + return; /* unchanged, non-empty "log file" names */ + else if (lp_syslog_facility(-1) != lp_syslog_facility(module_id)) + closelog(); + else + return; /* unchanged syslog settings */ + } else + log_initialised = 1; - /* this looks pointless, but it is needed in order for the + /* This looks pointless, but it is needed in order for the * C library on some systems to fetch the timezone info - * before the chroot */ - t = time(NULL); - localtime(&t); - - /* optionally use a log file instead of syslog */ - logfname = lp_log_file(); - if (logfname && *logfname) + * before the chroot. */ + timestring(time(NULL)); + + /* Optionally use a log file instead of syslog. (Non-daemon + * rsyncs will have already set logfile_name, as needed.) */ + if (am_daemon && !logfile_name) + logfile_name = lp_log_file(module_id); + if (logfile_name && *logfile_name) logfile_open(); else syslog_init(); @@ -181,10 +193,10 @@ void logfile_close(void) { - if (logfile) { + if (logfile_fp) { logfile_was_closed = 1; - fclose(logfile); - logfile = NULL; + fclose(logfile_fp); + logfile_fp = NULL; } } @@ -229,9 +241,6 @@ if (len < 0) exit_cleanup(RERR_MESSAGEIO); - if (quiet && code == FINFO) - return; - if (am_server && msg_fd_out >= 0) { /* Pass the message to our sibling. */ send_msg((enum msgcode)code, buf, len); @@ -243,7 +252,7 @@ if (code == FCLIENT) code = FINFO; - else if (am_daemon) { + else if (am_daemon || logfile_name) { static int in_block; char msg[2048]; int priority = code == FERROR ? LOG_WARNING : LOG_INFO; @@ -252,19 +261,22 @@ return; in_block = 1; if (!log_initialised) - log_init(); + log_init(0); strlcpy(msg, buf, MIN((int)sizeof msg, len + 1)); logit(priority, msg); in_block = 0; - if (code == FLOG || !am_server) + if (code == FLOG || (am_daemon && !am_server)) return; } else if (code == FLOG) return; + if (quiet && code != FERROR) + return; + if (am_server) { /* Pass the message to the non-server side. */ - if (io_multiplex_write((enum msgcode)code, buf, len)) + if (send_msg((enum msgcode)code, buf, len)) return; if (am_daemon) { /* TODO: can we send the error to the user somehow? */ @@ -276,17 +288,8 @@ case FERROR: log_got_error = 1; f = stderr; - goto pre_scan; - case FINFO: - f = am_server ? stderr : stdout; - pre_scan: - while (len > 1 && *buf == '\n') { - fputc(*buf, f); - buf++; - len--; - } break; - case FNAME: + case FINFO: f = am_server ? stderr : stdout; break; default: @@ -382,7 +385,7 @@ char buf[BIGPATHBUFLEN]; size_t len; - strcpy(buf, RSYNC_NAME ": "); + strlcpy(buf, RSYNC_NAME ": ", sizeof buf); len = (sizeof RSYNC_NAME ": ") - 1; va_start(ap, format); @@ -403,31 +406,18 @@ { FILE *f = NULL; - if (am_daemon) { - return; - } - - if (code == FLOG) { + if (am_daemon || code == FLOG) return; - } - if (code == FERROR) { + if (code == FERROR || am_server) f = stderr; - } - - if (code == FINFO) { - if (am_server) - f = stderr; - else - f = stdout; - } + else + f = stdout; - if (!f) exit_cleanup(RERR_MESSAGEIO); fflush(f); } -/* a generic logging routine for send/recv, with parameter - * substitiution */ +/* A generic logging routine for send/recv, with parameter substitiution. */ static void log_formatted(enum logcode code, char *format, char *op, struct file_struct *file, struct stats *initial_stats, int iflags, char *hlink) @@ -524,6 +514,14 @@ strlcpy(n, buf2, MAXPATHLEN); else n = buf2; + } else if (*n != '/') { + pathjoin(buf2, sizeof buf2, + curr_dir + module_dirlen, n); + clean_fname(buf2, 0); + if (fmt[1]) + strlcpy(n, buf2, MAXPATHLEN); + else + n = buf2; } else clean_fname(n, 0); if (*n == '/') @@ -537,15 +535,15 @@ case 'L': if (hlink && *hlink) { n = hlink; - strcpy(buf2, " => "); + strlcpy(buf2, " => ", sizeof buf2); } else if (S_ISLNK(file->mode) && file->u.link) { n = file->u.link; - strcpy(buf2, " -> "); + strlcpy(buf2, " -> ", sizeof buf2); } else { n = ""; if (!fmt[1]) break; - strcpy(buf2, " "); + strlcpy(buf2, " ", sizeof buf2); } strlcat(fmt, "s", sizeof fmt); snprintf(buf2 + 4, sizeof buf2 - 4, fmt, n); @@ -689,17 +687,20 @@ return 0; } -/* log the transfer of a file */ -void log_item(struct file_struct *file, struct stats *initial_stats, - int iflags, char *hlink) +/* Log the transfer of a file. If the code is FCLIENT, the output just goes + * to stdout. If it is FLOG, it just goes to the log file. Otherwise we + * output to both. */ +void log_item(enum logcode code, struct file_struct *file, + struct stats *initial_stats, int iflags, char *hlink) { char *s_or_r = am_sender ? "send" : "recv"; - if (lp_transfer_logging(module_id)) { - log_formatted(FLOG, lp_log_format(module_id), s_or_r, + if (code != FLOG && stdout_format && !am_server) { + log_formatted(FCLIENT, stdout_format, s_or_r, file, initial_stats, iflags, hlink); - } else if (log_format && !am_server) { - log_formatted(FNAME, log_format, s_or_r, + } + if (code != FCLIENT && logfile_format && *logfile_format) { + log_formatted(FLOG, logfile_format, s_or_r, file, initial_stats, iflags, hlink); } } @@ -709,14 +710,17 @@ { int significant_flags = iflags & SIGNIFICANT_ITEM_FLAGS; int see_item = itemizing && (significant_flags || *buf - || log_format_has_i > 1 || (verbose > 1 && log_format_has_i)); + || stdout_format_has_i > 1 || (verbose > 1 && stdout_format_has_i)); int local_change = iflags & ITEM_LOCAL_CHANGE && significant_flags; if (am_server) { - if (am_daemon && !dry_run && see_item) - log_item(file, &stats, iflags, buf); + if (logfile_name && !dry_run && see_item + && (significant_flags || logfile_format_has_i)) + log_item(FLOG, file, &stats, iflags, buf); } else if (see_item || local_change || *buf - || (S_ISDIR(file->mode) && significant_flags)) - log_item(file, &stats, iflags, buf); + || (S_ISDIR(file->mode) && significant_flags)) { + enum logcode code = significant_flags || logfile_format_has_i ? FINFO : FCLIENT; + log_item(code, file, &stats, iflags, buf); + } } void log_delete(char *fname, int mode) @@ -728,22 +732,22 @@ file.mode = mode; file.basename = fname; - if (!verbose && !log_format) + if (!verbose && !stdout_format) ; else if (am_server && protocol_version >= 29 && len < MAXPATHLEN) { if (S_ISDIR(mode)) len++; /* directories include trailing null */ send_msg(MSG_DELETED, fname, len); } else { - fmt = log_format_has_o_or_i ? log_format : "deleting %n"; + fmt = stdout_format_has_o_or_i ? stdout_format : "deleting %n"; log_formatted(FCLIENT, fmt, "del.", &file, &stats, ITEM_DELETED, NULL); } - if (!am_daemon || dry_run || !lp_transfer_logging(module_id)) + if (!logfile_name || dry_run || !logfile_format) return; - fmt = daemon_log_format_has_o_or_i ? lp_log_format(module_id) : "deleting %n"; + fmt = logfile_format_has_o_or_i ? logfile_format : "deleting %n"; log_formatted(FLOG, fmt, "del.", &file, &stats, ITEM_DELETED, NULL); } @@ -769,7 +773,7 @@ /* VANISHED is not an error, only a warning */ if (code == RERR_VANISHED) { - rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n", + rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n", name, code, file, line, who_am_i(), RSYNC_VERSION); } else { rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n", diff -urN --exclude=patches rsync-2.6.8/main.c rsync-2.6.9/main.c --- rsync-2.6.8/main.c 2006-03-01 19:53:42.000000000 -0800 +++ rsync-2.6.9/main.c 2006-10-13 16:46:32.000000000 -0700 @@ -1,23 +1,25 @@ -/* -*- c-file-style: "linux" -*- - - Copyright (C) 1996-2001 by Andrew Tridgell - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2001, 2002 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. -*/ +/* + * The startup routines, including main(), for rsync. + * + * Copyright (C) 1996-2001 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" #if defined CONFIG_LOCALE && defined HAVE_LOCALE_H @@ -33,7 +35,7 @@ extern int am_generator; extern int am_daemon; extern int blocking_io; -extern int remove_sent_files; +extern int remove_source_files; extern int daemon_over_rsh; extern int need_messages_from_generator; extern int kluge_around_eof; @@ -47,6 +49,10 @@ extern int protocol_version; extern int recurse; extern int relative_paths; +extern int sanitize_paths; +extern int curr_dir_depth; +extern int curr_dir_len; +extern int module_id; extern int rsync_port; extern int whole_file; extern int read_batch; @@ -57,11 +63,16 @@ extern pid_t cleanup_child_pid; extern struct stats stats; extern char *filesfrom_host; +extern char *partial_dir; +extern char *basis_dir[]; extern char *rsync_path; extern char *shell_cmd; extern char *batch_name; +extern char curr_dir[MAXPATHLEN]; +extern struct filter_list_struct server_filter_list; int local_server = 0; +int new_root_dir = 0; mode_t orig_umask = 0; struct file_list *the_file_list; @@ -168,7 +179,6 @@ return; if (am_daemon) { - log_exit(0, __FILE__, __LINE__); if (f == -1 || !am_sender) return; } @@ -189,7 +199,7 @@ /* this is the client */ if (f < 0 && !am_sender) /* e.g. when we got an empty file list. */ - ; + ; else if (!am_sender) { /* Read the first two in opposite order because the meaning of * read/write swaps when switching from sender to receiver. */ @@ -216,7 +226,8 @@ static void output_summary(void) { if (do_stats) { - rprintf(FINFO,"\nNumber of files: %d\n", stats.num_files); + rprintf(FCLIENT, "\n"); + rprintf(FINFO,"Number of files: %d\n", stats.num_files); rprintf(FINFO,"Number of files transferred: %d\n", stats.num_transferred_files); rprintf(FINFO,"Total file size: %s bytes\n", @@ -243,8 +254,9 @@ } if (verbose || do_stats) { + rprintf(FCLIENT, "\n"); rprintf(FINFO, - "\nsent %s bytes received %s bytes %s bytes/sec\n", + "sent %s bytes received %s bytes %s bytes/sec\n", human_num(total_written), human_num(total_read), human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2)); rprintf(FINFO, "total size is %s speedup is %.2f\n", @@ -267,7 +279,8 @@ mi = mallinfo(); - rprintf(FINFO, "\n" RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n", + rprintf(FCLIENT, "\n"); + rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n", getpid(), am_server ? "server " : "", am_daemon ? "daemon " : "", who_am_i()); rprintf(FINFO, " arena: %10ld (bytes from sbrk)\n", @@ -403,8 +416,8 @@ if (verbose > 3) { for (i = 0; i < argc; i++) - rprintf(FINFO, "cmd[%d]=%s ", i, args[i]); - rprintf(FINFO, "\n"); + rprintf(FCLIENT, "cmd[%d]=%s ", i, args[i]); + rprintf(FCLIENT, "\n"); } if (read_batch) { @@ -445,12 +458,14 @@ * destination path instead of its file-list name. This requires a * "local name" for writing out the destination file. * - * So, our task is to figure out what mode/local-name we need and return - * either a NULL for mode 1, or the local-name for mode 2. We also - * change directory if there are any path components in dest_path. */ + * So, our task is to figure out what mode/local-name we need. + * For mode 1, we change into the destination directory and return NULL. + * For mode 2, we change into the directory containing the destination + * file (if we aren't already there) and return the local-name. */ static char *get_local_name(struct file_list *flist, char *dest_path) { STRUCT_STAT st; + int statret; char *cp; if (verbose > 2) { @@ -461,13 +476,11 @@ if (!dest_path || list_only) return NULL; - /* If the destination path refers to an existing directory, enter - * it and use mode 1. If there is something other than a directory - * at the destination path, we must be transferring one file - * (anything at the destination will be overwritten). */ - if (do_stat(dest_path, &st) == 0) { + /* See what currently exists at the destination. */ + if ((statret = do_stat(dest_path, &st)) == 0) { + /* If the destination is a dir, enter it and use mode 1. */ if (S_ISDIR(st.st_mode)) { - if (!push_dir(dest_path)) { + if (!push_dir(dest_path, 0)) { rsyserr(FERROR, errno, "push_dir#1 %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILESELECT); @@ -488,38 +501,45 @@ exit_cleanup(RERR_FILESELECT); } } else if (errno != ENOENT) { - rsyserr(FERROR, errno, "cannot stat destination %s", + /* If we don't know what's at the destination, fail. */ + rsyserr(FERROR, errno, "ERROR: cannot stat destination %s", full_fname(dest_path)); exit_cleanup(RERR_FILESELECT); } cp = strrchr(dest_path, '/'); - /* If the destination path ends in a slash or we are transferring - * multiple files, create a directory at the destination path, - * enter the new directory, and use mode 1. */ + /* If we need a destination directory because the transfer is not + * of a single non-directory or the user has requested one via a + * destination path ending in a slash, create one and use mode 1. */ if (flist->count > 1 || (cp && !cp[1])) { /* Lop off the final slash (if any). */ if (cp && !cp[1]) *cp = '\0'; + if (statret == 0) { + rprintf(FERROR, + "ERROR: destination path is not a directory\n"); + exit_cleanup(RERR_SYNTAX); + } + if (mkdir_defmode(dest_path) != 0) { rsyserr(FERROR, errno, "mkdir %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILEIO); } + new_root_dir = 1; + if (verbose) rprintf(FINFO, "created directory %s\n", dest_path); if (dry_run) { - /* Indicate that the destination directory doesn't - * really exist and return mode 1. */ + /* Indicate that dest dir doesn't really exist. */ dry_run++; - return NULL; } - if (!push_dir(dest_path)) { + if (!push_dir(dest_path, dry_run > 1)) { rsyserr(FERROR, errno, "push_dir#2 %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILESELECT); @@ -539,7 +559,7 @@ dest_path = "/"; *cp = '\0'; - if (!push_dir(dest_path)) { + if (!push_dir(dest_path, 0)) { rsyserr(FERROR, errno, "push_dir#3 %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILESELECT); @@ -549,6 +569,38 @@ return cp + 1; } +/* Call this if the destination dir (which is assumed to be in curr_dir) + * does not yet exist and we can't create it due to being in dry-run + * mode. We'll fix dirs that can be relative to the non-existent dir. */ +static void fix_basis_dirs(void) +{ + char **dir, *new, *slash; + int len; + + if (dry_run <= 1) + return; + + slash = strrchr(curr_dir, '/'); + + for (dir = basis_dir; *dir; dir++) { + if (**dir == '/') + continue; + len = curr_dir_len + 1 + strlen(*dir) + 1; + if (!(new = new_array(char, len))) + out_of_memory("fix_basis_dirs"); + if (slash && strncmp(*dir, "../", 3) == 0) { + /* We want to remove only one leading "../" prefix for + * the directory we couldn't create in dry-run mode: + * this ensures that any other ".." references get + * evaluated the same as they would for a live copy. */ + *slash = '\0'; + pathjoin(new, len, curr_dir, *dir + 3); + *slash = '/'; + } else + pathjoin(new, len, curr_dir, *dir); + *dir = new; + } +} /* This is only called by the sender. */ static void read_final_goodbye(int f_in, int f_out) @@ -589,17 +641,20 @@ exit_cleanup(RERR_SYNTAX); return; } - if (am_daemon && lp_read_only(module_id) && remove_sent_files) { + if (am_daemon && lp_read_only(module_id) && remove_source_files) { rprintf(FERROR, - "ERROR: --remove-sent-files cannot be used with a read-only module\n"); + "ERROR: --remove-%s-files cannot be used with a read-only module\n", + remove_source_files == 1 ? "source" : "sent"); exit_cleanup(RERR_SYNTAX); return; } - if (!relative_paths && !push_dir(dir)) { - rsyserr(FERROR, errno, "push_dir#3 %s failed", - full_fname(dir)); - exit_cleanup(RERR_FILESELECT); + if (!relative_paths) { + if (!push_dir(dir, 0)) { + rsyserr(FERROR, errno, "push_dir#3 %s failed", + full_fname(dir)); + exit_cleanup(RERR_FILESELECT); + } } argc--; argv++; @@ -752,7 +807,7 @@ dir = argv[0]; argc--; argv++; - if (!am_daemon && !push_dir(dir)) { + if (!am_daemon && !push_dir(dir, 0)) { rsyserr(FERROR, errno, "push_dir#4 %s failed", full_fname(dir)); exit_cleanup(RERR_FILESELECT); @@ -783,6 +838,36 @@ if (argc > 0) local_name = get_local_name(flist,argv[0]); + /* Now that we know what our destination directory turned out to be, + * we can sanitize the --link-/copy-/compare-dest args correctly. */ + if (sanitize_paths) { + char **dir; + for (dir = basis_dir; *dir; dir++) { + *dir = sanitize_path(NULL, *dir, NULL, curr_dir_depth, NULL); + } + if (partial_dir) { + partial_dir = sanitize_path(NULL, partial_dir, NULL, curr_dir_depth, NULL); + } + } + fix_basis_dirs(); + + if (server_filter_list.head) { + char **dir; + struct filter_list_struct *elp = &server_filter_list; + + for (dir = basis_dir; *dir; dir++) { + if (check_filter(elp, *dir, 1) < 0) + goto options_rejected; + } + if (partial_dir && *partial_dir == '/' + && check_filter(elp, partial_dir, 1) < 0) { + options_rejected: + rprintf(FERROR, + "Your options have been rejected by the server.\n"); + exit_cleanup(RERR_SYNTAX); + } + } + exit_code = do_recv(f_in,f_out,flist,local_name); exit_cleanup(exit_code); } @@ -913,6 +998,8 @@ if (flist && flist->count > 0) { local_name = get_local_name(flist, argv[0]); + fix_basis_dirs(); + exit_code2 = do_recv(f_in, f_out, flist, local_name); } else { handle_stats(-1); @@ -1171,8 +1258,8 @@ char cmd_buf[300]; int ret; - sprintf(cmd_buf, get_panic_action(), - getpid(), getpid()); + snprintf(cmd_buf, sizeof cmd_buf, get_panic_action(), + getpid(), getpid()); /* Unless we failed to execute gdb, we allow the process to * continue. I'm not sure if that's right. */ @@ -1249,7 +1336,7 @@ * (implemented by forking "pwd" and reading its output) doesn't * work when there are other child processes. Also, on all systems * that implement getcwd that way "pwd" can't be found after chroot. */ - push_dir(NULL); + push_dir(NULL, 0); init_flist(); diff -urN --exclude=patches rsync-2.6.8/match.c rsync-2.6.9/match.c --- rsync-2.6.8/match.c 2006-02-28 13:48:15.000000000 -0800 +++ rsync-2.6.9/match.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,21 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ + * Block matching used by the file-transfer code. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" diff -urN --exclude=patches rsync-2.6.8/mkproto.awk rsync-2.6.9/mkproto.awk --- rsync-2.6.8/mkproto.awk 2006-02-01 18:29:30.000000000 -0800 +++ rsync-2.6.9/mkproto.awk 2006-10-12 23:50:56.000000000 -0700 @@ -54,15 +54,14 @@ printf "int %s(void);\n", a[2] } -/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { +/^static|^extern/ || /[;]/ { next; } -!/^OFF_T|^size_t|^off_t|^pid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^uchar|^short|^struct|^BOOL|^void|^time|^const|^RETSIGTYPE/ { +!/^[A-Za-z][A-Za-z0-9_]* / { next; } - /[(].*[)][ \t]*$/ { printf "%s;\n",$0; next; @@ -73,4 +72,3 @@ printf "%s\n",$0; next; } - diff -urN --exclude=patches rsync-2.6.8/options.c rsync-2.6.9/options.c --- rsync-2.6.8/options.c 2006-03-28 15:09:36.000000000 -0800 +++ rsync-2.6.9/options.c 2006-10-23 17:36:38.000000000 -0700 @@ -1,7 +1,9 @@ -/* -*- c-file-style: "linux" -*- +/* + * Command-line (and received via daemon-socket) option parsing. * - * Copyright (C) 1998-2001 by Andrew Tridgell - * Copyright (C) 2000, 2001, 2002 by Martin Pool + * Copyright (C) 1998-2001 Andrew Tridgell + * Copyright (C) 2000, 2001, 2002 Martin Pool + * Copyright (C) 2002, 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -13,9 +15,9 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "rsync.h" @@ -63,7 +65,7 @@ int delete_before = 0; int delete_after = 0; int delete_excluded = 0; -int remove_sent_files = 0; +int remove_source_files = 0; int one_file_system = 0; int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; @@ -145,7 +147,9 @@ char *basis_dir[MAX_BASIS_DIRS+1]; char *config_file = NULL; char *shell_cmd = NULL; -char *log_format = NULL; +char *logfile_name = NULL; +char *logfile_format = NULL; +char *stdout_format = NULL; char *password_file = NULL; char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; @@ -160,9 +164,12 @@ int verbose = 0; int quiet = 0; +int output_motd = 1; int log_before_transfer = 0; -int log_format_has_i = 0; -int log_format_has_o_or_i = 0; +int stdout_format_has_i = 0; +int stdout_format_has_o_or_i = 0; +int logfile_format_has_i = 0; +int logfile_format_has_o_or_i = 0; int always_checksum = 0; int list_only = 0; @@ -246,7 +253,8 @@ (int) SIZEOF_INT64, (int) sizeof (int64)); } - rprintf(f,"\nrsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"); + rprintf(f,"\n"); + rprintf(f,"rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"); rprintf(f,"are welcome to redistribute it under certain conditions. See the GNU\n"); rprintf(f,"General Public Licence for details.\n"); } @@ -256,10 +264,12 @@ { print_rsync_version(F); - rprintf(F,"\nrsync is a file transfer program capable of efficient remote update\n"); + rprintf(F,"\n"); + rprintf(F,"rsync is a file transfer program capable of efficient remote update\n"); rprintf(F,"via a fast differencing algorithm.\n"); - rprintf(F,"\nUsage: rsync [OPTION]... SRC [SRC]... DEST\n"); + rprintf(F,"\n"); + rprintf(F,"Usage: rsync [OPTION]... SRC [SRC]... DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST\n"); @@ -268,9 +278,11 @@ rprintf(F," or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]\n"); rprintf(F,"The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect\n"); rprintf(F,"to an rsync daemon, and require SRC or DEST to start with a module name.\n"); - rprintf(F,"\nOptions\n"); + rprintf(F,"\n"); + rprintf(F,"Options\n"); rprintf(F," -v, --verbose increase verbosity\n"); rprintf(F," -q, --quiet suppress non-error messages\n"); + rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n"); rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n"); rprintf(F," -a, --archive archive mode; same as -rlptgoD (no -H)\n"); rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n"); @@ -293,7 +305,7 @@ rprintf(F," -H, --hard-links preserve hard links\n"); rprintf(F," -p, --perms preserve permissions\n"); rprintf(F," -E, --executability preserve the file's executability\n"); - rprintf(F," --chmod=CHMOD change destination permissions\n"); + rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n"); rprintf(F," -o, --owner preserve owner (super-user only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," --devices preserve device files (super-user only)\n"); @@ -309,15 +321,15 @@ rprintf(F," -B, --block-size=SIZE force a fixed checksum block-size\n"); rprintf(F," -e, --rsh=COMMAND specify the remote shell to use\n"); rprintf(F," --rsync-path=PROGRAM specify the rsync to run on the remote machine\n"); - rprintf(F," --existing ignore non-existing files on receiving side\n"); - rprintf(F," --ignore-existing ignore files that already exist on receiving side\n"); - rprintf(F," --remove-sent-files sent files/symlinks are removed from sending side\n"); + rprintf(F," --existing skip creating new files on receiver\n"); + rprintf(F," --ignore-existing skip updating files that already exist on receiver\n"); + rprintf(F," --remove-source-files sender removes synchronized files (non-dirs)\n"); rprintf(F," --del an alias for --delete-during\n"); - rprintf(F," --delete delete files that don't exist on the sending side\n"); + rprintf(F," --delete delete extraneous files from destination dirs\n"); rprintf(F," --delete-before receiver deletes before transfer (default)\n"); rprintf(F," --delete-during receiver deletes during transfer, not before\n"); rprintf(F," --delete-after receiver deletes after transfer, not before\n"); - rprintf(F," --delete-excluded also delete excluded files on the receiving side\n"); + rprintf(F," --delete-excluded also delete excluded files from destination dirs\n"); rprintf(F," --ignore-errors delete even if there are I/O errors\n"); rprintf(F," --force force deletion of directories even if not empty\n"); rprintf(F," --max-delete=NUM don't delete more than NUM files\n"); @@ -359,7 +371,9 @@ rprintf(F," --progress show progress during transfer\n"); rprintf(F," -P same as --partial --progress\n"); rprintf(F," -i, --itemize-changes output a change-summary for all updates\n"); - rprintf(F," --log-format=FORMAT output filenames using the specified format\n"); + rprintf(F," --out-format=FORMAT output updates using the specified FORMAT\n"); + rprintf(F," --log-file=FILE log what we're doing to the specified FILE\n"); + rprintf(F," --log-file-format=FMT log updates using the specified FMT\n"); rprintf(F," --password-file=FILE read password from FILE\n"); rprintf(F," --list-only list the files instead of copying them\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n"); @@ -374,7 +388,8 @@ rprintf(F," --version print version number\n"); rprintf(F,"(-h) --help show this help (-h works with no other options)\n"); - rprintf(F,"\nUse \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); + rprintf(F,"\n"); + rprintf(F,"Use \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); rprintf(F,"Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation.\n"); rprintf(F,"See http://rsync.samba.org/ for updates, bug reports, and answers\n"); } @@ -394,6 +409,8 @@ {"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 }, {"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 }, {"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 }, + {"motd", 0, POPT_ARG_VAL, &output_motd, 1, 0, 0 }, + {"no-motd", 0, POPT_ARG_VAL, &output_motd, 0, 0, 0 }, {"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 }, {"human-readable", 'h', POPT_ARG_NONE, 0, 'h', 0, 0}, {"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 }, @@ -462,7 +479,8 @@ {"delete-during", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 }, {"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 }, {"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 }, - {"remove-sent-files",0, POPT_ARG_NONE, &remove_sent_files, 0, 0, 0 }, + {"remove-sent-files",0, POPT_ARG_VAL, &remove_source_files, 2, 0, 0 }, /* deprecated */ + {"remove-source-files",0,POPT_ARG_VAL, &remove_source_files, 1, 0, 0 }, {"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 }, {"ignore-errors", 0, POPT_ARG_NONE, &ignore_errors, 0, 0, 0 }, {"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 }, @@ -492,7 +510,10 @@ {"partial-dir", 0, POPT_ARG_STRING, &partial_dir, 0, 0, 0 }, {"delay-updates", 0, POPT_ARG_NONE, &delay_updates, 0, 0, 0 }, {"prune-empty-dirs",'m', POPT_ARG_NONE, &prune_empty_dirs, 0, 0, 0 }, - {"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 }, + {"log-file", 0, POPT_ARG_STRING, &logfile_name, 0, 0, 0 }, + {"log-file-format", 0, POPT_ARG_STRING, &logfile_format, 0, 0, 0 }, + {"out-format", 0, POPT_ARG_STRING, &stdout_format, 0, 0, 0 }, + {"log-format", 0, POPT_ARG_STRING, &stdout_format, 0, 0, 0 }, /* DEPRECATED */ {"itemize-changes", 'i', POPT_ARG_NONE, 0, 'i', 0, 0 }, {"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 }, {"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 }, @@ -536,12 +557,15 @@ { print_rsync_version(F); - rprintf(F,"\nUsage: rsync --daemon [OPTION]...\n"); + rprintf(F,"\n"); + rprintf(F,"Usage: rsync --daemon [OPTION]...\n"); rprintf(F," --address=ADDRESS bind to the specified address\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n"); rprintf(F," --config=FILE specify alternate rsyncd.conf file\n"); rprintf(F," --no-detach do not detach from the parent\n"); rprintf(F," --port=PORT listen on alternate port number\n"); + rprintf(F," --log-file=FILE override the \"log file\" setting\n"); + rprintf(F," --log-file-format=FMT override the \"log format\" setting\n"); rprintf(F," --sockopts=OPTIONS specify custom TCP options\n"); rprintf(F," -v, --verbose increase verbosity\n"); #ifdef INET6 @@ -550,7 +574,8 @@ #endif rprintf(F," --help show this help screen\n"); - rprintf(F,"\nIf you were not trying to invoke rsync as a daemon, avoid using any of the\n"); + rprintf(F,"\n"); + rprintf(F,"If you were not trying to invoke rsync as a daemon, avoid using any of the\n"); rprintf(F,"daemon-specific rsync options. See also the rsyncd.conf(5) man page.\n"); } @@ -565,6 +590,8 @@ {"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 }, #endif {"detach", 0, POPT_ARG_VAL, &no_detach, 0, 0, 0 }, + {"log-file", 0, POPT_ARG_STRING, &logfile_name, 0, 0, 0 }, + {"log-file-format", 0, POPT_ARG_STRING, &logfile_format, 0, 0, 0 }, {"no-detach", 0, POPT_ARG_VAL, &no_detach, 1, 0, 0 }, {"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 }, {"sockopts", 0, POPT_ARG_STRING, &sockopts, 0, 0, 0 }, @@ -590,8 +617,9 @@ void option_error(void) { if (!err_buf[0]) { - strcpy(err_buf, "Error parsing options: " - "option may be supported on client but not on server?\n"); + strlcpy(err_buf, "Error parsing options: option may " + "be supported on client but not on server?\n", + sizeof err_buf); } rprintf(FERROR, RSYNC_NAME ": %s", err_buf); @@ -665,17 +693,6 @@ *cp = ' '; bp = cp + 1; } - - for (op = long_options; ; op++) { - *shortname = op->shortName; - if (!op->longName && !*shortname) - break; - if (op->val == OPT_DAEMON) { - if (op->argInfo == POPT_ARG_VAL) - op->argInfo = POPT_ARG_NONE; - op->val = (op - long_options) + OPT_REFUSED_BASE; - } - } } @@ -780,6 +797,8 @@ if (ref && *ref) set_refuse_options(ref); + if (am_daemon) + set_refuse_options("log-file*"); /* TODO: Call poptReadDefaultConfig; handle errors. */ @@ -818,7 +837,9 @@ case OPT_DAEMON: if (am_daemon) { - strcpy(err_buf, "Attempt to hack rsync thwarted!\n"); + strlcpy(err_buf, + "Attempt to hack rsync thwarted!\n", + sizeof err_buf); return 0; } poptFreeContext(pc); @@ -889,14 +910,17 @@ case OPT_INCLUDE_FROM: arg = poptGetOptArg(pc); if (sanitize_paths) - arg = sanitize_path(NULL, arg, NULL, 0); + arg = sanitize_path(NULL, arg, NULL, 0, NULL); if (server_filter_list.head) { - char *cp = (char *)arg; + char *cp = strdup(arg); + if (!cp) + out_of_memory("parse_arguments"); if (!*cp) goto options_rejected; clean_fname(cp, 1); if (check_filter(&server_filter_list, cp, 0) < 0) goto options_rejected; + free(cp); } parse_filter_file(&filter_list, arg, opt == OPT_INCLUDE_FROM ? MATCHFLG_INCLUDE : 0, @@ -1020,7 +1044,7 @@ break; case OPT_LINK_DEST: -#ifdef HAVE_LINK +#ifdef SUPPORT_HARD_LINKS link_dest = 1; dest_option = "--link-dest"; goto set_dest_dir; @@ -1046,10 +1070,9 @@ MAX_BASIS_DIRS, dest_option); return 0; } - arg = poptGetOptArg(pc); - if (sanitize_paths) - arg = sanitize_path(NULL, arg, NULL, 0); - basis_dir[basis_dir_cnt++] = (char *)arg; + /* We defer sanitizing this arg until we know what + * our destination directory is going to be. */ + basis_dir[basis_dir_cnt++] = (char *)poptGetOptArg(pc); break; case OPT_CHMOD: @@ -1187,8 +1210,8 @@ return 0; } - if (remove_sent_files) { - /* We only want to infer this refusal of --remove-sent-files + if (remove_source_files) { + /* We only want to infer this refusal of --remove-source-files * via the refusal of "delete", not any of the "delete-FOO" * options. */ if (refused_delete && am_sender) { @@ -1204,17 +1227,14 @@ if (sanitize_paths) { int i; for (i = *argc; i-- > 0; ) - (*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0); + (*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL); if (tmpdir) - tmpdir = sanitize_path(NULL, tmpdir, NULL, 0); - if (partial_dir) - partial_dir = sanitize_path(NULL, partial_dir, NULL, 0); + tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL); if (backup_dir) - backup_dir = sanitize_path(NULL, backup_dir, NULL, 0); + backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL); } if (server_filter_list.head && !am_sender) { struct filter_list_struct *elp = &server_filter_list; - int i; if (tmpdir) { if (!*tmpdir) goto options_rejected; @@ -1222,18 +1242,6 @@ if (check_filter(elp, tmpdir, 1) < 0) goto options_rejected; } - if (partial_dir && *partial_dir) { - clean_fname(partial_dir, 1); - if (check_filter(elp, partial_dir, 1) < 0) - goto options_rejected; - } - for (i = 0; i < basis_dir_cnt; i++) { - if (!*basis_dir[i]) - goto options_rejected; - clean_fname(basis_dir[i], 1); - if (check_filter(elp, basis_dir[i], 1) < 0) - goto options_rejected; - } if (backup_dir) { if (!*backup_dir) goto options_rejected; @@ -1282,17 +1290,17 @@ if (make_backups && !backup_dir) omit_dir_times = 1; - if (log_format) { - if (am_server && log_format_has(log_format, 'I')) - log_format_has_i = 2; - else if (log_format_has(log_format, 'i')) - log_format_has_i = itemize_changes | 1; - if (!log_format_has(log_format, 'b') - && !log_format_has(log_format, 'c')) + if (stdout_format) { + if (am_server && log_format_has(stdout_format, 'I')) + stdout_format_has_i = 2; + else if (log_format_has(stdout_format, 'i')) + stdout_format_has_i = itemize_changes | 1; + if (!log_format_has(stdout_format, 'b') + && !log_format_has(stdout_format, 'c')) log_before_transfer = !am_server; } else if (itemize_changes) { - log_format = "%i %n%L"; - log_format_has_i = itemize_changes; + stdout_format = "%i %n%L"; + stdout_format_has_i = itemize_changes; log_before_transfer = !am_server; } @@ -1304,12 +1312,26 @@ set_io_timeout(io_timeout); - if (verbose && !log_format) { - log_format = "%n%L"; + if (verbose && !stdout_format) { + stdout_format = "%n%L"; log_before_transfer = !am_server; } - if (log_format_has_i || log_format_has(log_format, 'o')) - log_format_has_o_or_i = 1; + if (stdout_format_has_i || log_format_has(stdout_format, 'o')) + stdout_format_has_o_or_i = 1; + + if (logfile_name && !am_daemon) { + if (!logfile_format) { + logfile_format = "%i %n%L"; + logfile_format_has_i = logfile_format_has_o_or_i = 1; + } else { + if (log_format_has(logfile_format, 'i')) + logfile_format_has_i = 1; + if (logfile_format_has_i || log_format_has(logfile_format, 'o')) + logfile_format_has_o_or_i = 1; + } + log_init(0); + } else if (!am_daemon) + logfile_format = NULL; if (daemon_bwlimit && (!bwlimit || bwlimit > daemon_bwlimit)) bwlimit = daemon_bwlimit; @@ -1376,7 +1398,7 @@ clean_fname(partial_dir, 1); if (!*partial_dir || strcmp(partial_dir, ".") == 0) partial_dir = NULL; - else if (*partial_dir != '/') { + else if (*partial_dir != '/' && !am_server) { parse_rule(&filter_list, partial_dir, MATCHFLG_NO_PREFIXES|MATCHFLG_DIRECTORY, 0); } @@ -1414,7 +1436,7 @@ } } else { if (sanitize_paths) - files_from = sanitize_path(NULL, files_from, NULL, 0); + files_from = sanitize_path(NULL, files_from, NULL, 0, NULL); if (server_filter_list.head) { if (!*files_from) goto options_rejected; @@ -1484,7 +1506,7 @@ argstr[x++] = 'n'; if (preserve_links) argstr[x++] = 'l'; - if (xfer_dirs > (recurse || !delete_mode || !am_sender)) + if (xfer_dirs > (recurse || !delete_mode || !am_sender ? 1 : 0)) argstr[x++] = 'd'; if (am_sender) { if (keep_dirlinks) @@ -1574,12 +1596,13 @@ /* The server side doesn't use our log-format, but in certain * circumstances they need to know a little about the option. */ - if (log_format && am_sender) { - if (log_format_has_i > 1) + if (stdout_format && am_sender) { + /* Use --log-format, not --out-format, for compatibility. */ + if (stdout_format_has_i > 1) args[ac++] = "--log-format=%i%I"; - else if (log_format_has_i) + else if (stdout_format_has_i) args[ac++] = "--log-format=%i"; - else if (log_format_has_o_or_i) + else if (stdout_format_has_o_or_i) args[ac++] = "--log-format=%o"; else if (!verbose) args[ac++] = "--log-format=X"; @@ -1735,7 +1758,9 @@ if (fuzzy_basis && am_sender) args[ac++] = "--fuzzy"; - if (remove_sent_files) + if (remove_source_files == 1) + args[ac++] = "--remove-source-files"; + else if (remove_source_files) args[ac++] = "--remove-sent-files"; *argc = ac; @@ -1756,10 +1781,10 @@ { char *p; int not_host; + int hostlen; if (port_ptr && strncasecmp(URL_PREFIX, s, strlen(URL_PREFIX)) == 0) { char *path; - int hostlen; s += strlen(URL_PREFIX); if ((p = strchr(s, '/')) != NULL) { hostlen = p - s; @@ -1788,6 +1813,7 @@ if (*s == '[' && (p = strchr(s, ']')) != NULL && p[1] == ':') { s++; + hostlen = p - s; *p = '\0'; not_host = strchr(s, '/') || !strchr(s, ':'); *p = ']'; @@ -1797,6 +1823,7 @@ } else { if (!(p = strchr(s, ':'))) return NULL; + hostlen = p - s; *p = '\0'; not_host = strchr(s, '/') != NULL; *p = ':'; @@ -1804,8 +1831,8 @@ return NULL; } - *host_ptr = new_array(char, p - s + 1); - strlcpy(*host_ptr, s, p - s + 1); + *host_ptr = new_array(char, hostlen + 1); + strlcpy(*host_ptr, s, hostlen + 1); if (p[1] == ':') { if (port_ptr && !*port_ptr) diff -urN --exclude=patches rsync-2.6.8/packaging/lsb/rsync.spec rsync-2.6.9/packaging/lsb/rsync.spec --- rsync-2.6.8/packaging/lsb/rsync.spec 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/packaging/lsb/rsync.spec 2006-11-06 20:39:47.000000000 -0800 @@ -1,6 +1,6 @@ Summary: A program for synchronizing files over a network. Name: rsync -Version: 2.6.8 +Version: 2.6.9 Release: 1 Group: Applications/Internet Source: ftp://rsync.samba.org/pub/rsync/rsync-%{version}.tar.gz diff -urN --exclude=patches rsync-2.6.8/packaging/nightly-rsync rsync-2.6.9/packaging/nightly-rsync --- rsync-2.6.8/packaging/nightly-rsync 2006-04-08 09:36:57.000000000 -0700 +++ rsync-2.6.9/packaging/nightly-rsync 2006-10-17 22:14:10.000000000 -0700 @@ -18,6 +18,7 @@ our $unpacked = $ENV{HOME} . '/release/nightly'; # Where the local copy of /home/ftp/pub/rsync/nightly should be updated. our $nightly = $ENV{HOME} . '/samba-rsync-ftp/nightly'; +our $nightly_symlink = "$nightly/rsync-HEAD.tar.gz"; our($cvs_update, $make_tar, $upload, $help_opt); &Getopt::Long::Configure('bundling'); @@ -69,6 +70,8 @@ } close TAR; rename($name, $unpacked) or die $!; + unlink($nightly_symlink); + symlink("$name.tar.gz", $nightly_symlink); } chdir($nightly) or die $!; @@ -97,8 +100,11 @@ system 'ls -ltr'; if ($upload) { - $ENV{RSYNC_PARTIAL_DIR} = ''; # The rsync on samba.org is OLD. - system "rsync -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/nightly"; + my $opt = ''; + if (defined $ENV{RSYNC_PARTIAL_DIR}) { + $opt = " -f 'R $ENV{RSYNC_PARTIAL_DIR}'"; + } + system "rsync$opt -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/nightly"; } exit; diff -urN --exclude=patches rsync-2.6.8/packaging/release-rsync rsync-2.6.9/packaging/release-rsync --- rsync-2.6.8/packaging/release-rsync 2006-04-17 23:43:17.000000000 -0700 +++ rsync-2.6.9/packaging/release-rsync 2006-10-24 09:17:31.000000000 -0700 @@ -155,25 +155,29 @@ undef $/; $_ = ; $/ = "\n"; close IN; if ($fn =~ /configure/) { - s/^RSYNC_VERSION.*/RSYNC_VERSION=$version/m; + s/^RSYNC_VERSION=.*/RSYNC_VERSION=$version/m; } elsif ($fn =~ /\.spec/) { s/^(Version:) .*/$1 $version/m; s/^(Release:) .*/$1 $release/m; } elsif ($fn =~ /\.yo/) { s/^(manpage\([^)]+\)\(\d+\)\()[^)]+(\).*)/$1$today$2/m; s/^(This man ?page is current for version) \S+ (of rsync)/$1 $version $2/m; + } elsif ($fn eq 'NEWS') { + s/^(NEWS for rsync \Q$version\E) \(UNRELEASED\)\s*\n/$1 ($today)\n/mi + or die "Couldn't update NEWS file with release date!\n"; + } elsif ($fn eq 'OLDNEWS') { + s/^\t\S\S\s\S\S\S\s\d\d\d\d(\t\Q$version\E)/\t$ztoday$1/m + or die "Couldn't update OLDNEWS file with release date!\n"; } else { - s/^(NEWS for rsync \Q$version\E) \(UNRELEASED\)\s*\n/$1 ($today)\n/m; - s/^\t\S\S\s\S\S\S\s\d\d\d\d(\t\Q$version\E)/\t$ztoday$1/m; + die "Unrecognized file in \@tweak_files: $fn\n"; } open(OUT, '>', $fn) or die $!; print OUT $_; close OUT; } -system "yodl2man -o rsync.1 rsync.yo"; -system "yodl2man -o rsyncd.conf.5 rsyncd.conf.yo"; -#system "perl -pi -e \"s/\\\\\\'/\\\\&'/g\" rsync.1 rsyncd.conf.5"; +system "yodl2man -o rsync.1 rsync.yo; ./tweak_manpage_dashes rsync.1"; +system "yodl2man -o rsyncd.conf.5 rsyncd.conf.yo; ./tweak_manpage_dashes rsyncd.conf.5"; mkdir('patches/tmp') or die $!; system "rsync -a --exclude=patches/ --exclude-from=.cvsignore . patches/tmp/cvsdir/"; @@ -214,7 +218,7 @@ About to do the following in the samba-rsync-ftp dir: - move the old tar/diff files into the appropriate old-* dirs - - copy the moved tar/diff files on samba.org$skipping + - hard-link the moved tar/diff files on samba.org$skipping - create release tar, "$tar_name" - create release diffs, "$diff_name" - update README, *NEWS, TODO, and cvs.log @@ -240,38 +244,33 @@ # We need to run this regardless of $lastversion's "pre"ness. my @moved_files; foreach my $fn (glob('rsync*pre*.tar.gz*'), glob('rsync*pre*-NEWS')) { - my $new_fn = "old-previews/$fn"; - rename($fn, $new_fn) or die $!; - push(@moved_files, $new_fn); + link($fn, "old-previews/$fn") or die $!; + push(@moved_files, $fn); } if ($version !~ /pre/) { foreach my $fn (glob('rsync*.tar.gz*'), glob('rsync*-NEWS')) { next if $fn =~ /^rsync.*pre/; - my $new_fn = "old-versions/$fn"; - rename($fn, $new_fn) or die $!; - push(@moved_files, $new_fn); + link($fn, "old-versions/$fn") or die $!; + push(@moved_files, $fn); + } + + foreach my $fn (glob('rsync*pre*.diffs.gz*')) { + unlink($fn); } foreach my $fn (glob('rsync*.diffs.gz*')) { - next if $fn =~ /^rsync.*pre/; - my $new_fn = "old-patches/$fn"; - rename($fn, $new_fn) or die $!; - push(@moved_files, $new_fn); + link($fn, "old-patches/$fn") or die $!; + push(@moved_files, $fn); } } # Optimize our future upload (in the absence of --detect-renamed) by - # copying the above moved files on the remote server. + # using rsync to hard-link the above files on samba.org. if ($live) { - my $remote_cmd = ''; - foreach (@moved_files) { - my($path, $fn) = m#(.*)/([^/]+)$#; - $remote_cmd .= "cp -p /home/ftp/pub/rsync/{$fn,$path};"; - } - system "ssh samba.org '$remote_cmd'"; + system "rsync -avHOC --include='rsync*.gz*' --include='old-*/' --exclude='*' . samba.org:/home/ftp/pub/rsync"; } - foreach (glob("rsync*pre*.diffs.gz*")) { + foreach (@moved_files) { unlink($_); } @@ -292,7 +291,7 @@ ## TWEAK THE VERSIONS AS DESIRED HERE ## #mkdir("rsync-$lastversion/support", 0755) or die $!; #rename("rsync-$lastversion/rsyncstats", "rsync-$lastversion/support/rsyncstats"); -unlink("rsync-$lastversion/.ignore"); +#unlink("rsync-$lastversion/.ignore"); ## END ## system "diff -urN --exclude=patches rsync-$lastversion rsync-$version| gzip -9 >$diff_file"; diff -urN --exclude=patches rsync-2.6.8/params.c rsync-2.6.9/params.c --- rsync-2.6.8/params.c 2006-04-02 08:02:02.000000000 -0700 +++ rsync-2.6.9/params.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,7 +1,7 @@ -/* - This modules is based on the params.c module from Samba, written by Karl Auer - and much modifed by Christopher Hertel. +/* This modules is based on the params.c module from Samba, written by Karl Auer + and much modifed by Christopher Hertel. */ +/* * 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 @@ -12,11 +12,12 @@ * 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. - * - * -------------------------------------------------------------------------- ** + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* -------------------------------------------------------------------------- ** * * Module name: params * diff -urN --exclude=patches rsync-2.6.8/pipe.c rsync-2.6.9/pipe.c --- rsync-2.6.8/pipe.c 2006-02-23 17:56:26.000000000 -0800 +++ rsync-2.6.9/pipe.c 2006-05-29 15:56:58.000000000 -0700 @@ -1,8 +1,10 @@ -/* -*- c-file-style: "linux" -*- +/* + * Routines used to setup various kinds of inter-process pipes. * - * Copyright (C) 1996-2000 by Andrew Tridgell - * Copyright (C) Paul Mackerras 1996 - * Copyright (C) 2001, 2002 by Martin Pool + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2004, 2005, 2006 Wayne Davison * * 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 @@ -14,9 +16,9 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "rsync.h" @@ -26,6 +28,7 @@ extern int blocking_io; extern int filesfrom_fd; extern mode_t orig_umask; +extern char *logfile_name; extern struct chmod_mode_struct *chmod_modes; /** @@ -146,6 +149,12 @@ child_main(argc, argv); } + /* Let the client side handle this. */ + if (logfile_name) { + logfile_name = NULL; + logfile_close(); + } + if (close(from_child_pipe[1]) < 0 || close(to_child_pipe[0]) < 0) { rsyserr(FERROR, errno, "Failed to close"); diff -urN --exclude=patches rsync-2.6.8/prepare-source rsync-2.6.9/prepare-source --- rsync-2.6.8/prepare-source 2006-04-17 11:15:02.000000000 -0700 +++ rsync-2.6.9/prepare-source 2006-10-07 07:39:01.000000000 -0700 @@ -1,12 +1,12 @@ #!/bin/sh -# Use autoconf, autoheader, yodl, etc. to ready the generated files -# in the release. This is typically used after applying a diff from -# "patches" directory in CVS. +# Use autoconf, autoheader, yodl, etc. to ready the generated files in the +# release. This is typically used after applying a diff from the "patches" +# directory in a CVS-checked-out version. # -# NOTE: if you use a diff from the "patches" directory in a release -# tar, this is not needed (but doesn't hurt anything). +# NOTE: if you use a diff from the "patches" directory of a *release tar* +# (as opposed to from CVS), this is not needed (but doesn't hurt anything). dir=`dirname $0` -if test x"$dir" != x -o x"$dir" != x.; then +if test x"$dir" != x -a x"$dir" != x.; then cd "$dir" fi make -f prepare-source.mak diff -urN --exclude=patches rsync-2.6.8/prepare-source.mak rsync-2.6.9/prepare-source.mak --- rsync-2.6.8/prepare-source.mak 2006-02-07 09:30:35.000000000 -0800 +++ rsync-2.6.9/prepare-source.mak 2006-10-23 17:33:32.000000000 -0700 @@ -18,6 +18,8 @@ rsync.1: rsync.yo yodl2man -o rsync.1 rsync.yo + -./tweak_manpage_dashes rsync.1 rsyncd.conf.5: rsyncd.conf.yo yodl2man -o rsyncd.conf.5 rsyncd.conf.yo + -./tweak_manpage_dashes rsyncd.conf.5 diff -urN --exclude=patches rsync-2.6.8/progress.c rsync-2.6.9/progress.c --- rsync-2.6.8/progress.c 2006-01-14 09:10:52.000000000 -0800 +++ rsync-2.6.9/progress.c 2006-10-13 16:17:33.000000000 -0700 @@ -1,8 +1,10 @@ -/* -*- c-file-style: "linux" -*- +/* + * Routines to output progress information during a file transfer. * - * Copyright (C) 1996-2000 by Andrew Tridgell - * Copyright (C) Paul Mackerras 1996 - * Copyright (C) 2001, 2002 by Martin Pool + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -14,9 +16,9 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "rsync.h" @@ -102,8 +104,8 @@ stats.num_files - stats.current_file_index - 1, stats.num_files); } else - strcpy(eol, "\r"); - rprintf(FINFO, "%12s %3d%% %7.2f%s %4d:%02d:%02d%s", + strlcpy(eol, "\r", sizeof eol); + rprintf(FCLIENT, "%12s %3d%% %7.2f%s %4d:%02d:%02d%s", human_num(ofs), pct, rate, units, remain_h, remain_m, remain_s, eol); } diff -urN --exclude=patches rsync-2.6.8/proto.h rsync-2.6.9/proto.h --- rsync-2.6.8/proto.h 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/proto.h 2006-11-06 20:39:47.000000000 -0800 @@ -21,7 +21,7 @@ int tweak_mode(int mode, struct chmod_mode_struct *chmod_modes); int free_chmod_mode(struct chmod_mode_struct *chmod_modes); void close_all(void); -void _exit_cleanup(int code, const char *file, int line); +NORETURN void _exit_cleanup(int code, const char *file, int line); void cleanup_disable(void); void cleanup_set(char *fnametmp, char *fname, struct file_struct *file, int fd_r, int fd_w); @@ -33,15 +33,15 @@ socklen_t *ss_len); int lookup_name(int fd, const struct sockaddr_storage *ss, socklen_t ss_len, - char *name_buf, size_t name_buf_len, - char *port_buf, size_t port_buf_len); + char *name_buf, size_t name_buf_size, + char *port_buf, size_t port_buf_size); int compare_addrinfo_sockaddr(const struct addrinfo *ai, const struct sockaddr_storage *ss); int check_name(int fd, const struct sockaddr_storage *ss, - char *name_buf); + char *name_buf, size_t name_buf_size); int start_socket_client(char *host, char *path, int argc, char *argv[]); -int start_inband_exchange(char *user, char *path, int f_in, int f_out, +int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc); int start_daemon(int f_in, int f_out); int daemon_main(void); @@ -68,7 +68,7 @@ int unmap_file(struct map_struct *map); void init_flist(void); void show_flist_stats(void); -int link_stat(const char *path, STRUCT_STAT *buffer, int follow_dirlinks); +int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks); void flist_expand(struct file_list *flist); struct file_struct *make_file(char *fname, struct file_list *flist, STRUCT_STAT *stp, unsigned short flags, @@ -104,7 +104,7 @@ void set_msg_fd_out(int fd); void increment_active_files(int ndx, int itemizing, enum logcode code); void decrement_active_files(int ndx); -void send_msg(enum msgcode code, char *buf, int len); +int send_msg(enum msgcode code, char *buf, int len); int get_redo_num(int itemizing, enum logcode code); int get_hlink_num(void); void io_set_filesfrom_fds(int f_in, int f_out); @@ -141,12 +141,10 @@ void start_write_batch(int fd); void stop_write_batch(void); char *lp_bind_address(void); -char *lp_log_file(void); char *lp_motd_file(void); char *lp_pid_file(void); char *lp_socket_options(void); int lp_rsync_port(void); -int lp_syslog_facility(void); char *lp_auth_users(int ); char *lp_comment(int ); char *lp_dont_compress(int ); @@ -160,6 +158,7 @@ char *lp_include_from(int ); char *lp_incoming_chmod(int ); char *lp_lock_file(int ); +char *lp_log_file(int ); char *lp_log_format(int ); char *lp_name(int ); char *lp_outgoing_chmod(int ); @@ -168,6 +167,7 @@ char *lp_prexfer_exec(int ); char *lp_refuse_options(int ); char *lp_secrets_file(int ); +int lp_syslog_facility(int ); char *lp_temp_dir(int ); char *lp_uid(int ); int lp_max_connections(int ); @@ -184,7 +184,7 @@ BOOL lp_load(char *pszFname, int globals_only); int lp_numservices(void); int lp_number(char *name); -void log_init(void); +void log_init(int restart); void logfile_close(void); void logfile_reopen(void); void rwrite(enum logcode code, char *buf, int len); @@ -192,8 +192,8 @@ void rsyserr(enum logcode code, int errcode, const char *format, ...); void rflush(enum logcode code); int log_format_has(const char *format, char esc); -void log_item(struct file_struct *file, struct stats *initial_stats, - int iflags, char *hlink); +void log_item(enum logcode code, struct file_struct *file, + struct stats *initial_stats, int iflags, char *hlink); void maybe_log_item(struct file_struct *file, int iflags, int itemizing, char *buf); void log_delete(char *fname, int mode); @@ -223,7 +223,7 @@ int recv_files(int f_in, struct file_list *flist, char *local_name); void setup_iconv(); void free_sums(struct sum_struct *s); -mode_t dest_mode(mode_t flist_mode, mode_t cur_mode, int exists); +mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int exists); int set_file_attrs(char *fname, struct file_struct *file, STRUCT_STAT *st, int flags); RETSIGTYPE sig_int(UNUSED(int val)); @@ -276,8 +276,8 @@ void set_blocking(int fd); int fd_pair(int fd[2]); void print_child_argv(char **cmd); -void out_of_memory(char *str); -void overflow_exit(char *str); +NORETURN void out_of_memory(char *str); +NORETURN void overflow_exit(char *str); int set_modtime(char *fname, time_t modtime, mode_t mode); int mkdir_defmode(char *fname); int create_directory_path(char *fname); @@ -297,8 +297,9 @@ size_t stringjoin(char *dest, size_t destsize, ...); int count_dir_elements(const char *p); unsigned int clean_fname(char *name, BOOL collapse_dot_dot); -char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth); -int push_dir(char *dir); +char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth, + const char *symlink); +int push_dir(char *dir, int set_path_only); int pop_dir(char *dir); char *full_fname(const char *fn); char *partial_dir_fname(const char *fname); diff -urN --exclude=patches rsync-2.6.8/receiver.c rsync-2.6.9/receiver.c --- rsync-2.6.8/receiver.c 2006-02-24 08:43:44.000000000 -0800 +++ rsync-2.6.9/receiver.c 2006-10-13 00:18:29.000000000 -0700 @@ -1,33 +1,34 @@ -/* -*- 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 - 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. -*/ +/* + * Routines only used by the receiving process. + * + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" extern int verbose; extern int do_xfers; -extern int am_daemon; extern int am_server; extern int do_progress; extern int log_before_transfer; -extern int log_format_has_i; -extern int daemon_log_format_has_i; +extern int stdout_format_has_i; +extern int logfile_format_has_i; extern int csum_length; extern int read_batch; extern int write_batch; @@ -39,7 +40,7 @@ extern int basis_dir_cnt; extern int make_backups; extern int cleanup_got_literal; -extern int remove_sent_files; +extern int remove_source_files; extern int append_mode; extern int sparse_files; extern int keep_partial; @@ -47,7 +48,7 @@ extern int inplace; extern int delay_updates; extern struct stats stats; -extern char *log_format; +extern char *stdout_format; extern char *tmpdir; extern char *partial_dir; extern char *basis_dir[]; @@ -56,6 +57,8 @@ static struct bitbag *delayed_bits = NULL; static int phase = 0; +/* We're either updating the basis file or an identical copy: */ +static int updating_basis; /* @@ -81,15 +84,13 @@ static int get_tmpname(char *fnametmp, char *fname) { + int maxname, added, length = 0; char *f; - int length = 0; - int maxname; if (tmpdir) { /* Note: this can't overflow, so the return value is safe */ length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2); fnametmp[length++] = '/'; - fnametmp[length] = '\0'; /* always NULL terminated */ } if ((f = strrchr(fname, '/')) != NULL) { @@ -102,8 +103,9 @@ } else f = fname; fnametmp[length++] = '.'; - fnametmp[length] = '\0'; /* always NULL terminated */ + /* The maxname value is bufsize, and includes space for the '\0'. + * (Note that NAME_MAX get -8 for the leading '.' above.) */ maxname = MIN(MAXPATHLEN - 7 - length, NAME_MAX - 8); if (maxname < 1) { @@ -112,8 +114,10 @@ return 0; } - strlcpy(fnametmp + length, f, maxname); - strcat(fnametmp + length, ".XXXXXX"); + added = strlcpy(fnametmp + length, f, maxname); + if (added >= maxname) + added = maxname - 1; + memcpy(fnametmp + length + added, ".XXXXXX", 8); return 1; } @@ -166,9 +170,9 @@ sum_update(map_ptr(mapbuf, offset, len), len); offset = sum.flength; } - if (fd != -1 && do_lseek(fd, offset, SEEK_SET) != offset) { - rsyserr(FERROR, errno, "lseek failed on %s", - full_fname(fname)); + if (fd != -1 && (j = do_lseek(fd, offset, SEEK_SET)) != offset) { + rsyserr(FERROR, errno, "lseek of %s returned %.0f, not %.0f", + full_fname(fname), (double)j, (double)offset); exit_cleanup(RERR_FILEIO); } } @@ -215,15 +219,17 @@ sum_update(map, len); } - if (inplace) { + if (updating_basis) { if (offset == offset2 && fd != -1) { + OFF_T pos; if (flush_write_file(fd) < 0) goto report_write_error; offset += len; - if (do_lseek(fd, len, SEEK_CUR) != offset) { + if ((pos = do_lseek(fd, len, SEEK_CUR)) != offset) { rsyserr(FERROR, errno, - "lseek failed on %s", - full_fname(fname)); + "lseek of %s returned %.0f, not %.0f", + full_fname(fname), + (double)pos, (double)offset); exit_cleanup(RERR_FILEIO); } continue; @@ -293,7 +299,7 @@ "rename failed for %s (from %s)", full_fname(fname), partialptr); } else { - if (remove_sent_files + if (remove_source_files || (preserve_hard_links && file->link_u.links)) { SIVAL(numbuf, 0, i); @@ -341,8 +347,8 @@ struct file_struct *file; struct stats initial_stats; int save_make_backups = make_backups; - int itemizing = am_daemon ? daemon_log_format_has_i - : !am_server && log_format_has_i; + int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i; + enum logcode log_code = log_before_transfer ? FLOG : FINFO; int max_phase = protocol_version >= 29 ? 2 : 1; int i, recv_ok; @@ -357,6 +363,8 @@ if (delay_updates) delayed_bits = bitbag_create(flist->count); + updating_basis = inplace; + while (1) { cleanup_disable(); @@ -418,14 +426,13 @@ } if (!do_xfers) { /* log the transfer */ - if (!am_server && log_format) - log_item(file, &stats, iflags, NULL); + log_item(FCLIENT, file, &stats, iflags, NULL); if (read_batch) discard_receive_data(f_in, file->length); continue; } if (write_batch < 0) { - log_item(file, &stats, iflags, NULL); + log_item(FINFO, file, &stats, iflags, NULL); if (!am_server) discard_receive_data(f_in, file->length); continue; @@ -457,6 +464,7 @@ fnamecmp = get_backup_name(fname); break; case FNAMECMP_FUZZY: + updating_basis = 0; if (file->dirname) { pathjoin(fnamecmpbuf, MAXPATHLEN, file->dirname, xname); @@ -465,6 +473,7 @@ fnamecmp = xname; break; default: + updating_basis = 0; if (fnamecmp_type >= basis_dir_cnt) { rprintf(FERROR, "invalid basis_dir index: %d.\n", @@ -511,7 +520,10 @@ } } - if (fd1 != -1 && do_fstat(fd1,&st) != 0) { + if (fd1 == -1) { + st.st_mode = 0; + st.st_size = 0; + } else if (do_fstat(fd1,&st) != 0) { rsyserr(FERROR, errno, "fstat %s failed", full_fname(fnamecmp)); discard_receive_data(f_in, file->length); @@ -544,7 +556,7 @@ file->mode = dest_mode(file->mode, st.st_mode, exists); } - /* We now check to see if we are writing file "inplace" */ + /* We now check to see if we are writing the file "inplace" */ if (inplace) { fd2 = do_open(fname, O_WRONLY|O_CREAT, 0600); if (fd2 == -1) { @@ -589,13 +601,12 @@ continue; } - if (keep_partial) - cleanup_set(fnametmp, partialptr, file, fd1, fd2); + cleanup_set(fnametmp, partialptr, file, fd1, fd2); } /* log the transfer */ if (log_before_transfer) - log_item(file, &initial_stats, iflags, NULL); + log_item(FCLIENT, file, &initial_stats, iflags, NULL); else if (!am_server && verbose && do_progress) rprintf(FINFO, "%s\n", fname); @@ -603,8 +614,7 @@ recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file->length); - if (!log_before_transfer) - log_item(file, &initial_stats, iflags, NULL); + log_item(log_code, file, &initial_stats, iflags, NULL); if (fd1 != -1) close(fd1); @@ -615,9 +625,14 @@ } if ((recv_ok && (!delay_updates || !partialptr)) || inplace) { - if (partialptr == fname || *partial_dir == '/') - partialptr = NULL; - finish_transfer(fname, fnametmp, partialptr, + char *temp_copy_name; + if (partialptr == fname) + partialptr = temp_copy_name = NULL; + else if (*partial_dir == '/') + temp_copy_name = NULL; + else + temp_copy_name = partialptr; + finish_transfer(fname, fnametmp, temp_copy_name, file, recv_ok, 1); if (fnamecmp == partialptr) { do_unlink(partialptr); @@ -639,7 +654,7 @@ cleanup_disable(); if (recv_ok > 0) { - if (remove_sent_files + if (remove_source_files || (preserve_hard_links && file->link_u.links)) { SIVAL(numbuf, 0, i); send_msg(MSG_SUCCESS, numbuf, 4); diff -urN --exclude=patches rsync-2.6.8/rsync.1 rsync-2.6.9/rsync.1 --- rsync-2.6.8/rsync.1 2006-04-22 08:38:37.000000000 -0700 +++ rsync-2.6.9/rsync.1 2006-11-06 20:39:51.000000000 -0800 @@ -1,7 +1,8 @@ -.TH "rsync" "1" "22 Apr 2006" "" "" -.SH "NAME" +.TH "rsync" "1" "6 Nov 2006" "" "" +.SH "NAME" rsync \- faster, flexible replacement for rcp -.SH "SYNOPSIS" +.SH "SYNOPSIS" + .PP rsync [OPTION]\&.\&.\&. SRC [SRC]\&.\&.\&. DEST .PP @@ -19,7 +20,8 @@ .PP rsync [OPTION]\&.\&.\&. rsync://[USER@]HOST[:PORT]/SRC [DEST] .PP -.SH "DESCRIPTION" +.SH "DESCRIPTION" + .PP rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to @@ -48,8 +50,10 @@ .IP o support for anonymous or authenticated rsync daemons (ideal for mirroring) + .PP -.SH "GENERAL" +.SH "GENERAL" + .PP Rsync copies files either to or from a remote host, or locally on the current host (it does not support copying files between two remote hosts)\&. @@ -65,12 +69,13 @@ an exception to this latter rule)\&. .PP As a special case, if a single source arg is specified without a -destination, the files are listed in an output format similar to "ls -l"\&. +destination, the files are listed in an output format similar to "ls \-l"\&. .PP As expected, if neither the source or destination path specify a remote -host, the copy occurs locally (see also the \fB--list-only\fP option)\&. +host, the copy occurs locally (see also the \fB\-\-list\-only\fP option)\&. .PP -.SH "SETUP" +.SH "SETUP" + .PP See the file README for installation instructions\&. .PP @@ -80,13 +85,14 @@ for its communications, but it may have been configured to use a different remote shell by default, such as rsh or remsh\&. .PP -You can also specify any remote shell you like, either by using the \fB-e\fP +You can also specify any remote shell you like, either by using the \fB\-e\fP command line option, or by setting the RSYNC_RSH environment variable\&. .PP Note that rsync must be installed on both the source and destination machines\&. .PP -.SH "USAGE" +.SH "USAGE" + .PP You use rsync in the same way you use rcp\&. You must specify a source and a destination, one of which may be remote\&. @@ -94,8 +100,9 @@ Perhaps the best way to explain the syntax is with some examples: .PP .RS -\f(CWrsync -t *\&.c foo:src/\fP -.RE +\f(CWrsync \-t *\&.c foo:src/\fP +.RE + .PP This would transfer all files matching the pattern *\&.c from the current directory to the directory src on the machine foo\&. If any of @@ -104,8 +111,9 @@ differences\&. See the tech report for details\&. .PP .RS -\f(CWrsync -avz foo:src/bar /data/tmp\fP -.RE +\f(CWrsync \-avz foo:src/bar /data/tmp\fP +.RE + .PP This would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine\&. The @@ -115,8 +123,9 @@ size of data portions of the transfer\&. .PP .RS -\f(CWrsync -avz foo:src/bar/ /data/tmp\fP -.RE +\f(CWrsync \-avz foo:src/bar/ /data/tmp\fP +.RE + .PP A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination\&. You can think of a trailing @@ -128,22 +137,24 @@ /dest/foo: .PP .RS -\f(CWrsync -av /src/foo /dest\fP +\f(CWrsync \-av /src/foo /dest\fP .br -\f(CWrsync -av /src/foo/ /dest/foo\fP +\f(CWrsync \-av /src/foo/ /dest/foo\fP .br -.RE +.RE + .PP Note also that host and module references don\&'t require a trailing slash to copy the contents of the default directory\&. For example, both of these copy the remote directory\&'s contents into "/dest": .PP .RS -\f(CWrsync -av host: /dest\fP +\f(CWrsync \-av host: /dest\fP .br -\f(CWrsync -av host::module /dest\fP +\f(CWrsync \-av host::module /dest\fP .br -.RE +.RE + .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 @@ -154,18 +165,21 @@ .PP .RS \f(CWrsync somehost\&.mydomain\&.com::\fP -.RE +.RE + .PP See the following section for more details\&. .PP -.SH "ADVANCED USAGE" +.SH "ADVANCED USAGE" + .PP The syntax for requesting multiple files from a remote host involves using quoted spaces in the SRC\&. Some examples: .PP .RS \f(CWrsync host::\&'modname/dir1/file1 modname/dir2/file2\&' /dest\fP -.RE +.RE + .PP This would copy file1 and file2 into /dest from an rsync daemon\&. Each additional arg must include the same "modname/" prefix as the first one, @@ -173,8 +187,9 @@ to be a part of the filenames\&. .PP .RS -\f(CWrsync -av host:\&'dir1/file1 dir2/file2\&' /dest\fP -.RE +\f(CWrsync \-av host:\&'dir1/file1 dir2/file2\&' /dest\fP +.RE + .PP This would copy file1 and file2 into /dest using a remote shell\&. This word-splitting is done by the remote shell, so if it doesn\&'t work it means @@ -185,16 +200,18 @@ in place of the spaces\&. Two examples of this are: .PP .RS -\f(CWrsync -av host:\&'file\e name\e with\e spaces\&' /dest\fP +\f(CWrsync \-av host:\&'file\e name\e with\e spaces\&' /dest\fP .br -\f(CWrsync -av host:file?name?with?spaces /dest\fP +\f(CWrsync \-av host:file?name?with?spaces /dest\fP .br -.RE +.RE + .PP This latter example assumes that your shell passes through unmatched wildcards\&. If it complains about "no match", put the name in quotes\&. .PP -.SH "CONNECTING TO AN RSYNC DAEMON" +.SH "CONNECTING TO AN RSYNC DAEMON" + .PP It is also possible to use rsync without a remote shell as the transport\&. In this case you will directly connect to a remote rsync daemon, typically @@ -220,33 +237,32 @@ if you specify no local destination then a listing of the specified files on the remote daemon is provided\&. .IP o -you must not specify the \fB--rsh\fP (\fB-e\fP) option\&. +you must not specify the \fB\-\-rsh\fP (\fB\-e\fP) option\&. + .PP An example that copies all the files in a remote module named "src": .PP - .nf - - rsync -av host::src /dest + rsync \-av host::src /dest .fi - .PP Some modules on the remote daemon may require authentication\&. If so, you will receive a password prompt when you connect\&. You can avoid the password prompt by setting the environment variable RSYNC_PASSWORD to -the password you want to use or using the \fB--password-file\fP option\&. This +the password you want to use or using the \fB\-\-password\-file\fP option\&. This may be useful when scripting rsync\&. .PP WARNING: On some systems environment variables are visible to all -users\&. On those systems using \fB--password-file\fP is recommended\&. +users\&. On those systems using \fB\-\-password\-file\fP is recommended\&. .PP You may establish the connection via a web proxy by setting the environment variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy\&. Note that your web proxy\&'s configuration must support proxy connections to port 873\&. .PP -.SH "USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION" +.SH "USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION" + .PP It is sometimes useful to use various features of an rsync daemon (such as named modules) without actually allowing any new socket connections into a @@ -265,35 +281,30 @@ connection uses nearly the same command-line syntax as a normal rsync-daemon transfer, with the only exception being that you must explicitly set the remote shell program on the command-line with the -\fB--rsh=COMMAND\fP option\&. (Setting the RSYNC_RSH in the environment +\fB\-\-rsh=COMMAND\fP option\&. (Setting the RSYNC_RSH in the environment will not turn on this functionality\&.) For example: .PP - .nf - - rsync -av --rsh=ssh host::module /dest + rsync \-av \-\-rsh=ssh host::module /dest .fi - .PP If you need to specify a different remote-shell user, keep in mind that the user@ prefix in front of the host is specifying the rsync-user value (for a module that requires user-based authentication)\&. This means that you must -give the \&'-l user\&' option to ssh when specifying the remote-shell, as in -this example that uses the short version of the \fB--rsh\fP option: +give the \&'\-l user\&' option to ssh when specifying the remote-shell, as in +this example that uses the short version of the \fB\-\-rsh\fP option: .PP - .nf - - rsync -av -e "ssh -l ssh-user" rsync-user@host::module /dest + rsync \-av \-e "ssh \-l ssh-user" rsync-user@host::module /dest .fi - .PP The "ssh-user" will be used at the ssh level; the "rsync-user" will be used to log-in to the "module"\&. .PP -.SH "STARTING AN RSYNC DAEMON TO ACCEPT CONNECTIONS" +.SH "STARTING AN RSYNC DAEMON TO ACCEPT CONNECTIONS" + .PP In order to connect to an rsync daemon, the remote system needs to have a daemon already running (or it needs to have configured something like inetd @@ -306,7 +317,8 @@ If you\&'re using one of the remote-shell transports for the transfer, there is no need to manually start an rsync daemon\&. .PP -.SH "EXAMPLES" +.SH "EXAMPLES" + .PP Here are some examples of how I use rsync\&. .PP @@ -314,8 +326,9 @@ files and mail folders, I use a cron job that runs .PP .RS -\f(CWrsync -Cavz \&. arvidsjaur:backup\fP -.RE +\f(CWrsync \-Cavz \&. arvidsjaur:backup\fP +.RE + .PP each night over a PPP connection to a duplicate directory on my machine "arvidsjaur"\&. @@ -323,16 +336,13 @@ To synchronize my samba source trees I use the following Makefile targets: .PP - .nf - get: - rsync -avuzb --exclude \&'*~\&' samba:samba/ \&. + rsync \-avuzb \-\-exclude \&'*~\&' samba:samba/ \&. put: - rsync -Cavuzb \&. samba:samba/ + rsync \-Cavuzb \&. samba:samba/ sync: get put .fi - .PP this allows me to sync with a CVS directory at the other end of the @@ -342,147 +352,148 @@ I mirror a directory between my "old" and "new" ftp sites with the command: .PP -\f(CWrsync -az -e ssh --delete ~ftp/pub/samba nimbus:"~ftp/pub/tridge"\fP +\f(CWrsync \-az \-e ssh \-\-delete ~ftp/pub/samba nimbus:"~ftp/pub/tridge"\fP .PP This is launched from cron every few hours\&. .PP -.SH "OPTIONS SUMMARY" +.SH "OPTIONS SUMMARY" + .PP Here is a short summary of the options available in rsync\&. Please refer to the detailed description below for a complete description\&. .nf - - - -v, --verbose increase verbosity - -q, --quiet suppress non-error messages - -c, --checksum skip based on checksum, not mod-time & size - -a, --archive archive mode; same as -rlptgoD (no -H) - --no-OPTION turn off an implied OPTION (e\&.g\&. --no-D) - -r, --recursive recurse into directories - -R, --relative use relative path names - --no-implied-dirs don\&'t send implied dirs with --relative - -b, --backup make backups (see --suffix & --backup-dir) - --backup-dir=DIR make backups into hierarchy based in DIR - --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) - -u, --update skip files that are newer on the receiver - --inplace update destination files in-place - --append append data onto shorter files - -d, --dirs transfer directories without recursing - -l, --links copy symlinks as symlinks - -L, --copy-links transform symlink into referent file/dir - --copy-unsafe-links only "unsafe" symlinks are transformed - --safe-links ignore symlinks that point outside the tree - -k, --copy-dirlinks transform symlink to dir into referent dir - -K, --keep-dirlinks treat symlinked dir on receiver as dir - -H, --hard-links preserve hard links - -p, --perms preserve permissions - -E, --executability preserve executability - --chmod=CHMOD change destination permissions - -o, --owner preserve owner (super-user only) - -g, --group preserve group - --devices preserve device files (super-user only) - --specials preserve special files - -D same as --devices --specials - -t, --times preserve times - -O, --omit-dir-times omit directories when preserving times - --super receiver attempts super-user activities - -S, --sparse handle sparse files efficiently - -n, --dry-run show what would have been transferred - -W, --whole-file copy files whole (without rsync algorithm) - -x, --one-file-system don\&'t cross filesystem boundaries - -B, --block-size=SIZE force a fixed checksum block-size - -e, --rsh=COMMAND specify the remote shell to use - --rsync-path=PROGRAM specify the rsync to run on remote machine - --existing ignore non-existing files on receiving side - --ignore-existing ignore files that already exist on receiver - --remove-sent-files sent files/symlinks are removed from sender - --del an alias for --delete-during - --delete delete files that don\&'t exist on sender - --delete-before receiver deletes before transfer (default) - --delete-during receiver deletes during xfer, not before - --delete-after receiver deletes after transfer, not before - --delete-excluded also delete excluded files on receiver - --ignore-errors delete even if there are I/O errors - --force force deletion of dirs even if not empty - --max-delete=NUM don\&'t delete more than NUM files - --max-size=SIZE don\&'t transfer any file larger than SIZE - --min-size=SIZE don\&'t transfer any file smaller than SIZE - --partial keep partially transferred files - --partial-dir=DIR put a partially transferred file into DIR - --delay-updates put all updated files into place at end - -m, --prune-empty-dirs prune empty directory chains from file-list - --numeric-ids don\&'t map uid/gid values by user/group name - --timeout=TIME set I/O timeout in seconds - -I, --ignore-times don\&'t skip files that match size and time - --size-only skip files that match in size - --modify-window=NUM compare mod-times with reduced accuracy - -T, --temp-dir=DIR create temporary files in directory DIR - -y, --fuzzy find similar file for basis if no dest file - --compare-dest=DIR also compare received files relative to DIR - --copy-dest=DIR \&.\&.\&. and include copies of unchanged files - --link-dest=DIR hardlink to files in DIR when unchanged - -z, --compress compress file data during the transfer - --compress-level=NUM explicitly set compression level - -C, --cvs-exclude auto-ignore files in the same way CVS does - -f, --filter=RULE add a file-filtering RULE - -F same as --filter=\&'dir-merge /\&.rsync-filter\&' - repeated: --filter=\&'- \&.rsync-filter\&' - --exclude=PATTERN exclude files matching PATTERN - --exclude-from=FILE read exclude patterns from FILE - --include=PATTERN don\&'t exclude files matching PATTERN - --include-from=FILE read include patterns from FILE - --files-from=FILE read list of source-file names from FILE - -0, --from0 all *from/filter files are delimited by 0s - --address=ADDRESS bind address for outgoing socket to daemon - --port=PORT specify double-colon alternate port number - --sockopts=OPTIONS specify custom TCP options - --blocking-io use blocking I/O for the remote shell - --stats give some file-transfer stats - -8, --8-bit-output leave high-bit chars unescaped in output - -h, --human-readable output numbers in a human-readable format - --progress show progress during transfer - -P same as --partial --progress - -i, --itemize-changes output a change-summary for all updates - --log-format=FORMAT output filenames using the specified format - --password-file=FILE read password from FILE - --list-only list the files instead of copying them - --bwlimit=KBPS limit I/O bandwidth; KBytes per second - --write-batch=FILE write a batched update to FILE - --only-write-batch=FILE like --write-batch but w/o updating dest - --read-batch=FILE read a batched update from FILE - --protocol=NUM force an older protocol version to be used - --checksum-seed=NUM set block/file checksum seed (advanced) - -4, --ipv4 prefer IPv4 - -6, --ipv6 prefer IPv6 - --version print version number -(-h) --help show this help (see below for -h comment) + \-v, \-\-verbose increase verbosity + \-q, \-\-quiet suppress non-error messages + \-\-no\-motd suppress daemon-mode MOTD (see caveat) + \-c, \-\-checksum skip based on checksum, not mod-time & size + \-a, \-\-archive archive mode; same as \-rlptgoD (no \-H) + \-\-no\-OPTION turn off an implied OPTION (e\&.g\&. \-\-no\-D) + \-r, \-\-recursive recurse into directories + \-R, \-\-relative use relative path names + \-\-no\-implied\-dirs don\&'t send implied dirs with \-\-relative + \-b, \-\-backup make backups (see \-\-suffix & \-\-backup\-dir) + \-\-backup\-dir=DIR make backups into hierarchy based in DIR + \-\-suffix=SUFFIX backup suffix (default ~ w/o \-\-backup\-dir) + \-u, \-\-update skip files that are newer on the receiver + \-\-inplace update destination files in-place + \-\-append append data onto shorter files + \-d, \-\-dirs transfer directories without recursing + \-l, \-\-links copy symlinks as symlinks + \-L, \-\-copy\-links transform symlink into referent file/dir + \-\-copy\-unsafe\-links only "unsafe" symlinks are transformed + \-\-safe\-links ignore symlinks that point outside the tree + \-k, \-\-copy\-dirlinks transform symlink to dir into referent dir + \-K, \-\-keep\-dirlinks treat symlinked dir on receiver as dir + \-H, \-\-hard\-links preserve hard links + \-p, \-\-perms preserve permissions + \-E, \-\-executability preserve executability + \-\-chmod=CHMOD affect file and/or directory permissions + \-o, \-\-owner preserve owner (super-user only) + \-g, \-\-group preserve group + \-\-devices preserve device files (super-user only) + \-\-specials preserve special files + \-D same as \-\-devices \-\-specials + \-t, \-\-times preserve times + \-O, \-\-omit\-dir\-times omit directories when preserving times + \-\-super receiver attempts super-user activities + \-S, \-\-sparse handle sparse files efficiently + \-n, \-\-dry\-run show what would have been transferred + \-W, \-\-whole\-file copy files whole (without rsync algorithm) + \-x, \-\-one\-file\-system don\&'t cross filesystem boundaries + \-B, \-\-block\-size=SIZE force a fixed checksum block-size + \-e, \-\-rsh=COMMAND specify the remote shell to use + \-\-rsync\-path=PROGRAM specify the rsync to run on remote machine + \-\-existing skip creating new files on receiver + \-\-ignore\-existing skip updating files that exist on receiver + \-\-remove\-source\-files sender removes synchronized files (non-dir) + \-\-del an alias for \-\-delete\-during + \-\-delete delete extraneous files from dest dirs + \-\-delete\-before receiver deletes before transfer (default) + \-\-delete\-during receiver deletes during xfer, not before + \-\-delete\-after receiver deletes after transfer, not before + \-\-delete\-excluded also delete excluded files from dest dirs + \-\-ignore\-errors delete even if there are I/O errors + \-\-force force deletion of dirs even if not empty + \-\-max\-delete=NUM don\&'t delete more than NUM files + \-\-max\-size=SIZE don\&'t transfer any file larger than SIZE + \-\-min\-size=SIZE don\&'t transfer any file smaller than SIZE + \-\-partial keep partially transferred files + \-\-partial\-dir=DIR put a partially transferred file into DIR + \-\-delay\-updates put all updated files into place at end + \-m, \-\-prune\-empty\-dirs prune empty directory chains from file-list + \-\-numeric\-ids don\&'t map uid/gid values by user/group name + \-\-timeout=TIME set I/O timeout in seconds + \-I, \-\-ignore\-times don\&'t skip files that match size and time + \-\-size\-only skip files that match in size + \-\-modify\-window=NUM compare mod-times with reduced accuracy + \-T, \-\-temp\-dir=DIR create temporary files in directory DIR + \-y, \-\-fuzzy find similar file for basis if no dest file + \-\-compare\-dest=DIR also compare received files relative to DIR + \-\-copy\-dest=DIR \&.\&.\&. and include copies of unchanged files + \-\-link\-dest=DIR hardlink to files in DIR when unchanged + \-z, \-\-compress compress file data during the transfer + \-\-compress\-level=NUM explicitly set compression level + \-C, \-\-cvs\-exclude auto-ignore files in the same way CVS does + \-f, \-\-filter=RULE add a file-filtering RULE + \-F same as \-\-filter=\&'dir-merge /\&.rsync\-filter\&' + repeated: \-\-filter=\&'\- \&.rsync\-filter\&' + \-\-exclude=PATTERN exclude files matching PATTERN + \-\-exclude\-from=FILE read exclude patterns from FILE + \-\-include=PATTERN don\&'t exclude files matching PATTERN + \-\-include\-from=FILE read include patterns from FILE + \-\-files\-from=FILE read list of source-file names from FILE + \-0, \-\-from0 all *from/filter files are delimited by 0s + \-\-address=ADDRESS bind address for outgoing socket to daemon + \-\-port=PORT specify double-colon alternate port number + \-\-sockopts=OPTIONS specify custom TCP options + \-\-blocking\-io use blocking I/O for the remote shell + \-\-stats give some file-transfer stats + \-8, \-\-8\-bit\-output leave high-bit chars unescaped in output + \-h, \-\-human\-readable output numbers in a human-readable format + \-\-progress show progress during transfer + \-P same as \-\-partial \-\-progress + \-i, \-\-itemize\-changes output a change-summary for all updates + \-\-out\-format=FORMAT output updates using the specified FORMAT + \-\-log\-file=FILE log what we\&'re doing to the specified FILE + \-\-log\-file\-format=FMT log updates using the specified FMT + \-\-password\-file=FILE read password from FILE + \-\-list\-only list the files instead of copying them + \-\-bwlimit=KBPS limit I/O bandwidth; KBytes per second + \-\-write\-batch=FILE write a batched update to FILE + \-\-only\-write\-batch=FILE like \-\-write\-batch but w/o updating dest + \-\-read\-batch=FILE read a batched update from FILE + \-\-protocol=NUM force an older protocol version to be used + \-\-checksum\-seed=NUM set block/file checksum seed (advanced) + \-4, \-\-ipv4 prefer IPv4 + \-6, \-\-ipv6 prefer IPv6 + \-\-version print version number +(\-h) \-\-help show this help (see below for \-h comment) .fi - .PP Rsync can also be run as a daemon, in which case the following options are accepted: .nf - - - --daemon run as an rsync daemon - --address=ADDRESS bind to the specified address - --bwlimit=KBPS limit I/O bandwidth; KBytes per second - --config=FILE specify alternate rsyncd\&.conf file - --no-detach do not detach from the parent - --port=PORT listen on alternate port number - --sockopts=OPTIONS specify custom TCP options - -v, --verbose increase verbosity - -4, --ipv4 prefer IPv4 - -6, --ipv6 prefer IPv6 - -h, --help show this help (if used after --daemon) + \-\-daemon run as an rsync daemon + \-\-address=ADDRESS bind to the specified address + \-\-bwlimit=KBPS limit I/O bandwidth; KBytes per second + \-\-config=FILE specify alternate rsyncd\&.conf file + \-\-no\-detach do not detach from the parent + \-\-port=PORT listen on alternate port number + \-\-log\-file=FILE override the "log file" setting + \-\-log\-file\-format=FMT override the "log format" setting + \-\-sockopts=OPTIONS specify custom TCP options + \-v, \-\-verbose increase verbosity + \-4, \-\-ipv4 prefer IPv4 + \-6, \-\-ipv6 prefer IPv6 + \-h, \-\-help show this help (if used after \-\-daemon) .fi - .PP -.SH "OPTIONS" +.SH "OPTIONS" + .PP rsync uses the GNU long options package\&. Many of the command line options have two variants, one short and one long\&. These are shown @@ -490,62 +501,71 @@ The \&'=\&' for options that take a parameter is optional; whitespace can be used instead\&. .PP -.IP "\fB--help\fP" +.IP "\fB\-\-help\fP" Print a short help page describing the options available in rsync and exit\&. For backward-compatibility with older -versions of rsync, the help will also be output if you use the \fB-h\fP +versions of rsync, the help will also be output if you use the \fB\-h\fP option without any other args\&. .IP -.IP "\fB--version\fP" +.IP "\fB\-\-version\fP" print the rsync version number and exit\&. .IP -.IP "\fB-v, --verbose\fP" +.IP "\fB\-v, \-\-verbose\fP" This option increases the amount of information you are given during the transfer\&. By default, rsync works silently\&. A -single \fB-v\fP will give you information about what files are being -transferred and a brief summary at the end\&. Two \fB-v\fP flags will give you +single \fB\-v\fP will give you information about what files are being +transferred and a brief summary at the end\&. Two \fB\-v\fP flags will give you information on what files are being skipped and slightly more -information at the end\&. More than two \fB-v\fP flags should only be used if +information at the end\&. More than two \fB\-v\fP flags should only be used if you are debugging rsync\&. .IP Note that the names of the transferred files that are output are done using -a default \fB--log-format\fP of "%n%L", which tells you just the name of the -file and, if the item is a link, where it points\&. At the single \fB-v\fP +a default \fB\-\-out\-format\fP of "%n%L", which tells you just the name of the +file and, if the item is a link, where it points\&. At the single \fB\-v\fP level of verbosity, this does not mention when a file gets its attributes changed\&. If you ask for an itemized list of changed attributes (either -\fB--itemize-changes\fP or adding "%i" to the \fB--log-format\fP setting), the +\fB\-\-itemize\-changes\fP or adding "%i" to the \fB\-\-out\-format\fP setting), the output (on the client) increases to mention all items that are changed in -any way\&. See the \fB--log-format\fP option for more details\&. +any way\&. See the \fB\-\-out\-format\fP option for more details\&. .IP -.IP "\fB-q, --quiet\fP" +.IP "\fB\-q, \-\-quiet\fP" This option decreases the amount of information you are given during the transfer, notably suppressing information messages from the remote server\&. This flag is useful when invoking rsync from cron\&. .IP -.IP "\fB-I, --ignore-times\fP" +.IP "\fB\-\-no\-motd\fP" +This option affects the information that is output +by the client at the start of a daemon transfer\&. This suppresses the +message-of-the-day (MOTD) text, but it also affects the list of modules +that the daemon sends in response to the "rsync host::" request (due to +a limitation in the rsync protocol), so omit this option if you want to +request the list of modules from the deamon\&. +.IP +.IP "\fB\-I, \-\-ignore\-times\fP" Normally rsync will skip any files that are already the same size and have the same modification time-stamp\&. -This option turns off this "quick check" behavior\&. +This option turns off this "quick check" behavior, causing all files to +be updated\&. .IP -.IP "\fB--size-only\fP" +.IP "\fB\-\-size\-only\fP" Normally rsync will not transfer any files that are already the same size and have the same modification time-stamp\&. With the -\fB--size-only\fP option, files will not be transferred if they have the same size, +\fB\-\-size\-only\fP option, files will not be transferred if they have the same size, regardless of timestamp\&. This is useful when starting to use rsync after using another mirroring system which may not preserve timestamps exactly\&. .IP -.IP "\fB--modify-window\fP" +.IP "\fB\-\-modify\-window\fP" When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value\&. This is normally 0 (for an exact match), but you may find it useful to set this to a larger value in some situations\&. In particular, when transferring to or from an MS Windows FAT filesystem (which represents -times with a 2-second resolution), \fB--modify-window=1\fP is useful +times with a 2-second resolution), \fB\-\-modify\-window=1\fP is useful (allowing times to differ by up to 1 second)\&. .IP -.IP "\fB-c, --checksum\fP" +.IP "\fB\-c, \-\-checksum\fP" This forces the sender to checksum \fIevery\fP regular file using a 128-bit MD4 checksum\&. It does this during the initial file-system scan as it builds the list of all available files\&. The receiver @@ -562,42 +582,42 @@ that automatic after-the-transfer verification has nothing to do with this option\&'s before-the-transfer "Does this file need to be updated?" check\&. .IP -.IP "\fB-a, --archive\fP" -This is equivalent to \fB-rlptgoD\fP\&. It is a quick +.IP "\fB\-a, \-\-archive\fP" +This is equivalent to \fB\-rlptgoD\fP\&. It is a quick way of saying you want recursion and want to preserve almost -everything (with -H being a notable omission)\&. -The only exception to the above equivalence is when \fB--files-from\fP is -specified, in which case \fB-r\fP is not implied\&. +everything (with \-H being a notable omission)\&. +The only exception to the above equivalence is when \fB\-\-files\-from\fP is +specified, in which case \fB\-r\fP is not implied\&. .IP -Note that \fB-a\fP \fBdoes not preserve hardlinks\fP, because +Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because finding multiply-linked files is expensive\&. You must separately -specify \fB-H\fP\&. +specify \fB\-H\fP\&. .IP -.IP "--no-OPTION" +.IP "\-\-no\-OPTION" You may turn off one or more implied options by prefixing -the option name with "no-"\&. Not all options may be prefixed with a "no-": -only options that are implied by other options (e\&.g\&. \fB--no-D\fP, -\fB--no-perms\fP) or have different defaults in various circumstances -(e\&.g\&. \fB--no-whole-file\fP, \fB--no-blocking-io\fP, \fB--no-dirs\fP)\&. You may -specify either the short or the long option name after the "no-" prefix -(e\&.g\&. \fB--no-R\fP is the same as \fB--no-relative\fP)\&. -.IP -For example: if you want to use \fB-a\fP (\fB--archive\fP) but don\&'t want -\fB-o\fP (\fB--owner\fP), instead of converting \fB-a\fP into \fB-rlptgD\fP, you -could specify \fB-a --no-o\fP (or \fB-a --no-owner\fP)\&. -.IP -The order of the options is important: if you specify \fB--no-r -a\fP, the -\fB-r\fP option would end up being turned on, the opposite of \fB-a --no-r\fP\&. -Note also that the side-effects of the \fB--files-from\fP option are NOT +the option name with "no\-"\&. Not all options may be prefixed with a "no\-": +only options that are implied by other options (e\&.g\&. \fB\-\-no\-D\fP, +\fB\-\-no\-perms\fP) or have different defaults in various circumstances +(e\&.g\&. \fB\-\-no\-whole\-file\fP, \fB\-\-no\-blocking\-io\fP, \fB\-\-no\-dirs\fP)\&. You may +specify either the short or the long option name after the "no\-" prefix +(e\&.g\&. \fB\-\-no\-R\fP is the same as \fB\-\-no\-relative\fP)\&. +.IP +For example: if you want to use \fB\-a\fP (\fB\-\-archive\fP) but don\&'t want +\fB\-o\fP (\fB\-\-owner\fP), instead of converting \fB\-a\fP into \fB\-rlptgD\fP, you +could specify \fB\-a \-\-no\-o\fP (or \fB\-a \-\-no\-owner\fP)\&. +.IP +The order of the options is important: if you specify \fB\-\-no\-r \-a\fP, the +\fB\-r\fP option would end up being turned on, the opposite of \fB\-a \-\-no\-r\fP\&. +Note also that the side-effects of the \fB\-\-files\-from\fP option are NOT positional, as it affects the default state of several options and slightly -changes the meaning of \fB-a\fP (see the \fB--files-from\fP option for more +changes the meaning of \fB\-a\fP (see the \fB\-\-files\-from\fP option for more details)\&. .IP -.IP "\fB-r, --recursive\fP" +.IP "\fB\-r, \-\-recursive\fP" This tells rsync to copy directories -recursively\&. See also \fB--dirs\fP (\fB-d\fP)\&. +recursively\&. See also \fB\-\-dirs\fP (\fB\-d\fP)\&. .IP -.IP "\fB-R, --relative\fP" +.IP "\fB\-R, \-\-relative\fP" Use relative paths\&. This means that the full path names specified on the command line are sent to the server rather than just the last parts of the filenames\&. This is particularly useful when @@ -605,15 +625,17 @@ example, if you used this command: .IP .RS -\f(CW rsync -av /foo/bar/baz\&.c remote:/tmp/\fP -.RE +\f(CW rsync \-av /foo/bar/baz\&.c remote:/tmp/\fP +.RE + .IP \&.\&.\&. this would create a file named baz\&.c in /tmp/ on the remote machine\&. If instead you used .IP .RS -\f(CW rsync -avR /foo/bar/baz\&.c remote:/tmp/\fP -.RE +\f(CW rsync \-avR /foo/bar/baz\&.c remote:/tmp/\fP +.RE + .IP then a file named /tmp/foo/bar/baz\&.c would be created on the remote machine -- the full path name is preserved\&. To limit the amount of @@ -622,8 +644,9 @@ insert a dot and a slash into the source path, like this: .IP .RS -\f(CW rsync -avR /foo/\&./bar/baz\&.c remote:/tmp/\fP -.RE +\f(CW rsync \-avR /foo/\&./bar/baz\&.c remote:/tmp/\fP +.RE + .IP That would create /tmp/bar/baz\&.c on the remote machine\&. (Note that the dot must be followed by a slash, so "/foo/\&." would not be abbreviated\&.) @@ -631,8 +654,9 @@ source path\&. For example, when pushing files: .IP .RS -\f(CW (cd /foo; rsync -avR bar/baz\&.c remote:/tmp/) \fP -.RE +\f(CW (cd /foo; rsync \-avR bar/baz\&.c remote:/tmp/) \fP +.RE + .IP (Note that the parens put the two commands into a sub-shell, so that the "cd" command doesn\&'t remain in effect for future commands\&.) @@ -640,14 +664,15 @@ rsync daemon): .IP .RS -\f(CW rsync -avR --rsync-path="cd /foo; rsync" \e \fP +\f(CW rsync \-avR \-\-rsync\-path="cd /foo; rsync" \e \fP .br \f(CW remote:bar/baz\&.c /tmp/\fP -.RE +.RE + .IP -.IP "\fB--no-implied-dirs\fP" +.IP "\fB\-\-no\-implied\-dirs\fP" This option affects the default behavior of the -\fB--relative\fP option\&. When it is specified, the attributes of the implied +\fB\-\-relative\fP option\&. When it is specified, the attributes of the implied directories from the source names are not included in the transfer\&. This means that the corresponding path elements on the destination system are left unchanged if they exist, and any missing implied directories are @@ -657,62 +682,62 @@ .IP For instance, if a command-line arg or a files-from entry told rsync to transfer the file "path/foo/file", the directories "path" and "path/foo" -are implied when \fB--relative\fP is used\&. If "path/foo" is a symlink to +are implied when \fB\-\-relative\fP is used\&. If "path/foo" is a symlink to "bar" on the destination system, the receiving rsync would ordinarily delete "path/foo", recreate it as a directory, and receive the file into -the new directory\&. With \fB--no-implied-dirs\fP, the receiving rsync updates +the new directory\&. With \fB\-\-no\-implied\-dirs\fP, the receiving rsync updates "path/foo/file" using the existing path elements, which means that the file ends up being created in "path/bar"\&. Another way to accomplish this link -preservation is to use the \fB--keep-dirlinks\fP option (which will also +preservation is to use the \fB\-\-keep\-dirlinks\fP option (which will also affect symlinks to directories in the rest of the transfer)\&. .IP In a similar but opposite scenario, if the transfer of "path/foo/file" is requested and "path/foo" is a symlink on the sending side, running without -\fB--no-implied-dirs\fP would cause rsync to transform "path/foo" on the +\fB\-\-no\-implied\-dirs\fP would cause rsync to transform "path/foo" on the receiving side into an identical symlink, and then attempt to transfer "path/foo/file", which might fail if the duplicated symlink did not point to a directory on the receiving side\&. Another way to avoid this sending of -a symlink as an implied directory is to use \fB--copy-unsafe-links\fP, or -\fB--copy-dirlinks\fP (both of which also affect symlinks in the rest of the +a symlink as an implied directory is to use \fB\-\-copy\-unsafe\-links\fP, or +\fB\-\-copy\-dirlinks\fP (both of which also affect symlinks in the rest of the transfer -- see their descriptions for full details)\&. .IP -.IP "\fB-b, --backup\fP" +.IP "\fB\-b, \-\-backup\fP" With this option, preexisting destination files are renamed as each file is transferred or deleted\&. You can control where the backup file goes and what (if any) suffix gets appended using the -\fB--backup-dir\fP and \fB--suffix\fP options\&. +\fB\-\-backup\-dir\fP and \fB\-\-suffix\fP options\&. .IP -Note that if you don\&'t specify \fB--backup-dir\fP, (1) the -\fB--omit-dir-times\fP option will be implied, and (2) if \fB--delete\fP is -also in effect (without \fB--delete-excluded\fP), rsync will add a "protect" +Note that if you don\&'t specify \fB\-\-backup\-dir\fP, (1) the +\fB\-\-omit\-dir\-times\fP option will be implied, and (2) if \fB\-\-delete\fP is +also in effect (without \fB\-\-delete\-excluded\fP), rsync will add a "protect" filter-rule for the backup suffix to the end of all your existing excludes -(e\&.g\&. -f "P *~")\&. This will prevent previously backed-up files from being +(e\&.g\&. \-f "P *~")\&. This will prevent previously backed-up files from being deleted\&. Note that if you are supplying your own filter rules, you may need to manually insert your own exclude/protect rule somewhere higher up in the list so that it has a high enough priority to be effective (e\&.g\&., if your rules specify a trailing inclusion/exclusion of \&'*\&', the auto-added rule would never be reached)\&. .IP -.IP "\fB--backup-dir=DIR\fP" -In combination with the \fB--backup\fP option, this -tells rsync to store all backups in the specified directory\&. This is -very useful for incremental backups\&. You can additionally -specify a backup suffix using the \fB--suffix\fP option +.IP "\fB\-\-backup\-dir=DIR\fP" +In combination with the \fB\-\-backup\fP option, this +tells rsync to store all backups in the specified directory on the receiving +side\&. This can be used for incremental backups\&. You can additionally +specify a backup suffix using the \fB\-\-suffix\fP option (otherwise the files backed up in the specified directory will keep their original filenames)\&. .IP -.IP "\fB--suffix=SUFFIX\fP" +.IP "\fB\-\-suffix=SUFFIX\fP" This option allows you to override the default -backup suffix used with the \fB--backup\fP (\fB-b\fP) option\&. The default suffix is a ~ -if no -\fB-backup-dir\fP was specified, otherwise it is an empty string\&. +backup suffix used with the \fB\-\-backup\fP (\fB\-b\fP) option\&. The default suffix is a ~ +if no \-\fB\-backup-dir\fP was specified, otherwise it is an empty string\&. .IP -.IP "\fB-u, --update\fP" +.IP "\fB\-u, \-\-update\fP" This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file\&. (If an existing destination file has a modify time equal to the source file\&'s, it will be updated if the sizes are different\&.) .IP -In the current implementation of \fB--update\fP, a difference of file format +In the current implementation of \fB\-\-update\fP, a difference of file format between the sender and receiver is always considered to be important enough for an update, no matter what date is on the objects\&. In other words, if the source has a directory or a @@ -720,23 +745,23 @@ regardless of the timestamps\&. This might change in the future (feel free to comment on this on the mailing list if you have an opinion)\&. .IP -.IP "\fB--inplace\fP" +.IP "\fB\-\-inplace\fP" This causes rsync not to create a new copy of the file and then move it into place\&. Instead rsync will overwrite the existing file, meaning that the rsync algorithm can\&'t accomplish the full amount of network reduction it might be able to otherwise (since it does not yet try to sort data matches)\&. One exception to this is if you combine the option -with \fB--backup\fP, since rsync is smart enough to use the backup file as the +with \fB\-\-backup\fP, since rsync is smart enough to use the backup file as the basis file for the transfer\&. .IP This option is useful for transfer of large files with block-based changes or appended data, and also on systems that are disk bound, not network bound\&. .IP -The option implies \fB--partial\fP (since an interrupted transfer does not delete -the file), but conflicts with \fB--partial-dir\fP and \fB--delay-updates\fP\&. -Prior to rsync 2\&.6\&.4 \fB--inplace\fP was also incompatible with \fB--compare-dest\fP -and \fB--link-dest\fP\&. +The option implies \fB\-\-partial\fP (since an interrupted transfer does not delete +the file), but conflicts with \fB\-\-partial\-dir\fP and \fB\-\-delay\-updates\fP\&. +Prior to rsync 2\&.6\&.4 \fB\-\-inplace\fP was also incompatible with \fB\-\-compare\-dest\fP +and \fB\-\-link\-dest\fP\&. .IP WARNING: The file\&'s data will be in an inconsistent state during the transfer (and possibly afterward if the transfer gets interrupted), so you @@ -744,69 +769,69 @@ rsync will be unable to update a file in-place that is not writable by the receiving user\&. .IP -.IP "\fB--append\fP" +.IP "\fB\-\-append\fP" This causes rsync to update a file by appending data onto the end of the file, which presumes that the data that already exists on the receiving side is identical with the start of the file on the sending side\&. If that is not true, the file will fail the checksum test, and the -resend will do a normal \fB--inplace\fP update to correct the mismatched data\&. +resend will do a normal \fB\-\-inplace\fP update to correct the mismatched data\&. Only files on the receiving side that are shorter than the corresponding file on the sending side (as well as new files) are sent\&. -Implies \fB--inplace\fP, but does not conflict with \fB--sparse\fP (though the -\fB--sparse\fP option will be auto-disabled if a resend of the already-existing +Implies \fB\-\-inplace\fP, but does not conflict with \fB\-\-sparse\fP (though the +\fB\-\-sparse\fP option will be auto-disabled if a resend of the already-existing data is required)\&. .IP -.IP "\fB-d, --dirs\fP" +.IP "\fB\-d, \-\-dirs\fP" Tell the sending side to include any directories that -are encountered\&. Unlike \fB--recursive\fP, a directory\&'s contents are not copied +are encountered\&. Unlike \fB\-\-recursive\fP, a directory\&'s contents are not copied unless the directory name specified is "\&." or ends with a trailing slash (e\&.g\&. "\&.", "dir/\&.", "dir/", etc\&.)\&. Without this option or the -\fB--recursive\fP option, rsync will skip all directories it encounters (and +\fB\-\-recursive\fP option, rsync will skip all directories it encounters (and output a message to that effect for each one)\&. If you specify both -\fB--dirs\fP and \fB--recursive\fP, \fB--recursive\fP takes precedence\&. +\fB\-\-dirs\fP and \fB\-\-recursive\fP, \fB\-\-recursive\fP takes precedence\&. .IP -.IP "\fB-l, --links\fP" +.IP "\fB\-l, \-\-links\fP" When symlinks are encountered, recreate the symlink on the destination\&. .IP -.IP "\fB-L, --copy-links\fP" +.IP "\fB\-L, \-\-copy\-links\fP" When symlinks are encountered, the item that they point to (the referent) is copied, rather than the symlink\&. In older versions of rsync, this option also had the side-effect of telling the receiving side to follow symlinks, such as symlinks to directories\&. In a -modern rsync such as this one, you\&'ll need to specify \fB--keep-dirlinks\fP (\fB-K\fP) +modern rsync such as this one, you\&'ll need to specify \fB\-\-keep\-dirlinks\fP (\fB\-K\fP) to get this extra behavior\&. The only exception is when sending files to -an rsync that is too old to understand \fB-K\fP -- in that case, the \fB-L\fP option -will still have the side-effect of \fB-K\fP on that older receiving rsync\&. +an rsync that is too old to understand \fB\-K\fP -- in that case, the \fB\-L\fP option +will still have the side-effect of \fB\-K\fP on that older receiving rsync\&. .IP -.IP "\fB--copy-unsafe-links\fP" +.IP "\fB\-\-copy\-unsafe\-links\fP" This tells rsync to copy the referent of symbolic links that point outside the copied tree\&. Absolute symlinks are also treated like ordinary files, and so are any symlinks in the -source path itself when \fB--relative\fP is used\&. This option has no -additional effect if \fB--copy-links\fP was also specified\&. +source path itself when \fB\-\-relative\fP is used\&. This option has no +additional effect if \fB\-\-copy\-links\fP was also specified\&. .IP -.IP "\fB--safe-links\fP" +.IP "\fB\-\-safe\-links\fP" This tells rsync to ignore any symbolic links which point outside the copied tree\&. All absolute symlinks are -also ignored\&. Using this option in conjunction with \fB--relative\fP may +also ignored\&. Using this option in conjunction with \fB\-\-relative\fP may give unexpected results\&. .IP -.IP "\fB-K, --copy-dirlinks\fP" +.IP "\fB\-K, \-\-copy\-dirlinks\fP" This option causes the sending side to treat a symlink to a directory as though it were a real directory\&. This is useful if you don\&'t want symlinks to non-directories to be affected, as -they would be using \fB--copy-links\fP\&. +they would be using \fB\-\-copy\-links\fP\&. .IP Without this option, if the sending side has replaced a directory with a symlink to a directory, the receiving side will delete anything that is in the way of the new symlink, including a directory hierarchy (as long as -\fB--force\fP or \fB--delete\fP is in effect)\&. +\fB\-\-force\fP or \fB\-\-delete\fP is in effect)\&. .IP -See also \fB--keep-dirlinks\fP for an analogous option for the receiving +See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving side\&. .IP -.IP "\fB-K, --keep-dirlinks\fP" +.IP "\fB\-K, \-\-keep\-dirlinks\fP" This option causes the receiving side to treat a symlink to a directory as though it were a real directory, but only if it matches a real directory from the sender\&. Without this option, the @@ -814,14 +839,14 @@ .IP For example, suppose you transfer a directory "foo" that contains a file "file", but "foo" is a symlink to directory "bar" on the receiver\&. Without -\fB--keep-dirlinks\fP, the receiver deletes symlink "foo", recreates it as a +\fB\-\-keep\-dirlinks\fP, the receiver deletes symlink "foo", recreates it as a directory, and receives the file into the new directory\&. With -\fB--keep-dirlinks\fP, the receiver keeps the symlink and "file" ends up in +\fB\-\-keep\-dirlinks\fP, the receiver keeps the symlink and "file" ends up in "bar"\&. .IP -See also \fB--copy-dirlinks\fP for an analogous option for the sending side\&. +See also \fB\-\-copy\-dirlinks\fP for an analogous option for the sending side\&. .IP -.IP "\fB-H, --hard-links\fP" +.IP "\fB\-H, \-\-hard\-links\fP" This tells rsync to look for hard-linked files in the transfer and link together the corresponding files on the receiving side\&. Without this option, hard-linked files in the transfer are treated @@ -830,10 +855,10 @@ Note that rsync can only detect hard links if both parts of the link are in the list of files being sent\&. .IP -.IP "\fB-p, --perms\fP" +.IP "\fB\-p, \-\-perms\fP" This option causes the receiving rsync to set the destination permissions to be the same as the source permissions\&. (See -also the \fB--chmod\fP option for a way to modify what rsync considers to +also the \fB\-\-chmod\fP option for a way to modify what rsync considers to be the source permissions\&.) .IP When this option is \fIoff\fP, permissions are set as follows: @@ -841,52 +866,55 @@ .RS .IP o Existing files (including updated files) retain their existing -permissions, though the \fB--executability\fP option might change just +permissions, though the \fB\-\-executability\fP option might change just the execute permission for the file\&. .IP o New files get their "normal" permission bits set to the source file\&'s permissions masked with the receiving end\&'s umask setting, and their special permission bits disabled except in the case where a new directory inherits a setgid bit from its parent directory\&. -.RE +.RE + .IP -Thus, when \fB--perms\fP and \fB--executability\fP are both disabled, +Thus, when \fB\-\-perms\fP and \fB\-\-executability\fP are both disabled, rsync\&'s behavior is the same as that of other file-copy utilities, such as \fBcp\fP(1) and \fBtar\fP(1)\&. .IP In summary: to give destination files (both old and new) the source -permissions, use \fB--perms\fP\&. To give new files the destination-default +permissions, use \fB\-\-perms\fP\&. To give new files the destination-default permissions (while leaving existing files unchanged), make sure that the -\fB--perms\fP option is off and use \fB--chmod=ugo=rwX\fP (which ensures that +\fB\-\-perms\fP option is off and use \fB\-\-chmod=ugo=rwX\fP (which ensures that all non-masked bits get enabled)\&. If you\&'d care to make this latter behavior easier to type, you could define a popt alias for it, such as -putting this line in the file ~/\&.popt (this defines the \fB-s\fP option, -and includes --no-g to use the default group of the destination dir): +putting this line in the file ~/\&.popt (this defines the \fB\-s\fP option, +and includes \-\-no\-g to use the default group of the destination dir): .IP .RS -\f(CW rsync alias -s --no-p --no-g --chmod=ugo=rwX\fP -.RE +\f(CW rsync alias \-s \-\-no\-p \-\-no\-g \-\-chmod=ugo=rwX\fP +.RE + .IP You could then use this new option in a command such as this one: .IP .RS -\f(CW rsync -asv src/ dest/\fP -.RE +\f(CW rsync \-asv src/ dest/\fP +.RE + .IP -(Caveat: make sure that \fB-a\fP does not follow \fB-s\fP, or it will re-enable -the "--no-*" options\&.) +(Caveat: make sure that \fB\-a\fP does not follow \fB\-s\fP, or it will re-enable +the "\-\-no\-*" options\&.) .IP The preservation of the destination\&'s setgid bit on newly-created -directories when \fB--perms\fP is off was added in rsync 2\&.6\&.7\&. Older rsync +directories when \fB\-\-perms\fP is off was added in rsync 2\&.6\&.7\&. Older rsync versions erroneously preserved the three special permission bits for -newly-created files when \fB--perms\fP was off, while overriding the +newly-created files when \fB\-\-perms\fP was off, while overriding the destination\&'s setgid bit setting on a newly-created directory\&. (Keep in mind that it is the version of the receiving rsync that affects this behavior\&.) .IP -.IP "\fB-E, --executability\fP" +.IP "\fB\-E, \-\-executability\fP" This option causes rsync to preserve the -executability (or non-executability) of regular files when \fB--perms\fP is +executability (or non-executability) of regular files when \fB\-\-perms\fP is not enabled\&. A regular file is considered to be executable if at least one \&'x\&' is turned on in its permissions\&. When an existing destination file\&'s executability differs from that of the corresponding source file, rsync @@ -899,16 +927,17 @@ .IP o To make a file executable, rsync turns on each \&'x\&' permission that has a corresponding \&'r\&' permission enabled\&. -.RE +.RE + .IP -If \fB--perms\fP is enabled, this option is ignored\&. +If \fB\-\-perms\fP is enabled, this option is ignored\&. .IP -.IP "\fB--chmod\fP" +.IP "\fB\-\-chmod\fP" This option tells rsync to apply one or more comma-separated "chmod" strings to the permission of the files in the transfer\&. The resulting value is treated as though it was the permissions that the sending side supplied for the file, which means that this option -can seem to have no effect on existing files if \fB--perms\fP is not enabled\&. +can seem to have no effect on existing files if \fB\-\-perms\fP is not enabled\&. .IP In addition to the normal parsing rules specified in the \fBchmod\fP(1) manpage, you can specify an item that should only apply to a directory by @@ -916,31 +945,32 @@ file by prefixing it with a \&'F\&'\&. For example: .IP .RS ---chmod=Dg+s,ug+w,Fo-w,+X -.RE +\-\-chmod=Dg+s,ug+w,Fo-w,+X +.RE + .IP -It is also legal to specify multiple \fB--chmod\fP options, as each +It is also legal to specify multiple \fB\-\-chmod\fP options, as each additional option is just appended to the list of changes to make\&. .IP -See the \fB--perms\fP and \fB--executability\fP options for how the resulting +See the \fB\-\-perms\fP and \fB\-\-executability\fP options for how the resulting permission value can be applied to the files in the transfer\&. .IP -.IP "\fB-o, --owner\fP" +.IP "\fB\-o, \-\-owner\fP" This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the -receiving rsync is being run as the super-user (see also the \fB--super\fP +receiving rsync is being run as the super-user (see also the \fB\-\-super\fP option to force rsync to attempt super-user activities)\&. Without this option, the owner is set to the invoking user on the receiving side\&. .IP The preservation of ownership will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the -\fB--numeric-ids\fP option for a full discussion)\&. +\fB\-\-numeric\-ids\fP option for a full discussion)\&. .IP -.IP "\fB-g, --group\fP" +.IP "\fB\-g, \-\-group\fP" This option causes rsync to set the group of the destination file to be the same as the source file\&. If the receiving -program is not running as the super-user (or if \fB--no-super\fP was +program is not running as the super-user (or if \fB\-\-no\-super\fP was specified), only groups that the invoking user on the receiving side is a member of will be preserved\&. Without this option, the group is set to the default group of the invoking @@ -948,61 +978,61 @@ .IP The preservation of group information will associate matching names by default, but may fall back to using the ID number in some circumstances -(see also the \fB--numeric-ids\fP option for a full discussion)\&. +(see also the \fB\-\-numeric\-ids\fP option for a full discussion)\&. .IP -.IP "\fB--devices\fP" +.IP "\fB\-\-devices\fP" This option causes rsync to transfer character and block device files to the remote system to recreate these devices\&. This option has no effect if the receiving rsync is not run as the -super-user and \fB--super\fP is not specified\&. +super-user and \fB\-\-super\fP is not specified\&. .IP -.IP "\fB--specials\fP" +.IP "\fB\-\-specials\fP" This option causes rsync to transfer special files such as named sockets and fifos\&. .IP -.IP "\fB-D\fP" -The \fB-D\fP option is equivalent to \fB--devices\fP \fB--specials\fP\&. +.IP "\fB\-D\fP" +The \fB\-D\fP option is equivalent to \fB\-\-devices\fP \fB\-\-specials\fP\&. .IP -.IP "\fB-t, --times\fP" +.IP "\fB\-t, \-\-times\fP" This tells rsync to transfer modification times along with the files and update them on the remote system\&. Note that if this option is not used, the optimization that excludes files that have not been -modified cannot be effective; in other words, a missing \fB-t\fP or \fB-a\fP will -cause the next transfer to behave as if it used \fB-I\fP, causing all files to be +modified cannot be effective; in other words, a missing \fB\-t\fP or \fB\-a\fP will +cause the next transfer to behave as if it used \fB\-I\fP, causing all files to be updated (though the rsync algorithm will make the update fairly efficient -if the files haven\&'t actually changed, you\&'re much better off using \fB-t\fP)\&. +if the files haven\&'t actually changed, you\&'re much better off using \fB\-t\fP)\&. .IP -.IP "\fB-O, --omit-dir-times\fP" +.IP "\fB\-O, \-\-omit\-dir\-times\fP" This tells rsync to omit directories when -it is preserving modification times (see \fB--times\fP)\&. If NFS is sharing -the directories on the receiving side, it is a good idea to use \fB-O\fP\&. -This option is inferred if you use \fB--backup\fP without \fB--backup-dir\fP\&. +it is preserving modification times (see \fB\-\-times\fP)\&. If NFS is sharing +the directories on the receiving side, it is a good idea to use \fB\-O\fP\&. +This option is inferred if you use \fB\-\-backup\fP without \fB\-\-backup\-dir\fP\&. .IP -.IP "\fB--super\fP" +.IP "\fB\-\-super\fP" This tells the receiving side to attempt super-user activities even if the receiving rsync wasn\&'t run by the super-user\&. These -activities include: preserving users via the \fB--owner\fP option, preserving -all groups (not just the current user\&'s groups) via the \fB--groups\fP -option, and copying devices via the \fB--devices\fP option\&. This is useful +activities include: preserving users via the \fB\-\-owner\fP option, preserving +all groups (not just the current user\&'s groups) via the \fB\-\-groups\fP +option, and copying devices via the \fB\-\-devices\fP option\&. This is useful for systems that allow such activities without being the super-user, and also for ensuring that you will get errors if the receiving side isn\&'t being running as the super-user\&. To turn off super-user activities, the -super-user can use \fB--no-super\fP\&. +super-user can use \fB\-\-no\-super\fP\&. .IP -.IP "\fB-S, --sparse\fP" +.IP "\fB\-S, \-\-sparse\fP" Try to handle sparse files efficiently so they take -up less space on the destination\&. Conflicts with \fB--inplace\fP because it\&'s +up less space on the destination\&. Conflicts with \fB\-\-inplace\fP because it\&'s not possible to overwrite data in a sparse fashion\&. .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 correctly and ends up corrupting the files\&. .IP -.IP "\fB-n, --dry-run\fP" +.IP "\fB\-n, \-\-dry\-run\fP" This tells rsync to not do any file transfers, instead it will just report the actions it would have taken\&. .IP -.IP "\fB-W, --whole-file\fP" +.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\&. The transfer may be faster if this option is used when the bandwidth between the source and @@ -1010,7 +1040,7 @@ "disk" is actually a networked filesystem)\&. This is the default when both the source and destination are specified as local paths\&. .IP -.IP "\fB-x, --one-file-system\fP" +.IP "\fB\-x, \-\-one\-file\-system\fP" This tells rsync to avoid crossing a filesystem boundary when recursing\&. This does not limit the user\&'s ability to specify items to copy from multiple filesystems, just rsync\&'s recursion @@ -1024,28 +1054,29 @@ encounters (using the attributes of the mounted directory because those of the underlying mount-point directory are inaccessible)\&. .IP -If rsync has been told to collapse symlinks (via \fB--copy-links\fP or -\fB--copy-unsafe-links\fP), a symlink to a directory on another device is +If rsync has been told to collapse symlinks (via \fB\-\-copy\-links\fP or +\fB\-\-copy\-unsafe\-links\fP), a symlink to a directory on another device is treated like a mount-point\&. Symlinks to non-directories are unaffected by this option\&. .IP -.IP "\fB--existing, --ignore-non-existing\fP" +.IP "\fB\-\-existing, \-\-ignore\-non\-existing\fP" This tells rsync to skip -updating files that do not exist yet on the destination\&. If this option is -combined with the \fB--ignore-existing\fP option, no files will be updated -(which can be useful if all you want to do is to delete missing files)\&. +creating files (including directories) that do not exist +yet on the destination\&. If this option is +combined with the \fB\-\-ignore\-existing\fP option, no files will be updated +(which can be useful if all you want to do is to delete extraneous files)\&. .IP -.IP "\fB--ignore-existing\fP" +.IP "\fB\-\-ignore\-existing\fP" This tells rsync to skip updating files that -already exist on the destination\&. See also \fB--ignore-non-existing\fP\&. +already exist on the destination (this does \fInot\fP ignore existing +directores, or nothing would get done)\&. See also \fB\-\-existing\fP\&. .IP -.IP "\fB--remove-sent-files\fP" +.IP "\fB\-\-remove\-source\-files\fP" This tells rsync to remove from the sending -side the files and/or symlinks that are newly created or whose content is -updated on the receiving side\&. Directories and devices are not removed, -nor are files/symlinks whose attributes are merely changed\&. +side the files (meaning non-directories) that are a part of the transfer +and have been successfully duplicated on the receiving side\&. .IP -.IP "\fB--delete\fP" +.IP "\fB\-\-delete\fP" This tells rsync to delete extraneous files from the receiving side (ones that aren\&'t on the sending side), but only for the directories that are being synchronized\&. You must have asked rsync to @@ -1053,113 +1084,113 @@ for the directory\&'s contents (e\&.g\&. "dir/*") since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not the files\&' parent directory\&. Files that are excluded from transfer are -also excluded from being deleted unless you use the \fB--delete-excluded\fP +also excluded from being deleted unless you use the \fB\-\-delete\-excluded\fP option or mark the rules as only matching on the sending side (see the include/exclude modifiers in the FILTER RULES section)\&. .IP -Prior to rsync 2\&.6\&.7, this option would have no effect unless \fB--recursive\fP -was in effect\&. Beginning with 2\&.6\&.7, deletions will also occur when \fB--dirs\fP -(\fB-d\fP) is in effect, but only for directories whose contents are being copied\&. +Prior to rsync 2\&.6\&.7, this option would have no effect unless \fB\-\-recursive\fP +was in effect\&. Beginning with 2\&.6\&.7, deletions will also occur when \fB\-\-dirs\fP +(\fB\-d\fP) is in effect, but only for directories whose contents are being copied\&. .IP This option can be dangerous if used incorrectly! It is a very good idea -to run first using the \fB--dry-run\fP option (\fB-n\fP) to see what files would be +to run first using the \fB\-\-dry\-run\fP option (\fB\-n\fP) to see what files would be deleted to make sure important files aren\&'t listed\&. .IP If the sending side detects any I/O errors, then the deletion of any files at the destination will be automatically disabled\&. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the -destination\&. You can override this with the \fB--ignore-errors\fP option\&. +destination\&. You can override this with the \fB\-\-ignore\-errors\fP option\&. .IP -The \fB--delete\fP option may be combined with one of the --delete-WHEN options -without conflict, as well as \fB--delete-excluded\fP\&. However, if none of the ---delete-WHEN options are specified, rsync will currently choose the -\fB--delete-before\fP algorithm\&. A future version may change this to choose the -\fB--delete-during\fP algorithm\&. See also \fB--delete-after\fP\&. +The \fB\-\-delete\fP option may be combined with one of the \-\-delete\-WHEN options +without conflict, as well as \fB\-\-delete\-excluded\fP\&. However, if none of the +\-\-delete\-WHEN options are specified, rsync will currently choose the +\fB\-\-delete\-before\fP algorithm\&. A future version may change this to choose the +\fB\-\-delete\-during\fP algorithm\&. See also \fB\-\-delete\-after\fP\&. .IP -.IP "\fB--delete-before\fP" +.IP "\fB\-\-delete\-before\fP" Request that the file-deletions on the receiving -side be done before the transfer starts\&. This is the default if \fB--delete\fP -or \fB--delete-excluded\fP is specified without one of the --delete-WHEN options\&. -See \fB--delete\fP (which is implied) for more details on file-deletion\&. +side be done before the transfer starts\&. This is the default if \fB\-\-delete\fP +or \fB\-\-delete\-excluded\fP is specified without one of the \-\-delete\-WHEN options\&. +See \fB\-\-delete\fP (which is implied) for more details on file-deletion\&. .IP Deleting before the transfer is helpful if the filesystem is tight for space and removing extraneous files would help to make the transfer possible\&. However, it does introduce a delay before the start of the transfer, -and this delay might cause the transfer to timeout (if \fB--timeout\fP was +and this delay might cause the transfer to timeout (if \fB\-\-timeout\fP was specified)\&. .IP -.IP "\fB--delete-during, --del\fP" +.IP "\fB\-\-delete\-during, \-\-del\fP" Request that the file-deletions on the receiving side be done incrementally as the transfer happens\&. This is a faster method than choosing the before- or after-transfer algorithm, but it is only supported beginning with rsync version 2\&.6\&.4\&. -See \fB--delete\fP (which is implied) for more details on file-deletion\&. +See \fB\-\-delete\fP (which is implied) for more details on file-deletion\&. .IP -.IP "\fB--delete-after\fP" +.IP "\fB\-\-delete\-after\fP" Request that the file-deletions on the receiving side be done after the transfer has completed\&. This is useful if you are sending new per-directory merge files as a part of the transfer and you want their exclusions to take effect for the delete phase of the current transfer\&. -See \fB--delete\fP (which is implied) for more details on file-deletion\&. +See \fB\-\-delete\fP (which is implied) for more details on file-deletion\&. .IP -.IP "\fB--delete-excluded\fP" +.IP "\fB\-\-delete\-excluded\fP" In addition to deleting the files on the receiving side that are not on the sending side, this tells rsync to also -delete any files on the receiving side that are excluded (see \fB--exclude\fP)\&. +delete any files on the receiving side that are excluded (see \fB\-\-exclude\fP)\&. See the FILTER RULES section for a way to make individual exclusions behave this way on the receiver, and for a way to protect files from -\fB--delete-excluded\fP\&. -See \fB--delete\fP (which is implied) for more details on file-deletion\&. +\fB\-\-delete\-excluded\fP\&. +See \fB\-\-delete\fP (which is implied) for more details on file-deletion\&. .IP -.IP "\fB--ignore-errors\fP" -Tells \fB--delete\fP to go ahead and delete files +.IP "\fB\-\-ignore\-errors\fP" +Tells \fB\-\-delete\fP to go ahead and delete files even when there are I/O errors\&. .IP -.IP "\fB--force\fP" +.IP "\fB\-\-force\fP" This option tells rsync to delete a non-empty directory when it is to be replaced by a non-directory\&. This is only relevant if -deletions are not active (see \fB--delete\fP for details)\&. +deletions are not active (see \fB\-\-delete\fP for details)\&. .IP -Note for older rsync versions: \fB--force\fP used to still be required when -using \fB--delete-after\fP, and it used to be non-functional unless the -\fB--recursive\fP option was also enabled\&. +Note for older rsync versions: \fB\-\-force\fP used to still be required when +using \fB\-\-delete\-after\fP, and it used to be non-functional unless the +\fB\-\-recursive\fP option was also enabled\&. .IP -.IP "\fB--max-delete=NUM\fP" +.IP "\fB\-\-max\-delete=NUM\fP" This tells rsync not to delete more than NUM files or directories (NUM must be non-zero)\&. This is useful when mirroring very large trees to prevent disasters\&. .IP -.IP "\fB--max-size=SIZE\fP" +.IP "\fB\-\-max\-size=SIZE\fP" This tells rsync to avoid transferring any file that is larger than the specified SIZE\&. The SIZE value can be suffixed with a string to indicate a size multiplier, and -may be a fractional value (e\&.g\&. "\fB--max-size=1\&.5m\fP")\&. +may be a fractional value (e\&.g\&. "\fB\-\-max\-size=1\&.5m\fP")\&. .IP The suffixes are as follows: "K" (or "KiB") is a kibibyte (1024), "M" (or "MiB") is a mebibyte (1024*1024), and "G" (or "GiB") is a gibibyte (1024*1024*1024)\&. If you want the multiplier to be 1000 instead of 1024, use "KB", "MB", or "GB"\&. (Note: lower-case is also accepted for all values\&.) -Finally, if the suffix ends in either "+1" or "-1", the value will +Finally, if the suffix ends in either "+1" or "\-1", the value will be offset by one byte in the indicated direction\&. .IP -Examples: --max-size=1\&.5mb-1 is 1499999 bytes, and --max-size=2g+1 is +Examples: \-\-max\-size=1\&.5mb\-1 is 1499999 bytes, and \-\-max\-size=2g+1 is 2147483649 bytes\&. .IP -.IP "\fB--min-size=SIZE\fP" +.IP "\fB\-\-min\-size=SIZE\fP" This tells rsync to avoid transferring any file that is smaller than the specified SIZE, which can help in not transferring small, junk files\&. -See the \fB--max-size\fP option for a description of SIZE\&. +See the \fB\-\-max\-size\fP option for a description of SIZE\&. .IP -.IP "\fB-B, --block-size=BLOCKSIZE\fP" +.IP "\fB\-B, \-\-block\-size=BLOCKSIZE\fP" This forces the block size used in the rsync algorithm to a fixed value\&. It is normally selected based on the size of each file being updated\&. See the technical report for details\&. .IP -.IP "\fB-e, --rsh=COMMAND\fP" +.IP "\fB\-e, \-\-rsh=COMMAND\fP" This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync\&. Typically, rsync is configured to use ssh by @@ -1182,37 +1213,39 @@ shell is parsing and which quotes rsync is parsing)\&. Some examples: .IP .RS -\f(CW -e \&'ssh -p 2234\&'\fP +\f(CW \-e \&'ssh \-p 2234\&'\fP .br -\f(CW -e \&'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"\&'\fP +\f(CW \-e \&'ssh \-o "ProxyCommand nohup ssh firewall nc \-w1 %h %p"\&'\fP .br -.RE +.RE + .IP (Note that ssh users can alternately customize site-specific connect options in their \&.ssh/config file\&.) .IP You can also choose the remote shell program using the RSYNC_RSH -environment variable, which accepts the same range of values as \fB-e\fP\&. +environment variable, which accepts the same range of values as \fB\-e\fP\&. .IP -See also the \fB--blocking-io\fP option which is affected by this option\&. +See also the \fB\-\-blocking\-io\fP option which is affected by this option\&. .IP -.IP "\fB--rsync-path=PROGRAM\fP" +.IP "\fB\-\-rsync\-path=PROGRAM\fP" Use this to specify what program is to be run on the remote machine to start-up rsync\&. Often used when rsync is not in -the default remote-shell\&'s path (e\&.g\&. --rsync-path=/usr/local/bin/rsync)\&. +the default remote-shell\&'s path (e\&.g\&. \-\-rsync\-path=/usr/local/bin/rsync)\&. Note that PROGRAM is run with the help of a shell, so it can be any program, script, or command sequence you\&'d care to run, so long as it does not corrupt the standard-in & standard-out that rsync is using to communicate\&. .IP One tricky example is to set a different default directory on the remote -machine for use with the \fB--relative\fP option\&. For instance: +machine for use with the \fB\-\-relative\fP option\&. For instance: .IP .RS -\f(CW rsync -avR --rsync-path="cd /a/b && rsync" hst:c/d /e/\fP -.RE +\f(CW rsync \-avR \-\-rsync\-path="cd /a/b && rsync" hst:c/d /e/\fP +.RE + .IP -.IP "\fB-C, --cvs-exclude\fP" +.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 systems\&. It uses the same algorithm that CVS uses to determine if @@ -1224,9 +1257,10 @@ .RS \f(CWRCS SCCS CVS CVS\&.adm RCSLOG cvslog\&.* tags TAGS \&.make\&.state \&.nse_depinfo *~ #* \&.#* ,* _$* *$ *\&.old *\&.bak *\&.BAK *\&.orig *\&.rej -\&.del-* *\&.a *\&.olb *\&.o *\&.obj *\&.so *\&.exe *\&.Z *\&.elc *\&.ln core \&.svn/\fP -.RE -.RE +\&.del\-* *\&.a *\&.olb *\&.o *\&.obj *\&.so *\&.exe *\&.Z *\&.elc *\&.ln core \&.svn/\fP +.RE +.RE + .IP then files listed in a $HOME/\&.cvsignore are added to the list and any files listed in the CVSIGNORE environment variable (all cvsignore names @@ -1237,100 +1271,103 @@ rsync\&'s filter/exclude files, these patterns are split on whitespace\&. See the \fBcvs\fP(1) manual for more information\&. .IP -If you\&'re combining \fB-C\fP with your own \fB--filter\fP rules, you should +If you\&'re combining \fB\-C\fP with your own \fB\-\-filter\fP rules, you should note that these CVS excludes are appended at the end of your own rules, -regardless of where the \fB-C\fP was placed on the command-line\&. This makes them +regardless of where the \fB\-C\fP was placed on the command-line\&. This makes them a lower priority than any rules you specified explicitly\&. If you want to control where these CVS excludes get inserted into your filter rules, you -should omit the \fB-C\fP as a command-line option and use a combination of -\fB--filter=:C\fP and \fB--filter=-C\fP (either on your command-line or by -putting the ":C" and "-C" rules into a filter file with your other rules)\&. +should omit the \fB\-C\fP as a command-line option and use a combination of +\fB\-\-filter=:C\fP and \fB\-\-filter=\-C\fP (either on your command-line or by +putting the ":C" and "\-C" rules into a filter file with your other rules)\&. The first option turns on the per-directory scanning for the \&.cvsignore file\&. The second option does a one-time import of the CVS excludes mentioned above\&. .IP -.IP "\fB-f, --filter=RULE\fP" +.IP "\fB\-f, \-\-filter=RULE\fP" This option allows you to add rules to selectively exclude certain files from the list of files to be transferred\&. This is most useful in combination with a recursive transfer\&. .IP -You may use as many \fB--filter\fP options on the command line as you like +You may use as many \fB\-\-filter\fP options on the command line as you like to build up the list of files to exclude\&. .IP See the FILTER RULES section for detailed information on this option\&. .IP -.IP "\fB-F\fP" -The \fB-F\fP option is a shorthand for adding two \fB--filter\fP rules to +.IP "\fB\-F\fP" +The \fB\-F\fP option is a shorthand for adding two \fB\-\-filter\fP rules to your command\&. The first time it is used is a shorthand for this rule: .IP .RS -\f(CW --filter=\&'dir-merge /\&.rsync-filter\&'\fP -.RE +\f(CW \-\-filter=\&'dir\-merge /\&.rsync\-filter\&'\fP +.RE + .IP -This tells rsync to look for per-directory \&.rsync-filter files that have +This tells rsync to look for per-directory \&.rsync\-filter files that have been sprinkled through the hierarchy and use their rules to filter the -files in the transfer\&. If \fB-F\fP is repeated, it is a shorthand for this +files in the transfer\&. If \fB\-F\fP is repeated, it is a shorthand for this rule: .IP .RS -\f(CW --filter=\&'exclude \&.rsync-filter\&'\fP -.RE +\f(CW \-\-filter=\&'exclude \&.rsync\-filter\&'\fP +.RE + .IP -This filters out the \&.rsync-filter files themselves from the transfer\&. +This filters out the \&.rsync\-filter files themselves from the transfer\&. .IP See the FILTER RULES section for detailed information on how these options work\&. .IP -.IP "\fB--exclude=PATTERN\fP" +.IP "\fB\-\-exclude=PATTERN\fP" This option is a simplified form of the -\fB--filter\fP option that defaults to an exclude rule and does not allow +\fB\-\-filter\fP option that defaults to an exclude rule and does not allow the full rule-parsing syntax of normal filter rules\&. .IP See the FILTER RULES section for detailed information on this option\&. .IP -.IP "\fB--exclude-from=FILE\fP" -This option is related to the \fB--exclude\fP +.IP "\fB\-\-exclude\-from=FILE\fP" +This option is related to the \fB\-\-exclude\fP option, but it specifies a FILE that contains exclude patterns (one per line)\&. Blank lines in the file and lines starting with \&';\&' or \&'#\&' are ignored\&. -If \fIFILE\fP is \fB-\fP, the list will be read from standard input\&. +If \fIFILE\fP is \fB\-\fP, the list will be read from standard input\&. .IP -.IP "\fB--include=PATTERN\fP" +.IP "\fB\-\-include=PATTERN\fP" This option is a simplified form of the -\fB--filter\fP option that defaults to an include rule and does not allow +\fB\-\-filter\fP option that defaults to an include rule and does not allow the full rule-parsing syntax of normal filter rules\&. .IP See the FILTER RULES section for detailed information on this option\&. .IP -.IP "\fB--include-from=FILE\fP" -This option is related to the \fB--include\fP +.IP "\fB\-\-include\-from=FILE\fP" +This option is related to the \fB\-\-include\fP option, but it specifies a FILE that contains include patterns (one per line)\&. Blank lines in the file and lines starting with \&';\&' or \&'#\&' are ignored\&. -If \fIFILE\fP is \fB-\fP, the list will be read from standard input\&. +If \fIFILE\fP is \fB\-\fP, the list will be read from standard input\&. .IP -.IP "\fB--files-from=FILE\fP" +.IP "\fB\-\-files\-from=FILE\fP" Using this option allows you to specify the -exact list of files to transfer (as read from the specified FILE or \fB-\fP +exact list of files to transfer (as read from the specified FILE or \fB\-\fP for standard input)\&. It also tweaks the default behavior of rsync to make transferring just the specified files and directories easier: .IP .RS .IP o -The \fB--relative\fP (\fB-R\fP) option is implied, which preserves the path +The \fB\-\-relative\fP (\fB\-R\fP) option is implied, which preserves the path information that is specified for each item in the file (use -\fB--no-relative\fP or \fB--no-R\fP if you want to turn that off)\&. +\fB\-\-no\-relative\fP or \fB\-\-no\-R\fP if you want to turn that off)\&. .IP o -The \fB--dirs\fP (\fB-d\fP) option is implied, which will create directories +The \fB\-\-dirs\fP (\fB\-d\fP) option is implied, which will create directories specified in the list on the destination rather than noisily skipping -them (use \fB--no-dirs\fP or \fB--no-d\fP if you want to turn that off)\&. +them (use \fB\-\-no\-dirs\fP or \fB\-\-no\-d\fP if you want to turn that off)\&. .IP o -The \fB--archive\fP (\fB-a\fP) option\&'s behavior does not imply \fB--recursive\fP -(\fB-r\fP), so specify it explicitly, if you want it\&. +The \fB\-\-archive\fP (\fB\-a\fP) option\&'s behavior does not imply \fB\-\-recursive\fP +(\fB\-r\fP), so specify it explicitly, if you want it\&. .IP o These side-effects change the default state of rsync, so the position -of the \fB--files-from\fP option on the command-line has no bearing on how -other options are parsed (e\&.g\&. \fB-a\fP works the same before or after -\fB--files-from\fP, as does \fB--no-R\fP and all other options)\&. -.RE +of the \fB\-\-files\-from\fP option on the command-line has no bearing on how +other options are parsed (e\&.g\&. \fB\-a\fP works the same before or after +\fB\-\-files\-from\fP, as does \fB\-\-no\-R\fP and all other options)\&. +.RE + .IP The file names that are read from the FILE are all relative to the source dir -- any leading slashes are removed and no "\&.\&." references are @@ -1338,44 +1375,46 @@ command: .IP .RS -\f(CW rsync -a --files-from=/tmp/foo /usr remote:/backup\fP -.RE +\f(CW rsync \-a \-\-files\-from=/tmp/foo /usr remote:/backup\fP +.RE + .IP If /tmp/foo contains the string "bin" (or even "/bin"), the /usr/bin directory will be created as /backup/bin on the remote host\&. If it contains "bin/" (note the trailing slash), the immediate contents of the directory would also be sent (without needing to be explicitly mentioned in the file -- this began in version 2\&.6\&.4)\&. In both cases, -if the \fB-r\fP option was enabled, that dir\&'s entire hierarchy would -also be transferred (keep in mind that \fB-r\fP needs to be specified -explicitly with \fB--files-from\fP, since it is not implied by \fB-a\fP)\&. +if the \fB\-r\fP option was enabled, that dir\&'s entire hierarchy would +also be transferred (keep in mind that \fB\-r\fP needs to be specified +explicitly with \fB\-\-files\-from\fP, since it is not implied by \fB\-a\fP)\&. Also note -that the effect of the (enabled by default) \fB--relative\fP option is to +that the effect of the (enabled by default) \fB\-\-relative\fP option is to duplicate only the path info that is read from the file -- it does not force the duplication of the source-spec path (/usr in this case)\&. .IP -In addition, the \fB--files-from\fP file can be read from the remote host +In addition, the \fB\-\-files\-from\fP file can be read from the remote host instead of the local host if you specify a "host:" in front of the file (the host must match one end of the transfer)\&. As a short-cut, you can specify just a prefix of ":" to mean "use the remote end of the transfer"\&. For example: .IP .RS -\f(CW rsync -a --files-from=:/path/file-list src:/ /tmp/copy\fP -.RE +\f(CW rsync \-a \-\-files\-from=:/path/file\-list src:/ /tmp/copy\fP +.RE + .IP This would copy all the files specified in the /path/file-list file that was located on the remote "src" host\&. .IP -.IP "\fB-0, --from0\fP" +.IP "\fB\-0, \-\-from0\fP" This tells rsync that the rules/filenames it reads from a file are terminated by a null (\&'\e0\&') character, not a NL, CR, or CR+LF\&. -This affects \fB--exclude-from\fP, \fB--include-from\fP, \fB--files-from\fP, and any -merged files specified in a \fB--filter\fP rule\&. -It does not affect \fB--cvs-exclude\fP (since all names read from a \&.cvsignore +This affects \fB\-\-exclude\-from\fP, \fB\-\-include\-from\fP, \fB\-\-files\-from\fP, and any +merged files specified in a \fB\-\-filter\fP rule\&. +It does not affect \fB\-\-cvs\-exclude\fP (since all names read from a \&.cvsignore file are split on whitespace)\&. .IP -.IP "\fB-T, --temp-dir=DIR\fP" +.IP "\fB\-T, \-\-temp\-dir=DIR\fP" This option instructs rsync to use DIR as a scratch directory when creating temporary copies of the files transferred on the receiving side\&. The default behavior is to create each temporary @@ -1396,30 +1435,30 @@ new version on the disk at the same time\&. .IP If you are using this option for reasons other than a shortage of disk -space, you may wish to combine it with the \fB--delay-updates\fP option, +space, you may wish to combine it with the \fB\-\-delay\-updates\fP option, which will ensure that all copied files get put into subdirectories in the destination hierarchy, awaiting the end of the transfer\&. If you don\&'t have enough room to duplicate all the arriving files on the destination partition, another way to tell rsync that you aren\&'t overly concerned -about disk space is to use the \fB--partial-dir\fP option with a relative +about disk space is to use the \fB\-\-partial\-dir\fP option with a relative path; because this tells rsync that it is OK to stash off a copy of a single file in a subdir in the destination hierarchy, rsync will use the partial-dir as a staging area to bring over the copied file, and then -rename it into place from there\&. (Specifying a \fB--partial-dir\fP with +rename it into place from there\&. (Specifying a \fB\-\-partial\-dir\fP with an absolute path does not have this side-effect\&.) .IP -.IP "\fB-y, --fuzzy\fP" +.IP "\fB\-y, \-\-fuzzy\fP" This option tells rsync that it should look for a basis file for any destination file that is missing\&. The current algorithm looks in the same directory as the destination file for either a file that has an identical size and modified-time, or a similarly-named file\&. If found, rsync uses the fuzzy basis file to try to speed up the transfer\&. .IP -Note that the use of the \fB--delete\fP option might get rid of any potential -fuzzy-match files, so either use \fB--delete-after\fP or specify some +Note that the use of the \fB\-\-delete\fP option might get rid of any potential +fuzzy-match files, so either use \fB\-\-delete\-after\fP or specify some filename exclusions if you need to prevent this\&. .IP -.IP "\fB--compare-dest=DIR\fP" +.IP "\fB\-\-compare\-dest=DIR\fP" This option instructs rsync to use \fIDIR\fP on the destination machine as an additional hierarchy to compare destination files against doing transfers (if the files are missing in the destination @@ -1428,7 +1467,7 @@ directory\&. This is useful for creating a sparse backup of just files that have changed from an earlier backup\&. .IP -Beginning in version 2\&.6\&.4, multiple \fB--compare-dest\fP directories may be +Beginning in version 2\&.6\&.4, multiple \fB\-\-compare\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an exact match\&. If a match is found that differs only in attributes, a local copy is made @@ -1437,36 +1476,37 @@ selected to try to speed up the transfer\&. .IP If \fIDIR\fP is a relative path, it is relative to the destination directory\&. -See also \fB--copy-dest\fP and \fB--link-dest\fP\&. +See also \fB\-\-copy\-dest\fP and \fB\-\-link\-dest\fP\&. .IP -.IP "\fB--copy-dest=DIR\fP" -This option behaves like \fB--compare-dest\fP, but +.IP "\fB\-\-copy\-dest=DIR\fP" +This option behaves like \fB\-\-compare\-dest\fP, but rsync will also copy unchanged files found in \fIDIR\fP to the destination directory using a local copy\&. This is useful for doing transfers to a new destination while leaving existing files intact, and then doing a flash-cutover when all files have been successfully transferred\&. .IP -Multiple \fB--copy-dest\fP directories may be provided, which will cause +Multiple \fB\-\-copy\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an unchanged file\&. If a match is not found, a basis file from one of the \fIDIR\fPs will be selected to try to speed up the transfer\&. .IP If \fIDIR\fP is a relative path, it is relative to the destination directory\&. -See also \fB--compare-dest\fP and \fB--link-dest\fP\&. +See also \fB\-\-compare\-dest\fP and \fB\-\-link\-dest\fP\&. .IP -.IP "\fB--link-dest=DIR\fP" -This option behaves like \fB--copy-dest\fP, but +.IP "\fB\-\-link\-dest=DIR\fP" +This option behaves like \fB\-\-copy\-dest\fP, but unchanged files are hard linked from \fIDIR\fP to the destination directory\&. The files must be identical in all preserved attributes (e\&.g\&. permissions, possibly ownership) in order for the files to be linked together\&. An example: .IP .RS -\f(CW rsync -av --link-dest=$PWD/prior_dir host:src_dir/ new_dir/\fP -.RE +\f(CW rsync \-av \-\-link\-dest=$PWD/prior_dir host:src_dir/ new_dir/\fP +.RE + .IP -Beginning in version 2\&.6\&.4, multiple \fB--link-dest\fP directories may be +Beginning in version 2\&.6\&.4, multiple \fB\-\-link\-dest\fP directories may be provided, which will cause rsync to search the list in the order specified for an exact match\&. If a match is found that differs only in attributes, a local copy is made @@ -1474,15 +1514,20 @@ If a match is not found, a basis file from one of the \fIDIR\fPs will be selected to try to speed up the transfer\&. .IP +Note that if you combine this option with \fB\-\-ignore\-times\fP, rsync will not +link any files together because it only links identical files together as a +substitute for transferring the file, never as an additional check after the +file is updated\&. +.IP If \fIDIR\fP is a relative path, it is relative to the destination directory\&. -See also \fB--compare-dest\fP and \fB--copy-dest\fP\&. +See also \fB\-\-compare\-dest\fP and \fB\-\-copy\-dest\fP\&. .IP Note that rsync versions prior to 2\&.6\&.1 had a bug that could prevent -\fB--link-dest\fP from working properly for a non-super-user when \fB-o\fP was -specified (or implied by \fB-a\fP)\&. You can work-around this bug by avoiding -the \fB-o\fP option when sending to an old rsync\&. +\fB\-\-link\-dest\fP from working properly for a non-super-user when \fB\-o\fP was +specified (or implied by \fB\-a\fP)\&. You can work-around this bug by avoiding +the \fB\-o\fP option when sending to an old rsync\&. .IP -.IP "\fB-z, --compress\fP" +.IP "\fB\-z, \-\-compress\fP" With this option, rsync compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted -- something that is useful over a slow connection\&. @@ -1492,19 +1537,19 @@ because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection\&. .IP -.IP "\fB--compress-level=NUM\fP" +.IP "\fB\-\-compress\-level=NUM\fP" Explicitly set the compression level to use -(see \fB--compress\fP) instead of letting it default\&. If NUM is non-zero, -the \fB--compress\fP option is implied\&. +(see \fB\-\-compress\fP) instead of letting it default\&. If NUM is non-zero, +the \fB\-\-compress\fP option is implied\&. .IP -.IP "\fB--numeric-ids\fP" +.IP "\fB\-\-numeric\-ids\fP" With this option rsync will transfer numeric group and user IDs rather than using user and group names and mapping them at both ends\&. .IP By default rsync will use the username and groupname to determine what ownership to give files\&. The special uid 0 and the special group -0 are never mapped via user/group names even if the \fB--numeric-ids\fP +0 are never mapped via user/group names even if the \fB\-\-numeric\-ids\fP option is not specified\&. .IP If a user or group has no name on the source system or it has no match @@ -1514,47 +1559,49 @@ the chroot setting affects rsync\&'s ability to look up the names of the users and groups and what you can do about it\&. .IP -.IP "\fB--timeout=TIMEOUT\fP" +.IP "\fB\-\-timeout=TIMEOUT\fP" This option allows you to set a maximum I/O timeout in seconds\&. If no data is transferred for the specified time then rsync will exit\&. The default is 0, which means no timeout\&. .IP -.IP "\fB--address\fP" +.IP "\fB\-\-address\fP" By default rsync will bind to the wildcard address when -connecting to an rsync daemon\&. The \fB--address\fP option allows you to +connecting to an rsync daemon\&. The \fB\-\-address\fP option allows you to specify a specific IP address (or hostname) to bind to\&. See also this -option in the \fB--daemon\fP mode section\&. +option in the \fB\-\-daemon\fP mode section\&. .IP -.IP "\fB--port=PORT\fP" +.IP "\fB\-\-port=PORT\fP" This specifies an alternate TCP port number to use rather than the default of 873\&. This is only needed if you are using the double-colon (::) syntax to connect with an rsync daemon (since the URL syntax has a way to specify the port as a part of the URL)\&. See also this -option in the \fB--daemon\fP mode section\&. +option in the \fB\-\-daemon\fP mode section\&. .IP -.IP "\fB--sockopts\fP" +.IP "\fB\-\-sockopts\fP" This option can provide endless fun for people who like to tune their systems to the utmost degree\&. You can set all sorts of socket options which may make transfers faster (or -slower!)\&. Read the man page for the \f(CWsetsockopt()\fP system call for +slower!)\&. Read the man page for the +\f(CWsetsockopt()\fP +system call for details on some of the options you may be able to set\&. By default no special socket options are set\&. This only affects direct socket connections to a remote rsync daemon\&. This option also exists in the -\fB--daemon\fP mode section\&. +\fB\-\-daemon\fP mode section\&. .IP -.IP "\fB--blocking-io\fP" +.IP "\fB\-\-blocking\-io\fP" This tells rsync to use blocking I/O when launching a remote shell transport\&. If the remote shell is either rsh or remsh, rsync defaults to using blocking I/O, otherwise it defaults to using non-blocking I/O\&. (Note that ssh prefers non-blocking I/O\&.) .IP -.IP "\fB-i, --itemize-changes\fP" +.IP "\fB\-i, \-\-itemize\-changes\fP" Requests a simple itemized list of the changes that are being made to each file, including attribute changes\&. -This is exactly the same as specifying \fB--log-format=\&'%i %n%L\&'\fP\&. +This is exactly the same as specifying \fB\-\-out\-format=\&'%i %n%L\&'\fP\&. If you repeat the option, unchanged files will also be output, but only -if the receiving rsync is at least version 2\&.6\&.7 (you can use \fB-vv\fP +if the receiving rsync is at least version 2\&.6\&.7 (you can use \fB\-vv\fP with older versions of rsync, but that also turns on the output of other verbose messages)\&. .IP @@ -1578,11 +1625,12 @@ (such as the creation of a directory or the changing of a symlink, etc\&.)\&. .IP o A \fBh\fP means that the item is a hard link to another item (requires -\fB--hard-links\fP)\&. +\fB\-\-hard\-links\fP)\&. .IP o A \fB\&.\fP means that the item is not being updated (though it might have attributes that are being modified)\&. -.RE +.RE + .IP The file-types that replace the \fBX\fP are: \fBf\fP for a file, a \fBd\fP for a directory, an \fBL\fP for a symlink, a \fBD\fP for a device, and a \fBS\fP for a @@ -1600,62 +1648,89 @@ .RS .IP o A \fBc\fP means the checksum of the file is different and will be -updated by the file transfer (requires \fB--checksum\fP)\&. +updated by the file transfer (requires \fB\-\-checksum\fP)\&. .IP o A \fBs\fP means the size of the file is different and will be updated by the file transfer\&. .IP o A \fBt\fP means the modification time is different and is being updated -to the sender\&'s value (requires \fB--times\fP)\&. An alternate value of \fBT\fP +to the sender\&'s value (requires \fB\-\-times\fP)\&. An alternate value of \fBT\fP means that the time will be set to the transfer time, which happens anytime a symlink is transferred, or when a file or device is transferred -without \fB--times\fP\&. +without \fB\-\-times\fP\&. .IP o A \fBp\fP means the permissions are different and are being updated to -the sender\&'s value (requires \fB--perms\fP)\&. +the sender\&'s value (requires \fB\-\-perms\fP)\&. .IP o An \fBo\fP means the owner is different and is being updated to the -sender\&'s value (requires \fB--owner\fP and super-user privileges)\&. +sender\&'s value (requires \fB\-\-owner\fP and super-user privileges)\&. .IP o A \fBg\fP means the group is different and is being updated to the -sender\&'s value (requires \fB--group\fP and the authority to set the group)\&. +sender\&'s value (requires \fB\-\-group\fP and the authority to set the group)\&. .IP o The \fBz\fP slot is reserved for future use\&. -.RE +.RE + .IP One other output is possible: when deleting files, the "%i" will output the string "*deleting" for each item that is being removed (assuming that you are talking to a recent enough rsync that it logs deletions instead of outputting them as a verbose message)\&. .IP -.IP "\fB--log-format=FORMAT\fP" +.IP "\fB\-\-out\-format=FORMAT\fP" This allows you to specify exactly what the -rsync client outputs to the user on a per-file basis\&. The format is a text +rsync client outputs to the user on a per-update basis\&. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character\&. For a list of the possible escape characters, see -the "log format" setting in the rsyncd\&.conf manpage\&. (Note that this -option does not affect what a daemon logs to its logfile\&.) +the "log format" setting in the rsyncd\&.conf manpage\&. .IP Specifying this option will mention each file, dir, etc\&. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a -touched directory) unless the itemize-changes escape (%i) is included in -the string, in which case the logging of names increases to mention any +touched directory)\&. In addition, if the itemize-changes escape (%i) is +included in the string, the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least -2\&.6\&.4)\&. See the \fB--itemize-changes\fP option for a description of the +2\&.6\&.4)\&. See the \fB\-\-itemize\-changes\fP option for a description of the output of "%i"\&. .IP -The \fB--verbose\fP option implies a format of "%n%L", but you can use -\fB--log-format\fP without \fB--verbose\fP if you like, or you can override +The \fB\-\-verbose\fP option implies a format of "%n%L", but you can use +\fB\-\-out\-format\fP without \fB\-\-verbose\fP if you like, or you can override the format of its per-file output using this option\&. .IP -Rsync will output the log-format string prior to a file\&'s transfer unless +Rsync will output the out-format string prior to a file\&'s transfer unless one of the transfer-statistic escapes is requested, in which case the logging is done at the end of the file\&'s transfer\&. When this late logging -is in effect and \fB--progress\fP is also specified, rsync will also output +is in effect and \fB\-\-progress\fP is also specified, rsync will also output the name of the file being transferred prior to its progress information -(followed, of course, by the log-format output)\&. +(followed, of course, by the out-format output)\&. +.IP +.IP "\fB\-\-log\-file=FILE\fP" +This option causes rsync to log what it is doing +to a file\&. This is similar to the logging that a daemon does, but can be +requested for the client side and/or the server side of a non-daemon +transfer\&. If specified as a client option, transfer logging will be +enabled with a default format of "%i %n%L"\&. See the \fB\-\-log\-file\-format\fP +option if you wish to override this\&. +.IP +Here\&'s a example command that requests the remote side to log what is +happening: +.IP +.nf + rsync \-av \-\-rsync\-path="rsync \-\-log\-file=/tmp/rlog" src/ dest/ +.fi + +.IP +This is very useful if you need to debug why a connection is closing +unexpectedly\&. .IP -.IP "\fB--stats\fP" +.IP "\fB\-\-log\-file\-format=FORMAT\fP" +This allows you to specify exactly what +per-update logging is put into the file specified by the \fB\-\-log\-file\fP option +(which must also be specified for this option to have any effect)\&. If you +specify an empty string, updated files will not be mentioned in the log file\&. +For a list of the possible escape characters, see the "log format" setting +in the rsyncd\&.conf manpage\&. +.IP +.IP "\fB\-\-stats\fP" This tells rsync to print a verbose set of statistics on the file transfer, allowing you to tell how effective the rsync algorithm is for your data\&. @@ -1702,9 +1777,10 @@ rsync received by the client side from the server side\&. "Non-message" bytes means that we don\&'t count the bytes for a verbose message that the server sent to us, which makes the stats more consistent\&. -.RE +.RE + .IP -.IP "\fB-8, --8-bit-output\fP" +.IP "\fB\-8, \-\-8\-bit\-output\fP" This tells rsync to leave all high-bit characters unescaped in the output instead of trying to test them to see if they\&'re valid in the current locale and escaping the invalid ones\&. All control @@ -1714,38 +1790,38 @@ The escape idiom that started in 2\&.6\&.7 is to output a literal backslash (\e) and a hash (#), followed by exactly 3 octal digits\&. For example, a newline would output as "\e#012"\&. A literal backslash that is in a filename is not -escaped unless it is followed by a hash and 3 digits (0-9)\&. +escaped unless it is followed by a hash and 3 digits (0\-9)\&. .IP -.IP "\fB-h, --human-readable\fP" +.IP "\fB\-h, \-\-human\-readable\fP" Output numbers in a more human-readable format\&. This makes big numbers output using larger units, with a K, M, or G suffix\&. If this option was specified once, these units are K (1000), M (1000*1000), and G (1000*1000*1000); if the option is repeated, the units are powers of 1024 instead of 1000\&. .IP -.IP "\fB--partial\fP" +.IP "\fB\-\-partial\fP" By default, rsync will delete any partially transferred file if the transfer is interrupted\&. In some circumstances it is more desirable to keep partially transferred files\&. Using the -\fB--partial\fP option tells rsync to keep the partial file which should +\fB\-\-partial\fP option tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster\&. .IP -.IP "\fB--partial-dir=DIR\fP" +.IP "\fB\-\-partial\-dir=DIR\fP" A better way to keep partial files than the -\fB--partial\fP option is to specify a \fIDIR\fP that will be used to hold the +\fB\-\-partial\fP option is to specify a \fIDIR\fP that will be used to hold the partial data (instead of writing it out to the destination file)\&. On the next transfer, rsync will use a file found in this dir as data to speed up the resumption of the transfer and then delete it after it has served its purpose\&. .IP -Note that if \fB--whole-file\fP is specified (or implied), any partial-dir +Note that if \fB\-\-whole\-file\fP is specified (or implied), any partial-dir file that is found for a file that is being updated will simply be removed (since rsync is sending files without using the incremental rsync algorithm)\&. .IP Rsync will create the \fIDIR\fP if it is missing (just the last dir -- not the whole path)\&. This makes it easy to use a relative path (such as -"\fB--partial-dir=\&.rsync-partial\fP") to have rsync create the +"\fB\-\-partial\-dir=\&.rsync\-partial\fP") to have rsync create the partial-directory in the destination file\&'s directory when needed, and then remove it again when the partial file is deleted\&. .IP @@ -1753,8 +1829,8 @@ rule at the end of all your existing excludes\&. This will prevent the sending of any partial-dir files that may exist on the sending side, and will also prevent the untimely deletion of partial-dir items on the -receiving side\&. An example: the above \fB--partial-dir\fP option would add -the equivalent of "\fB--exclude=\&.rsync-partial/\fP" at the end of any other +receiving side\&. An example: the above \fB\-\-partial\-dir\fP option would add +the equivalent of "\fB\-\-exclude=\&.rsync\-partial/\fP" at the end of any other filter rules\&. .IP If you are supplying your own exclude rules, you may need to add your own @@ -1762,48 +1838,48 @@ rule may be ineffective at the end of your other rules, or (2) you may wish to override rsync\&'s exclude choice\&. For instance, if you want to make rsync clean-up any left-over partial-dirs that may be lying around, you -should specify \fB--delete-after\fP and add a "risk" filter rule, e\&.g\&. -\fB-f \&'R \&.rsync-partial/\&'\fP\&. (Avoid using \fB--delete-before\fP or -\fB--delete-during\fP unless you don\&'t need rsync to use any of the +should specify \fB\-\-delete\-after\fP and add a "risk" filter rule, e\&.g\&. +\fB\-f \&'R \&.rsync\-partial/\&'\fP\&. (Avoid using \fB\-\-delete\-before\fP or +\fB\-\-delete\-during\fP unless you don\&'t need rsync to use any of the left-over partial-dir data during the current run\&.) .IP -IMPORTANT: the \fB--partial-dir\fP should not be writable by other users or it +IMPORTANT: the \fB\-\-partial\-dir\fP should not be writable by other users or it is a security risk\&. E\&.g\&. AVOID "/tmp"\&. .IP You can also set the partial-dir value the RSYNC_PARTIAL_DIR environment -variable\&. Setting this in the environment does not force \fB--partial\fP to be -enabled, but rather it affects where partial files go when \fB--partial\fP is -specified\&. For instance, instead of using \fB--partial-dir=\&.rsync-tmp\fP -along with \fB--progress\fP, you could set RSYNC_PARTIAL_DIR=\&.rsync-tmp in your -environment and then just use the \fB-P\fP option to turn on the use of the -\&.rsync-tmp dir for partial transfers\&. The only times that the \fB--partial\fP -option does not look for this environment value are (1) when \fB--inplace\fP was -specified (since \fB--inplace\fP conflicts with \fB--partial-dir\fP), and (2) when -\fB--delay-updates\fP was specified (see below)\&. +variable\&. Setting this in the environment does not force \fB\-\-partial\fP to be +enabled, but rather it affects where partial files go when \fB\-\-partial\fP is +specified\&. For instance, instead of using \fB\-\-partial\-dir=\&.rsync\-tmp\fP +along with \fB\-\-progress\fP, you could set RSYNC_PARTIAL_DIR=\&.rsync\-tmp in your +environment and then just use the \fB\-P\fP option to turn on the use of the +\&.rsync\-tmp dir for partial transfers\&. The only times that the \fB\-\-partial\fP +option does not look for this environment value are (1) when \fB\-\-inplace\fP was +specified (since \fB\-\-inplace\fP conflicts with \fB\-\-partial\-dir\fP), and (2) when +\fB\-\-delay\-updates\fP was specified (see below)\&. .IP For the purposes of the daemon-config\&'s "refuse options" setting, -\fB--partial-dir\fP does \fInot\fP imply \fB--partial\fP\&. This is so that a -refusal of the \fB--partial\fP option can be used to disallow the overwriting +\fB\-\-partial\-dir\fP does \fInot\fP imply \fB\-\-partial\fP\&. This is so that a +refusal of the \fB\-\-partial\fP option can be used to disallow the overwriting of destination files with a partial transfer, while still allowing the -safer idiom provided by \fB--partial-dir\fP\&. +safer idiom provided by \fB\-\-partial\-dir\fP\&. .IP -.IP "\fB--delay-updates\fP" +.IP "\fB\-\-delay\-updates\fP" This option puts the temporary file from each updated file into a holding directory until the end of the transfer, at which time all the files are renamed into place in rapid succession\&. This attempts to make the updating of the files a little more atomic\&. By default the files are placed into a directory named "\&.~tmp~" in each file\&'s destination directory, but if you\&'ve specified the -\fB--partial-dir\fP option, that directory will be used instead\&. See the -comments in the \fB--partial-dir\fP section for a discussion of how this +\fB\-\-partial\-dir\fP option, that directory will be used instead\&. See the +comments in the \fB\-\-partial\-dir\fP section for a discussion of how this "\&.~tmp~" dir will be excluded from the transfer, and what you can do if you wnat rsync to cleanup old "\&.~tmp~" dirs that might be lying around\&. -Conflicts with \fB--inplace\fP and \fB--append\fP\&. +Conflicts with \fB\-\-inplace\fP and \fB\-\-append\fP\&. .IP This option uses more memory on the receiving side (one bit per file transferred) and also requires enough free disk space on the receiving side to hold an additional copy of all the updated files\&. Note also that -you should not use an absolute path to \fB--partial-dir\fP unless (1) +you should not use an absolute path to \fB\-\-partial\-dir\fP unless (1) there is no chance of any of the files in the transfer having the same name (since all the updated files will be put into a single directory if the path is @@ -1812,10 +1888,10 @@ delayed updates will fail if they can\&'t be renamed into place)\&. .IP See also the "atomic-rsync" perl script in the "support" subdir for an -update algorithm that is even more atomic (it uses \fB--link-dest\fP and a +update algorithm that is even more atomic (it uses \fB\-\-link\-dest\fP and a parallel hierarchy of files)\&. .IP -.IP "\fB-m, --prune-empty-dirs\fP" +.IP "\fB\-m, \-\-prune\-empty\-dirs\fP" This option tells the receiving rsync to get rid of empty directories from the file-list, including nested directories that have no non-directory children\&. This is useful for avoiding the @@ -1834,8 +1910,9 @@ that the directory "emptydir" was kept in the file-list: .IP .RS ---filter \&'protect emptydir/\&' -.RE +\-\-filter \&'protect emptydir/\&' +.RE + .IP Here\&'s an example that copies all \&.pdf files in a hierarchy, only creating the necessary destination directories to hold the \&.pdf files, and ensures @@ -1843,56 +1920,61 @@ (note the hide filter of non-directories being used instead of an exclude): .IP .RS -rsync -avm --del --include=\&'*\&.pdf\&' -f \&'hide,! */\&' src/ dest -.RE +rsync \-avm \-\-del \-\-include=\&'*\&.pdf\&' \-f \&'hide,! */\&' src/ dest +.RE + .IP If you didn\&'t want to remove superfluous destination files, the more -time-honored options of "--include=\&'*/\&' --exclude=\&'*\&'" would work fine +time-honored options of "\-\-include=\&'*/\&' \-\-exclude=\&'*\&'" would work fine in place of the hide-filter (if that is more natural to you)\&. .IP -.IP "\fB--progress\fP" +.IP "\fB\-\-progress\fP" This option tells rsync to print information showing the progress of the transfer\&. This gives a bored user something to watch\&. -Implies \fB--verbose\fP if it wasn\&'t already specified\&. +Implies \fB\-\-verbose\fP if it wasn\&'t already specified\&. .IP -When the file is transferring, the data looks like this: +While rsync is transferring a regular file, it updates a progress line that +looks like this: .IP - .nf - 782448 63% 110\&.64kB/s 0:00:04 .fi - .IP -This tells you the current file size, the percentage of the transfer that -is complete, the current calculated file-completion rate (including both -data over the wire and data being matched locally), and the estimated time -remaining in this transfer\&. +In this example, the receiver has reconstructed 782448 bytes or 63% of the +sender\&'s file, which is being reconstructed at a rate of 110\&.64 kilobytes +per second, and the transfer will finish in 4 seconds if the current rate +is maintained until the end\&. +.IP +These statistics can be misleading if the incremental transfer algorithm is +in use\&. For example, if the sender\&'s file consists of the basis file +followed by additional data, the reported rate will probably drop +dramatically when the receiver gets to the literal data, and the transfer +will probably take much longer to finish than the receiver estimated as it +was finishing the matched part of the file\&. .IP -After a file is complete, the data looks like this: +When the file transfer finishes, rsync replaces the progress line with a +summary line that looks like this: .IP - .nf - - 1238099 100% 146\&.38kB/s 0:00:08 (5, 57\&.1% of 396) + 1238099 100% 146\&.38kB/s 0:00:08 (xfer#5, to-check=169/396) .fi - .IP -This tells you the final file size, that it\&'s 100% complete, the final -transfer rate for the file, the amount of elapsed time it took to transfer -the file, and the addition of a total-transfer summary in parentheses\&. -These additional numbers tell you how many files have been updated, and -what percent of the total number of files has been scanned\&. +In this example, the file was 1238099 bytes long in total, the average rate +of transfer for the whole file was 146\&.38 kilobytes per second over the 8 +seconds that it took to complete, it was the 5th transfer of a regular file +during the current rsync session, and there are 169 more files for the +receiver to check (to see if they are up-to-date or not) remaining out of +the 396 total files in the file-list\&. .IP -.IP "\fB-P\fP" -The \fB-P\fP option is equivalent to \fB--partial\fP \fB--progress\fP\&. Its +.IP "\fB\-P\fP" +The \fB\-P\fP option is equivalent to \fB\-\-partial\fP \fB\-\-progress\fP\&. Its purpose is to make it much easier to specify these two options for a long transfer that may be interrupted\&. .IP -.IP "\fB--password-file\fP" +.IP "\fB\-\-password\-file\fP" This option allows you to provide a password in a file for accessing a remote rsync daemon\&. Note that this option is only useful when accessing an rsync daemon using the built in @@ -1900,28 +1982,25 @@ must not be world readable\&. It should contain just the password as a single line\&. .IP -.IP "\fB--list-only\fP" +.IP "\fB\-\-list\-only\fP" This option will cause the source files to be listed instead of transferred\&. This option is inferred if there is a single source arg and no destination specified, so its main uses are: (1) to turn a copy command that includes a destination arg into a file-listing command, (2) to be able to specify more than one local source arg (note: be sure to include the destination), or -(3) to avoid the automatically added "\fB-r --exclude=\&'/*/*\&'\fP" options that +(3) to avoid the automatically added "\fB\-r \-\-exclude=\&'/*/*\&'\fP" options that rsync usually uses as a compatibility kluge when generating a non-recursive listing\&. Caution: keep in mind that a source arg with a wild-card is expanded by the shell into multiple args, so it is never safe to try to list such an arg without using this option\&. For example: .IP - .nf - - rsync -av --list-only foo* dest/ + rsync \-av \-\-list\-only foo* dest/ .fi - .IP -.IP "\fB--bwlimit=KBPS\fP" +.IP "\fB\-\-bwlimit=KBPS\fP" This option allows you to specify a maximum transfer rate in kilobytes per second\&. This option is most effective when using rsync with large files (several megabytes and up)\&. Due to the nature @@ -1930,16 +2009,16 @@ result is an average transfer rate equaling the specified limit\&. A value of zero specifies no limit\&. .IP -.IP "\fB--write-batch=FILE\fP" +.IP "\fB\-\-write\-batch=FILE\fP" Record a file that can later be applied to -another identical destination with \fB--read-batch\fP\&. See the "BATCH MODE" -section for details, and also the \fB--only-write-batch\fP option\&. +another identical destination with \fB\-\-read\-batch\fP\&. See the "BATCH MODE" +section for details, and also the \fB\-\-only\-write\-batch\fP option\&. .IP -.IP "\fB--only-write-batch=FILE\fP" -Works like \fB--write-batch\fP, except that +.IP "\fB\-\-only\-write\-batch=FILE\fP" +Works like \fB\-\-write\-batch\fP, except that no updates are made on the destination system when creating the batch\&. This lets you transport the changes to the destination system via some -other means and then apply the changes via \fB--read-batch\fP\&. +other means and then apply the changes via \fB\-\-read\-batch\fP\&. .IP Note that you can feel free to write the batch directly to some portable media: if this media fills to capacity before the end of the transfer, you @@ -1953,43 +2032,48 @@ into the batch file without having to flow over the wire to the receiver (when pulling, the sender is remote, and thus can\&'t write the batch)\&. .IP -.IP "\fB--read-batch=FILE\fP" +.IP "\fB\-\-read\-batch=FILE\fP" Apply all of the changes stored in FILE, a -file previously generated by \fB--write-batch\fP\&. -If \fIFILE\fP is \fB-\fP, the batch data will be read from standard input\&. +file previously generated by \fB\-\-write\-batch\fP\&. +If \fIFILE\fP is \fB\-\fP, the batch data will be read from standard input\&. See the "BATCH MODE" section for details\&. .IP -.IP "\fB--protocol=NUM\fP" +.IP "\fB\-\-protocol=NUM\fP" Force an older protocol version to be used\&. This is useful for creating a batch file that is compatible with an older version of rsync\&. For instance, if rsync 2\&.6\&.4 is being used with the -\fB--write-batch\fP option, but rsync 2\&.6\&.3 is what will be used to run the -\fB--read-batch\fP option, you should use "--protocol=28" when creating the +\fB\-\-write\-batch\fP option, but rsync 2\&.6\&.3 is what will be used to run the +\fB\-\-read\-batch\fP option, you should use "\-\-protocol=28" when creating the batch file to force the older protocol version to be used in the batch file (assuming you can\&'t upgrade the rsync on the reading system)\&. .IP -.IP "\fB-4, --ipv4\fP or \fB-6, --ipv6\fP" +.IP "\fB\-4, \-\-ipv4\fP or \fB\-6, \-\-ipv6\fP" Tells rsync to prefer IPv4/IPv6 when creating sockets\&. This only affects sockets that rsync has direct control over, such as the outgoing socket when directly contacting an -rsync daemon\&. See also these options in the \fB--daemon\fP mode section\&. +rsync daemon\&. See also these options in the \fB\-\-daemon\fP mode section\&. .IP -.IP "\fB--checksum-seed=NUM\fP" +.IP "\fB\-\-checksum\-seed=NUM\fP" Set the MD4 checksum seed to the integer NUM\&. This 4 byte checksum seed is included in each block and file MD4 checksum calculation\&. By default the checksum seed is generated -by the server and defaults to the current \f(CWtime()\fP\&. This option +by the server and defaults to the current +\f(CWtime()\fP +\&. This option is used to set a specific checksum seed, which is useful for applications that want repeatable block and file checksums, or in the case where the user wants a more random checksum seed\&. -Note that setting NUM to 0 causes rsync to use the default of \f(CWtime()\fP +Note that setting NUM to 0 causes rsync to use the default of +\f(CWtime()\fP for checksum seed\&. + .PP -.SH "DAEMON OPTIONS" +.SH "DAEMON OPTIONS" + .PP The options allowed when starting an rsync daemon are as follows: .PP -.IP "\fB--daemon\fP" +.IP "\fB\-\-daemon\fP" This tells rsync that it is to run as a daemon\&. The daemon you start running may be accessed using an rsync client using the \fBhost::module\fP or \fBrsync://host/module/\fP syntax\&. @@ -2001,65 +2085,78 @@ requests accordingly\&. See the \fBrsyncd\&.conf\fP(5) man page for more details\&. .IP -.IP "\fB--address\fP" +.IP "\fB\-\-address\fP" By default rsync will bind to the wildcard address when -run as a daemon with the \fB--daemon\fP option\&. The \fB--address\fP option +run as a daemon with the \fB\-\-daemon\fP option\&. The \fB\-\-address\fP option allows you to specify a specific IP address (or hostname) to bind to\&. This -makes virtual hosting possible in conjunction with the \fB--config\fP option\&. +makes virtual hosting possible in conjunction with the \fB\-\-config\fP option\&. See also the "address" global option in the rsyncd\&.conf manpage\&. .IP -.IP "\fB--bwlimit=KBPS\fP" +.IP "\fB\-\-bwlimit=KBPS\fP" This option allows you to specify a maximum transfer rate in kilobytes per second for the data the daemon sends\&. -The client can still specify a smaller \fB--bwlimit\fP value, but their +The client can still specify a smaller \fB\-\-bwlimit\fP value, but their requested value will be rounded down if they try to exceed it\&. See the client version of this option (above) for some extra details\&. .IP -.IP "\fB--config=FILE\fP" +.IP "\fB\-\-config=FILE\fP" This specifies an alternate config file than -the default\&. This is only relevant when \fB--daemon\fP is specified\&. +the default\&. This is only relevant when \fB\-\-daemon\fP is specified\&. The default is /etc/rsyncd\&.conf unless the daemon is running over a remote shell program and the remote user is not the super-user; in that case the default is rsyncd\&.conf in the current directory (typically $HOME)\&. .IP -.IP "\fB--no-detach\fP" +.IP "\fB\-\-no\-detach\fP" When running as a daemon, this option instructs rsync to not detach itself and become a background process\&. This option is required when running as a service on Cygwin, and may also be useful when rsync is supervised by a program such as \fBdaemontools\fP or AIX\&'s \fBSystem Resource Controller\fP\&. -\fB--no-detach\fP is also recommended when rsync is run under a +\fB\-\-no\-detach\fP is also recommended when rsync is run under a debugger\&. This option has no effect if rsync is run from inetd or sshd\&. .IP -.IP "\fB--port=PORT\fP" +.IP "\fB\-\-port=PORT\fP" This specifies an alternate TCP port number for the daemon to listen on rather than the default of 873\&. See also the "port" global option in the rsyncd\&.conf manpage\&. .IP -.IP "\fB--sockopts\fP" +.IP "\fB\-\-log\-file=FILE\fP" +This option tells the rsync daemon to use the +given log-file name instead of using the "log file" setting in the config +file\&. +.IP +.IP "\fB\-\-log\-file\-format=FORMAT\fP" +This option tells the rsync daemon to use the +given FORMAT string instead of using the "log format" setting in the config +file\&. It also enables "transfer logging" unless the string is empty, in which +case transfer logging is turned off\&. +.IP +.IP "\fB\-\-sockopts\fP" This overrides the \fBsocket options\fP setting in the rsyncd\&.conf file and has the same syntax\&. .IP -.IP "\fB-v, --verbose\fP" +.IP "\fB\-v, \-\-verbose\fP" This option increases the amount of information the daemon logs during its startup phase\&. After the client connects, the daemon\&'s verbosity level will be controlled by the options that the client used and the "max verbosity" setting in the module\&'s config section\&. .IP -.IP "\fB-4, --ipv4\fP or \fB-6, --ipv6\fP" +.IP "\fB\-4, \-\-ipv4\fP or \fB\-6, \-\-ipv6\fP" Tells rsync to prefer IPv4/IPv6 when creating the incoming sockets that the rsync daemon will use to listen for connections\&. One of these options may be required in older versions of Linux to work around an IPv6 bug in the kernel (if you see an "address already in use" error when nothing else is using the port, -try specifying \fB--ipv6\fP or \fB--ipv4\fP when starting the daemon)\&. +try specifying \fB\-\-ipv6\fP or \fB\-\-ipv4\fP when starting the daemon)\&. .IP -.IP "\fB-h, --help\fP" -When specified after \fB--daemon\fP, print a short help +.IP "\fB\-h, \-\-help\fP" +When specified after \fB\-\-daemon\fP, print a short help page describing the options available for starting an rsync daemon\&. + .PP -.SH "FILTER RULES" +.SH "FILTER RULES" + .PP The filter rules allow for flexible selection of which files to transfer (include) and which files to skip (exclude)\&. The rules either directly @@ -2081,7 +2178,8 @@ .br \f(CWRULE,MODIFIERS [PATTERN_OR_FILENAME]\fP .br -.RE +.RE + .PP You have your choice of using either short or long RULE names, as described below\&. If you use a short-named rule, the \&',\&' separating the RULE from the @@ -2090,7 +2188,7 @@ Here are the available rule prefixes: .PP .RS -\fBexclude, -\fP specifies an exclude pattern\&. +\fBexclude, \-\fP specifies an exclude pattern\&. .br \fBinclude, +\fP specifies an include pattern\&. .br @@ -2108,31 +2206,33 @@ .br \fBclear, !\fP clears the current include/exclude list (takes no arg) .br -.RE +.RE + .PP When rules are being read from a file, empty lines are ignored, as are comment lines that start with a "#"\&. .PP -Note that the \fB--include\fP/\fB--exclude\fP command-line options do not allow the +Note that the \fB\-\-include\fP/\fB\-\-exclude\fP command-line options do not allow the full range of rule parsing as described above -- they only allow the specification of include/exclude patterns plus a "!" token to clear the list (and the normal comment parsing when rules are read from a file)\&. If a pattern -does not begin with "- " (dash, space) or "+ " (plus, space), then the -rule will be interpreted as if "+ " (for an include option) or "- " (for -an exclude option) were prefixed to the string\&. A \fB--filter\fP option, on +does not begin with "\- " (dash, space) or "+ " (plus, space), then the +rule will be interpreted as if "+ " (for an include option) or "\- " (for +an exclude option) were prefixed to the string\&. A \fB\-\-filter\fP option, on the other hand, must always contain either a short or long rule name at the start of the rule\&. .PP -Note also that the \fB--filter\fP, \fB--include\fP, and \fB--exclude\fP options take one +Note also that the \fB\-\-filter\fP, \fB\-\-include\fP, and \fB\-\-exclude\fP options take one rule/pattern each\&. To add multiple ones, you can repeat the options on -the command-line, use the merge-file syntax of the \fB--filter\fP option, or -the \fB--include-from\fP/\fB--exclude-from\fP options\&. +the command-line, use the merge-file syntax of the \fB\-\-filter\fP option, or +the \fB\-\-include\-from\fP/\fB\-\-exclude\-from\fP options\&. .PP -.SH "INCLUDE/EXCLUDE PATTERN RULES" +.SH "INCLUDE/EXCLUDE PATTERN RULES" + .PP You can include and exclude files by specifying patterns using the "+", -"-", etc\&. filter rules (as introduced in the FILTER RULES section above)\&. +"\-", etc\&. filter rules (as introduced in the FILTER RULES section above)\&. The include/exclude rules each specify a pattern that is matched against the names of the files that are going to be transferred\&. These patterns can take several forms: @@ -2168,7 +2268,7 @@ .IP o a \&'?\&' matches any character except a slash (/)\&. .IP o -a \&'[\&' introduces a character class, such as [a-z] or [[:alpha:]]\&. +a \&'[\&' introduces a character class, such as [a\-z] or [[:alpha:]]\&. .IP o in a wildcard pattern, a backslash can be used to escape a wildcard character, but it is matched literally when no wildcards are present\&. @@ -2185,9 +2285,10 @@ "dir_name/" had been specified) and all the files in the directory (as if "dir_name/**" had been specified)\&. (This behavior is new for version 2\&.6\&.7\&.) + .PP -Note that, when using the \fB--recursive\fP (\fB-r\fP) option (which is implied by -\fB-a\fP), every subcomponent of every path is visited from the top down, so +Note that, when using the \fB\-\-recursive\fP (\fB\-r\fP) option (which is implied by +\fB\-a\fP), every subcomponent of every path is visited from the top down, so include/exclude patterns get applied recursively to each subcomponent\&'s full name (e\&.g\&. to include "/foo/bar/baz" the subcomponents "/foo" and "/foo/bar" must not be excluded)\&. @@ -2199,19 +2300,20 @@ For instance, this won\&'t work: .PP .RS -\f(CW+ /some/path/this-file-will-not-be-found\fP +\f(CW+ /some/path/this\-file\-will\-not\-be\-found\fP .br -\f(CW+ /file-is-included\fP +\f(CW+ /file\-is\-included\fP .br -\f(CW- *\fP +\f(CW\- *\fP .br -.RE +.RE + .PP This fails because the parent directory "some" is excluded by the \&'*\&' rule, so rsync never visits any of the files in the "some" or "some/path" directories\&. One solution is to ask for all directories in the hierarchy to be included by using a single rule: "+ */" (put it somewhere before the -"- *" rule), and perhaps use the \fB--prune-empty-dirs\fP option\&. Another +"\- *" rule), and perhaps use the \fB\-\-prune\-empty\-dirs\fP option\&. Another solution is to add specific include rules for all the parent dirs that need to be visited\&. For instance, this set of rules works fine: @@ -2221,39 +2323,42 @@ .br \f(CW+ /some/path/\fP .br -\f(CW+ /some/path/this-file-is-found\fP +\f(CW+ /some/path/this\-file\-is\-found\fP .br -\f(CW+ /file-also-included\fP +\f(CW+ /file\-also\-included\fP .br -\f(CW- *\fP +\f(CW\- *\fP .br -.RE +.RE + .PP Here are some examples of exclude/include matching: .PP .IP o -"- *\&.o" would exclude all filenames matching *\&.o +"\- *\&.o" would exclude all filenames matching *\&.o .IP o -"- /foo" would exclude a file (or directory) named foo in the +"\- /foo" would exclude a file (or directory) named foo in the transfer-root directory .IP o -"- foo/" would exclude any directory named foo +"\- foo/" would exclude any directory named foo .IP o -"- /foo/*/bar" would exclude any file named bar which is at two +"\- /foo/*/bar" would exclude any file named bar which is at two levels below a directory named foo in the transfer-root directory .IP o -"- /foo/**/bar" would exclude any file named bar two +"\- /foo/**/bar" would exclude any file named bar two or more levels below a directory named foo in the transfer-root directory .IP o -The combination of "+ */", "+ *\&.c", and "- *" would include all +The combination of "+ */", "+ *\&.c", and "\- *" would include all directories and C source files but nothing else (see also the -\fB--prune-empty-dirs\fP option) +\fB\-\-prune\-empty\-dirs\fP option) .IP o -The combination of "+ foo/", "+ foo/bar\&.c", and "- *" would include +The combination of "+ foo/", "+ foo/bar\&.c", and "\- *" would include only the foo directory and foo/bar\&.c (the foo directory must be explicitly included or it would be excluded by the "*") + .PP -.SH "MERGE-FILE FILTER RULES" +.SH "MERGE-FILE FILTER RULES" + .PP You can merge whole files into your filter rules by specifying either a merge (\&.) or a dir-merge (:) filter rule (as introduced in the FILTER RULES @@ -2278,68 +2383,70 @@ .br \f(CW\&. /etc/rsync/default\&.rules\fP .br -\f(CWdir-merge \&.per-dir-filter\fP +\f(CWdir\-merge \&.per\-dir\-filter\fP .br -\f(CWdir-merge,n- \&.non-inherited-per-dir-excludes\fP +\f(CWdir\-merge,n\- \&.non\-inherited\-per\-dir\-excludes\fP .br -\f(CW:n- \&.non-inherited-per-dir-excludes\fP +\f(CW:n\- \&.non\-inherited\-per\-dir\-excludes\fP .br -.RE +.RE + .PP The following modifiers are accepted after a merge or dir-merge rule: .PP .IP o -A \fB-\fP specifies that the file should consist of only exclude +A \fB\-\fP specifies that the file should consist of only exclude patterns, with no other rule-parsing except for in-file comments\&. .IP o A \fB+\fP specifies that the file should consist of only include patterns, with no other rule-parsing except for in-file comments\&. .IP o A \fBC\fP is a way to specify that the file should be read in a -CVS-compatible manner\&. This turns on \&'n\&', \&'w\&', and \&'-\&', but also +CVS-compatible manner\&. This turns on \&'n\&', \&'w\&', and \&'\-\&', but also allows the list-clearing token (!) to be specified\&. If no filename is provided, "\&.cvsignore" is assumed\&. .IP o A \fBe\fP will exclude the merge-file name from the transfer; e\&.g\&. -"dir-merge,e \&.rules" is like "dir-merge \&.rules" and "- \&.rules"\&. +"dir-merge,e \&.rules" is like "dir-merge \&.rules" and "\- \&.rules"\&. .IP o An \fBn\fP specifies that the rules are not inherited by subdirectories\&. .IP o A \fBw\fP specifies that the rules are word-split on whitespace instead of the normal line-splitting\&. This also turns off comments\&. Note: the space that separates the prefix from the rule is treated specially, so -"- foo + bar" is parsed as two rules (assuming that prefix-parsing wasn\&'t +"\- foo + bar" is parsed as two rules (assuming that prefix-parsing wasn\&'t also disabled)\&. .IP o -You may also specify any of the modifiers for the "+" or "-" rules +You may also specify any of the modifiers for the "+" or "\-" rules (below) in order to have the rules that are read in from the file -default to having that modifier set\&. For instance, "merge,-/ \&.excl" would +default to having that modifier set\&. For instance, "merge,\-/ \&.excl" would treat the contents of \&.excl as absolute-path excludes, while "dir-merge,s \&.filt" and ":sC" would each make all their per-directory rules apply only on the sending side\&. + .PP -The following modifiers are accepted after a "+" or "-": +The following modifiers are accepted after a "+" or "\-": .PP .IP o A "/" specifies that the include/exclude rule should be matched against the absolute pathname of the current item\&. For example, -"-/ /etc/passwd" would exclude the passwd file any time the transfer -was sending files from the "/etc" directory, and "-/ subdir/foo" +"\-/ /etc/passwd" would exclude the passwd file any time the transfer +was sending files from the "/etc" directory, and "\-/ subdir/foo" would always exclude "foo" when it is in a dir named "subdir", even if "foo" is at the root of the current transfer\&. .IP o A "!" specifies that the include/exclude should take effect if -the pattern fails to match\&. For instance, "-! */" would exclude all +the pattern fails to match\&. For instance, "\-! */" would exclude all non-directories\&. .IP o A \fBC\fP is used to indicate that all the global CVS-exclude rules -should be inserted as excludes in place of the "-C"\&. No arg should +should be inserted as excludes in place of the "\-C"\&. No arg should follow\&. .IP o An \fBs\fP is used to indicate that the rule applies to the sending side\&. When a rule affects the sending side, it prevents files from being transferred\&. The default is for a rule to affect both sides -unless \fB--delete-excluded\fP was specified, in which case default rules +unless \fB\-\-delete\-excluded\fP was specified, in which case default rules become sender-side only\&. See also the hide (H) and show (S) rules, which are an alternate way to specify sending-side includes/excludes\&. .IP o @@ -2348,6 +2455,7 @@ being deleted\&. See the \fBs\fP modifier for more info\&. See also the protect (P) and risk (R) rules, which are an alternate way to specify receiver-side includes/excludes\&. + .PP Per-directory rules are inherited in all subdirectories of the directory where the merge-file was found unless the \&'n\&' modifier was used\&. Each @@ -2365,22 +2473,23 @@ would only match the file "foo" in the directory where the dir-merge filter file was found\&. .PP -Here\&'s an example filter file which you\&'d specify via \fB--filter="\&. file":\fP +Here\&'s an example filter file which you\&'d specify via \fB\-\-filter="\&. file":\fP .PP .RS -\f(CWmerge /home/user/\&.global-filter\fP +\f(CWmerge /home/user/\&.global\-filter\fP .br -\f(CW- *\&.gz\fP +\f(CW\- *\&.gz\fP .br -\f(CWdir-merge \&.rules\fP +\f(CWdir\-merge \&.rules\fP .br \f(CW+ *\&.[ch]\fP .br -\f(CW- *\&.o\fP +\f(CW\- *\&.o\fP .br -.RE +.RE + .PP -This will merge the contents of the /home/user/\&.global-filter file at the +This will merge the contents of the /home/user/\&.global\-filter file at the start of the list and also turns the "\&.rules" filename into a per-directory filter file\&. All rules read in prior to the start of the directory scan follow the global anchoring rules (i\&.e\&. a leading slash matches at the root @@ -2389,13 +2498,14 @@ If a per-directory merge-file is specified with a path that is a parent directory of the first transfer directory, rsync will scan all the parent dirs from that starting point to the transfer directory for the indicated -per-directory file\&. For instance, here is a common filter (see \fB-F\fP): +per-directory file\&. For instance, here is a common filter (see \fB\-F\fP): .PP .RS -\f(CW--filter=\&': /\&.rsync-filter\&'\fP -.RE +\f(CW\-\-filter=\&': /\&.rsync\-filter\&'\fP +.RE + .PP -That rule tells rsync to scan for the file \&.rsync-filter in all +That rule tells rsync to scan for the file \&.rsync\-filter in all directories from the root down through the parent directory of the transfer prior to the start of the normal directory scan of the file in the directories that are sent as a part of the transfer\&. (Note: for an @@ -2404,24 +2514,25 @@ Some examples of this pre-scanning for per-directory files: .PP .RS -\f(CWrsync -avF /src/path/ /dest/dir\fP +\f(CWrsync \-avF /src/path/ /dest/dir\fP .br -\f(CWrsync -av --filter=\&': \&.\&./\&.\&./\&.rsync-filter\&' /src/path/ /dest/dir\fP +\f(CWrsync \-av \-\-filter=\&': \&.\&./\&.\&./\&.rsync\-filter\&' /src/path/ /dest/dir\fP .br -\f(CWrsync -av --filter=\&': \&.rsync-filter\&' /src/path/ /dest/dir\fP +\f(CWrsync \-av \-\-filter=\&': \&.rsync\-filter\&' /src/path/ /dest/dir\fP .br -.RE +.RE + .PP -The first two commands above will look for "\&.rsync-filter" in "/" and +The first two commands above will look for "\&.rsync\-filter" in "/" and "/src" before the normal scan begins looking for the file in "/src/path" and its subdirectories\&. The last command avoids the parent-dir scan -and only looks for the "\&.rsync-filter" files in each directory that is +and only looks for the "\&.rsync\-filter" files in each directory that is a part of the transfer\&. .PP If you want to include the contents of a "\&.cvsignore" in your patterns, you should use the rule ":C", which creates a dir-merge of the \&.cvsignore file, but parsed in a CVS-compatible manner\&. You can -use this to affect where the \fB--cvs-exclude\fP (\fB-C\fP) option\&'s inclusion of the +use this to affect where the \fB\-\-cvs\-exclude\fP (\fB\-C\fP) option\&'s inclusion of the per-directory \&.cvsignore file gets placed into your rules by putting the ":C" wherever you like in your filter rules\&. Without this, rsync would add the dir-merge rule for the \&.cvsignore file at the end of all your other @@ -2429,19 +2540,20 @@ example: .PP .RS -\f(CWcat < out\&.dat\fP -.RE +.RE + .PP then look at out\&.dat\&. If everything is working correctly then out\&.dat should be a zero length file\&. If you are getting the above error from @@ -2788,109 +2910,130 @@ for non-interactive logins\&. .PP If you are having trouble debugging filter patterns, then -try specifying the \fB-vv\fP option\&. At this level of verbosity rsync will +try specifying the \fB\-vv\fP option\&. At this level of verbosity rsync will show why each individual file is included or excluded\&. .PP -.SH "EXIT VALUES" +.SH "EXIT VALUES" + .PP -.IP "\fB0\fP" +.IP "\fB0\fP" Success -.IP "\fB1\fP" +.IP "\fB1\fP" Syntax or usage error -.IP "\fB2\fP" +.IP "\fB2\fP" Protocol incompatibility -.IP "\fB3\fP" +.IP "\fB3\fP" Errors selecting input/output files, dirs -.IP "\fB4\fP" +.IP "\fB4\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 specified that is supported by the client and not by the server\&. -.IP "\fB5\fP" +.IP "\fB5\fP" Error starting client-server protocol -.IP "\fB6\fP" +.IP "\fB6\fP" Daemon unable to append to log-file -.IP "\fB10\fP" +.IP "\fB10\fP" Error in socket I/O -.IP "\fB11\fP" +.IP "\fB11\fP" Error in file I/O -.IP "\fB12\fP" +.IP "\fB12\fP" Error in rsync protocol data stream -.IP "\fB13\fP" +.IP "\fB13\fP" Errors with program diagnostics -.IP "\fB14\fP" +.IP "\fB14\fP" Error in IPC code -.IP "\fB20\fP" +.IP "\fB20\fP" Received SIGUSR1 or SIGINT -.IP "\fB21\fP" -Some error returned by \f(CWwaitpid()\fP -.IP "\fB22\fP" +.IP "\fB21\fP" +Some error returned by +\f(CWwaitpid()\fP +.IP "\fB22\fP" Error allocating core memory buffers -.IP "\fB23\fP" +.IP "\fB23\fP" Partial transfer due to error -.IP "\fB24\fP" +.IP "\fB24\fP" Partial transfer due to vanished source files -.IP "\fB25\fP" -The --max-delete limit stopped deletions -.IP "\fB30\fP" +.IP "\fB25\fP" +The \-\-max\-delete limit stopped deletions +.IP "\fB30\fP" Timeout in data send/receive + .PP -.SH "ENVIRONMENT VARIABLES" +.SH "ENVIRONMENT VARIABLES" + .PP -.IP "\fBCVSIGNORE\fP" +.IP "\fBCVSIGNORE\fP" The CVSIGNORE environment variable supplements any -ignore patterns in \&.cvsignore files\&. See the \fB--cvs-exclude\fP option for +ignore patterns in \&.cvsignore files\&. See the \fB\-\-cvs\-exclude\fP option for more details\&. -.IP "\fBRSYNC_RSH\fP" +.IP "\fBRSYNC_RSH\fP" The RSYNC_RSH environment variable allows you to override the default shell used as the transport for rsync\&. Command line -options are permitted after the command name, just as in the \fB-e\fP option\&. -.IP "\fBRSYNC_PROXY\fP" +options are permitted after the command name, just as in the \fB\-e\fP option\&. +.IP "\fBRSYNC_PROXY\fP" The RSYNC_PROXY environment variable allows you to redirect your rsync client to use a web proxy when connecting to a rsync daemon\&. You should set RSYNC_PROXY to a hostname:port pair\&. -.IP "\fBRSYNC_PASSWORD\fP" +.IP "\fBRSYNC_PASSWORD\fP" Setting RSYNC_PASSWORD to the required password allows you to run authenticated rsync connections to an rsync daemon without user intervention\&. Note that this does not supply a password to a shell transport such as ssh\&. -.IP "\fBUSER\fP or \fBLOGNAME\fP" +.IP "\fBUSER\fP or \fBLOGNAME\fP" The USER or LOGNAME environment variables are used to determine the default username sent to an rsync daemon\&. If neither is set, the username defaults to "nobody"\&. -.IP "\fBHOME\fP" +.IP "\fBHOME\fP" The HOME environment variable is used to find the user\&'s default \&.cvsignore file\&. + .PP -.SH "FILES" +.SH "FILES" + .PP /etc/rsyncd\&.conf or rsyncd\&.conf .PP -.SH "SEE ALSO" +.SH "SEE ALSO" + .PP \fBrsyncd\&.conf\fP(5) .PP -.SH "BUGS" +.SH "BUGS" + .PP times are transferred as *nix time_t values .PP When transferring to FAT filesystems rsync may re-sync unmodified files\&. -See the comments on the \fB--modify-window\fP option\&. +See the comments on the \fB\-\-modify\-window\fP option\&. .PP file permissions, devices, etc\&. are transferred as native numerical values .PP -see also the comments on the \fB--delete\fP option +see also the comments on the \fB\-\-delete\fP option .PP Please report bugs! See the website at http://rsync\&.samba\&.org/ .PP -.SH "VERSION" +.SH "VERSION" + +.PP +This man page is current for version 2\&.6\&.9 of rsync\&. .PP -This man page is current for version 2\&.6\&.8 of rsync\&. +.SH "INTERNAL OPTIONS" + .PP -.SH "CREDITS" +The options \fB\-\-server\fP and \fB\-\-sender\fP are used internally by rsync, +and should never be typed by a user under normal circumstances\&. Some +awareness of these options may be needed in certain scenarios, such as +when setting up a login that can only run an rsync command\&. For instance, +the support directory of the rsync distribution has an example script +named rrsync (for restricted rsync) that can be used with a restricted +ssh login\&. +.PP +.SH "CREDITS" + .PP rsync is distributed under the GNU public license\&. See the file COPYING for details\&. @@ -2908,7 +3051,8 @@ This program uses the excellent zlib compression library written by Jean-loup Gailly and Mark Adler\&. .PP -.SH "THANKS" +.SH "THANKS" + .PP Thanks to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell and David Bell for helpful suggestions, patches and testing of rsync\&. @@ -2917,7 +3061,8 @@ Especial thanks also to: David Dykstra, Jos Backus, Sebastian Krahmer, Martin Pool, Wayne Davison, J\&.W\&. Schultz\&. .PP -.SH "AUTHOR" +.SH "AUTHOR" + .PP rsync was originally written by Andrew Tridgell and Paul Mackerras\&. Many people have later contributed to it\&. diff -urN --exclude=patches rsync-2.6.8/rsync.c rsync-2.6.9/rsync.c --- rsync-2.6.8/rsync.c 2006-02-23 17:56:26.000000000 -0800 +++ rsync-2.6.9/rsync.c 2006-10-08 15:02:13.000000000 -0700 @@ -1,24 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ - -/* this file contains code used by more than one part of the rsync - process */ + * Routines common to more than one of the rsync processes. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H @@ -32,7 +32,6 @@ extern int verbose; extern int dry_run; -extern int daemon_log_format_has_i; extern int preserve_perms; extern int preserve_executability; extern int preserve_times; @@ -101,25 +100,27 @@ /* This is only called when we aren't preserving permissions. Figure out what * the permissions should be and return them merged back into the mode. */ -mode_t dest_mode(mode_t flist_mode, mode_t cur_mode, int exists) +mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int exists) { + int new_mode; /* If the file already exists, we'll return the local permissions, * possibly tweaked by the --executability option. */ if (exists) { + new_mode = (flist_mode & ~CHMOD_BITS) | (stat_mode & CHMOD_BITS); if (preserve_executability && S_ISREG(flist_mode)) { /* If the source file is executable, grant execute * rights to everyone who can read, but ONLY if the * file isn't already executable. */ if (!(flist_mode & 0111)) - cur_mode &= ~0111; - else if (!(cur_mode & 0111)) - cur_mode |= (cur_mode & 0444) >> 2; + new_mode &= ~0111; + else if (!(stat_mode & 0111)) + new_mode |= (new_mode & 0444) >> 2; } - } else - cur_mode = flist_mode & ACCESSPERMS & ~orig_umask; - if (daemon_chmod_modes && !S_ISLNK(flist_mode)) - cur_mode = tweak_mode(cur_mode, daemon_chmod_modes); - return (flist_mode & ~CHMOD_BITS) | (cur_mode & CHMOD_BITS); + } else { + /* Apply the umask and turn off special permissions. */ + new_mode = flist_mode & (~CHMOD_BITS | (ACCESSPERMS & ~orig_umask)); + } + return new_mode; } int set_file_attrs(char *fname, struct file_struct *file, STRUCT_STAT *st, @@ -128,6 +129,7 @@ int updated = 0; STRUCT_STAT st2; int change_uid, change_gid; + mode_t new_mode = file->mode; if (!st) { if (dry_run) @@ -138,11 +140,11 @@ return 0; } st = &st2; - if (!preserve_perms && S_ISDIR(file->mode) + if (!preserve_perms && S_ISDIR(new_mode) && st->st_mode & S_ISGID) { /* We just created this directory and its setgid * bit is on, so make sure it stays on. */ - file->mode |= S_ISGID; + new_mode |= S_ISGID; } } @@ -203,9 +205,11 @@ updated = 1; } + if (daemon_chmod_modes && !S_ISLNK(new_mode)) + new_mode = tweak_mode(new_mode, daemon_chmod_modes); #ifdef HAVE_CHMOD - if ((st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS)) { - int ret = do_chmod(fname, file->mode); + if ((st->st_mode & CHMOD_BITS) != (new_mode & CHMOD_BITS)) { + int ret = do_chmod(fname, new_mode); if (ret < 0) { rsyserr(FERROR, errno, "failed to set permissions on %s", @@ -218,12 +222,10 @@ #endif if (verbose > 1 && flags & ATTRS_REPORT) { - enum logcode code = daemon_log_format_has_i || dry_run - ? FCLIENT : FINFO; if (updated) - rprintf(code, "%s\n", fname); + rprintf(FCLIENT, "%s\n", fname); else - rprintf(code, "%s is uptodate\n", fname); + rprintf(FCLIENT, "%s is uptodate\n", fname); } return updated; } diff -urN --exclude=patches rsync-2.6.8/rsync.h rsync-2.6.9/rsync.h --- rsync-2.6.8/rsync.h 2006-04-13 09:53:15.000000000 -0700 +++ rsync-2.6.9/rsync.h 2006-10-23 20:31:30.000000000 -0700 @@ -1,23 +1,23 @@ /* - Copyright (C) by Andrew Tridgell 1996, 2000 - Copyright (C) Paul Mackerras 1996 - Copyright (C) 2001, 2002 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. -*/ - + * Copyright (C) 1996, 2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #define False 0 #define True 1 @@ -64,6 +64,7 @@ #define FLAG_DEL_HERE (1<<3) /* receiver/generator */ #define FLAG_HLINK_TOL (1<<4) /* receiver/generator */ #define FLAG_NO_FUZZY (1<<5) /* generator */ +#define FLAG_MISSING (1<<6) /* generator */ /* update this if you make incompatible changes */ #define PROTOCOL_VERSION 29 @@ -157,10 +158,10 @@ ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE)) -/* Log-message categories. Only FERROR and FINFO get sent over the socket. - * FLOG and FCLIENT are only used on the daemon side for custom logging, - * while FNAME is only used on the client side. */ -enum logcode { FERROR=1, FINFO=2, FLOG=3, FCLIENT=4, FNAME=5, FSOCKERR=6 }; +/* Log-message categories. Only FERROR and FINFO get sent over the socket, + * but FLOG and FSOCKERR can be sent over the receiver -> generator pipe. + * FLOG only goes to the log file, not the client; FCLIENT is the opposite. */ +enum logcode { FNONE=0, FERROR=1, FINFO=2, FLOG=3, FCLIENT=4, FSOCKERR=5 }; /* Messages types that are sent over the message channel. The logcode * values must all be present here with identical numbers. */ @@ -313,6 +314,12 @@ #include #endif +#ifdef MAKEDEV_TAKES_3_ARGS +#define MAKEDEV(devmajor,devminor) makedev(0,devmajor,devminor) +#else +#define MAKEDEV(devmajor,devminor) makedev(devmajor,devminor) +#endif + #ifdef HAVE_COMPAT_H #include #endif @@ -382,10 +389,7 @@ * to ensure that any code that really requires a 64-bit integer has * it (e.g. the checksum code uses two 32-bit integers for its 64-bit * counter). */ -#if SIZEOF_OFF64_T == 8 -# define int64 off64_t -# define SIZEOF_INT64 8 -#elif SIZEOF_LONG == 8 +#if SIZEOF_LONG == 8 # define int64 long # define SIZEOF_INT64 8 #elif SIZEOF_INT == 8 @@ -394,6 +398,9 @@ #elif SIZEOF_LONG_LONG == 8 # define int64 long long # define SIZEOF_INT64 8 +#elif SIZEOF_OFF64_T == 8 +# define int64 off64_t +# define SIZEOF_INT64 8 #elif SIZEOF_OFF_T == 8 # define int64 off_t # define SIZEOF_INT64 8 @@ -491,8 +498,9 @@ #define HL_SKIP 1 struct hlink { - int next; - int hlindex; + int32 next; + int32 hlindex; + unsigned short link_dest_used; }; #define F_DEV link_u.idev->dev @@ -659,6 +667,7 @@ #endif #define UNUSED(x) x __attribute__((__unused__)) +#define NORETURN __attribute__((__noreturn__)) #include "proto.h" @@ -848,6 +857,9 @@ #ifndef WEXITSTATUS #define WEXITSTATUS(stat) ((int)(((stat)>>8)&0xFF)) #endif +#ifndef WIFEXITED +#define WIFEXITED(stat) ((int)((stat)&0xFF) == 0) +#endif #define exit_cleanup(code) _exit_cleanup(code, __FILE__, __LINE__) diff -urN --exclude=patches rsync-2.6.8/rsync.yo rsync-2.6.9/rsync.yo --- rsync-2.6.8/rsync.yo 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/rsync.yo 2006-11-06 20:39:47.000000000 -0800 @@ -1,5 +1,5 @@ mailto(rsync-bugs@samba.org) -manpage(rsync)(1)(22 Apr 2006)()() +manpage(rsync)(1)(6 Nov 2006)()() manpagename(rsync)(faster, flexible replacement for rcp) manpagesynopsis() @@ -33,7 +33,7 @@ Some of the additional features of rsync are: -itemize( +itemization( it() support for copying links, devices, owners, groups, and permissions it() exclude and exclude-from options similar to GNU tar it() a CVS exclude mode for ignoring the same files that CVS would ignore @@ -182,7 +182,7 @@ Using rsync in this way is the same as using it with a remote shell except that: -itemize( +itemization( it() you either use a double colon :: instead of a single colon to separate the hostname from the path, or you use an rsync:// URL. it() the first word of the "path" is actually a module name. @@ -299,6 +299,7 @@ to the detailed description below for a complete description. verb( -v, --verbose increase verbosity -q, --quiet suppress non-error messages + --no-motd suppress daemon-mode MOTD (see caveat) -c, --checksum skip based on checksum, not mod-time & size -a, --archive archive mode; same as -rlptgoD (no -H) --no-OPTION turn off an implied OPTION (e.g. --no-D) @@ -321,7 +322,7 @@ -H, --hard-links preserve hard links -p, --perms preserve permissions -E, --executability preserve executability - --chmod=CHMOD change destination permissions + --chmod=CHMOD affect file and/or directory permissions -o, --owner preserve owner (super-user only) -g, --group preserve group --devices preserve device files (super-user only) @@ -337,15 +338,15 @@ -B, --block-size=SIZE force a fixed checksum block-size -e, --rsh=COMMAND specify the remote shell to use --rsync-path=PROGRAM specify the rsync to run on remote machine - --existing ignore non-existing files on receiving side - --ignore-existing ignore files that already exist on receiver - --remove-sent-files sent files/symlinks are removed from sender + --existing skip creating new files on receiver + --ignore-existing skip updating files that exist on receiver + --remove-source-files sender removes synchronized files (non-dir) --del an alias for --delete-during - --delete delete files that don't exist on sender + --delete delete extraneous files from dest dirs --delete-before receiver deletes before transfer (default) --delete-during receiver deletes during xfer, not before --delete-after receiver deletes after transfer, not before - --delete-excluded also delete excluded files on receiver + --delete-excluded also delete excluded files from dest dirs --ignore-errors delete even if there are I/O errors --force force deletion of dirs even if not empty --max-delete=NUM don't delete more than NUM files @@ -387,7 +388,9 @@ --progress show progress during transfer -P same as --partial --progress -i, --itemize-changes output a change-summary for all updates - --log-format=FORMAT output filenames using the specified format + --out-format=FORMAT output updates using the specified FORMAT + --log-file=FILE log what we're doing to the specified FILE + --log-file-format=FMT log updates using the specified FMT --password-file=FILE read password from FILE --list-only list the files instead of copying them --bwlimit=KBPS limit I/O bandwidth; KBytes per second @@ -399,8 +402,7 @@ -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 --version print version number -(-h) --help show this help (see below for -h comment) -) +(-h) --help show this help (see below for -h comment)) Rsync can also be run as a daemon, in which case the following options are accepted: verb( @@ -410,12 +412,13 @@ --config=FILE specify alternate rsyncd.conf file --no-detach do not detach from the parent --port=PORT listen on alternate port number + --log-file=FILE override the "log file" setting + --log-file-format=FMT override the "log format" setting --sockopts=OPTIONS specify custom TCP options -v, --verbose increase verbosity -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 - -h, --help show this help (if used after --daemon) -) + -h, --help show this help (if used after --daemon)) manpageoptions() @@ -442,22 +445,30 @@ you are debugging rsync. Note that the names of the transferred files that are output are done using -a default bf(--log-format) of "%n%L", which tells you just the name of the +a default bf(--out-format) of "%n%L", which tells you just the name of the file and, if the item is a link, where it points. At the single bf(-v) level of verbosity, this does not mention when a file gets its attributes changed. If you ask for an itemized list of changed attributes (either -bf(--itemize-changes) or adding "%i" to the bf(--log-format) setting), the +bf(--itemize-changes) or adding "%i" to the bf(--out-format) setting), the output (on the client) increases to mention all items that are changed in -any way. See the bf(--log-format) option for more details. +any way. See the bf(--out-format) option for more details. dit(bf(-q, --quiet)) This option decreases the amount of information you are given during the transfer, notably suppressing information messages from the remote server. This flag is useful when invoking rsync from cron. +dit(bf(--no-motd)) This option affects the information that is output +by the client at the start of a daemon transfer. This suppresses the +message-of-the-day (MOTD) text, but it also affects the list of modules +that the daemon sends in response to the "rsync host::" request (due to +a limitation in the rsync protocol), so omit this option if you want to +request the list of modules from the deamon. + dit(bf(-I, --ignore-times)) Normally rsync will skip any files that are already the same size and have the same modification time-stamp. -This option turns off this "quick check" behavior. +This option turns off this "quick check" behavior, causing all files to +be updated. dit(bf(--size-only)) Normally rsync will not transfer any files that are already the same size and have the same modification time-stamp. With the @@ -607,8 +618,8 @@ rule would never be reached). dit(bf(--backup-dir=DIR)) In combination with the bf(--backup) option, this -tells rsync to store all backups in the specified directory. This is -very useful for incremental backups. You can additionally +tells rsync to store all backups in the specified directory on the receiving +side. This can be used for incremental backups. You can additionally specify a backup suffix using the bf(--suffix) option (otherwise the files backed up in the specified directory will keep their original filenames). @@ -737,7 +748,7 @@ When this option is em(off), permissions are set as follows: -quote(itemize( +quote(itemization( it() Existing files (including updated files) retain their existing permissions, though the bf(--executability) option might change just the execute permission for the file. @@ -784,7 +795,7 @@ executability differs from that of the corresponding source file, rsync modifies the destination file's permissions as follows: -quote(itemize( +quote(itemization( it() To make a file non-executable, rsync turns off all its 'x' permissions. it() To make a file executable, rsync turns on each 'x' permission that @@ -905,17 +916,18 @@ by this option. dit(bf(--existing, --ignore-non-existing)) This tells rsync to skip -updating files that do not exist yet on the destination. If this option is +creating files (including directories) that do not exist +yet on the destination. If this option is combined with the bf(--ignore-existing) option, no files will be updated -(which can be useful if all you want to do is to delete missing files). +(which can be useful if all you want to do is to delete extraneous files). dit(bf(--ignore-existing)) This tells rsync to skip updating files that -already exist on the destination. See also bf(--ignore-non-existing). +already exist on the destination (this does em(not) ignore existing +directores, or nothing would get done). See also bf(--existing). -dit(bf(--remove-sent-files)) This tells rsync to remove from the sending -side the files and/or symlinks that are newly created or whose content is -updated on the receiving side. Directories and devices are not removed, -nor are files/symlinks whose attributes are merely changed. +dit(bf(--remove-source-files)) This tells rsync to remove from the sending +side the files (meaning non-directories) that are a part of the transfer +and have been successfully duplicated on the receiving side. dit(bf(--delete)) This tells rsync to delete extraneous files from the receiving side (ones that aren't on the sending side), but only for the @@ -1152,7 +1164,7 @@ for standard input). It also tweaks the default behavior of rsync to make transferring just the specified files and directories easier: -quote(itemize( +quote(itemization( it() The bf(--relative) (bf(-R)) option is implied, which preserves the path information that is specified for each item in the file (use bf(--no-relative) or bf(--no-R) if you want to turn that off). @@ -1297,6 +1309,11 @@ If a match is not found, a basis file from one of the em(DIR)s will be selected to try to speed up the transfer. +Note that if you combine this option with bf(--ignore-times), rsync will not +link any files together because it only links identical files together as a +substitute for transferring the file, never as an additional check after the +file is updated. + If em(DIR) is a relative path, it is relative to the destination directory. See also bf(--compare-dest) and bf(--copy-dest). @@ -1366,7 +1383,7 @@ dit(bf(-i, --itemize-changes)) Requests a simple itemized list of the changes that are being made to each file, including attribute changes. -This is exactly the same as specifying bf(--log-format='%i %n%L'). +This is exactly the same as specifying bf(--out-format='%i %n%L'). If you repeat the option, unchanged files will also be output, but only if the receiving rsync is at least version 2.6.7 (you can use bf(-vv) with older versions of rsync, but that also turns on the output of other @@ -1380,7 +1397,7 @@ The update types that replace the bf(Y) are as follows: -quote(itemize( +quote(itemization( it() A bf(<) means that a file is being transferred to the remote host (sent). it() A bf(>) means that a file is being transferred to the local host @@ -1406,7 +1423,7 @@ The attribute that is associated with each letter is as follows: -quote(itemize( +quote(itemization( it() A bf(c) means the checksum of the file is different and will be updated by the file transfer (requires bf(--checksum)). it() A bf(s) means the size of the file is different and will be updated @@ -1430,37 +1447,58 @@ you are talking to a recent enough rsync that it logs deletions instead of outputting them as a verbose message). -dit(bf(--log-format=FORMAT)) This allows you to specify exactly what the -rsync client outputs to the user on a per-file basis. The format is a text +dit(bf(--out-format=FORMAT)) This allows you to specify exactly what the +rsync client outputs to the user on a per-update basis. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character. For a list of the possible escape characters, see -the "log format" setting in the rsyncd.conf manpage. (Note that this -option does not affect what a daemon logs to its logfile.) +the "log format" setting in the rsyncd.conf manpage. Specifying this option will mention each file, dir, etc. that gets updated in a significant way (a transferred file, a recreated symlink/device, or a -touched directory) unless the itemize-changes escape (%i) is included in -the string, in which case the logging of names increases to mention any +touched directory). In addition, if the itemize-changes escape (%i) is +included in the string, the logging of names increases to mention any item that is changed in any way (as long as the receiving side is at least 2.6.4). See the bf(--itemize-changes) option for a description of the output of "%i". The bf(--verbose) option implies a format of "%n%L", but you can use -bf(--log-format) without bf(--verbose) if you like, or you can override +bf(--out-format) without bf(--verbose) if you like, or you can override the format of its per-file output using this option. -Rsync will output the log-format string prior to a file's transfer unless +Rsync will output the out-format string prior to a file's transfer unless one of the transfer-statistic escapes is requested, in which case the logging is done at the end of the file's transfer. When this late logging is in effect and bf(--progress) is also specified, rsync will also output the name of the file being transferred prior to its progress information -(followed, of course, by the log-format output). +(followed, of course, by the out-format output). + +dit(bf(--log-file=FILE)) This option causes rsync to log what it is doing +to a file. This is similar to the logging that a daemon does, but can be +requested for the client side and/or the server side of a non-daemon +transfer. If specified as a client option, transfer logging will be +enabled with a default format of "%i %n%L". See the bf(--log-file-format) +option if you wish to override this. + +Here's a example command that requests the remote side to log what is +happening: + +verb( rsync -av --rsync-path="rsync --log-file=/tmp/rlog" src/ dest/) + +This is very useful if you need to debug why a connection is closing +unexpectedly. + +dit(bf(--log-file-format=FORMAT)) This allows you to specify exactly what +per-update logging is put into the file specified by the bf(--log-file) option +(which must also be specified for this option to have any effect). If you +specify an empty string, updated files will not be mentioned in the log file. +For a list of the possible escape characters, see the "log format" setting +in the rsyncd.conf manpage. dit(bf(--stats)) This tells rsync to print a verbose set of statistics on the file transfer, allowing you to tell how effective the rsync algorithm is for your data. -The current statistics are as follows: quote(itemize( +The current statistics are as follows: quote(itemization( it() bf(Number of files) is the count of all "files" (in the generic sense), which includes directories, symlinks, etc. it() bf(Number of files transferred) is the count of normal files that @@ -1633,24 +1671,34 @@ something to watch. Implies bf(--verbose) if it wasn't already specified. -When the file is transferring, the data looks like this: +While rsync is transferring a regular file, it updates a progress line that +looks like this: verb( 782448 63% 110.64kB/s 0:00:04) -This tells you the current file size, the percentage of the transfer that -is complete, the current calculated file-completion rate (including both -data over the wire and data being matched locally), and the estimated time -remaining in this transfer. - -After a file is complete, the data looks like this: - -verb( 1238099 100% 146.38kB/s 0:00:08 (5, 57.1% of 396)) - -This tells you the final file size, that it's 100% complete, the final -transfer rate for the file, the amount of elapsed time it took to transfer -the file, and the addition of a total-transfer summary in parentheses. -These additional numbers tell you how many files have been updated, and -what percent of the total number of files has been scanned. +In this example, the receiver has reconstructed 782448 bytes or 63% of the +sender's file, which is being reconstructed at a rate of 110.64 kilobytes +per second, and the transfer will finish in 4 seconds if the current rate +is maintained until the end. + +These statistics can be misleading if the incremental transfer algorithm is +in use. For example, if the sender's file consists of the basis file +followed by additional data, the reported rate will probably drop +dramatically when the receiver gets to the literal data, and the transfer +will probably take much longer to finish than the receiver estimated as it +was finishing the matched part of the file. + +When the file transfer finishes, rsync replaces the progress line with a +summary line that looks like this: + +verb( 1238099 100% 146.38kB/s 0:00:08 (xfer#5, to-check=169/396)) + +In this example, the file was 1238099 bytes long in total, the average rate +of transfer for the whole file was 146.38 kilobytes per second over the 8 +seconds that it took to complete, it was the 5th transfer of a regular file +during the current rsync session, and there are 169 more files for the +receiver to check (to see if they are up-to-date or not) remaining out of +the 396 total files in the file-list. dit(bf(-P)) The bf(-P) option is equivalent to bf(--partial) bf(--progress). Its purpose is to make it much easier to specify these two options for a long @@ -1782,6 +1830,15 @@ daemon to listen on rather than the default of 873. See also the "port" global option in the rsyncd.conf manpage. +dit(bf(--log-file=FILE)) This option tells the rsync daemon to use the +given log-file name instead of using the "log file" setting in the config +file. + +dit(bf(--log-file-format=FORMAT)) This option tells the rsync daemon to use the +given FORMAT string instead of using the "log format" setting in the config +file. It also enables "transfer logging" unless the string is empty, in which +case transfer logging is turned off. + dit(bf(--sockopts)) This overrides the bf(socket options) setting in the rsyncd.conf file and has the same syntax. @@ -1868,7 +1925,7 @@ the names of the files that are going to be transferred. These patterns can take several forms: -itemize( +itemization( it() if the pattern starts with a / then it is anchored to a particular spot in the hierarchy of files, otherwise it is matched against the end of the pathname. This is similar to a leading ^ in @@ -1946,7 +2003,7 @@ Here are some examples of exclude/include matching: -itemize( +itemization( it() "- *.o" would exclude all filenames matching *.o it() "- /foo" would exclude a file (or directory) named foo in the transfer-root directory @@ -1993,7 +2050,7 @@ The following modifiers are accepted after a merge or dir-merge rule: -itemize( +itemization( it() A bf(-) specifies that the file should consist of only exclude patterns, with no other rule-parsing except for in-file comments. it() A bf(+) specifies that the file should consist of only include @@ -2020,7 +2077,7 @@ The following modifiers are accepted after a "+" or "-": -itemize( +itemization( it() A "/" specifies that the include/exclude rule should be matched against the absolute pathname of the current item. For example, "-/ /etc/passwd" would exclude the passwd file any time the transfer @@ -2295,7 +2352,7 @@ into the directory /bdest/dir. The differences between the two examples reveals some of the flexibility you have in how you deal with batches: -itemize( +itemization( it() The first example shows that the initial copy doesn't have to be local -- you can push or pull data to/from a remote host using either the remote-shell syntax or rsync daemon syntax, as desired. @@ -2499,7 +2556,17 @@ manpagesection(VERSION) -This man page is current for version 2.6.8 of rsync. +This man page is current for version 2.6.9 of rsync. + +manpagesection(INTERNAL OPTIONS) + +The options bf(--server) and bf(--sender) are used internally by rsync, +and should never be typed by a user under normal circumstances. Some +awareness of these options may be needed in certain scenarios, such as +when setting up a login that can only run an rsync command. For instance, +the support directory of the rsync distribution has an example script +named rrsync (for restricted rsync) that can be used with a restricted +ssh login. manpagesection(CREDITS) diff -urN --exclude=patches rsync-2.6.8/rsyncd.conf.5 rsync-2.6.9/rsyncd.conf.5 --- rsync-2.6.8/rsyncd.conf.5 2006-04-22 08:38:38.000000000 -0700 +++ rsync-2.6.9/rsyncd.conf.5 2006-11-06 20:39:52.000000000 -0800 @@ -1,34 +1,37 @@ -.TH "rsyncd\&.conf" "5" "22 Apr 2006" "" "" -.SH "NAME" +.TH "rsyncd\&.conf" "5" "6 Nov 2006" "" "" +.SH "NAME" rsyncd\&.conf \- configuration file for rsync in daemon mode -.SH "SYNOPSIS" +.SH "SYNOPSIS" + .PP rsyncd\&.conf .PP -.SH "DESCRIPTION" +.SH "DESCRIPTION" + .PP The rsyncd\&.conf file is the runtime configuration file for rsync when -run as an rsync daemon\&. +run as an rsync daemon\&. .PP The rsyncd\&.conf file controls authentication, access, logging and available modules\&. .PP -.SH "FILE FORMAT" +.SH "FILE FORMAT" + .PP -The file consists of modules and parameters\&. A module begins with the +The file consists of modules and parameters\&. A module begins with the name of the module in square brackets and continues until the next module begins\&. Modules contain parameters of the form \&'name = value\&'\&. .PP The file is line-based -- that is, each newline-terminated line represents either a comment, a module name or a parameter\&. .PP -Only the first equals sign in a parameter is significant\&. Whitespace before +Only the first equals sign in a parameter is significant\&. Whitespace before or after the first equals sign is discarded\&. Leading, trailing and internal whitespace in module and parameter names is irrelevant\&. Leading and trailing whitespace in a parameter value is discarded\&. Internal whitespace within a parameter value is retained verbatim\&. .PP -Any line beginning with a hash (#) is ignored, as are lines containing +Any line beginning with a hash (#) is ignored, as are lines containing only whitespace\&. .PP Any line ending in a \e is "continued" on the next line in the @@ -37,12 +40,13 @@ The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or true/false\&. Case is not significant in boolean values, but is preserved -in string values\&. +in string values\&. .PP -.SH "LAUNCHING THE RSYNC DAEMON" +.SH "LAUNCHING THE RSYNC DAEMON" + .PP -The rsync daemon is launched by specifying the \fB--daemon\fP option to -rsync\&. +The rsync daemon is launched by specifying the \fB\-\-daemon\fP option to +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 @@ -51,26 +55,20 @@ .PP You can launch it either via inetd, as a stand-alone daemon, or from an rsync client via a remote shell\&. If run as a stand-alone daemon then -just run the command "\fBrsync --daemon\fP" from a suitable startup script\&. +just run the command "\fBrsync \-\-daemon\fP" from a suitable startup script\&. .PP When run via inetd you should add a line like this to /etc/services: .PP - .nf - rsync 873/tcp .fi - .PP and a single line something like this to /etc/inetd\&.conf: .PP - .nf - - rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon + rsync stream tcp nowait root /usr/bin/rsync rsyncd \-\-daemon .fi - .PP Replace "/usr/bin/rsync" with the path to where you have rsync installed on @@ -79,104 +77,95 @@ .PP Note that you should \fBnot\fP send the rsync daemon a HUP signal to force it to reread the \f(CWrsyncd\&.conf\fP file\&. The file is re-read on each client -connection\&. +connection\&. .PP -.SH "GLOBAL OPTIONS" +.SH "GLOBAL OPTIONS" + .PP The first parameters in the file (before a [module] header) are the -global parameters\&. +global parameters\&. .PP You may also include any module parameters in the global part of the config file in which case the supplied value will override the default for that parameter\&. .PP -.IP "\fBmotd file\fP" +.IP "\fBmotd file\fP" The "motd file" option allows you to specify a "message of the day" to display to clients on each connect\&. This usually contains site information and any legal notices\&. The default is no motd file\&. .IP -.IP "\fBlog file\fP" -The "log file" option tells the rsync daemon to log -messages to that file rather than using syslog\&. This is particularly -useful on systems (such as AIX) where \f(CWsyslog()\fP doesn\&'t work for -chrooted programs\&. If the daemon fails to open to specified file, it -will fall back to using syslog and output an error about the failure\&. -(Note that a failure to open the specified log file used to be a fatal -error\&.) -.IP -.IP "\fBpid file\fP" +.IP "\fBpid file\fP" The "pid file" option tells the rsync daemon to write its process ID to that file\&. .IP -.IP "\fBsyslog facility\fP" -The "syslog facility" option allows you to -specify the syslog facility name to use when logging messages from the -rsync daemon\&. You may use any standard syslog facility name which is -defined on your system\&. Common names are auth, authpriv, cron, daemon, -ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, -local1, local2, local3, local4, local5, local6 and local7\&. The default -is daemon\&. -.IP -.IP "\fBport\fP" +.IP "\fBport\fP" You can override the default port the daemon will listen on by specifying this value (defaults to 873)\&. This is ignored if the daemon -is being run by inetd, and is superseded by the \fB--port\fP command-line option\&. +is being run by inetd, and is superseded by the \fB\-\-port\fP command-line option\&. .IP -.IP "\fBaddress\fP" +.IP "\fBaddress\fP" You can override the default IP address the daemon will listen on by specifying this value\&. This is ignored if the daemon is -being run by inetd, and is superseded by the \fB--address\fP command-line option\&. +being run by inetd, and is superseded by the \fB\-\-address\fP command-line option\&. .IP -.IP "\fBsocket options\fP" +.IP "\fBsocket options\fP" This option can provide endless fun for people who like to tune their systems to the utmost degree\&. You can set all sorts of socket options which may make transfers faster (or -slower!)\&. Read the man page for the \f(CWsetsockopt()\fP system call for +slower!)\&. Read the man page for the +\f(CWsetsockopt()\fP +system call for details on some of the options you may be able to set\&. By default no special socket options are set\&. These settings are superseded by the -\fB--sockopts\fP command-line option\&. +\fB\-\-sockopts\fP command-line option\&. .IP -.PP -.SH "MODULE OPTIONS" +.SH "MODULE OPTIONS" + .PP After the global options you should define a number of modules, each module exports a directory tree as a symbolic name\&. Modules are exported by specifying a module name in square brackets [module] followed by the options for that module\&. .PP -.IP -.IP "\fBcomment\fP" +.IP "\fBcomment\fP" The "comment" option specifies a description string that is displayed next to the module name when clients obtain a list of available modules\&. The default is no comment\&. .IP -.IP "\fBpath\fP" +.IP "\fBpath\fP" The "path" option specifies the directory in the daemon\&'s filesystem to make available in this module\&. You must specify this option for each module in \f(CWrsyncd\&.conf\fP\&. .IP -.IP "\fBuse chroot\fP" +.IP "\fBuse chroot\fP" If "use chroot" is true, the rsync daemon will chroot to the "path" before starting the file transfer with the client\&. This has the advantage of extra protection against possible implementation security -holes, but it has the disadvantages of requiring super-user privileges, +holes, but it has the disadvantages of requiring super-user privileges, of not being able to follow symbolic links that are either absolute or outside of the new root path, and of complicating the preservation of usernames and groups (see below)\&. 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 most absolute paths (options -such as \fB--backup-dir\fP, \fB--compare-dest\fP, etc\&. interpret an absolute path as +such as \fB\-\-backup\-dir\fP, \fB\-\-compare\-dest\fP, etc\&. interpret an absolute path as rooted in the module\&'s "path" dir, just as if chroot was specified)\&. The default for "use chroot" is true\&. .IP In order to preserve usernames and groupnames, rsync needs to be able to use the standard library functions for looking up names and IDs (i\&.e\&. -\f(CWgetpwuid()\fP, \f(CWgetgrgid()\fP, \f(CWgetpwname()\fP, and \f(CWgetgrnam()\fP)\&. This means a +\f(CWgetpwuid()\fP +, +\f(CWgetgrgid()\fP +, +\f(CWgetpwname()\fP +, and +\f(CWgetgrnam()\fP +)\&. This means a process in the chroot namespace will need to have access to the resources used by these library functions (traditionally /etc/passwd and /etc/group)\&. If these resources are not available, rsync will only be -able to copy the IDs, just as if the \fB--numeric-ids\fP option had been +able to copy the IDs, just as if the \fB\-\-numeric\-ids\fP option had been specified\&. .IP Note that you are free to setup user/group information in the chroot area @@ -192,119 +181,148 @@ do this automatically, but you might as well specify both to be extra sure)\&. .IP -.IP "\fBmax connections\fP" +.IP "\fBmax connections\fP" The "max connections" option allows you to specify the maximum number of simultaneous connections you will allow\&. Any clients connecting when the maximum has been reached will receive a message telling them to try later\&. The default is 0 which means no limit\&. See also the "lock file" option\&. .IP -.IP "\fBmax verbosity\fP" +.IP "\fBlog file\fP" +When the "log file" option is set to a non-empty +string, the rsync daemon will log messages to the indicated file rather +than using syslog\&. This is particularly useful on systems (such as AIX) +where +\f(CWsyslog()\fP +doesn\&'t work for chrooted programs\&. The file is +opened before +\f(CWchroot()\fP +is called, allowing it to be placed outside +the transfer\&. If this value is set on a per-module basis instead of +globally, the global log will still contain any authorization failures +or config-file error messages\&. +.IP +If the daemon fails to open to specified file, it will fall back to +using syslog and output an error about the failure\&. (Note that the +failure to open the specified log file used to be a fatal error\&.) +.IP +.IP "\fBsyslog facility\fP" +The "syslog facility" option allows you to +specify the syslog facility name to use when logging messages from the +rsync daemon\&. You may use any standard syslog facility name which is +defined on your system\&. Common names are auth, authpriv, cron, daemon, +ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, +local1, local2, local3, local4, local5, local6 and local7\&. The default +is daemon\&. This setting has no effect if the "log file" setting is a +non-empty string (either set in the per-modules settings, or inherited +from the global settings)\&. +.IP +.IP "\fBmax verbosity\fP" The "max verbosity" option allows you to control the maximum amount of verbose information that you\&'ll allow the daemon to generate (since the information goes into the log file)\&. The default is 1, which allows the client to request one level of verbosity\&. .IP -.IP "\fBlock file\fP" +.IP "\fBlock file\fP" The "lock file" option specifies the file to use to support the "max connections" option\&. The rsync daemon uses record locking on this file to ensure that the max connections limit is not -exceeded for the modules sharing the lock file\&. +exceeded for the modules sharing the lock file\&. The default is \f(CW/var/run/rsyncd\&.lock\fP\&. .IP -.IP "\fBread only\fP" +.IP "\fBread only\fP" The "read only" option determines whether clients will be able to upload files or not\&. If "read only" is true then any attempted uploads will fail\&. If "read only" is false then uploads will be possible if file permissions on the daemon side allow them\&. The default is for all modules to be read only\&. .IP -.IP "\fBwrite only\fP" +.IP "\fBwrite only\fP" The "write only" option determines whether clients will be able to download files or not\&. If "write only" is true then any attempted downloads will fail\&. If "write only" is false then downloads will be possible if file permissions on the daemon side allow them\&. The default is for this option to be disabled\&. .IP -.IP "\fBlist\fP" +.IP "\fBlist\fP" The "list" option determines if this module should be listed when the client asks for a listing of available modules\&. By setting this to false you can create hidden modules\&. The default is for modules to be listable\&. .IP -.IP "\fBuid\fP" +.IP "\fBuid\fP" 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 uid -2, which is normally +file permissions are available\&. The default is uid \-2, which is normally the user "nobody"\&. .IP -.IP "\fBgid\fP" +.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 gid -2, +was run as root\&. This complements the "uid" option\&. The default is gid \-2, which is normally the group "nobody"\&. .IP -.IP "\fBfilter\fP" +.IP "\fBfilter\fP" The "filter" option allows you to specify a space-separated list of filter rules that the daemon will not allow to be read or written\&. This is only superficially equivalent to the client specifying these -patterns with the \fB--filter\fP option\&. Only one "filter" option may be +patterns with the \fB\-\-filter\fP option\&. Only one "filter" option may be specified, but it may contain as many rules as you like, including merge-file rules\&. Note that per-directory merge-file rules do not provide -as much protection as global rules, but they can be used to make \fB--delete\fP +as much protection as global rules, but they can be used to make \fB\-\-delete\fP work better when a client downloads the daemon\&'s files (if the per-dir merge files are included in the transfer)\&. .IP -.IP "\fBexclude\fP" +.IP "\fBexclude\fP" The "exclude" option allows you to specify a space-separated list of patterns that the daemon will not allow to be read or written\&. This is only superficially equivalent to the client -specifying these patterns with the \fB--exclude\fP option\&. Only one "exclude" -option may be specified, but you can use "-" and "+" before patterns to +specifying these patterns with the \fB\-\-exclude\fP option\&. Only one "exclude" +option may be specified, but you can use "\-" and "+" before patterns to specify exclude/include\&. .IP Because this exclude list is not passed to the client it only applies on the daemon: that is, it excludes files received by a client when receiving from a daemon and files deleted on a daemon when sending to a daemon, but it doesn\&'t exclude files from being deleted on a client when receiving -from a daemon\&. +from a daemon\&. .IP -.IP "\fBexclude from\fP" +.IP "\fBexclude from\fP" The "exclude from" option specifies a filename on the daemon that contains exclude patterns, one per line\&. This is only superficially equivalent -to the client specifying the \fB--exclude-from\fP option with an equivalent file\&. +to the client specifying the \fB\-\-exclude\-from\fP option with an equivalent file\&. See the "exclude" option above\&. .IP -.IP "\fBinclude\fP" +.IP "\fBinclude\fP" The "include" option allows you to specify a space-separated list of patterns which rsync should not exclude\&. This is only superficially equivalent to the client specifying these patterns with -the \fB--include\fP option because it applies only on the daemon\&. This is +the \fB\-\-include\fP option because it applies only on the daemon\&. This is useful as it allows you to build up quite complex exclude/include rules\&. -Only one "include" option may be specified, but you can use "+" and "-" +Only one "include" option may be specified, but you can use "+" and "\-" before patterns to switch include/exclude\&. See the "exclude" option above\&. .IP -.IP "\fBinclude from\fP" +.IP "\fBinclude from\fP" The "include from" option specifies a filename on the daemon that contains include patterns, one per line\&. This is only superficially equivalent to the client specifying the -\fB--include-from\fP option with a equivalent file\&. +\fB\-\-include\-from\fP option with a equivalent file\&. See the "exclude" option above\&. .IP -.IP "\fBincoming chmod\fP" +.IP "\fBincoming chmod\fP" This option allows you to specify a set of comma-separated chmod strings that will affect the permissions of all incoming files (files that are being received by the daemon)\&. These changes happen after all other permission calculations, and this will even override destination-default and/or existing permissions when the -client does not specify \fB--perms\fP\&. -See the description of the \fB--chmod\fP rsync option and the \fBchmod\fP(1) +client does not specify \fB\-\-perms\fP\&. +See the description of the \fB\-\-chmod\fP rsync option and the \fBchmod\fP(1) manpage for information on the format of this string\&. .IP -.IP "\fBoutgoing chmod\fP" +.IP "\fBoutgoing chmod\fP" This option allows you to specify a set of comma-separated chmod strings that will affect the permissions of all outgoing files (files that are being sent out from the daemon)\&. These @@ -312,10 +330,10 @@ than those stored in the filesystem itself\&. For instance, you could disable group write permissions on the server while having it appear to be on to the clients\&. -See the description of the \fB--chmod\fP rsync option and the \fBchmod\fP(1) +See the description of the \fB\-\-chmod\fP rsync option and the \fBchmod\fP(1) manpage for information on the format of this string\&. .IP -.IP "\fBauth users\fP" +.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 @@ -329,10 +347,10 @@ .IP See also the "CONNECTING TO AN RSYNC DAEMON OVER A REMOTE SHELL PROGRAM" section in \fBrsync\fP(1) for information on how handle an -rsyncd\&.conf-level username that differs from the remote-shell-level +rsyncd\&.conf\-level username that differs from the remote-shell-level username when using a remote shell to connect to an rsync daemon\&. .IP -.IP "\fBsecrets file\fP" +.IP "\fBsecrets file\fP" The "secrets file" option specifies the name of a file that contains the username:password pairs used for authenticating this module\&. This file is only consulted if the "auth @@ -341,21 +359,21 @@ with a hash (#) is considered a comment and is skipped\&. The passwords can contain any characters but be warned that many operating systems limit the length of passwords that can be typed at the client end, so -you may find that passwords longer than 8 characters don\&'t work\&. +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)\&. 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 +.IP "\fBstrict modes\fP" +The "strict modes" option determines whether or not the permissions on the secrets file will be checked\&. If "strict modes" is true, then the secrets file must not be readable by any user ID other than the one that the rsync daemon is running under\&. If "strict modes" is false, the check is not performed\&. The default is true\&. This option was added to accommodate rsync running on the Windows operating system\&. .IP -.IP "\fBhosts allow\fP" +.IP "\fBhosts allow\fP" The "hosts allow" option allows you to specify a list of patterns that are matched against a connecting clients hostname and IP address\&. If none of the patterns match then the @@ -385,7 +403,8 @@ a hostname pattern using wildcards\&. These are matched using the same rules as normal unix filename matching\&. If the pattern matches then the client is allowed in\&. -.RE +.RE + .IP Note IPv6 link-local addresses can have a scope in the address specification: .IP @@ -396,19 +415,20 @@ .br \f(CW fe80::%link1/ffff:ffff:ffff:ffff::\fP .br -.RE +.RE + .IP You can also combine "hosts allow" with a separate "hosts deny" option\&. If both options are specified then the "hosts allow" option s checked first and a match results in the client being able to connect\&. The "hosts deny" option is then checked and a match means -that the host is rejected\&. If the host does not match either the +that the host is rejected\&. If the host does not match either the "hosts allow" or the "hosts deny" patterns then it is allowed to connect\&. .IP The default is no "hosts allow" option, which means all hosts can connect\&. .IP -.IP "\fBhosts deny\fP" +.IP "\fBhosts deny\fP" The "hosts deny" option allows you to specify a list of patterns that are matched against a connecting clients hostname and IP address\&. If the pattern matches then the connection is @@ -416,36 +436,36 @@ .IP The default is no "hosts deny" option, which means all hosts can connect\&. .IP -.IP "\fBignore errors\fP" +.IP "\fBignore errors\fP" The "ignore errors" option tells rsyncd to ignore I/O errors on the daemon when deciding whether to run the delete -phase of the transfer\&. Normally rsync skips the \fB--delete\fP step if any +phase of the transfer\&. Normally rsync skips the \fB\-\-delete\fP step if any I/O errors have occurred in order to prevent disastrous deletion due to a temporary resource shortage or other I/O error\&. In some cases this test is counter productive so you can use this option to turn off this -behavior\&. +behavior\&. .IP -.IP "\fBignore nonreadable\fP" +.IP "\fBignore nonreadable\fP" This tells the rsync daemon to completely ignore files that are not readable by the user\&. This is useful for public archives that may have some non-readable files among the directories, and the sysadmin doesn\&'t want those files to be seen at all\&. .IP -.IP "\fBtransfer logging\fP" -The "transfer logging" option enables per-file +.IP "\fBtransfer logging\fP" +The "transfer logging" option enables per-file logging of downloads and uploads in a format somewhat similar to that used by ftp daemons\&. The daemon always logs the transfer at the end, so if a transfer is aborted, no mention will be made in the log file\&. .IP If you want to customize the log lines, see the "log format" option\&. .IP -.IP "\fBlog format\fP" +.IP "\fBlog format\fP" The "log format" option allows you to specify the format used for logging file transfers when transfer logging is enabled\&. The format is a text string containing embedded single-character escape sequences prefixed with a percent (%) character\&. An optional numeric field width may also be specified between the percent and the escape -letter (e\&.g\&. "%-50n %8l %07p")\&. +letter (e\&.g\&. "%\-50n %8l %07p")\&. .IP The default log format is "%o %h [%a] %m (%u) %f %l", and a "%t [%p] " is always prefixed when using the "log file" option\&. @@ -459,7 +479,7 @@ .IP o %a the remote IP address .IP o -%b the number of bytes actually transferred +%b the number of bytes actually transferred .IP o %B the permission bits of the file (e\&.g\&. rwxrwxrwt) .IP o @@ -475,7 +495,7 @@ .IP o %l the length of the file in bytes .IP o -%L the string " -> SYMLINK", " => HARDLINK", or "" (where \fBSYMLINK\fP or \fBHARDLINK\fP is a filename) +%L the string " \-> SYMLINK", " => HARDLINK", or "" (where \fBSYMLINK\fP or \fBHARDLINK\fP is a filename) .IP o %m the module name .IP o @@ -494,16 +514,17 @@ %u the authenticated username or an empty string .IP o %U the uid of the file (decimal) -.RE +.RE + .IP For a list of what the characters mean that are output by "%i", see the -\fB--itemize-changes\fP option in the rsync manpage\&. +\fB\-\-itemize\-changes\fP option in the rsync manpage\&. .IP Note that some of the logged output changes when talking with older rsync versions\&. For instance, deleted files were only output as verbose messages prior to rsync 2\&.6\&.4\&. .IP -.IP "\fBtimeout\fP" +.IP "\fBtimeout\fP" The "timeout" option allows you to override the clients choice for I/O timeout for this module\&. Using this option you can ensure that rsync won\&'t wait on a dead client forever\&. The timeout @@ -511,37 +532,41 @@ default\&. A good choice for anonymous rsync daemons may be 600 (giving a 10 minute timeout)\&. .IP -.IP "\fBrefuse options\fP" +.IP "\fBrefuse options\fP" The "refuse options" option allows you to specify a space-separated list of rsync command line options that will be refused by your rsync daemon\&. You may specify the full option name, its one-letter abbreviation, or a wild-card string that matches multiple options\&. -For example, this would refuse \fB--checksum\fP (\fB-c\fP) and all the various +For example, this would refuse \fB\-\-checksum\fP (\fB\-c\fP) and all the various delete options: .IP .RS \f(CW refuse options = c delete\fP -.RE +.RE + .IP The reason the above refuses all delete options is that the options imply -\fB--delete\fP, and implied options are refused just like explicit options\&. +\fB\-\-delete\fP, and implied options are refused just like explicit options\&. As an additional safety feature, the refusal of "delete" also refuses \fBremove-sent-files\fP when the daemon is the sender; if you want the latter -without the former, instead refuse "delete-*" -- that refuses all the -delete modes without affecting \fB--remove-sent-files\fP\&. +without the former, instead refuse "delete\-*" -- that refuses all the +delete modes without affecting \fB\-\-remove\-sent\-files\fP\&. .IP When an option is refused, the daemon prints an error message and exits\&. -To prevent all compression, you can use "dont compress = *" (see below) +To prevent all compression when serving files, +you can use "dont compress = *" (see below) instead of "refuse options = compress" to avoid returning an error to a client that requests compression\&. .IP -.IP "\fBdont compress\fP" +.IP "\fBdont compress\fP" The "dont compress" option allows you to select filenames based on wildcard patterns that should not be compressed -during transfer\&. Compression is expensive in terms of CPU usage so it +when pulling files from the daemon (no analogous option exists to +govern the pushing of files to a daemon)\&. +Compression is expensive in terms of CPU usage, so it is usually good to not try to compress files that won\&'t compress well, -such as already compressed files\&. +such as already compressed files\&. .IP The "dont compress" option takes a space-separated list of case-insensitive wildcard patterns\&. Any source filename matching one @@ -549,7 +574,7 @@ .IP The default setting is \f(CW*\&.gz *\&.tgz *\&.zip *\&.z *\&.rpm *\&.deb *\&.iso *\&.bz2 *\&.tbz\fP .IP -.IP "\fBpre-xfer exec\fP, \fBpost-xfer exec\fP" +.IP "\fBpre-xfer exec\fP, \fBpost-xfer exec\fP" You may specify a command to be run before and/or after the transfer\&. If the \fBpre-xfer exec\fP command fails, the transfer is aborted before it begins\&. @@ -569,6 +594,8 @@ .IP o \fBRSYNC_USER_NAME\fP: The accessing user\&'s name (empty if no user)\&. .IP o +\fBRSYNC_PID\fP: A unique number for this transfer\&. +.IP o \fBRSYNC_REQUEST\fP: (pre-xfer only) The module/path info specified by the user (note that the user can specify multiple source files, so the request can be something like "mod/path1 mod/path2", etc\&.)\&. @@ -577,19 +604,24 @@ in these numbered values\&. RSYNC_ARG0 is always "rsyncd", and the last value contains a single period\&. .IP o -\fBRSYNC_EXIT_STATUS\fP: (post-xfer only) rsync\&'s exit value\&. This will be 0 for a -successful run, a positive value for an error that rsync returned -(e\&.g\&. 23=partial xfer), or a -1 if rsync failed to exit properly\&. -.IP o -\fBRSYNC_RAW_STATUS\fP: (post-xfer only) the raw exit value from \f(CWwaitpid()\fP\&. -.RE +\fBRSYNC_EXIT_STATUS\fP: (post-xfer only) the server side\&'s exit value\&. +This will be 0 for a successful run, a positive value for an error that the +server generated, or a \-1 if rsync failed to exit properly\&. Note that an +error that occurs on the client side does not currently get sent to the +server side, so this is not the final exit status for the whole transfer\&. +.IP o +\fBRSYNC_RAW_STATUS\fP: (post-xfer only) the raw exit value from +\f(CWwaitpid()\fP +\&. +.RE + .IP Even though the commands can be associated with a particular module, they are run using the permissions of the user that started the daemon (not the module\&'s uid/gid setting) without any chroot restrictions\&. .IP -.PP -.SH "AUTHENTICATION STRENGTH" +.SH "AUTHENTICATION STRENGTH" + .PP The authentication protocol used in rsync is a 128 bit MD4 based challenge response system\&. This is fairly weak protection, though (with @@ -606,28 +638,24 @@ Future versions of rsync may support SSL for better authentication and encryption, but that is still being investigated\&. .PP -.SH "EXAMPLES" +.SH "EXAMPLES" + .PP A simple rsyncd\&.conf file that allow anonymous rsync to a ftp area at \f(CW/home/ftp\fP would be: .PP - .nf - [ftp] path = /home/ftp comment = ftp export area .fi - .PP A more sophisticated example would be: .PP - .nf - uid = nobody gid = nobody @@ -647,7 +675,7 @@ [rsyncftp] path = /var/ftp/pub/rsync comment = rsync ftp area (approx 6 MB) - + [sambawww] path = /public_html/samba comment = Samba WWW pages (approx 240 MB) @@ -659,7 +687,6 @@ secrets file = /etc/rsyncd\&.secrets .fi - .PP The /etc/rsyncd\&.secrets file would look something like this: @@ -669,28 +696,35 @@ .br \f(CWsusan:herpass\fP .br -.RE +.RE + .PP -.SH "FILES" +.SH "FILES" + .PP /etc/rsyncd\&.conf or rsyncd\&.conf .PP -.SH "SEE ALSO" +.SH "SEE ALSO" + .PP -rsync(1) +\fBrsync\fP(1) .PP -.SH "DIAGNOSTICS" +.SH "DIAGNOSTICS" + .PP -.SH "BUGS" +.SH "BUGS" + .PP Please report bugs! The rsync bug tracking system is online at http://rsync\&.samba\&.org/ .PP -.SH "VERSION" +.SH "VERSION" + .PP -This man page is current for version 2\&.6\&.8 of rsync\&. +This man page is current for version 2\&.6\&.9 of rsync\&. .PP -.SH "CREDITS" +.SH "CREDITS" + .PP rsync is distributed under the GNU public license\&. See the file COPYING for details\&. @@ -706,16 +740,18 @@ This program uses the zlib compression library written by Jean-loup Gailly and Mark Adler\&. .PP -.SH "THANKS" +.SH "THANKS" + .PP Thanks to Warren Stanley for his original idea and patch for the rsync daemon\&. Thanks to Karsten Thygesen for his many suggestions and -documentation! +documentation! .PP -.SH "AUTHOR" +.SH "AUTHOR" + .PP rsync was written by Andrew Tridgell and Paul Mackerras\&. Many people have later contributed to it\&. .PP Mailing lists for support and development are available at -http://lists\&.samba\&.org +http://lists\&.samba\&.org diff -urN --exclude=patches rsync-2.6.8/rsyncd.conf.yo rsync-2.6.9/rsyncd.conf.yo --- rsync-2.6.8/rsyncd.conf.yo 2006-04-22 08:38:34.000000000 -0700 +++ rsync-2.6.9/rsyncd.conf.yo 2006-11-06 20:39:47.000000000 -0800 @@ -1,5 +1,5 @@ mailto(rsync-bugs@samba.org) -manpage(rsyncd.conf)(5)(22 Apr 2006)()() +manpage(rsyncd.conf)(5)(6 Nov 2006)()() manpagename(rsyncd.conf)(configuration file for rsync in daemon mode) manpagesynopsis() @@ -8,27 +8,27 @@ manpagedescription() The rsyncd.conf file is the runtime configuration file for rsync when -run as an rsync daemon. +run as an rsync daemon. The rsyncd.conf file controls authentication, access, logging and available modules. manpagesection(FILE FORMAT) -The file consists of modules and parameters. A module begins with the +The file consists of modules and parameters. A module begins with the name of the module in square brackets and continues until the next module begins. Modules contain parameters of the form 'name = value'. The file is line-based -- that is, each newline-terminated line represents either a comment, a module name or a parameter. -Only the first equals sign in a parameter is significant. Whitespace before +Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing and internal whitespace in module and parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is retained verbatim. -Any line beginning with a hash (#) is ignored, as are lines containing +Any line beginning with a hash (#) is ignored, as are lines containing only whitespace. Any line ending in a \ is "continued" on the next line in the @@ -37,12 +37,12 @@ The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or true/false. Case is not significant in boolean values, but is preserved -in string values. +in string values. manpagesection(LAUNCHING THE RSYNC DAEMON) The rsync daemon is launched by specifying the bf(--daemon) option to -rsync. +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 @@ -58,7 +58,7 @@ verb( rsync 873/tcp) and a single line something like this to /etc/inetd.conf: - + verb( rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon) Replace "/usr/bin/rsync" with the path to where you have rsync installed on @@ -67,12 +67,12 @@ Note that you should bf(not) send the rsync daemon a HUP signal to force it to reread the tt(rsyncd.conf) file. The file is re-read on each client -connection. +connection. manpagesection(GLOBAL OPTIONS) The first parameters in the file (before a [module] header) are the -global parameters. +global parameters. You may also include any module parameters in the global part of the config file in which case the supplied value will override the @@ -84,25 +84,9 @@ usually contains site information and any legal notices. The default is no motd file. -dit(bf(log file)) The "log file" option tells the rsync daemon to log -messages to that file rather than using syslog. This is particularly -useful on systems (such as AIX) where code(syslog()) doesn't work for -chrooted programs. If the daemon fails to open to specified file, it -will fall back to using syslog and output an error about the failure. -(Note that a failure to open the specified log file used to be a fatal -error.) - dit(bf(pid file)) The "pid file" option tells the rsync daemon to write its process ID to that file. -dit(bf(syslog facility)) The "syslog facility" option allows you to -specify the syslog facility name to use when logging messages from the -rsync daemon. You may use any standard syslog facility name which is -defined on your system. Common names are auth, authpriv, cron, daemon, -ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, -local1, local2, local3, local4, local5, local6 and local7. The default -is daemon. - dit(bf(port)) You can override the default port the daemon will listen on by specifying this value (defaults to 873). This is ignored if the daemon is being run by inetd, and is superseded by the bf(--port) command-line option. @@ -142,7 +126,7 @@ dit(bf(use chroot)) If "use chroot" is true, the rsync daemon will chroot to the "path" before starting the file transfer with the client. This has the advantage of extra protection against possible implementation security -holes, but it has the disadvantages of requiring super-user privileges, +holes, but it has the disadvantages of requiring super-user privileges, of not being able to follow symbolic links that are either absolute or outside of the new root path, and of complicating the preservation of usernames and groups (see below). When "use chroot" is false, for security reasons, @@ -180,6 +164,29 @@ message telling them to try later. The default is 0 which means no limit. See also the "lock file" option. +dit(bf(log file)) When the "log file" option is set to a non-empty +string, the rsync daemon will log messages to the indicated file rather +than using syslog. This is particularly useful on systems (such as AIX) +where code(syslog()) doesn't work for chrooted programs. The file is +opened before code(chroot()) is called, allowing it to be placed outside +the transfer. If this value is set on a per-module basis instead of +globally, the global log will still contain any authorization failures +or config-file error messages. + +If the daemon fails to open to specified file, it will fall back to +using syslog and output an error about the failure. (Note that the +failure to open the specified log file used to be a fatal error.) + +dit(bf(syslog facility)) The "syslog facility" option allows you to +specify the syslog facility name to use when logging messages from the +rsync daemon. You may use any standard syslog facility name which is +defined on your system. Common names are auth, authpriv, cron, daemon, +ftp, kern, lpr, mail, news, security, syslog, user, uucp, local0, +local1, local2, local3, local4, local5, local6 and local7. The default +is daemon. This setting has no effect if the "log file" setting is a +non-empty string (either set in the per-modules settings, or inherited +from the global settings). + dit(bf(max verbosity)) The "max verbosity" option allows you to control the maximum amount of verbose information that you'll allow the daemon to generate (since the information goes into the log file). The default is 1, @@ -188,7 +195,7 @@ dit(bf(lock file)) The "lock file" option specifies the file to use to support the "max connections" option. The rsync daemon uses record locking on this file to ensure that the max connections limit is not -exceeded for the modules sharing the lock file. +exceeded for the modules sharing the lock file. The default is tt(/var/run/rsyncd.lock). dit(bf(read only)) The "read only" option determines whether clients @@ -240,7 +247,7 @@ the daemon: that is, it excludes files received by a client when receiving from a daemon and files deleted on a daemon when sending to a daemon, but it doesn't exclude files from being deleted on a client when receiving -from a daemon. +from a daemon. dit(bf(exclude from)) The "exclude from" option specifies a filename on the daemon that contains exclude patterns, one per line. @@ -306,13 +313,13 @@ with a hash (#) is considered a comment and is skipped. The passwords can contain any characters but be warned that many operating systems limit the length of passwords that can be typed at the client end, so -you may find that passwords longer than 8 characters don't work. +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)). The file must normally not be readable by "other"; see "strict modes". -dit(bf(strict modes)) The "strict modes" option determines whether or not +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 true, then the secrets file must not be readable by any user ID other than the one that the rsync daemon is running under. If "strict modes" is @@ -326,7 +333,7 @@ Each pattern can be in one of five forms: -quote(itemize( +quote(itemization( it() a dotted decimal IPv4 address of the form a.b.c.d, or an IPv6 address of the form a:b:c::d:e:f. In this case the incoming machine's IP address must match exactly. @@ -357,7 +364,7 @@ option. If both options are specified then the "hosts allow" option s checked first and a match results in the client being able to connect. The "hosts deny" option is then checked and a match means -that the host is rejected. If the host does not match either the +that the host is rejected. If the host does not match either the "hosts allow" or the "hosts deny" patterns then it is allowed to connect. @@ -376,14 +383,14 @@ I/O errors have occurred in order to prevent disastrous deletion due to a temporary resource shortage or other I/O error. In some cases this test is counter productive so you can use this option to turn off this -behavior. +behavior. dit(bf(ignore nonreadable)) This tells the rsync daemon to completely ignore files that are not readable by the user. This is useful for public archives that may have some non-readable files among the directories, and the sysadmin doesn't want those files to be seen at all. -dit(bf(transfer logging)) The "transfer logging" option enables per-file +dit(bf(transfer logging)) The "transfer logging" option enables per-file logging of downloads and uploads in a format somewhat similar to that used by ftp daemons. The daemon always logs the transfer at the end, so if a transfer is aborted, no mention will be made in the log file. @@ -405,9 +412,9 @@ The single-character escapes that are understood are as follows: -quote(itemize( +quote(itemization( it() %a the remote IP address - it() %b the number of bytes actually transferred + it() %b the number of bytes actually transferred it() %B the permission bits of the file (e.g. rwxrwxrwt) it() %c the checksum bytes received for this file (only when sending) it() %f the filename (long form on sender; no trailing "/") @@ -459,15 +466,18 @@ delete modes without affecting bf(--remove-sent-files). When an option is refused, the daemon prints an error message and exits. -To prevent all compression, you can use "dont compress = *" (see below) +To prevent all compression when serving files, +you can use "dont compress = *" (see below) instead of "refuse options = compress" to avoid returning an error to a client that requests compression. dit(bf(dont compress)) The "dont compress" option allows you to select filenames based on wildcard patterns that should not be compressed -during transfer. Compression is expensive in terms of CPU usage so it +when pulling files from the daemon (no analogous option exists to +govern the pushing of files to a daemon). +Compression is expensive in terms of CPU usage, so it is usually good to not try to compress files that won't compress well, -such as already compressed files. +such as already compressed files. The "dont compress" option takes a space-separated list of case-insensitive wildcard patterns. Any source filename matching one @@ -482,21 +492,24 @@ The following environment variables will be set, though some are specific to the pre-xfer or the post-xfer environment: -quote(itemize( +quote(itemization( it() bf(RSYNC_MODULE_NAME): The name of the module being accessed. it() bf(RSYNC_MODULE_PATH): The path configured for the module. it() bf(RSYNC_HOST_ADDR): The accessing host's IP address. it() bf(RSYNC_HOST_NAME): The accessing host's name. it() bf(RSYNC_USER_NAME): The accessing user's name (empty if no user). + it() bf(RSYNC_PID): A unique number for this transfer. it() bf(RSYNC_REQUEST): (pre-xfer only) The module/path info specified by the user (note that the user can specify multiple source files, so the request can be something like "mod/path1 mod/path2", etc.). it() bf(RSYNC_ARG#): (pre-xfer only) The pre-request arguments are set in these numbered values. RSYNC_ARG0 is always "rsyncd", and the last value contains a single period. - it() bf(RSYNC_EXIT_STATUS): (post-xfer only) rsync's exit value. This will be 0 for a - successful run, a positive value for an error that rsync returned - (e.g. 23=partial xfer), or a -1 if rsync failed to exit properly. + it() bf(RSYNC_EXIT_STATUS): (post-xfer only) the server side's exit value. + This will be 0 for a successful run, a positive value for an error that the + server generated, or a -1 if rsync failed to exit properly. Note that an + error that occurs on the client side does not currently get sent to the + server side, so this is not the final exit status for the whole transfer. it() bf(RSYNC_RAW_STATUS): (post-xfer only) the raw exit value from code(waitpid()). )) @@ -555,7 +568,7 @@ [rsyncftp] path = /var/ftp/pub/rsync comment = rsync ftp area (approx 6 MB) - + [sambawww] path = /public_html/samba comment = Samba WWW pages (approx 240 MB) @@ -580,7 +593,7 @@ manpageseealso() -rsync(1) +bf(rsync)(1) manpagediagnostics() @@ -591,7 +604,7 @@ manpagesection(VERSION) -This man page is current for version 2.6.8 of rsync. +This man page is current for version 2.6.9 of rsync. manpagesection(CREDITS) @@ -613,7 +626,7 @@ Thanks to Warren Stanley for his original idea and patch for the rsync daemon. Thanks to Karsten Thygesen for his many suggestions and -documentation! +documentation! manpageauthor() @@ -621,4 +634,4 @@ Many people have later contributed to it. Mailing lists for support and development are available at -url(http://lists.samba.org)(lists.samba.org) +url(http://lists.samba.org)(lists.samba.org) diff -urN --exclude=patches rsync-2.6.8/runtests.sh rsync-2.6.9/runtests.sh --- rsync-2.6.8/runtests.sh 2006-03-16 13:37:18.000000000 -0800 +++ rsync-2.6.9/runtests.sh 2006-11-03 16:18:49.000000000 -0800 @@ -1,6 +1,7 @@ #! /bin/sh # Copyright (C) 2001, 2002 by Martin Pool +# Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version @@ -13,8 +14,7 @@ # # 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. - +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # rsync top-level test script -- this invokes all the other more # detailed tests in order. This script can either be called by `make @@ -138,9 +138,27 @@ fi fi +POSIXLY_CORRECT=1 +if test x"$TOOLDIR" = x; then + TOOLDIR=`pwd` +fi +srcdir=`dirname $0` +if test x"$srcdir" = x -o x"$srcdir" = x.; then + srcdir="$TOOLDIR" +fi +if test x"$rsync_bin" = x; then + rsync_bin="$TOOLDIR/rsync" +fi + +# This allows the user to specify extra rsync options -- use carefully! +RSYNC="$rsync_bin $*" +#RSYNC="valgrind $rsync_bin $*" + +export POSIXLY_CORRECT TOOLDIR srcdir RSYNC + echo "============================================================" -echo "$0 running in `pwd`" -echo " rsync_bin=$rsync_bin" +echo "$0 running in $TOOLDIR" +echo " rsync_bin=$RSYNC" echo " srcdir=$srcdir" if [ -f /usr/bin/whoami ]; then @@ -164,7 +182,7 @@ fi # Check if setfacl is around and if it supports the -k or -s option. -if setfacl --help 2>/dev/null | grep ' -k,' >/dev/null; then +if setfacl --help 2>&1 | grep ' -k,\|\[-[a-z]*k' >/dev/null; then setfacl_nodef='setfacl -k' elif setfacl -s u::7,g::5,o:5 testsuite 2>/dev/null; then setfacl_nodef='setfacl -s u::7,g::5,o:5' @@ -172,6 +190,8 @@ setfacl_nodef=true fi +export setfacl_nodef + if [ ! -f "$rsync_bin" ]; then echo "rsync_bin $rsync_bin is not a file" >&2 exit 2 @@ -182,11 +202,6 @@ exit 2 fi -RSYNC="$rsync_bin" -#RSYNC="valgrind --tool=addrcheck $rsync_bin" - -export rsync_bin RSYNC setfacl_nodef - skipped=0 missing=0 passed=0 @@ -195,7 +210,7 @@ # Prefix for scratch directory. We create separate directories for # each test case, so that they can be left behind in case of failure # to aid investigation. -scratchbase="`pwd`"/testtmp +scratchbase="$TOOLDIR"/testtmp echo " scratchbase=$scratchbase" suitedir="$srcdir/testsuite" @@ -206,7 +221,7 @@ [ -d "$scratchdir" ] && rm -rf "$scratchdir" mkdir "$scratchdir" # Get rid of default ACLs and dir-setgid to avoid confusing some tests. - $setfacl_nodef "$scratchdir" + $setfacl_nodef "$scratchdir" || true chmod g-s "$scratchdir" return 0 } diff -urN --exclude=patches rsync-2.6.8/sender.c rsync-2.6.9/sender.c --- rsync-2.6.8/sender.c 2006-01-14 12:26:24.000000000 -0800 +++ rsync-2.6.9/sender.c 2006-09-19 18:53:32.000000000 -0700 @@ -1,21 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ + * Routines only used by the sending process. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" @@ -24,14 +27,14 @@ extern int am_server; extern int am_daemon; extern int log_before_transfer; -extern int log_format_has_i; -extern int daemon_log_format_has_i; +extern int stdout_format_has_i; +extern int logfile_format_has_i; extern int csum_length; extern int append_mode; extern int io_error; extern int allowed_lull; extern int protocol_version; -extern int remove_sent_files; +extern int remove_source_files; extern int updating_basis_file; extern int make_backups; extern int do_progress; @@ -40,7 +43,7 @@ extern int write_batch; extern struct stats stats; extern struct file_list *the_file_list; -extern char *log_format; +extern char *stdout_format; /** @@ -125,17 +128,19 @@ return; file = the_file_list->files[ndx]; - /* The generator might tell us about symlinks we didn't send. */ - if (!(file->flags & FLAG_SENT) && !S_ISLNK(file->mode)) - return; if (file->dir.root) { offset = stringjoin(fname, sizeof fname, file->dir.root, "/", NULL); } else offset = 0; f_name(file, fname + offset); - if (remove_sent_files && do_unlink(fname) == 0 && verbose > 1) - rprintf(FINFO, "sender removed %s\n", fname + offset); + if (remove_source_files) { + if (do_unlink(fname) == 0) { + if (verbose > 1) + rprintf(FINFO, "sender removed %s\n", fname + offset); + } else + rsyserr(FERROR, errno, "sender failed to remove %s", fname + offset); + } } static void write_ndx_and_attrs(int f_out, int ndx, int iflags, @@ -215,8 +220,8 @@ int phase = 0, max_phase = protocol_version >= 29 ? 2 : 1; struct stats initial_stats; int save_make_backups = make_backups; - int itemizing = am_daemon ? daemon_log_format_has_i - : !am_server && log_format_has_i; + int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i; + enum logcode log_code = log_before_transfer ? FLOG : FINFO; int f_xfer = write_batch < 0 ? batch_fd : f_out; int i, j; @@ -278,8 +283,7 @@ stats.total_transferred_size += file->length; if (!do_xfers) { /* log the transfer */ - if (!am_server && log_format) - log_item(file, &stats, iflags, NULL); + log_item(FCLIENT, file, &stats, iflags, NULL); write_ndx_and_attrs(f_out, i, iflags, fnamecmp_type, xname, xlen); continue; @@ -340,9 +344,9 @@ rprintf(FINFO, "calling match_sums %s\n", fname); if (log_before_transfer) - log_item(file, &initial_stats, iflags, NULL); + log_item(FCLIENT, file, &initial_stats, iflags, NULL); else if (!am_server && verbose && do_progress) - rprintf(FINFO, "%s\n", fname2); + rprintf(FCLIENT, "%s\n", fname2); set_compression(fname); @@ -350,8 +354,7 @@ if (do_progress) end_progress(st.st_size); - if (!log_before_transfer) - log_item(file, &initial_stats, iflags, NULL); + log_item(log_code, file, &initial_stats, iflags, NULL); if (mbuf) { j = unmap_file(mbuf); diff -urN --exclude=patches rsync-2.6.8/socket.c rsync-2.6.9/socket.c --- rsync-2.6.8/socket.c 2006-04-10 17:48:28.000000000 -0700 +++ rsync-2.6.9/socket.c 2006-10-31 11:21:57.000000000 -0800 @@ -1,39 +1,34 @@ -/* -*- c-file-style: "linux" -*- - - rsync -- fast file replication program - - Copyright (C) 1992-2001 by Andrew Tridgell - Copyright (C) 2001, 2002 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. -*/ - -/** - * @file socket.c - * +/* * Socket functions used in rsync. * - * This file is now converted to use the new-style getaddrinfo() + * Copyright (C) 1992-2001 Andrew Tridgell + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* This file is now converted to use the new-style getaddrinfo() * interface, which supports IPv6 but is also supported on recent * IPv4-only machines. On systems that don't have that interface, we - * emulate it using the KAME implementation. - **/ + * emulate it using the KAME implementation. */ #include "rsync.h" #include #include +#include extern char *bind_address; extern int default_af_hint; diff -urN --exclude=patches rsync-2.6.8/support/cull_options rsync-2.6.9/support/cull_options --- rsync-2.6.8/support/cull_options 2005-06-23 08:53:26.000000000 -0700 +++ rsync-2.6.9/support/cull_options 2006-09-17 17:13:50.000000000 -0700 @@ -55,7 +55,7 @@ foreach my $opt (sort keys %long_opt) { my $val = $long_opt{$opt}; - $val = 1 if $opt =~ /^max-/; + $val = 1 if $opt =~ /^(max-|min-)/; $val = 3 if $opt eq 'files-from'; $val = '$ro ? -1 : ' . $val if $opt =~ /^remove-/; print " '$opt' => $val,\n"; diff -urN --exclude=patches rsync-2.6.8/support/file-attr-restore rsync-2.6.9/support/file-attr-restore --- rsync-2.6.8/support/file-attr-restore 2006-03-21 10:06:26.000000000 -0800 +++ rsync-2.6.9/support/file-attr-restore 2006-09-02 13:05:08.000000000 -0700 @@ -47,7 +47,8 @@ my($type, $perms, $owner, $group, $name) = /$detail_line/; die "Invalid input line $.:\n$_" unless defined $name; die "A filename is not properly escaped:\n$_" unless $name =~ /^[^"\\]*(\\(\d\d\d|\D)[^"\\]*)*$/; - my $fn = eval "\"$name\""; + my $fn = $name; + $fn =~ s/\\(\d+|.)/ eval "\"\\$1\"" /eg; if ($type eq '-') { undef $type unless -f $fn; } elsif ($type eq 'd') { diff -urN --exclude=patches rsync-2.6.8/support/rrsync rsync-2.6.9/support/rrsync --- rsync-2.6.8/support/rrsync 2005-06-23 08:58:57.000000000 -0700 +++ rsync-2.6.9/support/rrsync 2006-09-17 17:16:31.000000000 -0700 @@ -50,17 +50,19 @@ # To disable a short-named option, add its letter to this string: our $short_disabled = ''; -our $short_no_arg = 'CDHIKLORSWbcdglnoprtuvxz'; # DO NOT REMOVE ANY +our $short_no_arg = 'CDEHIKLORSWbcdgklmnoprtuvxz'; # DO NOT REMOVE ANY our $short_with_num = 'B'; # DO NOT REMOVE ANY # To disable a long-named option, change its value to a -1. The values mean: # 0 = the option has no arg; 1 = the arg doesn't need any checking; 2 = only # check the arg when receiving; and 3 = always check the arg. our %long_opt = ( + 'append' => 0, 'backup-dir' => 2, 'bwlimit' => 1, 'checksum-seed' => 1, 'compare-dest' => 2, + 'compress-level' => 1, 'copy-dest' => 2, 'copy-unsafe-links' => 0, 'daemon' => 0, @@ -83,19 +85,25 @@ 'log-format' => 1, 'max-delete' => 1, 'max-size' => 1, + 'min-size' => 1, 'modify-window' => 1, 'no-implied-dirs' => 0, + 'no-r' => 0, 'no-relative' => 0, + 'no-specials' => 0, 'numeric-ids' => 0, 'only-write-batch' => 1, 'partial' => 0, 'partial-dir' => 2, 'remove-sent-files' => $ro ? -1 : 0, + 'remove-source-files' => $ro ? -1 : 0, 'safe-links' => 0, 'sender' => 0, 'server' => 0, 'size-only' => 0, + 'specials' => 0, 'suffix' => 1, + 'super' => 0, 'temp-dir' => 2, 'timeout' => 1, ); diff -urN --exclude=patches rsync-2.6.8/syscall.c rsync-2.6.9/syscall.c --- rsync-2.6.8/syscall.c 2006-01-29 10:52:53.000000000 -0800 +++ rsync-2.6.9/syscall.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,28 +1,25 @@ -/* - Copyright (C) Andrew Tridgell 1998 - Copyright (C) 2002 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. -*/ - -/** - * @file syscall.c - * +/* * Syscall wrappers to ensure that nothing gets done in dry_run mode * and to handle system peculiarities. - **/ + * + * Copyright (C) 1998 Andrew Tridgell + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" @@ -168,10 +165,10 @@ /* Some BSD systems cannot make a directory if the name * contains a trailing slash. * */ - + /* Don't change empty string; and also we can't improve on * "/" */ - + l = strlen(name); while (l > 1) { if (name[--l] != '/') @@ -184,7 +181,7 @@ { if (dry_run) return 0; RETURN_ERROR_IF_RO_OR_LO; - trim_trailing_slashes(fname); + trim_trailing_slashes(fname); return mkdir(fname, mode); } diff -urN --exclude=patches rsync-2.6.8/t_stub.c rsync-2.6.9/t_stub.c --- rsync-2.6.8/t_stub.c 2006-02-23 17:56:29.000000000 -0800 +++ rsync-2.6.9/t_stub.c 2006-09-23 20:11:41.000000000 -0700 @@ -1,35 +1,32 @@ -/* -*- c-file-style: "linux" -*- - * - * Copyright (C) 2001, 2002 by Martin Pool +/* + * This file contains really simple implementations for rsync global + * functions, so that module test harnesses can run standalone. + * + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison * * 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. -*/ + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" -/** - * @file t_stub.c - * - * This file contains really simple implementations for rsync global - * functions, so that module test harnesses can run standalone. - **/ - int modify_window = 0; int module_id = -1; int relative_paths = 0; int human_readable = 0; +int module_dirlen = 0; mode_t orig_umask = 002; char *partial_dir; struct filter_list_struct server_filter_list; @@ -69,16 +66,20 @@ char *lp_name(UNUSED(int mod)) { - return NULL; + return NULL; } BOOL lp_use_chroot(UNUSED(int mod)) { - return 0; + return 0; } char *lp_path(UNUSED(int mod)) { - return NULL; + return NULL; } + const char *who_am_i(void) +{ + return "tester"; +} diff -urN --exclude=patches rsync-2.6.8/t_unsafe.c rsync-2.6.9/t_unsafe.c --- rsync-2.6.8/t_unsafe.c 2003-09-10 01:27:34.000000000 -0700 +++ rsync-2.6.9/t_unsafe.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,36 +1,32 @@ /* - * Copyright (C) 2002 by Martin Pool - * + * Test harness for unsafe_symlink(). Not linked into rsync itself. + * + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003 Wayne Davison + * * 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. + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @file - * - * Test harness for unsafe_symlink(). Not linked into @c rsync itself. - * - * Prints either "safe" or "unsafe" depending on the two arguments. - * Always returns 0 unless something extraordinary happens. - **/ +/* Prints either "safe" or "unsafe" depending on the two arguments. + * Always returns 0 unless something extraordinary happens. */ #include "rsync.h" int dry_run, read_only, list_only, verbose; int preserve_perms = 0; - int main(int argc, char **argv) { @@ -41,6 +37,6 @@ printf("%s\n", unsafe_symlink(argv[1], argv[2]) ? "unsafe" : "safe"); - + return 0; } diff -urN --exclude=patches rsync-2.6.8/testsuite/chmod-option.test rsync-2.6.9/testsuite/chmod-option.test --- rsync-2.6.8/testsuite/chmod-option.test 2006-02-03 09:58:48.000000000 -0800 +++ rsync-2.6.9/testsuite/chmod-option.test 2006-10-12 21:59:53.000000000 -0700 @@ -38,5 +38,35 @@ checkit "$RSYNC -avv --chmod ug-s,a+rX,D+w \"$fromdir/\" \"$todir/\"" "$checkdir" "$todir" +rm -r "$fromdir" "$checkdir" "$todir" +makepath "$todir" +makepath "$fromdir/foo" +touch "$fromdir/bar" + +checkit "$RSYNC -avv \"$fromdir/\" \"$checkdir/\"" "$fromdir" "$checkdir" +chmod o+x "$fromdir"/bar + +checkit "$RSYNC -avv --chmod=Fo-x \"$fromdir/\" \"$todir/\"" "$checkdir" "$todir" + +# Tickle a bug in rsync 2.6.8: if you push a new directory with --perms off to +# a daemon with an incoming chmod, the daemon pretends the directory is a file +# for the purposes of the second application of the incoming chmod. + +build_rsyncd_conf +cat >>"$scratchdir/test-rsyncd.conf" <"$todir/filters" <"$chkfile" +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ >f+++++++ bar/baz/rsync @@ -130,11 +131,11 @@ diff $diffopt "$chkfile" "$outfile" || test_fail "test 7 failed" mv "$todir" "$lddir" -$RSYNC -ivvplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \ +$RSYNC -ivvplrtH --copy-dest=../ld "$fromdir/" "$todir/" \ | tee "$outfile" filter_outfile cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ cf bar/baz/rsync @@ -147,10 +148,10 @@ diff $diffopt "$chkfile" "$outfile" || test_fail "test 8 failed" rm -rf "$todir" -$RSYNC -iplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \ +$RSYNC -iplrtH --copy-dest=../ld "$fromdir/" "$todir/" \ | tee "$outfile" cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ cd+++++++ foo/ @@ -181,7 +182,7 @@ | tee "$outfile" filter_outfile cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ hf bar/baz/rsync @@ -194,10 +195,10 @@ diff $diffopt "$chkfile" "$outfile" || test_fail "test 11 failed" rm -rf "$todir" -$RSYNC -iplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \ +$RSYNC -iplrtH --dry-run --link-dest=../ld "$fromdir/" "$todir/" \ | tee "$outfile" cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ cd+++++++ foo/ @@ -205,6 +206,17 @@ diff $diffopt "$chkfile" "$outfile" || test_fail "test 12 failed" rm -rf "$todir" +$RSYNC -iplrtH --link-dest=../ld "$fromdir/" "$todir/" \ + | tee "$outfile" +cat <"$chkfile" +cd+++++++ ./ +cd+++++++ bar/ +cd+++++++ bar/baz/ +cd+++++++ foo/ +EOT +diff $diffopt "$chkfile" "$outfile" || test_fail "test 13 failed" + +rm -rf "$todir" $RSYNC -vvplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \ | tee "$outfile" filter_outfile @@ -219,7 +231,7 @@ "foo/extra" is a hard link foo/sym is uptodate EOT -diff $diffopt "$chkfile" "$outfile" || test_fail "test 13 failed" +diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed" rm -rf "$todir" $RSYNC -ivvplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \ @@ -228,7 +240,7 @@ # TODO fix really-old problem when combining -H with --compare-dest: # missing output for foo/extra hard-link (and it might not be updated)! cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ .f bar/baz/rsync @@ -237,18 +249,18 @@ .f foo/config2 .L foo/sym -> ../bar/baz/rsync EOT -diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed" +diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed" rm -rf "$todir" $RSYNC -iplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \ | tee "$outfile" cat <"$chkfile" -.d..t.... ./ +cd+++++++ ./ cd+++++++ bar/ cd+++++++ bar/baz/ cd+++++++ foo/ EOT -diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed" +diff $diffopt "$chkfile" "$outfile" || test_fail "test 16 failed" rm -rf "$todir" $RSYNC -vvplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \ @@ -265,7 +277,7 @@ "foo/extra" is a hard link foo/sym is uptodate EOT -diff $diffopt "$chkfile" "$outfile" || test_fail "test 16 failed" +diff $diffopt "$chkfile" "$outfile" || test_fail "test 17 failed" # The script would have aborted on error, so getting here means we've won. exit 0 diff -urN --exclude=patches rsync-2.6.8/testsuite/rsync.fns rsync-2.6.9/testsuite/rsync.fns --- rsync-2.6.8/testsuite/rsync.fns 2006-02-04 11:27:07.000000000 -0800 +++ rsync-2.6.9/testsuite/rsync.fns 2006-05-30 11:26:17.000000000 -0700 @@ -224,17 +224,19 @@ port=2612 pidfile="$scratchdir/rsyncd.pid" logfile="$scratchdir/rsyncd.log" + hostname=`uname -n` cat >"$conf" < + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005 Wayne Davison * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version @@ -11,17 +13,12 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @file tls.c - * - * Trivial @c ls for comparing two directories after running an rsync. - * - * The problem with using the system's own ls is that some features +/* 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. @@ -34,9 +31,7 @@ * * A key requirement for this program is that the output be "very * reproducible." So we mask away information that can accidentally - * change. - **/ - + * change. */ #include "rsync.h" @@ -48,7 +43,6 @@ int list_only = 0; int preserve_perms = 0; - static void failed(char const *what, char const *where) { fprintf(stderr, PROGRAM ": %s %s: %s\n", @@ -56,8 +50,6 @@ exit(1); } - - static void list_file(const char *fname) { STRUCT_STAT buf; @@ -82,7 +74,7 @@ buf.st_mode &= ~0777; buf.st_mtime = (time_t)0; buf.st_uid = buf.st_gid = 0; - strcpy(linkbuf, " -> "); + strlcpy(linkbuf, " -> ", sizeof linkbuf); /* const-cast required for silly UNICOS headers */ len = readlink((char *) fname, linkbuf+4, sizeof(linkbuf) - 4); if (len == -1) @@ -99,16 +91,16 @@ if (buf.st_mtime) { mt = gmtime(&buf.st_mtime); - sprintf(datebuf, "%04d-%02d-%02d %02d:%02d:%02d", + snprintf(datebuf, sizeof datebuf, + "%04d-%02d-%02d %02d:%02d:%02d", (int)mt->tm_year + 1900, (int)mt->tm_mon + 1, (int)mt->tm_mday, (int)mt->tm_hour, (int)mt->tm_min, (int)mt->tm_sec); - } else { - strcpy(datebuf, " "); - } + } else + strlcpy(datebuf, " ", sizeof datebuf); /* TODO: Perhaps escape special characters in fname? */ @@ -124,7 +116,6 @@ datebuf, fname, linkbuf); } - int main(int argc, char *argv[]) { diff -urN --exclude=patches rsync-2.6.8/token.c rsync-2.6.9/token.c --- rsync-2.6.8/token.c 2005-12-29 23:19:16.000000000 -0800 +++ rsync-2.6.9/token.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,21 +1,24 @@ /* - Copyright (C) Andrew Tridgell 1996 - Copyright (C) Paul Mackerras 1996 - - 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. -*/ + * Routines used by the file-transfer code. + * + * Copyright (C) 1996 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2003, 2004, 2005 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ #include "rsync.h" #include "zlib/zlib.h" @@ -105,7 +108,6 @@ return n; } - /* non-compressing send token */ static void simple_send_token(int f, int32 token, struct map_struct *buf, OFF_T offset, int32 n) @@ -124,7 +126,6 @@ write_int(f, -(token+1)); } - /* Flag bytes in compressed stream are encoded as follows: */ #define END_FLAG 0 /* that's all folks */ #define TOKEN_LONG 0x20 /* followed by 32-bit token number */ @@ -188,10 +189,8 @@ last_run_end = 0; run_start = token; flush_pending = 0; - } else if (last_token == -2) { run_start = token; - } else if (nb != 0 || token != last_token + 1 || token >= run_start + 65536) { /* output previous run */ @@ -295,7 +294,6 @@ } } - /* tells us what the receiver is in the middle of doing */ static enum { r_init, r_idle, r_running, r_inflating, r_inflated } recv_state; @@ -494,7 +492,6 @@ send_deflated_token(f, token, buf, offset, n, toklen); } - /* * receive a token or buffer from the other end. If the reurn value is >0 then * it is a data buffer of that length, and *data will point at the data. diff -urN --exclude=patches rsync-2.6.8/trimslash.c rsync-2.6.9/trimslash.c --- rsync-2.6.8/trimslash.c 2003-09-10 01:27:34.000000000 -0700 +++ rsync-2.6.9/trimslash.c 2006-04-25 16:51:15.000000000 -0700 @@ -1,19 +1,22 @@ /* - * Copyright (C) 2002 by Martin Pool - * + * Simple utility used only by the test harness. + * + * Copyright (C) 2002 Martin Pool + * Copyright (C) 2003 Wayne Davison + * * 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. + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "rsync.h" @@ -24,16 +27,11 @@ int list_only = 0; int preserve_perms = 0; -/** - * @file trimslash.c - * - * Test harness; not linked into release. - **/ int main(int argc, char **argv) { int i; - + if (argc <= 1) { fprintf(stderr, "trimslash: needs at least one argument\n"); return 1; diff -urN --exclude=patches rsync-2.6.8/tweak_manpage_dashes rsync-2.6.9/tweak_manpage_dashes --- rsync-2.6.8/tweak_manpage_dashes 1969-12-31 16:00:00.000000000 -0800 +++ rsync-2.6.9/tweak_manpage_dashes 2006-10-27 10:51:21.000000000 -0700 @@ -0,0 +1,8 @@ +#!/usr/bin/perl -i -p +s{(--\w[-\w]+)}{ $x = $1; $x =~ s/-/\\-/g; $x }eg; +s/(? + * Copyright (C) 1996-2000 Andrew Tridgell + * Copyright (C) 1996 Paul Mackerras + * Copyright (C) 2001, 2002 Martin Pool + * Copyright (C) 2003, 2004, 2005, 2006 Wayne Davison * * 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 @@ -14,17 +16,11 @@ * 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. + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/** - * @file - * - * Utilities used in rsync - **/ - #include "rsync.h" extern int verbose; @@ -33,22 +29,23 @@ extern int modify_window; extern int relative_paths; extern int human_readable; +extern unsigned int module_dirlen; extern mode_t orig_umask; extern char *partial_dir; extern struct filter_list_struct server_filter_list; int sanitize_paths = 0; +char curr_dir[MAXPATHLEN]; +unsigned int curr_dir_len; +int curr_dir_depth; /* This is only set for a sanitizing daemon. */ - -/** - * Set a fd into nonblocking mode - **/ +/* Set a fd into nonblocking mode. */ void set_nonblocking(int fd) { int val; - if ((val = fcntl(fd, F_GETFL, 0)) == -1) + if ((val = fcntl(fd, F_GETFL)) == -1) return; if (!(val & NONBLOCK_FLAG)) { val |= NONBLOCK_FLAG; @@ -56,14 +53,12 @@ } } -/** - * Set a fd into blocking mode - **/ +/* Set a fd into blocking mode. */ void set_blocking(int fd) { int val; - if ((val = fcntl(fd, F_GETFL, 0)) == -1) + if ((val = fcntl(fd, F_GETFL)) == -1) return; if (val & NONBLOCK_FLAG) { val &= ~NONBLOCK_FLAG; @@ -97,7 +92,7 @@ void print_child_argv(char **cmd) { - rprintf(FINFO, "opening connection using "); + rprintf(FCLIENT, "opening connection using "); for (; *cmd; cmd++) { /* Look for characters that ought to be quoted. This * is not a great quoting algorithm, but it's @@ -106,23 +101,23 @@ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" ",.-_=+@/") != strlen(*cmd)) { - rprintf(FINFO, "\"%s\" ", *cmd); + rprintf(FCLIENT, "\"%s\" ", *cmd); } else { - rprintf(FINFO, "%s ", *cmd); + rprintf(FCLIENT, "%s ", *cmd); } } - rprintf(FINFO, "\n"); + rprintf(FCLIENT, "\n"); } -void out_of_memory(char *str) +NORETURN void out_of_memory(char *str) { - rprintf(FERROR, "ERROR: out of memory in %s\n", str); + rprintf(FERROR, "ERROR: out of memory in %s [%s]\n", str, who_am_i()); exit_cleanup(RERR_MALLOC); } -void overflow_exit(char *str) +NORETURN void overflow_exit(char *str) { - rprintf(FERROR, "ERROR: buffer overflow in %s\n", str); + rprintf(FERROR, "ERROR: buffer overflow in %s [%s]\n", str, who_am_i()); exit_cleanup(RERR_MALLOC); } @@ -364,7 +359,7 @@ /* start where the last one left off to reduce chance of clashes */ start = counter; do { - sprintf(&path[pos], "%03d", counter); + snprintf(&path[pos], MAX_RENAMES_DIGITS+1, "%03d", counter); if (++counter >= MAX_RENAMES) counter = 1; } while ((rc = access(path, 0)) == 0 && counter != start); @@ -549,7 +544,7 @@ s = "."; if (sanitize_paths) - s = sanitize_path(NULL, s, "", 0); + s = sanitize_path(NULL, s, "", 0, NULL); else s = strdup(s); @@ -680,7 +675,7 @@ int cnt = 0, new_component = 1; while (*p) { if (*p++ == '/') - new_component = 1; + new_component = (*p != '.' || (p[1] != '/' && p[1] != '\0')); else if (new_component) { new_component = 0; cnt++; @@ -755,22 +750,29 @@ * The rootdir string contains a value to use in place of a leading slash. * Specify NULL to get the default of lp_path(module_id). * - * If depth is >= 0, it is a count of how many '..'s to allow at the start - * of the path. Use -1 to allow unlimited depth. + * The depth var is a count of how many '..'s to allow at the start of the + * path. If symlink is set, combine its value with the "p" value to get + * the target path, and **return NULL if any '..'s try to escape**. * * We also clean the path in a manner similar to clean_fname() but with a - * few differences: + * few differences: * * Turns multiple adjacent slashes into a single slash, gets rid of "." dir * elements (INCLUDING a trailing dot dir), PRESERVES a trailing slash, and * ALWAYS collapses ".." elements (except for those at the start of the * string up to "depth" deep). If the resulting name would be empty, * change it into a ".". */ -char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth) +char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth, + const char *symlink) { - char *start, *sanp; + char *start, *sanp, *save_dest = dest; int rlen = 0, leave_one_dotdir = relative_paths; + if (symlink && *symlink == '/') { + p = symlink; + symlink = ""; + } + if (dest != p) { int plen = strlen(p); if (*p == '/') { @@ -793,7 +795,18 @@ } start = sanp = dest + rlen; - while (*p != '\0') { + while (1) { + if (*p == '\0') { + if (!symlink || !*symlink) + break; + while (sanp != start && sanp[-1] != '/') { + /* strip last element */ + sanp--; + } + /* Append a relative symlink */ + p = symlink; + symlink = ""; + } /* discard leading or extra slashes */ if (*p == '/') { p++; @@ -815,6 +828,11 @@ if (*p == '.' && p[1] == '.' && (p[2] == '/' || p[2] == '\0')) { /* ".." component followed by slash or end */ if (depth <= 0 || sanp != start) { + if (symlink && sanp == start) { + if (!save_dest) + free(dest); + return NULL; + } p += 2; if (sanp != start) { /* back up sanp one level */ @@ -843,15 +861,10 @@ return dest; } -char curr_dir[MAXPATHLEN]; -unsigned int curr_dir_len; - -/** - * Like chdir(), but it keeps track of the current directory (in the +/* Like chdir(), but it keeps track of the current directory (in the * global "curr_dir"), and ensures that the path size doesn't overflow. - * Also cleans the path using the clean_fname() function. - **/ -int push_dir(char *dir) + * Also cleans the path using the clean_fname() function. */ +int push_dir(char *dir, int set_path_only) { static int initialised; unsigned int len; @@ -872,7 +885,7 @@ if ((*dir == '/' ? len : curr_dir_len + 1 + len) >= sizeof curr_dir) return 0; - if (chdir(dir)) + if (!set_path_only && chdir(dir)) return 0; if (*dir == '/') { @@ -885,6 +898,11 @@ } curr_dir_len = clean_fname(curr_dir, 1); + if (sanitize_paths) { + if (module_dirlen > curr_dir_len) + module_dirlen = curr_dir_len; + curr_dir_depth = count_dir_elements(curr_dir + module_dirlen); + } return 1; } @@ -901,6 +919,8 @@ curr_dir_len = strlcpy(curr_dir, dir, sizeof curr_dir); if (curr_dir_len >= sizeof curr_dir) curr_dir_len = sizeof curr_dir - 1; + if (sanitize_paths) + curr_dir_depth = count_dir_elements(curr_dir + module_dirlen); return 1; } @@ -922,7 +942,7 @@ if (*fn == '/') p1 = p2 = ""; else { - p1 = curr_dir; + p1 = curr_dir + module_dirlen; for (p2 = p1; *p2 == '/'; p2++) {} if (*p2) p2 = "/"; @@ -931,17 +951,11 @@ m1 = " (in "; m2 = lp_name(module_id); m3 = ")"; - if (p1 == curr_dir) { - if (!lp_use_chroot(module_id)) { - char *p = lp_path(module_id); - if (*p != '/' || p[1]) - p1 += strlen(p); - } - } } else m1 = m2 = m3 = ""; - asprintf(&result, "\"%s%s%s\"%s%s%s", p1, p2, fn, m1, m2, m3); + if (asprintf(&result, "\"%s%s%s\"%s%s%s", p1, p2, fn, m1, m2, m3) <= 0) + out_of_memory("full_fname"); return result; } @@ -967,13 +981,11 @@ if ((int)pathjoin(t, sz, partial_dir, fn) >= sz) return NULL; if (server_filter_list.head) { - static int len; - if (!len) - len = strlen(partial_dir); - t[len] = '\0'; + t = strrchr(partial_fname, '/'); + *t = '\0'; if (check_filter(&server_filter_list, partial_fname, 1) < 0) return NULL; - t[len] = '/'; + *t = '/'; if (check_filter(&server_filter_list, partial_fname, 0) < 0) return NULL; } @@ -1103,7 +1115,7 @@ units = 'K'; } if (units) { - sprintf(bufs[n], "%.2f%c", dnum, units); + snprintf(bufs[n], sizeof bufs[0], "%.2f%c", dnum, units); return bufs[n]; } } diff -urN --exclude=patches rsync-2.6.8/wildtest.c rsync-2.6.9/wildtest.c --- rsync-2.6.8/wildtest.c 2006-01-26 14:32:59.000000000 -0800 +++ rsync-2.6.9/wildtest.c 2006-04-25 16:51:16.000000000 -0700 @@ -1,6 +1,22 @@ /* -** wildmatch test suite. -*/ + * Test suite for the wildmatch code. + * + * Copyright (C) 2003, 2004, 2006 Wayne Davison + * + * 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., + * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ /*#define COMPARE_WITH_FNMATCH*/