From 5a7549fc0959e038390c43def0789a8b6b51609a Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 8 Nov 2006 10:38:37 +0000 Subject: [PATCH] Savannah bug#18222 - test case --- ChangeLog | 4 ++ depcomp | 17 ++++++++- doc/texinfo.tex | 64 +++++++++++++++++++++++--------- find/ftsfind.c | 2 + find/testsuite/Makefile.am | 2 + find/testsuite/find.gnu/sv-bug-18222.exp | 9 +++++ find/testsuite/find.gnu/sv-bug-18222.xo | 2 + install-sh | 26 ++++++++++--- 8 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 find/testsuite/find.gnu/sv-bug-18222.exp create mode 100644 find/testsuite/find.gnu/sv-bug-18222.xo diff --git a/ChangeLog b/ChangeLog index 768b883..35b6080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-11-08 James Youngman + * 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). diff --git a/depcomp b/depcomp index ffe5461..ca5ea4e 100755 --- a/depcomp +++ b/depcomp @@ -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 @@ gcc3) ## 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 diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 36c1aca..ab95370 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -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 @@ where each line of input produces a line of output.} % 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 @@ where each line of input produces a line of output.} \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 @@ where each line of input produces a line of output.} % 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 @@ where each line of input produces a line of output.} }$% } +% @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 @@ where each line of input produces a line of output.} \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 @@ where each line of input produces a line of output.} \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 @@ where each line of input produces a line of output.} % 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 @@ where each line of input produces a line of output.} \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 @@ where each line of input produces a line of output.} }% } \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 diff --git a/find/ftsfind.c b/find/ftsfind.c index ea70cfe..4a31392 100644 --- a/find/ftsfind.c +++ b/find/ftsfind.c @@ -355,6 +355,8 @@ find(char *arg) FTSENT *ent; + state.starting_path_length = strlen(arg); + arglist[0] = arg; arglist[1] = NULL; diff --git a/find/testsuite/Makefile.am b/find/testsuite/Makefile.am index 6413a21..d6b83a5 100644 --- a/find/testsuite/Makefile.am +++ b/find/testsuite/Makefile.am @@ -65,6 +65,7 @@ find.posix/grouping.xo \ 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/xtype-symlink.exp \ 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 \ diff --git a/find/testsuite/find.gnu/sv-bug-18222.exp b/find/testsuite/find.gnu/sv-bug-18222.exp new file mode 100644 index 0000000..f317448 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-18222.exp @@ -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" } + diff --git a/find/testsuite/find.gnu/sv-bug-18222.xo b/find/testsuite/find.gnu/sv-bug-18222.xo new file mode 100644 index 0000000..4f5f863 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-18222.xo @@ -0,0 +1,2 @@ +tmp/short +tmp/longer diff --git a/install-sh b/install-sh index 9d6a5eb..4fbbae7 100755 --- a/install-sh +++ b/install-sh @@ -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 @@ do 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. -- 2.11.4.GIT