mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
44 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81c7cd4c29 | ||
|
|
f79efa913c | ||
|
|
8b861292c6 | ||
|
|
39f54be321 | ||
|
|
9bfbfd3b8a | ||
|
|
fff7466c36 | ||
|
|
bd2fa30652 | ||
|
|
fffcc47efc | ||
|
|
302c89b285 | ||
|
|
3dd09fbf17 | ||
|
|
baa4aff633 | ||
|
|
aa3694f1ff | ||
|
|
9211474a6e | ||
|
|
ca76cd842a | ||
|
|
6879364228 | ||
|
|
0a2845a592 | ||
|
|
d4e06e8c46 | ||
|
|
61789dd7d5 | ||
|
|
df92958bed | ||
|
|
c559453c89 | ||
|
|
65ab259cdb | ||
|
|
563ff6778d | ||
|
|
eae700da7d | ||
|
|
dc3bf580fc | ||
|
|
d2ed2e78cf | ||
|
|
c799d7b979 | ||
|
|
73c74c33e6 | ||
|
|
c1635e0379 | ||
|
|
2486f9acdf | ||
|
|
af1a8f76a6 | ||
|
|
1c1565ff39 | ||
|
|
c3d98f8640 | ||
|
|
cf504308fe | ||
|
|
3677890d37 | ||
|
|
2af2bec9b2 | ||
|
|
30f0e39058 | ||
|
|
fc1e984e89 | ||
|
|
24c61a8949 | ||
|
|
b3354081ac | ||
|
|
aedb44867d | ||
|
|
65a82e4c26 | ||
|
|
28571ed121 | ||
|
|
3a0036e766 | ||
|
|
fa0309e396 |
2
THANKS
2
THANKS
@@ -11,6 +11,7 @@ Adam Klein aklein@debian.org
|
||||
Akim Demaille demaille@inf.enst.fr
|
||||
Alain Magloire alain@qnx.com
|
||||
Alan Iwi iwi@atm.ox.ac.uk
|
||||
Albert Chin-A-Young china@thewrittenword.com
|
||||
Albert Hopkins ahopkins@dynacare.com
|
||||
Alberto Accomazzi alberto@cfa0.harvard.edu
|
||||
aldomel aldomel@ix.netcom.com
|
||||
@@ -137,6 +138,7 @@ Ian Bruce ian.bruce@myrealbox.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian Turner vectro@pipeline.com
|
||||
Iida Yosiaki iida@gnu.org
|
||||
James james@albion.glarp.com
|
||||
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Sneeringer jvs@ocslink.com
|
||||
|
||||
22
config/config.guess
vendored
22
config/config.guess
vendored
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2002-03-04'
|
||||
timestamp='2002-03-20'
|
||||
|
||||
# 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
|
||||
@@ -98,7 +98,7 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
for c in cc gcc c89 c99 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
@@ -760,7 +760,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
@@ -771,15 +771,15 @@ EOF
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
rm -f $dummy.c
|
||||
@@ -1059,12 +1059,12 @@ EOF
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
echo i386-${UNAME_MACHINE}-nto-qnx
|
||||
else
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
|
||||
@@ -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{2002-03-01.06}
|
||||
\def\texinfoversion{2002-03-26.08}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
||||
% 2000, 01, 02 Free Software Foundation, Inc.
|
||||
@@ -53,7 +53,7 @@
|
||||
% texindex foo.??
|
||||
% tex foo.texi
|
||||
% tex foo.texi
|
||||
% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
|
||||
% dvips foo.dvi -o # or whatever; this makes foo.ps.
|
||||
% The extra TeX runs get the cross-reference information correct.
|
||||
% Sometimes one run after texindex suffices, and sometimes you need more
|
||||
% than two; texi2dvi does it as many times as necessary.
|
||||
@@ -846,7 +846,6 @@ where each line of input produces a line of output.}
|
||||
% @math gets a chance to work. This could perhaps be fixed, but for now
|
||||
% at least we can have real math in the main text, where it's needed most.
|
||||
%
|
||||
%
|
||||
\let\implicitmath = $%$ font-lock fix
|
||||
%
|
||||
% One complication: _ usually means subscripts, but it could also mean
|
||||
@@ -857,10 +856,22 @@ where each line of input produces a line of output.}
|
||||
{\catcode95 = \active % 95 = _
|
||||
\gdef\mathunderscore{%
|
||||
\catcode95=\active
|
||||
\def_{\ifnum\fam=\slfam\_\else\sb\fi}%
|
||||
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
|
||||
}}
|
||||
%
|
||||
\def\math{\tex\mathcode`\_="8000\mathunderscore \implicitmath\finishmath}
|
||||
% Another complication: we want \\ (and @\) to output a \ character.
|
||||
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
|
||||
% this is not advertised and we don't care. Texinfo does not
|
||||
% otherwise define @\.
|
||||
%
|
||||
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
|
||||
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
|
||||
%
|
||||
\def\math{%
|
||||
\tex
|
||||
\mathcode`\_="8000 \mathunderscore
|
||||
\let\\ = \mathbackslash
|
||||
\implicitmath\finishmath}
|
||||
\def\finishmath#1{#1\implicitmath\Etex}
|
||||
|
||||
% @bullet and @minus need the same treatment as @math, just above.
|
||||
@@ -1431,11 +1442,19 @@ where each line of input produces a line of output.}
|
||||
|
||||
\def\realdash{-}
|
||||
\def\codedash{-\discretionary{}{}{}}
|
||||
\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
|
||||
\def\codeunder{%
|
||||
% this is all so @math{@code{var_name}+1} can work. In math mode, _
|
||||
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
|
||||
% will therefore expand the active definition of _, which is us
|
||||
% (inside @code that is), therefore an endless loop.
|
||||
\ifusingtt{\ifmmode
|
||||
\mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
|
||||
\else\normalunderscore \fi
|
||||
\discretionary{}{}{}}%
|
||||
{\_}%
|
||||
}
|
||||
\def\codex #1{\tclose{#1}\endgroup}
|
||||
|
||||
%\let\exp=\tclose %Was temporary
|
||||
|
||||
% @kbd is like @code, except that if the argument is just one @key command,
|
||||
% then @kbd has no effect.
|
||||
|
||||
@@ -1637,8 +1656,6 @@ where each line of input produces a line of output.}
|
||||
\global\let\contents = \relax
|
||||
\global\let\shortcontents = \relax
|
||||
\fi
|
||||
%
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
}
|
||||
|
||||
\def\finishtitlepage{%
|
||||
@@ -2396,20 +2413,19 @@ width0pt\relax} \fi
|
||||
\let\item = \relax
|
||||
}
|
||||
|
||||
% Ignore @ignore ... @end ignore.
|
||||
% Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu,
|
||||
% @direntry, and @documentdescription.
|
||||
%
|
||||
\def\ignore{\doignore{ignore}}
|
||||
|
||||
% Also ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu,
|
||||
% @documentdescription, and @direntry text.
|
||||
%
|
||||
\def\ifinfo{\doignore{ifinfo}}
|
||||
\def\ifhtml{\doignore{ifhtml}}
|
||||
\def\ifinfo{\doignore{ifinfo}}
|
||||
\def\ifplaintext{\doignore{ifplaintext}}
|
||||
\def\ifnottex{\doignore{ifnottex}}
|
||||
\def\html{\doignore{html}}
|
||||
\def\menu{\doignore{menu}}
|
||||
\def\documentdescription{\doignore{documentdescription}}
|
||||
\def\direntry{\doignore{direntry}}
|
||||
\def\documentdescription{\doignore{documentdescription}}
|
||||
\def\documentdescriptionword{documentdescription}
|
||||
|
||||
% @dircategory CATEGORY -- specify a category of the dir file
|
||||
% which this file should belong to. Ignore this in TeX.
|
||||
@@ -2436,14 +2452,21 @@ width0pt\relax} \fi
|
||||
% We must not have @c interpreted as a control sequence.
|
||||
\catcode`\@ = 12
|
||||
%
|
||||
% Make the letter c a comment character so that the rest of the line
|
||||
% will be ignored. This way, the document can have (for example)
|
||||
% @c @end ifinfo
|
||||
% and the @end ifinfo will be properly ignored.
|
||||
% (We've just changed @ to catcode 12.)
|
||||
\catcode`\c = 14
|
||||
\def\ignoreword{#1}%
|
||||
\ifx\ignoreword\documentdescriptionword
|
||||
% The c kludge breaks documentdescription, since
|
||||
% `documentdescription' contains a `c'. Means not everything will
|
||||
% be ignored inside @documentdescription, but oh well...
|
||||
\else
|
||||
% Make the letter c a comment character so that the rest of the line
|
||||
% will be ignored. This way, the document can have (for example)
|
||||
% @c @end ifinfo
|
||||
% and the @end ifinfo will be properly ignored.
|
||||
% (We've just changed @ to catcode 12.)
|
||||
\catcode`\c = 14
|
||||
\fi
|
||||
%
|
||||
% And now expand that command.
|
||||
% And now expand the command defined above.
|
||||
\doignoretext
|
||||
}
|
||||
|
||||
@@ -2634,19 +2657,21 @@ width0pt\relax} \fi
|
||||
\def\ifclearfail{\nestedignore{ifclear}}
|
||||
\defineunmatchedend{ifclear}
|
||||
|
||||
% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
|
||||
% following, through the first @end iftex (etc.). Make `@end iftex'
|
||||
% (etc.) valid only after an @iftex.
|
||||
% @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we
|
||||
% read the text following, through the first @end iftex (etc.). Make
|
||||
% `@end iftex' (etc.) valid only after an @iftex.
|
||||
%
|
||||
\def\iftex{\conditionalsucceed{iftex}}
|
||||
\def\ifnothtml{\conditionalsucceed{ifnothtml}}
|
||||
\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
|
||||
\def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}}
|
||||
\defineunmatchedend{iftex}
|
||||
\defineunmatchedend{ifnothtml}
|
||||
\defineunmatchedend{ifnotinfo}
|
||||
\defineunmatchedend{ifnotplaintext}
|
||||
|
||||
% We can't just want to start a group at @iftex (for example) and end it
|
||||
% at @end iftex, since then @set commands inside the conditional have no
|
||||
% We can't just want to start a group at @iftex (etc.) and end it at
|
||||
% @end iftex, since then @set commands inside the conditional have no
|
||||
% effect (they'd get reverted at the end of the group). So we must
|
||||
% define \Eiftex to redefine itself to be its previous value. (We can't
|
||||
% just define it to fail again with an ``unmatched end'' error, since
|
||||
@@ -2861,7 +2886,7 @@ width0pt\relax} \fi
|
||||
|
||||
% If an index command is used in an @example environment, any spaces
|
||||
% therein should become regular spaces in the raw index file, not the
|
||||
% expansion of \tie (\\leavevmode \penalty \@M \ ).
|
||||
% expansion of \tie (\leavevmode \penalty \@M \ ).
|
||||
{\obeyspaces
|
||||
\gdef\unsepspaces{\obeyspaces\let =\space}}
|
||||
|
||||
@@ -3906,7 +3931,7 @@ width0pt\relax} \fi
|
||||
% argument, which will end up as the last argument to the \...entry macro.
|
||||
%
|
||||
% We open the .toc file here instead of at @setfilename or any other
|
||||
% given time so that @contents can be put in the document anywhere.
|
||||
% fixed time so that @contents can be put in the document anywhere.
|
||||
%
|
||||
\newif\iftocfileopened
|
||||
\def\writetocentry#1{%
|
||||
@@ -3915,6 +3940,14 @@ width0pt\relax} \fi
|
||||
\global\tocfileopenedtrue
|
||||
\fi
|
||||
\iflinks \write\tocfile{#1{\folio}}\fi
|
||||
%
|
||||
% Tell \shipout to create a page destination if we're doing pdf, which
|
||||
% will be the target of the links in the table of contents. We can't
|
||||
% just do it on every page because the title pages are numbered 1 and
|
||||
% 2 (the page numbers aren't printed), and so are the first two pages
|
||||
% of the document. Thus, we'd have two destinations named `1', and
|
||||
% two named `2'.
|
||||
\ifpdf \pdfmakepagedesttrue \fi
|
||||
}
|
||||
|
||||
\newskip\contentsrightmargin \contentsrightmargin=1in
|
||||
@@ -4115,36 +4148,27 @@ width0pt\relax} \fi
|
||||
\message{environments,}
|
||||
% @foo ... @end foo.
|
||||
|
||||
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
||||
%
|
||||
% Since these characters are used in examples, it should be an even number of
|
||||
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
||||
% Furthermore, these definitions must come after we define our fonts.
|
||||
\newbox\dblarrowbox \newbox\longdblarrowbox
|
||||
\newbox\pushcharbox \newbox\bullbox
|
||||
\newbox\equivbox \newbox\errorbox
|
||||
|
||||
%{\tentt
|
||||
%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
|
||||
%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
|
||||
%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
|
||||
%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
|
||||
% Adapted from the manmac format (p.420 of TeXbook)
|
||||
%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
|
||||
% depth .1ex\hfil}
|
||||
%}
|
||||
|
||||
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
||||
%
|
||||
\def\point{$\star$}
|
||||
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
|
||||
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
|
||||
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
|
||||
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
|
||||
|
||||
% The @error{} command.
|
||||
% Adapted from the TeXbook's \boxit.
|
||||
%
|
||||
\newbox\errorbox
|
||||
%
|
||||
{\tentt \global\dimen0 = 3em}% Width of the box.
|
||||
\dimen2 = .55pt % Thickness of rules
|
||||
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
|
||||
\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
|
||||
|
||||
%
|
||||
\global\setbox\errorbox=\hbox to \dimen0{\hfil
|
||||
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
|
||||
\advance\hsize by -2\dimen2 % Rules.
|
||||
@@ -4155,8 +4179,7 @@ width0pt\relax} \fi
|
||||
\kern3pt\vrule width\dimen2}% Space to right.
|
||||
\hrule height\dimen2}
|
||||
\hfil}
|
||||
|
||||
% The @error{} command.
|
||||
%
|
||||
\def\error{\leavevmode\lower.7ex\copy\errorbox}
|
||||
|
||||
% @tex ... @end tex escapes into raw Tex temporarily.
|
||||
@@ -4196,9 +4219,9 @@ width0pt\relax} \fi
|
||||
\def\@{@}%
|
||||
\let\Etex=\endgroup}
|
||||
|
||||
% Define @lisp ... @endlisp.
|
||||
% Define @lisp ... @end lisp.
|
||||
% @lisp does a \begingroup so it can rebind things,
|
||||
% including the definition of @endlisp (which normally is erroneous).
|
||||
% including the definition of @end lisp (which normally is erroneous).
|
||||
|
||||
% Amount to narrow the margins by for @lisp.
|
||||
\newskip\lispnarrowing \lispnarrowing=0.4in
|
||||
@@ -4596,6 +4619,21 @@ width0pt\relax} \fi
|
||||
\endgroup\nonfillfinish\endgroup
|
||||
}
|
||||
|
||||
% @copying ... @end copying.
|
||||
% Save the text away for @insertcopying later.
|
||||
%
|
||||
\newbox\copyingbox
|
||||
%
|
||||
\def\copying{\begingroup
|
||||
\parindent = 0pt % looks wrong on title page
|
||||
\def\Ecopying{\egroup\endgroup}%
|
||||
\global\setbox\copyingbox = \vbox\bgroup
|
||||
}
|
||||
|
||||
% @insertcopying.
|
||||
%
|
||||
\def\insertcopying{\unvcopy\copyingbox}
|
||||
|
||||
|
||||
\message{defuns,}
|
||||
% @defun etc.
|
||||
@@ -5274,7 +5312,7 @@ width0pt\relax} \fi
|
||||
\message{Warning: redefining \the\macname}%
|
||||
\else
|
||||
\expandafter\ifx\csname \the\macname\endcsname \relax
|
||||
\else \errmessage{The name \the\macname\space is reserved}\fi
|
||||
\else \errmessage{Macro name \the\macname\space already defined}\fi
|
||||
\global\cslet{macsave.\the\macname}{\the\macname}%
|
||||
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
|
||||
% Add the macroname to \macrolist
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2002-02-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (File characteristic tests): Document the
|
||||
behavior of test -nt and -ot when one of the files does not exist,
|
||||
using the same behavior that is documented in ksh93.
|
||||
|
||||
2002-03-05 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* coreutils.texi (cut invocation): Say that selected input is
|
||||
|
||||
@@ -8323,13 +8323,13 @@ True if @var{file} exists and has a size greater than zero.
|
||||
@opindex -nt
|
||||
@cindex newer-than file check
|
||||
True if @var{file1} is newer (according to modification date) than
|
||||
@var{file2}.
|
||||
@var{file2}, or if @var{file1} exists and @var{file2} does not.
|
||||
|
||||
@item @var{file1} -ot @var{file2}
|
||||
@opindex -ot
|
||||
@cindex older-than file check
|
||||
True if @var{file1} is older (according to modification date) than
|
||||
@var{file2}.
|
||||
@var{file2}, or if @var{file2} exists and @var{file1} does not.
|
||||
|
||||
@item @var{file1} -ef @var{file2}
|
||||
@opindex -ef
|
||||
|
||||
@@ -1,3 +1,42 @@
|
||||
2002-03-30 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.1.8.
|
||||
|
||||
* tests/mv/i-link-no: Use --reply=no rather than -i.
|
||||
The latter depends on whether stdin is a tty and hence would
|
||||
fail in some situations where --reply=no doesn't.
|
||||
|
||||
* src/mv.c (do_move): Correct a comment.
|
||||
|
||||
* src/copy.c (copy_internal): Move the block that sets `earlier_file'
|
||||
down to just before the first use of that variable. Otherwise, it was
|
||||
possible to make mv (and probably cp, too) malfunction when copying
|
||||
hard-linked files into a directory containing at least one of the
|
||||
source file names. Call forget_created everywhere thereafter where
|
||||
this function returns without creating a destination file that might
|
||||
subsequently be linked. Reported by Iida Yosiaki.
|
||||
* src/cp-hash.c (forget_created): New function.
|
||||
* src/cp-hash.h (forget_created): Prototype.
|
||||
|
||||
* tests/mv/i-link-no: New test for the above.
|
||||
Based on an example from Iida Yosiaki.
|
||||
* tests/mv/Makefile.am (TESTS): Add i-link-no.
|
||||
|
||||
2002-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/copy.c (copy_internal) [move_mode]: Give a better diagnostic,
|
||||
by using errno from the failed unlink, when a cross-device `mv'
|
||||
fails, e.g., because the destination cannot be unlinked.
|
||||
Prompted by a report from Karl Berry.
|
||||
* tests/mv/part-fail: New test for the above.
|
||||
* tests/mv/Makefile.am (TESTS): Add part-fail.
|
||||
|
||||
2002-03-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/Makefile.am (datadir): Don't override $(datadir)
|
||||
which might be set by --datadir and different from $(prefix)/share.
|
||||
Patch from Albert Chin-A-Young.
|
||||
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 4.1.7.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[4.1.8]
|
||||
* mv no longer mistakenly creates links to preexisting destination files
|
||||
that aren't moved
|
||||
[4.1.7]
|
||||
* rm: close a hole that would allow a running rm process to be subverted
|
||||
[4.1.6]
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
2002-03-25 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0.12.
|
||||
|
||||
2002-02-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/test.c (age_of): Return -1 and 0 rather than 0 and 1.
|
||||
Might as well keep it simple, and like bash.
|
||||
(binary_operator): Fix bug with -nt and -ot, when one of the
|
||||
files did not exist. We want to be compatible with the ksh93
|
||||
documentation, and with Bash.
|
||||
|
||||
2002-03-17 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/seq.c (usage): Mention that --format=FORMAT must be
|
||||
a *floating-point* format, also in description of that option.
|
||||
Reported by Karl Eichwalder.
|
||||
(usage): Also add the `=' signs here: --format=FORMAT,
|
||||
--separator=STRING.
|
||||
|
||||
2002-03-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* src/Makefile.am (datadir): Don't override $(datadir)
|
||||
which might be set by --datadir and different from $(prefix)/share.
|
||||
Patch from Albert Chin-A-Young.
|
||||
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Specify the required version
|
||||
of automake (1.6), and options (gnits dist-bzip2), rather than...
|
||||
* Makefile.am (AUTOMAKE_OPTIONS): ...here. Remove definition.
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
2002-03-16 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* Version 2.0.22.
|
||||
|
||||
* src/Makefile.am (datadir): Don't override $(datadir)
|
||||
which might be set by --datadir and different from $(prefix)/share.
|
||||
Patch from Albert Chin-A-Young.
|
||||
|
||||
2002-03-10 Jim Meyering <meyering@lucent.com>
|
||||
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Specify the required version
|
||||
of automake (1.6), and options (gnits dist-bzip2), rather than...
|
||||
* Makefile.am (AUTOMAKE_OPTIONS): ...here. Remove definition.
|
||||
@@ -17,7 +23,7 @@
|
||||
|
||||
2002-02-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* src/cat.c (simple_cat, cat, main): Used char * rather than
|
||||
* src/cat.c (simple_cat, cat, main): Use char * rather than
|
||||
unsigned char *, to avoid some technical violations of the C
|
||||
standard, and to avoid the need for casts. I guess the
|
||||
unsigned char * was probably there for improved performance
|
||||
|
||||
86
src/copy.c
86
src/copy.c
@@ -791,7 +791,6 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
char *earlier_file = NULL;
|
||||
char *dst_backup = NULL;
|
||||
int backup_succeeded = 0;
|
||||
int rename_errno;
|
||||
int delayed_fail;
|
||||
int copied_as_regular = 0;
|
||||
int ran_chown = 0;
|
||||
@@ -816,38 +815,6 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
|
||||
src_type = src_sb.st_mode;
|
||||
|
||||
/* Associate the destination path with the source device and inode
|
||||
so that if we encounter a matching dev/ino pair in the source tree
|
||||
we can arrange to create a hard link between the corresponding names
|
||||
in the destination tree.
|
||||
|
||||
Sometimes, when preserving links, we have to record dev/ino even
|
||||
though st_nlink == 1:
|
||||
- when using -H and processing a command line argument;
|
||||
that command line argument could be a symlink pointing to another
|
||||
command line argument. With `cp -H --preserve=link', we hard-link
|
||||
those two destination files.
|
||||
- likewise for -L except that it applies to all files, not just
|
||||
command line arguments.
|
||||
|
||||
Also record directory dev/ino when using --recursive. We'll use that
|
||||
info to detect this problem: cp -R dir dir. FIXME-maybe: ideally,
|
||||
directory info would be recorded in a separate hash table, since
|
||||
such entries are useful only while a single command line hierarchy
|
||||
is being copied -- so that separate table could be cleared between
|
||||
command line args. Using the same hash table to preserve hard
|
||||
links means that it may not be cleared. */
|
||||
|
||||
if ((x->preserve_links
|
||||
&& (1 < src_sb.st_nlink
|
||||
|| (command_line_arg
|
||||
&& x->dereference == DEREF_COMMAND_LINE_ARGUMENTS)
|
||||
|| x->dereference == DEREF_ALWAYS))
|
||||
|| (x->recursive && S_ISDIR (src_type)))
|
||||
{
|
||||
earlier_file = remember_copied (dst_path, src_sb.st_ino, src_sb.st_dev);
|
||||
}
|
||||
|
||||
src_mode = src_sb.st_mode;
|
||||
|
||||
if (S_ISDIR (src_type) && !x->recursive)
|
||||
@@ -1085,6 +1052,38 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
/* Associate the destination path with the source device and inode
|
||||
so that if we encounter a matching dev/ino pair in the source tree
|
||||
we can arrange to create a hard link between the corresponding names
|
||||
in the destination tree.
|
||||
|
||||
Sometimes, when preserving links, we have to record dev/ino even
|
||||
though st_nlink == 1:
|
||||
- when using -H and processing a command line argument;
|
||||
that command line argument could be a symlink pointing to another
|
||||
command line argument. With `cp -H --preserve=link', we hard-link
|
||||
those two destination files.
|
||||
- likewise for -L except that it applies to all files, not just
|
||||
command line arguments.
|
||||
|
||||
Also record directory dev/ino when using --recursive. We'll use that
|
||||
info to detect this problem: cp -R dir dir. FIXME-maybe: ideally,
|
||||
directory info would be recorded in a separate hash table, since
|
||||
such entries are useful only while a single command line hierarchy
|
||||
is being copied -- so that separate table could be cleared between
|
||||
command line args. Using the same hash table to preserve hard
|
||||
links means that it may not be cleared. */
|
||||
|
||||
if ((x->preserve_links
|
||||
&& (1 < src_sb.st_nlink
|
||||
|| (command_line_arg
|
||||
&& x->dereference == DEREF_COMMAND_LINE_ARGUMENTS)
|
||||
|| x->dereference == DEREF_ALWAYS))
|
||||
|| (x->recursive && S_ISDIR (src_type)))
|
||||
{
|
||||
earlier_file = remember_copied (dst_path, src_sb.st_ino, src_sb.st_dev);
|
||||
}
|
||||
|
||||
/* Did we copy this inode somewhere else (in this command line argument)
|
||||
and therefore this is a second hard link to the inode? */
|
||||
|
||||
@@ -1173,6 +1172,11 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
error (0, 0, _("cannot move %s to a subdirectory of itself, %s"),
|
||||
quote_n (0, top_level_src_path),
|
||||
quote_n (1, top_level_dst_path));
|
||||
|
||||
/* Note that there is no need to call forget_created here,
|
||||
(compare with the other calls in this file) since the
|
||||
destination directory didn't exist before. */
|
||||
|
||||
*copy_into_self = 1;
|
||||
/* FIXME-cleanup: Don't return zero here; adjust mv.c accordingly.
|
||||
The only caller that uses this code (mv.c) ends up setting its
|
||||
@@ -1210,20 +1214,19 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
error (0, errno,
|
||||
_("cannot move %s to %s"),
|
||||
quote_n (0, src_path), quote_n (1, dst_path));
|
||||
forget_created (src_sb.st_ino, src_sb.st_dev);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Save this value of errno to use in case the unlink fails. */
|
||||
rename_errno = errno;
|
||||
|
||||
/* The rename attempt has failed. Remove any existing destination
|
||||
file so that a cross-device `mv' acts as if it were really using
|
||||
the rename syscall. */
|
||||
if (unlink (dst_path) && errno != ENOENT)
|
||||
{
|
||||
/* Use the value of errno from the failed rename. */
|
||||
error (0, rename_errno, _("cannot move %s to %s"),
|
||||
error (0, errno,
|
||||
_("inter-device move failed: %s to %s; unable to remove target"),
|
||||
quote_n (0, src_path), quote_n (1, dst_path));
|
||||
forget_created (src_sb.st_ino, src_sb.st_dev);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1525,6 +1528,13 @@ copy_internal (const char *src_path, const char *dst_path,
|
||||
return delayed_fail;
|
||||
|
||||
un_backup:
|
||||
|
||||
/* We didn't create the destination.
|
||||
Remove the entry associating the source dev/ino with the
|
||||
destination file name, so we don't try to `preserve' a link
|
||||
to a file we didn't create. */
|
||||
forget_created (src_sb.st_ino, src_sb.st_dev);
|
||||
|
||||
if (dst_backup)
|
||||
{
|
||||
if (rename (dst_backup, dst_path))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* cp-hash.c -- file copying (hash search routines)
|
||||
Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation.
|
||||
Copyright (C) 89, 90, 91, 1995-2002 Free Software Foundation.
|
||||
|
||||
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
|
||||
@@ -84,6 +84,23 @@ src_to_dest_free (void *x)
|
||||
free (x);
|
||||
}
|
||||
|
||||
/* Remove the entry matching INO/DEV from the table
|
||||
that maps source ino/dev to destination file name. */
|
||||
void
|
||||
forget_created (ino_t ino, dev_t dev)
|
||||
{
|
||||
struct Src_to_dest probe;
|
||||
struct Src_to_dest *ent;
|
||||
|
||||
probe.st_ino = ino;
|
||||
probe.st_dev = dev;
|
||||
probe.name = NULL;
|
||||
|
||||
ent = hash_delete (src_to_dest, &probe);
|
||||
if (ent)
|
||||
src_to_dest_free (ent);
|
||||
}
|
||||
|
||||
/* Add PATH to the list of files that we have created.
|
||||
Return 1 if we can't stat PATH, otherwise 0. */
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
void hash_init PARAMS ((void));
|
||||
void forget_all PARAMS ((void));
|
||||
void forget_created PARAMS ((ino_t ino, dev_t dev));
|
||||
char *remember_copied PARAMS ((const char *node, ino_t ino, dev_t dev));
|
||||
int remember_created PARAMS ((const char *path));
|
||||
|
||||
2
src/mv.c
2
src/mv.c
@@ -206,7 +206,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
|
||||
else if (rename_succeeded)
|
||||
{
|
||||
/* No need to remove anything. SOURCE was successfully
|
||||
renamed to DEST. */
|
||||
renamed to DEST. Or the user declined to rename a file. */
|
||||
dir_to_remove = NULL;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* seq - print sequence of numbers to standard output.
|
||||
Copyright (C) 1994-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -87,8 +87,8 @@ Usage: %s [OPTION]... LAST\n\
|
||||
fputs (_("\
|
||||
Print numbers from FIRST to LAST, in steps of INCREMENT.\n\
|
||||
\n\
|
||||
-f, --format FORMAT use printf(3) style FORMAT (default: %g)\n\
|
||||
-s, --separator STRING use STRING to separate numbers (default: \\n)\n\
|
||||
-f, --format=FORMAT use printf style floating-point FORMAT (default: %g)\n\
|
||||
-s, --separator=STRING use STRING to separate numbers (default: \\n)\n\
|
||||
-w, --equal-width equalize width by padding with leading zeroes\n\
|
||||
"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
|
||||
29
src/test.c
29
src/test.c
@@ -2,7 +2,7 @@
|
||||
|
||||
/* Modified to run with the GNU shell by bfox. */
|
||||
|
||||
/* Copyright (C) 1987-2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -293,19 +293,15 @@ isint (register char *string, intmax_t *result)
|
||||
}
|
||||
|
||||
/* Find the modification time of FILE, and stuff it into *AGE.
|
||||
Return nonzero if successful, else zero. */
|
||||
Return 0 if successful, -1 if not. */
|
||||
static int
|
||||
age_of (char *filename, time_t *age)
|
||||
{
|
||||
struct stat finfo;
|
||||
|
||||
if (test_stat (filename, &finfo) < 0)
|
||||
return (0);
|
||||
|
||||
if (age)
|
||||
int r = test_stat (filename, &finfo);
|
||||
if (r == 0)
|
||||
*age = finfo.st_mtime;
|
||||
|
||||
return (1);
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -520,13 +516,13 @@ binary_operator (void)
|
||||
{
|
||||
/* nt - newer than */
|
||||
time_t lt, rt;
|
||||
int le, re;
|
||||
pos += 3;
|
||||
if (l_is_l || r_is_l)
|
||||
test_syntax_error (_("-nt does not accept -l\n"), NULL);
|
||||
if (age_of (argv[op - 1], <) && age_of (argv[op + 1], &rt))
|
||||
return (TRUE == (lt > rt));
|
||||
else
|
||||
return (FALSE);
|
||||
le = age_of (argv[op - 1], <);
|
||||
re = age_of (argv[op + 1], &rt);
|
||||
return le > re || (le == 0 && lt > rt);
|
||||
}
|
||||
|
||||
if (argv[op][2] == 'e' && !argv[op][3])
|
||||
@@ -594,12 +590,13 @@ binary_operator (void)
|
||||
{
|
||||
/* ot - older than */
|
||||
time_t lt, rt;
|
||||
int le, re;
|
||||
pos += 3;
|
||||
if (l_is_l || r_is_l)
|
||||
test_syntax_error (_("-ot does not accept -l\n"), NULL);
|
||||
if (age_of (argv[op - 1], <) && age_of (argv[op + 1], &rt))
|
||||
return (TRUE == (lt < rt));
|
||||
return (FALSE);
|
||||
le = age_of (argv[op - 1], <);
|
||||
re = age_of (argv[op + 1], &rt);
|
||||
return le < re || (re == 0 && lt < rt);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
@@ -163,7 +163,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/cut/Makefile
|
||||
$(AUTOMAKE) --gnits tests/cut/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -169,7 +170,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/date/Makefile
|
||||
$(AUTOMAKE) --gnits tests/date/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/fmt/Makefile
|
||||
$(AUTOMAKE) --gnits tests/fmt/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -160,7 +160,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/head/Makefile
|
||||
$(AUTOMAKE) --gnits tests/head/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -163,7 +163,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/join/Makefile
|
||||
$(AUTOMAKE) --gnits tests/join/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/md5sum/Makefile
|
||||
$(AUTOMAKE) --gnits tests/md5sum/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/misc/Makefile
|
||||
$(AUTOMAKE) --gnits tests/misc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
||||
AUTOMAKE_OPTIONS = 1.3 gnits
|
||||
|
||||
TESTS = dup-source childproof i-4 update i-2 mv-special-1 \
|
||||
TESTS = \
|
||||
i-link-no \
|
||||
part-fail \
|
||||
dup-source childproof i-4 update i-2 mv-special-1 \
|
||||
into-self into-self-2 into-self-3 into-self-4 \
|
||||
backup-is-src \
|
||||
i-1 hard-link-1 force partition-perm to-symlink dir-file diag \
|
||||
|
||||
@@ -119,7 +119,10 @@ am__quote = @am__quote@
|
||||
install_sh = @install_sh@
|
||||
AUTOMAKE_OPTIONS = 1.3 gnits
|
||||
|
||||
TESTS = dup-source childproof i-4 update i-2 mv-special-1 \
|
||||
TESTS = \
|
||||
i-link-no \
|
||||
part-fail \
|
||||
dup-source childproof i-4 update i-2 mv-special-1 \
|
||||
into-self into-self-2 into-self-3 into-self-4 \
|
||||
backup-is-src \
|
||||
i-1 hard-link-1 force partition-perm to-symlink dir-file diag \
|
||||
|
||||
52
tests/mv/i-link-no
Executable file
52
tests/mv/i-link-no
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
# Show that mv doesn't preserve links to files the user has declined to move.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
|
||||
pwd=`pwd`
|
||||
tmp=i-link-no.$$
|
||||
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
framework_failure=0
|
||||
mkdir $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
mkdir a b || framework_failure=1
|
||||
echo foo > a/foo || framework_failure=1
|
||||
ln a/foo a/bar || framework_failure=1
|
||||
echo FUBAR > b/FUBAR || framework_failure=1
|
||||
ln b/FUBAR b/bar || framework_failure=1
|
||||
chmod a-w b/bar || framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo '$0: failure in testing framework' 1>&2
|
||||
(exit 1); exit
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
mv --reply=no a/bar a/foo b 2> err > out || fail=1
|
||||
cat <<EOF > exp
|
||||
EOF
|
||||
|
||||
cat <<EOF > exp_err
|
||||
EOF
|
||||
|
||||
cmp err exp_err || fail=1
|
||||
test $fail = 1 && diff err exp_err 2> /dev/null
|
||||
|
||||
cmp out exp || fail=1
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
case "`cat b/foo`" in
|
||||
foo) ;;
|
||||
*) fail=1;;
|
||||
esac
|
||||
|
||||
(exit $fail); exit
|
||||
47
tests/mv/part-fail
Executable file
47
tests/mv/part-fail
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
# Make sure we give a sensible diagnostic when a cross-device `mv'
|
||||
# fails, e.g., because the destination cannot be unlinked.
|
||||
# This is a bit fragile since it relies on the string used
|
||||
# for EPERM: `permission denied'.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
|
||||
|
||||
if test -z "$other_partition_tmpdir"; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
pwd=`pwd`
|
||||
tmp=part-fail.$$
|
||||
trap 'status=$?; cd $pwd; chmod u+w $other_partition_tmpdir;rm -rf $tmp $other_partition_tmpdir && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
framework_failure=0
|
||||
mkdir $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
touch k $other_partition_tmpdir/k || framework_failure=1
|
||||
chmod u-w $other_partition_tmpdir || framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo '$0: failure in testing framework' 1>&2
|
||||
(exit 1); exit
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
mv -f k $other_partition_tmpdir 2> out && fail=1
|
||||
cat <<EOF > exp
|
||||
mv: inter-device move failed: \`k' to \`$other_partition_tmpdir/k'; unable to remove target: Permission denied
|
||||
EOF
|
||||
|
||||
cmp out exp || fail=1
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
(exit $fail); exit
|
||||
@@ -139,7 +139,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/od/Makefile
|
||||
$(AUTOMAKE) --gnits tests/od/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -213,7 +213,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/pr/Makefile
|
||||
$(AUTOMAKE) --gnits tests/pr/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/sha1sum/Makefile
|
||||
$(AUTOMAKE) --gnits tests/sha1sum/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -184,7 +184,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/sort/Makefile
|
||||
$(AUTOMAKE) --gnits tests/sort/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/sum/Makefile
|
||||
$(AUTOMAKE) --gnits tests/sum/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -161,7 +161,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/tac/Makefile
|
||||
$(AUTOMAKE) --gnits tests/tac/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/tail-2/Makefile
|
||||
$(AUTOMAKE) --gnits tests/tail-2/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -163,7 +163,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/tail/Makefile
|
||||
$(AUTOMAKE) --gnits tests/tail/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.5d from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
@@ -48,6 +48,7 @@ INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = @program_transform_name@
|
||||
@@ -183,7 +184,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/test/Makefile
|
||||
$(AUTOMAKE) --gnits tests/test/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -167,7 +167,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/tr/Makefile
|
||||
$(AUTOMAKE) --gnits tests/tr/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/tsort/Makefile
|
||||
$(AUTOMAKE) --gnits tests/tsort/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -140,7 +140,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/unexpand/Makefile
|
||||
$(AUTOMAKE) --gnits tests/unexpand/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -165,7 +165,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/uniq/Makefile
|
||||
$(AUTOMAKE) --gnits tests/uniq/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
@@ -153,7 +153,7 @@ all: all-am
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/wc/Makefile
|
||||
$(AUTOMAKE) --gnits tests/wc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
uninstall-info-am:
|
||||
|
||||
Reference in New Issue
Block a user