Index: ChangeLog
===================================================================
RCS file: /sources/findutils/findutils/ChangeLog,v
retrieving revision 1.96
diff -u -u -r1.96 ChangeLog
--- ChangeLog	8 Nov 2006 07:28:50 -0000	1.96
+++ ChangeLog	8 Nov 2006 10:33:06 -0000
@@ -1,5 +1,9 @@
 2007-11-08  James Youngman <jay@gnu.org>
 
+	* ftsfind.c (process_all_startpoints): Set
+	state.starting_path_length for every pathname argument.
+	This fixes Savannah bug #18222.
+
 	* pred.c (pred_prune): -prune should have an effect only if we are
 	 currently considering a directory (Savannah bug #15531).
 	
Index: depcomp
===================================================================
RCS file: /sources/findutils/findutils/depcomp,v
retrieving revision 1.6
diff -u -u -r1.6 depcomp
--- depcomp	20 Aug 2006 18:18:42 -0000	1.6
+++ depcomp	8 Nov 2006 10:33:06 -0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2006-07-09.11
+scriptversion=2006-10-15.18
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
 # Foundation, Inc.
@@ -92,7 +92,20 @@
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
Index: install-sh
===================================================================
RCS file: /sources/findutils/findutils/install-sh,v
retrieving revision 1.7
diff -u -u -r1.7 install-sh
--- install-sh	20 Aug 2006 18:18:42 -0000	1.7
+++ install-sh	8 Nov 2006 10:33:06 -0000
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-05-11.20
+scriptversion=2006-10-14.15
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -336,12 +336,26 @@
 	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
 	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- / "$tmpdir/d") >/dev/null 2>&1
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
 	    then
-	      # Check for bugs in HP-UX 11.23 and IRIX 6.5 mkdir.
-	      case `ls -ld "$tmpdir"` in
-		d????-??-* ) posix_mkdir=:;;
-	      esac
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
 	      rmdir "$tmpdir/d" "$tmpdir"
 	    else
 	      # Remove any dirs left behind by ancient mkdir implementations.
Index: doc/texinfo.tex
===================================================================
RCS file: /sources/findutils/findutils/doc/texinfo.tex,v
retrieving revision 1.9
diff -u -u -r1.9 texinfo.tex
--- doc/texinfo.tex	20 Aug 2006 18:18:42 -0000	1.9
+++ doc/texinfo.tex	8 Nov 2006 10:33:06 -0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2006-07-17.16}
+\def\texinfoversion{2006-10-15.13}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -157,6 +157,18 @@
 \chardef\spacecat = 10
 \def\spaceisspace{\catcode`\ =\spacecat}
 
+% sometimes characters are active, so we need control sequences.
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dashChar  = `\-
+\chardef\dotChar   = `\.
+\chardef\exclamChar= `\!
+\chardef\lquoteChar= `\`
+\chardef\questChar = `\?
+\chardef\rquoteChar= `\'
+\chardef\semiChar  = `\;
+\chardef\underChar = `\_
+
 % Ignore a token.
 %
 \def\gobble#1{}
@@ -1976,13 +1988,6 @@
 % Can't use plain's \frenchspacing because it uses the `\x notation, and
 % sometimes \x has an active definition that messes things up.
 %
-\chardef\colonChar = `\:
-\chardef\commaChar = `\,
-\chardef\dotChar   = `\.
-\chardef\exclamChar= `\!
-\chardef\questChar = `\?
-\chardef\semiChar  = `\;
-%
 \catcode`@=11
   \def\plainfrenchspacing{%
     \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
@@ -2010,6 +2015,7 @@
      \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
     \kern-0.4pt\hrule}%
   \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+\def\key #1{{\nohyphenation \uppercase{#1}}\null}
 % The old definition, with no lozenge:
 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
@@ -2051,11 +2057,14 @@
 % and arrange explicitly to hyphenate at a dash.
 %  -- rms.
 {
-  \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active
+  \catcode`\-=\active \catcode`\_=\active
+  \catcode`\'=\active \catcode`\`=\active
   %
   \global\def\code{\begingroup
-    \catcode`\-=\active  \catcode`\_=\active \catcode`\'=\active
-    \let'\singlequotechar
+    \catcode\rquoteChar=\active \catcode\lquoteChar=\active
+    \let'\codequoteright \let`\codequoteleft
+    %
+    \catcode\dashChar=\active  \catcode\underChar=\active
     \ifallowcodebreaks
      \let-\codedash
      \let_\codeunder
@@ -2301,6 +2310,10 @@
     }$%
 }
 
+% @textdegree - the normal degrees sign.
+%
+\def\textdegree{$^\circ$}
+
 % Laurent Siebenmann reports \Orb undefined with:
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
@@ -3524,6 +3537,7 @@
   \definedummyword\point
   \definedummyword\print
   \definedummyword\result
+  \definedummyword\textdegree
   %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
@@ -3657,6 +3671,7 @@
   \def\point{.}%
   \def\print{-|}%
   \def\result{=>}%
+  \def\textdegree{degrees}%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
@@ -5404,7 +5419,7 @@
 % evince), the lilypond developers report.  xpdf does work with the
 % regular 0x27.  
 % 
-\def\singlequotechar{%
+\def\codequoteright{%
   \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
     '%
   \else
@@ -5412,6 +5427,18 @@
   \fi
 }
 %
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+% 
+\def\codequoteleft{%
+  \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+    `%
+  \else
+    \char'22
+  \fi
+}
+%
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
@@ -5425,12 +5452,15 @@
     }%
   }
   \catcode`\'=\active
-  \gdef\quoteexpand{%
-    \catcode`\'=\active
-    \def'{\singlequotechar}
-  }%
+  \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
+  %
+  \catcode`\`=\active
+  \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
+  %
+  \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
 \endgroup
-%
+
+% start the verbatim environment.
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
Index: find/ftsfind.c
===================================================================
RCS file: /sources/findutils/findutils/find/ftsfind.c,v
retrieving revision 1.16
diff -u -u -r1.16 ftsfind.c
--- find/ftsfind.c	8 Nov 2006 10:18:50 -0000	1.16
+++ find/ftsfind.c	8 Nov 2006 10:33:06 -0000
@@ -355,6 +355,8 @@
   FTSENT *ent;
   
 
+  state.starting_path_length = strlen(arg);
+
   arglist[0] = arg;
   arglist[1] = NULL;
   
Index: find/testsuite/Makefile.am
===================================================================
RCS file: /sources/findutils/findutils/find/testsuite/Makefile.am,v
retrieving revision 1.33
diff -u -u -r1.33 Makefile.am
--- find/testsuite/Makefile.am	21 Aug 2006 22:35:13 -0000	1.33
+++ find/testsuite/Makefile.am	8 Nov 2006 10:33:06 -0000
@@ -65,6 +65,7 @@
 find.posix/links.xo \
 find.posix/sv-bug-11175.xo \
 find.posix/sv-bug-12181.xo \
+find.posix/sv-bug-18222.xo \
 find.posix/depth1.xo \
 find.posix/sizes.xo \
 find.posix/name.xo \
@@ -138,6 +139,7 @@
 find.gnu/sv-bug-12230.exp \
 find.gnu/sv-bug-17477.exp \
 find.gnu/sv-bug-17490.exp \
+find.gnu/sv-bug-18222.exp \
 find.gnu/quit.exp \
 find.gnu/xtype.exp \
 find.posix/and.exp \
Index: find/testsuite/find.gnu/sv-bug-18222.exp
===================================================================
RCS file: find/testsuite/find.gnu/sv-bug-18222.exp
diff -N find/testsuite/find.gnu/sv-bug-18222.exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ find/testsuite/find.gnu/sv-bug-18222.exp	8 Nov 2006 10:33:06 -0000
@@ -0,0 +1,9 @@
+# Test for Savannah bug #18222
+#
+# That bug was a case were the expansion of %H is truncated if the name
+# of the second start point is longer than that of the first.
+exec rm -rf tmp
+exec mkdir tmp
+exec touch tmp/short tmp/longer
+find_start p { tmp/short tmp/longer -printf "%H\n" }
+
Index: find/testsuite/find.gnu/sv-bug-18222.xo
===================================================================
RCS file: find/testsuite/find.gnu/sv-bug-18222.xo
diff -N find/testsuite/find.gnu/sv-bug-18222.xo
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ find/testsuite/find.gnu/sv-bug-18222.xo	8 Nov 2006 10:33:06 -0000
@@ -0,0 +1,2 @@
+tmp/short
+tmp/longer
