mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
97 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11135e1307 | ||
|
|
d8a0eef528 | ||
|
|
b7657496c3 | ||
|
|
01c7f17f33 | ||
|
|
a211252152 | ||
|
|
24c0a0a99d | ||
|
|
df521a1b29 | ||
|
|
686a7e9ff3 | ||
|
|
1d738b51d1 | ||
|
|
84c2d0e52e | ||
|
|
6c0c08eb29 | ||
|
|
7de9edecfc | ||
|
|
9e3f43b368 | ||
|
|
d7b702d0d0 | ||
|
|
ed5b1cad23 | ||
|
|
532074e1c7 | ||
|
|
deef42170f | ||
|
|
b808de586b | ||
|
|
ac7f057d98 | ||
|
|
2daa912c53 | ||
|
|
7bf8c634eb | ||
|
|
c091e6fe83 | ||
|
|
dc61111cc6 | ||
|
|
920680fe4f | ||
|
|
c9f0e3d343 | ||
|
|
b4c9bd2b7e | ||
|
|
453be366da | ||
|
|
f51e80f564 | ||
|
|
993a56e8e0 | ||
|
|
d8e4dccdca | ||
|
|
427e67b196 | ||
|
|
90ffddc87e | ||
|
|
8458f55338 | ||
|
|
bf5ef10371 | ||
|
|
d087967041 | ||
|
|
cfb54dec88 | ||
|
|
e1958a7253 | ||
|
|
cf50a06294 | ||
|
|
c96d9a880f | ||
|
|
25bf05e45e | ||
|
|
99b35637c4 | ||
|
|
09b8756e33 | ||
|
|
9c5d11d5c5 | ||
|
|
bf6c2a07af | ||
|
|
c729fe037e | ||
|
|
02cde32c0a | ||
|
|
7741f87086 | ||
|
|
9e630b86cb | ||
|
|
2e19f14a91 | ||
|
|
65b1a6ec82 | ||
|
|
06d1a87e3b | ||
|
|
f417e8b9d4 | ||
|
|
4fb556ee0e | ||
|
|
c850393032 | ||
|
|
61ece919c6 | ||
|
|
843b44b3f7 | ||
|
|
5edb65b5c4 | ||
|
|
a71cb7cad1 | ||
|
|
e2d1b297e7 | ||
|
|
70bea7fd3e | ||
|
|
ec936db8d7 | ||
|
|
2b69ce2d89 | ||
|
|
0a25bc498d | ||
|
|
6cc7e13732 | ||
|
|
0e1c643956 | ||
|
|
2e29b32116 | ||
|
|
082787996c | ||
|
|
edef42bf40 | ||
|
|
efce5c3bdf | ||
|
|
18ac22d2fc | ||
|
|
c20eae80c7 | ||
|
|
6f43239736 | ||
|
|
c6b7de061f | ||
|
|
10d64e02c4 | ||
|
|
852a30165b | ||
|
|
e4d0cf679c | ||
|
|
57c0968203 | ||
|
|
761ed79f4d | ||
|
|
f49ea966c3 | ||
|
|
8c6d49c84d | ||
|
|
061a10d1ff | ||
|
|
787dfe9c83 | ||
|
|
9e3949fa6f | ||
|
|
62b64a0e92 | ||
|
|
37c289ea31 | ||
|
|
297a13a5a3 | ||
|
|
2aae4df6ef | ||
|
|
8670ecb6cb | ||
|
|
1b1bcc5e29 | ||
|
|
03d1ff2dea | ||
|
|
1381664a56 | ||
|
|
3ed45d5062 | ||
|
|
dfd3465715 | ||
|
|
86488adef8 | ||
|
|
3564013e18 | ||
|
|
a019f34623 | ||
|
|
0e2247a55b |
@@ -18,7 +18,7 @@ cvs-dist: maintainer-check
|
||||
ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \
|
||||
tag="$$pkg-$$ver"; \
|
||||
echo tag=$$tag; \
|
||||
if cvs -n log -h README| grep -e $$tag > /dev/null; then \
|
||||
if cvs -n log -h README| grep -e $$tag: > /dev/null; then \
|
||||
echo "VERSION not new; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@@ -50,7 +50,8 @@ THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
|
||||
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
|
||||
v = Version
|
||||
url = ftp://alpha.gnu.org/gnu/fetish/$(distdir).tar.gz
|
||||
url-host-prefix = ftp://alpha.gnu.org
|
||||
url = $(url-host-prefix)/gnu/fetish/$(distdir).tar.gz
|
||||
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
|
||||
rel-check:
|
||||
@@ -87,7 +88,7 @@ alpha:
|
||||
ln $(distdir).tar.gz ../release
|
||||
chmod a-w $(distdir).tar.gz
|
||||
@echo =====================================
|
||||
@echo 'ncftp -u $(dir $(url))'
|
||||
@echo 'ncftp -u $(url-host-prefix)/fs/share/ftp/gnu/fetish/'
|
||||
@echo '# put $(distdir).tar.gz'
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo 'pot-mail $(distdir).tar.gz | bash'
|
||||
|
||||
2
THANKS
2
THANKS
@@ -2,7 +2,9 @@ This is just a start at listing e-mail addresses of contributors.
|
||||
The rest of the addresses are still in the ChangeLog.
|
||||
|
||||
Achim Blumensath: blume@corona.oche.de
|
||||
aldomel: aldomel@ix.netcom.com
|
||||
Akim Demaille: demaille@inf.enst.fr
|
||||
Andreas Jaeger: jaeger@gnu.org
|
||||
Andreas Schwab: schwab@issan.informatik.uni-dortmund.de
|
||||
Andries Brouwer: Andries.Brouwer@cwi.nl
|
||||
Arne Henrik Juul: arnej@imf.unit.no
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
% texinfo.tex -- TeX macros to handle Texinfo files.
|
||||
\def\texinfoversion{1998-09-30}%
|
||||
%
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{1998-11-13}%
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
|
||||
% Free Software Foundation, Inc.
|
||||
@@ -50,12 +54,6 @@
|
||||
% Sometimes one run after texindex suffices, and sometimes you need more
|
||||
% than two; texi2dvi does it as many times as necessary.
|
||||
|
||||
|
||||
% Make it possible to create a .fmt file just by loading this file:
|
||||
% if the underlying format is not loaded, start by loading it now.
|
||||
% Added by gildea November 1993.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
|
||||
\message{Loading texinfo [version \texinfoversion]:}
|
||||
|
||||
% If in a .fmt file, print the version number
|
||||
@@ -189,13 +187,16 @@
|
||||
\shipout\vbox{%
|
||||
\ifcropmarks \vbox to \outervsize\bgroup
|
||||
\hsize = \outerhsize
|
||||
\line{\ewtop\hfil\ewtop}%
|
||||
\nointerlineskip
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nstop}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nstop}%
|
||||
}%
|
||||
\vskip-\topandbottommargin
|
||||
\vtop to0pt{%
|
||||
\line{\ewtop\hfil\ewtop}%
|
||||
\nointerlineskip
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nstop}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nstop}%
|
||||
}%
|
||||
\vss}%
|
||||
\vskip\topandbottommargin
|
||||
\line\bgroup
|
||||
\hfil % center the page within the outer (page) hsize.
|
||||
@@ -218,13 +219,15 @@
|
||||
\hfil\egroup % end of (centering) \line\bgroup
|
||||
\vskip\topandbottommargin plus1fill minus1fill
|
||||
\boxmaxdepth = \cornerthick
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nsbot}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nsbot}%
|
||||
\vbox to0pt{\vss
|
||||
\line{%
|
||||
\vbox{\moveleft\cornerthick\nsbot}%
|
||||
\hfill
|
||||
\vbox{\moveright\cornerthick\nsbot}%
|
||||
}%
|
||||
\nointerlineskip
|
||||
\line{\ewbot\hfil\ewbot}%
|
||||
}%
|
||||
\nointerlineskip
|
||||
\line{\ewbot\hfil\ewbot}%
|
||||
\egroup % \vbox from first cropmarks clause
|
||||
\fi
|
||||
}% end of \shipout\vbox
|
||||
@@ -846,7 +849,7 @@ where each line of input produces a line of output.}
|
||||
\immediate\write16{If you are running another version of TeX, relax.}
|
||||
\immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
|
||||
\immediate\write16{ Then upgrade your TeX installation if you can.}
|
||||
\immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)}
|
||||
\immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
|
||||
\immediate\write16{If you are stuck with version 3.0, run the}
|
||||
\immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
|
||||
\immediate\write16{ to use a workaround.}
|
||||
@@ -980,7 +983,7 @@ where each line of input produces a line of output.}
|
||||
%
|
||||
\def\expandablevalue#1{%
|
||||
\expandafter\ifx\csname SET#1\endcsname\relax
|
||||
{[No value for ``#1'']v}%
|
||||
{[No value for ``#1'']}%
|
||||
\else
|
||||
\csname SET#1\endcsname
|
||||
\fi
|
||||
@@ -2408,6 +2411,11 @@ width0pt\relax} \fi
|
||||
\def\copyright{\realbackslash copyright}%
|
||||
\def\tclose##1{\realbackslash tclose {##1}}%
|
||||
\def\code##1{\realbackslash code {##1}}%
|
||||
\def\uref##1{\realbackslash uref {##1}}%
|
||||
\def\url##1{\realbackslash url {##1}}%
|
||||
\def\env##1{\realbackslash env {##1}}%
|
||||
\def\command##1{\realbackslash command {##1}}%
|
||||
\def\option##1{\realbackslash option {##1}}%
|
||||
\def\dotless##1{\realbackslash dotless {##1}}%
|
||||
\def\samp##1{\realbackslash samp {##1}}%
|
||||
\def\,##1{\realbackslash ,{##1}}%
|
||||
@@ -2423,6 +2431,7 @@ width0pt\relax} \fi
|
||||
\def\kbd##1{\realbackslash kbd {##1}}%
|
||||
\def\dfn##1{\realbackslash dfn {##1}}%
|
||||
\def\emph##1{\realbackslash emph {##1}}%
|
||||
\def\acronym##1{\realbackslash acronym {##1}}%
|
||||
%
|
||||
% Handle some cases of @value -- where the variable name does not
|
||||
% contain - or _, and the value does not contain any
|
||||
@@ -2486,6 +2495,11 @@ width0pt\relax} \fi
|
||||
%\let\tt=\indexdummyfont
|
||||
\let\tclose=\indexdummyfont
|
||||
\let\code=\indexdummyfont
|
||||
\let\url=\indexdummyfont
|
||||
\let\uref=\indexdummyfont
|
||||
\let\env=\indexdummyfont
|
||||
\let\command=\indexdummyfont
|
||||
\let\option=\indexdummyfont
|
||||
\let\file=\indexdummyfont
|
||||
\let\samp=\indexdummyfont
|
||||
\let\kbd=\indexdummyfont
|
||||
@@ -5205,7 +5219,7 @@ width0pt\relax} \fi
|
||||
\vsize = #1\relax
|
||||
\advance\vsize by \topskip
|
||||
\outervsize = \vsize
|
||||
\advance\outervsize by 0.6in
|
||||
\advance\outervsize by 2\topandbottommargin
|
||||
\pageheight = \vsize
|
||||
%
|
||||
\hsize = #2\relax
|
||||
@@ -5445,10 +5459,9 @@ width0pt\relax} \fi
|
||||
@rm
|
||||
|
||||
@c Local variables:
|
||||
@c eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
@c page-delimiter: "^\\\\message"
|
||||
@c update-date-leading-regexp: "def\\texinfoversion{"
|
||||
@c update-date-date-regexp: "[-0-9.]+"
|
||||
@c update-date-format-string: "%Y-%m-%d"
|
||||
@c update-date-trailing-regexp: "}"
|
||||
@c eval: (and(load "update-date" t t)(add-hook 'write-file-hooks 'update-date))
|
||||
@c time-stamp-start: "def\\\\texinfoversion{"
|
||||
@c time-stamp-format: "%:y-%02m-%02d"
|
||||
@c time-stamp-end: "}"
|
||||
@c End:
|
||||
|
||||
@@ -2327,7 +2327,7 @@ all GNU extensions and revert to traditional mode, thus introducing some
|
||||
limitations, and changes several of the program's default option values.
|
||||
When @samp{-G} is not specified, GNU extensions are always enabled. GNU
|
||||
extensions to @code{ptx} are documented wherever appropriate in this
|
||||
document. See @xref{Compatibility in ptx} for an explicit list of them.
|
||||
document. For the full list, see @xref{Compatibility in ptx}.
|
||||
|
||||
Individual options are explained in incoming sections.
|
||||
|
||||
@@ -2471,9 +2471,9 @@ only if it is given in the Only file and not given in the Ignore file.
|
||||
|
||||
On each input line, the leading sequence of non white characters will be
|
||||
taken to be a reference that has the purpose of identifying this input
|
||||
line on the produced permuted index. See @xref{Output formatting in ptx} for
|
||||
more information about reference production. Using this option change
|
||||
the default value for option @code{-S}.
|
||||
line on the produced permuted index. For more information about reference
|
||||
production, see @xref{Output formatting in ptx}.
|
||||
Using this option changes the default value for option @code{-S}.
|
||||
|
||||
Using this option, the program does not try very hard to remove
|
||||
references from contexts in output, but it succeeds in doing so
|
||||
|
||||
21
lib/lstat.c
21
lib/lstat.c
@@ -1,7 +1,7 @@
|
||||
/* Work around the bug in some systems whereby lstat succeeds when
|
||||
given the zero-length file name argument. The lstat from SunOS4.1.4
|
||||
has this bug.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998 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
|
||||
@@ -21,11 +21,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of lstat to rpl_lstat (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_lstat on
|
||||
most systems. */
|
||||
#undef lstat
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
@@ -33,16 +28,20 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* FIXME: describe. */
|
||||
/* This is a wrapper for lstat(2).
|
||||
If FILE is the empty string, fail with errno == ENOENT.
|
||||
Otherwise, return the result of calling the real lstat.
|
||||
|
||||
This works around the bug in some systems whereby lstat succeeds when
|
||||
given the zero-length file name argument. The lstat from SunOS4.1.4
|
||||
has this bug. */
|
||||
|
||||
int
|
||||
rpl_lstat (file, sbuf)
|
||||
const char *file;
|
||||
struct stat *sbuf;
|
||||
rpl_lstat (const char *file, struct stat *sbuf)
|
||||
{
|
||||
if (file && *file == 0)
|
||||
{
|
||||
errno = EINVAL;
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
55
lib/mktime.c
55
lib/mktime.c
@@ -1,4 +1,4 @@
|
||||
/* mktime: convert a `struct tm' to a time_t value zzzzzz
|
||||
/* mktime: convert a `struct tm' to a time_t value
|
||||
Copyright (C) 1993-1997, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||
|
||||
@@ -28,14 +28,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Some systems need this in order to declare localtime_r properly. */
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT 1
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define HAVE_LIMITS_H 1
|
||||
# define HAVE_LOCALTIME_R 1
|
||||
# define STDC_HEADERS 1
|
||||
#endif
|
||||
|
||||
@@ -125,14 +119,14 @@ time_t __mktime_internal __P ((struct tm *,
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
# define localtime_r __localtime_r
|
||||
# define my_mktime_localtime_r __localtime_r
|
||||
#else
|
||||
# if ! HAVE_LOCALTIME_R && ! defined localtime_r
|
||||
/* Approximate localtime_r as best we can in its absence. */
|
||||
# define localtime_r my_mktime_localtime_r
|
||||
static struct tm *localtime_r __P ((const time_t *, struct tm *));
|
||||
/* If we're a mktime substitute in a GNU program, then prefer
|
||||
localtime to localtime_r, since many localtime_r implementations
|
||||
are buggy. */
|
||||
static struct tm *my_mktime_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
localtime_r (t, tp)
|
||||
my_mktime_localtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
{
|
||||
@@ -142,7 +136,6 @@ localtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */
|
||||
#endif /* ! _LIBC */
|
||||
|
||||
|
||||
@@ -197,7 +190,7 @@ mktime (tp)
|
||||
__tzset ();
|
||||
#endif
|
||||
|
||||
return __mktime_internal (tp, localtime_r, &localtime_offset);
|
||||
return __mktime_internal (tp, my_mktime_localtime_r, &localtime_offset);
|
||||
}
|
||||
|
||||
/* Use CONVERT to convert *T to a broken down time in *TP.
|
||||
@@ -259,14 +252,14 @@ __mktime_internal (tp, convert, offset)
|
||||
struct tm *(*convert) __P ((const time_t *, struct tm *));
|
||||
time_t *offset;
|
||||
{
|
||||
time_t t, dt, t0;
|
||||
time_t t, dt, t0, t1, t2;
|
||||
struct tm tm;
|
||||
|
||||
/* The maximum number of probes (calls to CONVERT) should be enough
|
||||
to handle any combinations of time zone rule changes, solar time,
|
||||
and leap seconds. POSIX.1 prohibits leap seconds, but some hosts
|
||||
have them anyway. */
|
||||
int remaining_probes = 4;
|
||||
leap seconds, and oscillations around a spring-forward gap.
|
||||
POSIX.1 prohibits leap seconds, but some hosts have them anyway. */
|
||||
int remaining_probes = 6;
|
||||
|
||||
/* Time requested. Copy it in case CONVERT modifies *TP; this can
|
||||
occur if TP is localtime's returned value and CONVERT is localtime. */
|
||||
@@ -312,15 +305,27 @@ __mktime_internal (tp, convert, offset)
|
||||
tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
|
||||
t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm);
|
||||
|
||||
for (t = t0 + *offset;
|
||||
for (t = t1 = t2 = t0 + *offset;
|
||||
(dt = ydhms_tm_diff (year, yday, hour, min, sec,
|
||||
ranged_convert (convert, &t, &tm)));
|
||||
t += dt)
|
||||
if (--remaining_probes == 0)
|
||||
t1 = t2, t2 = t, t += dt)
|
||||
if (t == t1 && t != t2
|
||||
&& (isdst < 0 || tm.tm_isdst < 0
|
||||
|| (isdst != 0) != (tm.tm_isdst != 0)))
|
||||
/* We can't possibly find a match, as we are oscillating
|
||||
between two values. The requested time probably falls
|
||||
within a spring-forward gap of size DT. Follow the common
|
||||
practice in this case, which is to return a time that is DT
|
||||
away from the requested time, preferring a time whose
|
||||
tm_isdst differs from the requested value. In practice,
|
||||
this is more useful than returning -1. */
|
||||
break;
|
||||
else if (--remaining_probes == 0)
|
||||
return -1;
|
||||
|
||||
/* Check whether tm.tm_isdst has the requested value, if any. */
|
||||
if (0 <= isdst && 0 <= tm.tm_isdst)
|
||||
/* If we have a match, check whether tm.tm_isdst has the requested
|
||||
value, if any. */
|
||||
if (dt == 0 && 0 <= isdst && 0 <= tm.tm_isdst)
|
||||
{
|
||||
int dst_diff = (isdst != 0) - (tm.tm_isdst != 0);
|
||||
if (dst_diff)
|
||||
@@ -531,6 +536,6 @@ main (argc, argv)
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DDEBUG -D__EXTENSIONS__ -DHAVE_LIMITS_H -DHAVE_LOCALTIME_R -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
End:
|
||||
*/
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of stat to rpl_stat (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_stat on
|
||||
most systems. */
|
||||
#undef stat
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
@@ -42,9 +37,7 @@ extern int errno;
|
||||
has this bug. */
|
||||
|
||||
int
|
||||
rpl_stat (file, sbuf)
|
||||
const char *file;
|
||||
struct stat *sbuf;
|
||||
rpl_stat (const char *file, struct stat *sbuf)
|
||||
{
|
||||
if (file && *file == 0)
|
||||
{
|
||||
|
||||
230
lib/strftime.c
230
lib/strftime.c
@@ -22,11 +22,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Some systems need this in order to declare localtime_r properly. */
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT 1
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define HAVE_LIMITS_H 1
|
||||
# define HAVE_MBLEN 1
|
||||
@@ -136,7 +131,7 @@ extern char *tzname[];
|
||||
add one for integer division truncation;
|
||||
add one more for a minus sign if t is signed. */
|
||||
#define INT_STRLEN_BOUND(t) \
|
||||
((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 100 + 1 + TYPE_SIGNED (t))
|
||||
((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t))
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
@@ -149,19 +144,20 @@ extern char *tzname[];
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
# define gmtime_r __gmtime_r
|
||||
# define localtime_r __localtime_r
|
||||
# define my_strftime_gmtime_r __gmtime_r
|
||||
# define my_strftime_localtime_r __localtime_r
|
||||
# define tzname __tzname
|
||||
# define tzset __tzset
|
||||
#else
|
||||
# if ! HAVE_LOCALTIME_R
|
||||
# if ! HAVE_TM_GMTOFF
|
||||
/* Approximate gmtime_r as best we can in its absence. */
|
||||
# undef gmtime_r
|
||||
# define gmtime_r my_gmtime_r
|
||||
static struct tm *gmtime_r __P ((const time_t *, struct tm *));
|
||||
|
||||
/* If we're a strftime substitute in a GNU program, then prefer gmtime
|
||||
to gmtime_r, since many gmtime_r implementations are buggy.
|
||||
Similarly for localtime_r. */
|
||||
|
||||
# if ! HAVE_TM_GMTOFF
|
||||
static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
gmtime_r (t, tp)
|
||||
my_strftime_gmtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
{
|
||||
@@ -171,14 +167,11 @@ gmtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
|
||||
/* Approximate localtime_r as best we can in its absence. */
|
||||
# undef localtime_r
|
||||
# define localtime_r my_ftime_localtime_r
|
||||
static struct tm *localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
localtime_r (t, tp)
|
||||
my_strftime_localtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
{
|
||||
@@ -188,7 +181,6 @@ localtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_LOCALTIME_R */
|
||||
#endif /* ! defined _LIBC */
|
||||
|
||||
|
||||
@@ -376,34 +368,35 @@ static char const month_name[][10] =
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
# define my_strftime emacs_strftime
|
||||
/* Emacs 20.2 uses `-Dstrftime=emacs_strftime' when compiling,
|
||||
because that's how strftime used to be configured.
|
||||
Undo this, since it gets in the way of accessing the underlying strftime,
|
||||
which is needed for things like %Ec in Solaris.
|
||||
The following two lines can be removed once Emacs stops compiling with
|
||||
`-Dstrftime=emacs_strftime'. */
|
||||
# undef strftime
|
||||
size_t strftime __P ((char *, size_t, const char *, const struct tm *));
|
||||
# define my_strftime emacs_strftimeu
|
||||
# define ut_argument , ut
|
||||
# define ut_argument_spec int ut;
|
||||
# define ut_argument_spec_iso , int ut
|
||||
#else
|
||||
# define my_strftime strftime
|
||||
# define ut_argument
|
||||
# define ut_argument_spec
|
||||
# define ut_argument_spec_iso
|
||||
/* We don't have this information in general. */
|
||||
# define ut 0
|
||||
#endif
|
||||
|
||||
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
||||
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
||||
Work around this bug by copying *tp before it might be munged. */
|
||||
size_t _strftime_copytm __P ((char *, size_t, const char *,
|
||||
const struct tm *));
|
||||
const struct tm * ut_argument_spec_iso));
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp)
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
{
|
||||
struct tm tmcopy;
|
||||
tmcopy = *tp;
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy);
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
|
||||
}
|
||||
# undef my_strftime
|
||||
# define my_strftime(S, Maxsize, Format, Tp) \
|
||||
@@ -418,41 +411,44 @@ size_t strftime __P ((char *, size_t, const char *, const struct tm *));
|
||||
anywhere, so to determine how many characters would be
|
||||
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp)
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
{
|
||||
int hour12 = tp->tm_hour;
|
||||
#ifdef _NL_CURRENT
|
||||
const char *const a_wkday = _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday);
|
||||
const char *const f_wkday = _NL_CURRENT (LC_TIME, DAY_1 + tp->tm_wday);
|
||||
const char *const a_month = _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon);
|
||||
const char *const f_month = _NL_CURRENT (LC_TIME, MON_1 + tp->tm_mon);
|
||||
const char *const ampm = _NL_CURRENT (LC_TIME,
|
||||
hour12 > 11 ? PM_STR : AM_STR);
|
||||
size_t aw_len = strlen (a_wkday);
|
||||
size_t am_len = strlen (a_month);
|
||||
size_t ap_len = strlen (ampm);
|
||||
/* We cannot make the following values variables since we must delay
|
||||
the evaluation of these values until really needed since some
|
||||
expressions might not be valid in every situation. The `struct tm'
|
||||
might be generated by a strptime() call that initialized
|
||||
only a few elements. Dereference the pointers only if the format
|
||||
requires this. Then it is ok to fail if the pointers are invalid. */
|
||||
# define a_wkday _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday)
|
||||
# define f_wkday _NL_CURRENT (LC_TIME, DAY_1 + tp->tm_wday)
|
||||
# define a_month _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon)
|
||||
# define f_month _NL_CURRENT (LC_TIME, MON_1 + tp->tm_mon)
|
||||
# define ampm _NL_CURRENT (LC_TIME, tp->tm_hour > 11 ? PM_STR : AM_STR)
|
||||
|
||||
# define aw_len strlen (a_wkday)
|
||||
# define am_len strlen (a_month)
|
||||
# define ap_len strlen (ampm)
|
||||
#else
|
||||
# if !HAVE_STRFTIME
|
||||
const char *const f_wkday = weekday_name[tp->tm_wday];
|
||||
const char *const f_month = month_name[tp->tm_mon];
|
||||
const char *const a_wkday = f_wkday;
|
||||
const char *const a_month = f_month;
|
||||
const char *const ampm = "AMPM" + 2 * (hour12 > 11);
|
||||
# define f_wkday (weekday_name[tp->tm_wday])
|
||||
# define f_month (month_name[tp->tm_mon])
|
||||
# define a_wkday f_wkday
|
||||
# define a_month f_month
|
||||
# define ampm ("AMPM" + 2 * (tp->tm_hour > 11))
|
||||
|
||||
size_t aw_len = 3;
|
||||
size_t am_len = 3;
|
||||
size_t ap_len = 2;
|
||||
# endif
|
||||
#endif
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
size_t wkday_len = strlen (f_wkday);
|
||||
size_t month_len = strlen (f_month);
|
||||
#endif
|
||||
const char *zone;
|
||||
size_t zonelen;
|
||||
size_t i = 0;
|
||||
char *p = s;
|
||||
const char *f;
|
||||
@@ -468,25 +464,27 @@ my_strftime (s, maxsize, format, tp)
|
||||
zone = (const char *) tp->tm_zone;
|
||||
#endif
|
||||
#if HAVE_TZNAME
|
||||
/* POSIX.1 8.1.1 requires that whenever strftime() is called, the
|
||||
time zone names contained in the external variable `tzname' shall
|
||||
be set as if the tzset() function had been called. */
|
||||
if (ut)
|
||||
{
|
||||
if (! (zone && *zone))
|
||||
zone = "GMT";
|
||||
}
|
||||
else
|
||||
{
|
||||
/* POSIX.1 8.1.1 requires that whenever strftime() is called, the
|
||||
time zone names contained in the external variable `tzname' shall
|
||||
be set as if the tzset() function had been called. */
|
||||
# if HAVE_TZSET
|
||||
tzset ();
|
||||
tzset ();
|
||||
# endif
|
||||
|
||||
if (!(zone && *zone) && tp->tm_isdst >= 0)
|
||||
zone = tzname[tp->tm_isdst];
|
||||
}
|
||||
#endif
|
||||
if (! zone)
|
||||
zone = ""; /* POSIX.2 requires the empty string here. */
|
||||
|
||||
zonelen = strlen (zone);
|
||||
|
||||
if (hour12 > 12)
|
||||
hour12 -= 12;
|
||||
else
|
||||
if (hour12 == 0) hour12 = 12;
|
||||
if (hour12 == 0)
|
||||
hour12 = 12;
|
||||
|
||||
for (f = format; *f != '\0'; ++f)
|
||||
{
|
||||
@@ -552,7 +550,13 @@ my_strftime (s, maxsize, format, tp)
|
||||
if (bytes == 0)
|
||||
break;
|
||||
|
||||
if (bytes == (size_t) -2 || bytes == (size_t) -1)
|
||||
if (bytes == (size_t) -2)
|
||||
{
|
||||
len += strlen (f + len);
|
||||
break;
|
||||
}
|
||||
|
||||
if (bytes == (size_t) -1)
|
||||
{
|
||||
len++;
|
||||
break;
|
||||
@@ -563,6 +567,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
while (! mbsinit (&mbstate));
|
||||
|
||||
cpy (len, f);
|
||||
f += len - 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -672,7 +677,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_lowcase = 0;
|
||||
}
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
cpy (wkday_len, f_wkday);
|
||||
cpy (strlen (f_wkday), f_wkday);
|
||||
break;
|
||||
#else
|
||||
goto underlying_strftime;
|
||||
@@ -698,7 +703,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_lowcase = 0;
|
||||
}
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
cpy (month_len, f_month);
|
||||
cpy (strlen (f_month), f_month);
|
||||
break;
|
||||
#else
|
||||
goto underlying_strftime;
|
||||
@@ -722,9 +727,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
subformat:
|
||||
{
|
||||
char *old_start = p;
|
||||
size_t len = my_strftime (NULL, maxsize - i, subfmt, tp);
|
||||
if (len == 0 && *subfmt)
|
||||
return 0;
|
||||
size_t len = my_strftime (NULL, (size_t) -1, subfmt, tp);
|
||||
add (len, my_strftime (p, maxsize - i, subfmt, tp));
|
||||
|
||||
if (to_uppcase)
|
||||
@@ -750,7 +753,6 @@ my_strftime (s, maxsize, format, tp)
|
||||
*u++ = modifier;
|
||||
*u++ = format_char;
|
||||
*u = '\0';
|
||||
ubuf[0] = '\1';
|
||||
len = strftime (ubuf, sizeof ubuf, ufmt, tp);
|
||||
if (len == 0 && ubuf[0] != '\0')
|
||||
return 0;
|
||||
@@ -1150,7 +1152,16 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_uppcase = 0;
|
||||
to_lowcase = 1;
|
||||
}
|
||||
cpy (zonelen, zone);
|
||||
|
||||
#if HAVE_TZNAME
|
||||
/* The tzset() call might have changed the value. */
|
||||
if (!(zone && *zone) && tp->tm_isdst >= 0)
|
||||
zone = tzname[tp->tm_isdst];
|
||||
#endif
|
||||
if (! zone)
|
||||
zone = ""; /* POSIX.2 requires the empty string here. */
|
||||
|
||||
cpy (strlen (zone), zone);
|
||||
break;
|
||||
|
||||
case 'z': /* GNU extension. */
|
||||
@@ -1162,34 +1173,39 @@ my_strftime (s, maxsize, format, tp)
|
||||
#if HAVE_TM_GMTOFF
|
||||
diff = tp->tm_gmtoff;
|
||||
#else
|
||||
struct tm gtm;
|
||||
struct tm ltm;
|
||||
time_t lt;
|
||||
|
||||
ltm = *tp;
|
||||
lt = mktime (<m);
|
||||
|
||||
if (lt == (time_t) -1)
|
||||
if (ut)
|
||||
diff = 0;
|
||||
else
|
||||
{
|
||||
/* mktime returns -1 for errors, but -1 is also a
|
||||
valid time_t value. Check whether an error really
|
||||
occurred. */
|
||||
struct tm tm;
|
||||
localtime_r (<, &tm);
|
||||
struct tm gtm;
|
||||
struct tm ltm;
|
||||
time_t lt;
|
||||
|
||||
if ((ltm.tm_sec ^ tm.tm_sec)
|
||||
| (ltm.tm_min ^ tm.tm_min)
|
||||
| (ltm.tm_hour ^ tm.tm_hour)
|
||||
| (ltm.tm_mday ^ tm.tm_mday)
|
||||
| (ltm.tm_mon ^ tm.tm_mon)
|
||||
| (ltm.tm_year ^ tm.tm_year))
|
||||
ltm = *tp;
|
||||
lt = mktime (<m);
|
||||
|
||||
if (lt == (time_t) -1)
|
||||
{
|
||||
/* mktime returns -1 for errors, but -1 is also a
|
||||
valid time_t value. Check whether an error really
|
||||
occurred. */
|
||||
struct tm tm;
|
||||
|
||||
if (! my_strftime_localtime_r (<, &tm)
|
||||
|| ((ltm.tm_sec ^ tm.tm_sec)
|
||||
| (ltm.tm_min ^ tm.tm_min)
|
||||
| (ltm.tm_hour ^ tm.tm_hour)
|
||||
| (ltm.tm_mday ^ tm.tm_mday)
|
||||
| (ltm.tm_mon ^ tm.tm_mon)
|
||||
| (ltm.tm_year ^ tm.tm_year)))
|
||||
break;
|
||||
}
|
||||
|
||||
if (! my_strftime_gmtime_r (<, >m))
|
||||
break;
|
||||
|
||||
diff = tm_diff (<m, >m);
|
||||
}
|
||||
|
||||
if (! gmtime_r (<, >m))
|
||||
break;
|
||||
|
||||
diff = tm_diff (<m, >m);
|
||||
#endif
|
||||
|
||||
if (diff < 0)
|
||||
@@ -1222,7 +1238,23 @@ my_strftime (s, maxsize, format, tp)
|
||||
}
|
||||
}
|
||||
|
||||
if (p)
|
||||
if (p && i < maxsize)
|
||||
*p = '\0';
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
/* For Emacs we have a separate interface which corresponds to the normal
|
||||
strftime function and does not have the extra information whether the
|
||||
TP arguments comes from a `gmtime' call or not. */
|
||||
size_t
|
||||
emacs_strftime (s, maxsize, format, tp)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
{
|
||||
return my_strftime (s, maxsize, format, tp, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
37
m4/ChangeLog
37
m4/ChangeLog
@@ -1,3 +1,40 @@
|
||||
1998-11-14 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* lstat.m4: Correct comment. POSIX does not permit it to succeed.
|
||||
* stat.m4: Likewise.
|
||||
|
||||
1998-11-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
|
||||
* lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
|
||||
|
||||
1998-10-18 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
|
||||
|
||||
1998-10-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
|
||||
include, though we still hard-code the `require'-like AC_CHECK_HEADERS
|
||||
calls for those previously hard-coded headers. Instead, take a new
|
||||
parameter.
|
||||
(jm_CHECK_DECLARATIONS): Reflect interface change.
|
||||
* check-decl.m4 (jm_CHECK_DECLS): Likewise.
|
||||
(jm_CHECK_DECL_LOCALTIME_R): New macro.
|
||||
|
||||
* mktime.m4: Test for spring-forward gap before long-running test.
|
||||
|
||||
1998-10-14 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
|
||||
instead of "TZ=America/Vancouver". From Paul Eggert.
|
||||
|
||||
1998-10-11 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
|
||||
This adds a test for a recently added compatibility fix for mktime.c.
|
||||
* jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
|
||||
|
||||
1998-09-27 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
|
||||
|
||||
@@ -6,8 +6,8 @@ chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fnmatch.m4 \
|
||||
fstypename.m4 getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 glibc.m4 \
|
||||
inttypes_h.m4 isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 \
|
||||
jm-winsz1.m4 jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 perl.m4 prereq.m4 progtest.m4 putenv.m4 \
|
||||
readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 mktime.m4 perl.m4 prereq.m4 progtest.m4 \
|
||||
putenv.m4 readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
strftime.m4 uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
|
||||
##m4-files-end
|
||||
|
||||
@@ -95,8 +95,8 @@ chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fnmatch.m4 \
|
||||
fstypename.m4 getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 glibc.m4 \
|
||||
inttypes_h.m4 isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 \
|
||||
jm-winsz1.m4 jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 perl.m4 prereq.m4 progtest.m4 putenv.m4 \
|
||||
readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 mktime.m4 perl.m4 prereq.m4 progtest.m4 \
|
||||
putenv.m4 readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
strftime.m4 uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
#serial 2
|
||||
#serial 4
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
dnl different packages.
|
||||
AC_DEFUN(jm_CHECK_DECLS,
|
||||
[
|
||||
headers='
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
'
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put entries
|
||||
@@ -14,5 +33,6 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
AC_CHECK_FUNCS(DECL_FREE DECL_LSEEK DECL_MALLOC DECL_MEMCHR DECL_REALLOC \
|
||||
DECL_STPCPY DECL_STRSTR)
|
||||
fi
|
||||
jm_CHECK_DECLARATIONS(free lseek malloc memchr realloc stpcpy strstr)
|
||||
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
|
||||
memchr realloc stpcpy strstr)
|
||||
])
|
||||
|
||||
33
m4/decl.m4
33
m4/decl.m4
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
AC_DEFUN(jm_CHECK_DECLARATION,
|
||||
[
|
||||
@@ -10,24 +10,7 @@ AC_DEFUN(jm_CHECK_DECLARATION,
|
||||
test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h)
|
||||
AC_MSG_CHECKING([whether $1 is declared])
|
||||
AC_CACHE_VAL(jm_cv_func_decl_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif],
|
||||
[AC_TRY_COMPILE($2,
|
||||
[
|
||||
#ifndef $1
|
||||
char *(*pfn) = (char *(*)) $1
|
||||
@@ -38,23 +21,23 @@ char *(*pfn) = (char *(*)) $1
|
||||
|
||||
if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , , [$3
|
||||
ifelse([$4], , , [$4
|
||||
])dnl
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl jm_CHECK_DECLARATIONS(FUNCTION... [, ACTION-IF-DECLARED
|
||||
dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED
|
||||
dnl [, ACTION-IF-NOT-DECLARED]])
|
||||
AC_DEFUN(jm_CHECK_DECLARATIONS,
|
||||
[
|
||||
for jm_func in $1
|
||||
for jm_func in $2
|
||||
do
|
||||
jm_CHECK_DECLARATION($jm_func,
|
||||
jm_CHECK_DECLARATION($jm_func, $1,
|
||||
[
|
||||
jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
AC_DEFINE_UNQUOTED($jm_tr_func) $2], $3)dnl
|
||||
AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl
|
||||
done
|
||||
])
|
||||
|
||||
@@ -7,12 +7,12 @@ dnl /* Define to rpl_mktime if the replacement function should be used. */
|
||||
dnl #undef mktime
|
||||
dnl
|
||||
AC_DEFUN(jm_FUNC_MKTIME,
|
||||
[AC_REQUIRE([AM_FUNC_MKTIME])dnl
|
||||
[AC_REQUIRE([jm_AM_FUNC_MKTIME])dnl
|
||||
|
||||
dnl mktime.c uses localtime_r if it exists. Check for it.
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
|
||||
if test $am_cv_func_working_mktime = no; then
|
||||
if test $jm_am_cv_func_working_mktime = no; then
|
||||
AC_DEFINE_UNQUOTED(mktime, rpl_mktime)
|
||||
fi
|
||||
])
|
||||
|
||||
43
m4/lstat.m4
43
m4/lstat.m4
@@ -1,20 +1,18 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether lstat has the bug that it succeeds when given the
|
||||
dnl zero-length file name argument. The lstat from SunOS4.1.4 does this.
|
||||
dnl zero-length file name argument. The lstat from SunOS4.1.4 and the Hurd
|
||||
dnl (as of 1998-11-01) do this.
|
||||
dnl
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_lstat if the replacement function should be used. */
|
||||
dnl #undef lstat
|
||||
dnl If it does, then define HAVE_LSTAT_EMPTY_STRING_BUG and arrange to
|
||||
dnl compile the wrapper function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_LSTAT,
|
||||
[
|
||||
AC_CACHE_CHECK([for working lstat], jm_cv_func_working_lstat,
|
||||
AC_CACHE_CHECK([whether lstat accepts an empty string],
|
||||
jm_cv_func_lstat_empty_string_bug,
|
||||
[AC_TRY_RUN([
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
@@ -23,16 +21,31 @@ AC_DEFUN(jm_FUNC_LSTAT,
|
||||
main ()
|
||||
{
|
||||
struct stat sbuf;
|
||||
exit (lstat ("", &sbuf) == 0 ? 1 : 0);
|
||||
exit (lstat ("", &sbuf) ? 1 : 0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_lstat=yes,
|
||||
jm_cv_func_working_lstat=no,
|
||||
jm_cv_func_lstat_empty_string_bug=yes,
|
||||
jm_cv_func_lstat_empty_string_bug=no,
|
||||
dnl When crosscompiling, assume lstat is broken.
|
||||
jm_cv_func_working_lstat=no)
|
||||
jm_cv_func_lstat_empty_string_bug=yes)
|
||||
])
|
||||
if test $jm_cv_func_working_lstat = no; then
|
||||
if test $jm_cv_func_lstat_empty_string_bug = yes; then
|
||||
|
||||
LIBOBJS="$LIBOBJS lstat.o"
|
||||
AC_DEFINE_UNQUOTED(lstat, rpl_lstat)
|
||||
|
||||
if test $jm_cv_func_lstat_empty_string_bug = yes; then
|
||||
if test x = y; then
|
||||
# This code is deliberately never run via ./configure.
|
||||
# FIXME: this is a hack to make autoheader put the corresponding
|
||||
# HAVE_* undef for this symbol in config.h.in. This saves me the
|
||||
# trouble of having to maintain the #undef in acconfig.h manually.
|
||||
AC_CHECK_FUNCS(LSTAT_EMPTY_STRING_BUG)
|
||||
fi
|
||||
# Defining it this way (rather than via AC_DEFINE) short-circuits the
|
||||
# autoheader check -- autoheader doesn't know it's already been taken
|
||||
# care of by the hack above.
|
||||
ac_kludge=HAVE_LSTAT_EMPTY_STRING_BUG
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
166
m4/mktime.m4
Normal file
166
m4/mktime.m4
Normal file
@@ -0,0 +1,166 @@
|
||||
#serial 1001
|
||||
|
||||
dnl Just like mktime.m4 from automake-1.3b, but with an additional test.
|
||||
dnl Renamed to have jm_ prefix and to use jm_ prefix on cache variable names.
|
||||
|
||||
AC_DEFUN(jm_AM_FUNC_MKTIME,
|
||||
[AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_CHECK_HEADERS(sys/time.h unistd.h)
|
||||
AC_CHECK_FUNCS(alarm)
|
||||
AC_CACHE_CHECK([for working mktime], jm_am_cv_func_working_mktime,
|
||||
[AC_TRY_RUN(
|
||||
changequote(<<, >>)dnl
|
||||
<</* Test program from Paul Eggert (eggert@twinsun.com)
|
||||
and Tony Leneis (tony@plaza.ds.adp.com). */
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_ALARM
|
||||
# define alarm(X) /* empty */
|
||||
#endif
|
||||
|
||||
/* Work around redefinition to rpl_putenv by other config tests. */
|
||||
#undef putenv
|
||||
|
||||
static time_t time_t_max;
|
||||
|
||||
/* Values we'll use to set the TZ environment variable. */
|
||||
static const char *const tz_strings[] = {
|
||||
(const char *) 0, "TZ=GMT0", "TZ=JST-9",
|
||||
"TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
|
||||
};
|
||||
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
|
||||
|
||||
/* Fail if mktime fails to convert a date in the spring-forward gap.
|
||||
Based on a problem report from Andreas Jaeger. */
|
||||
static void
|
||||
spring_forward_gap ()
|
||||
{
|
||||
/* glibc (up to about 1998-10-07) failed this test) */
|
||||
struct tm tm;
|
||||
|
||||
/* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
|
||||
instead of "TZ=America/Vancouver" in order to detect the bug even
|
||||
on systems that don't support the Olson extension, or don't have the
|
||||
full zoneinfo tables installed. */
|
||||
putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
|
||||
tm.tm_year = 98;
|
||||
tm.tm_mon = 3;
|
||||
tm.tm_mday = 5;
|
||||
tm.tm_hour = 2;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
tm.tm_isdst = -1;
|
||||
if (mktime (&tm) == (time_t)-1)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
mktime_test (now)
|
||||
time_t now;
|
||||
{
|
||||
struct tm *lt;
|
||||
if ((lt = localtime (&now)) && mktime (lt) != now)
|
||||
exit (1);
|
||||
now = time_t_max - now;
|
||||
if ((lt = localtime (&now)) && mktime (lt) != now)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
irix_6_4_bug ()
|
||||
{
|
||||
/* Based on code from Ariel Faigon. */
|
||||
struct tm tm;
|
||||
tm.tm_year = 96;
|
||||
tm.tm_mon = 3;
|
||||
tm.tm_mday = 0;
|
||||
tm.tm_hour = 0;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
tm.tm_isdst = -1;
|
||||
mktime (&tm);
|
||||
if (tm.tm_mon != 2 || tm.tm_mday != 31)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
bigtime_test (j)
|
||||
int j;
|
||||
{
|
||||
struct tm tm;
|
||||
time_t now;
|
||||
tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
|
||||
/* This test makes some buggy mktime implementations loop.
|
||||
Give up after 10 seconds. */
|
||||
alarm (10);
|
||||
now = mktime (&tm);
|
||||
alarm (0);
|
||||
if (now != (time_t) -1)
|
||||
{
|
||||
struct tm *lt = localtime (&now);
|
||||
if (! (lt
|
||||
&& lt->tm_year == tm.tm_year
|
||||
&& lt->tm_mon == tm.tm_mon
|
||||
&& lt->tm_mday == tm.tm_mday
|
||||
&& lt->tm_hour == tm.tm_hour
|
||||
&& lt->tm_min == tm.tm_min
|
||||
&& lt->tm_sec == tm.tm_sec
|
||||
&& lt->tm_yday == tm.tm_yday
|
||||
&& lt->tm_wday == tm.tm_wday
|
||||
&& ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
|
||||
== (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
time_t t, delta;
|
||||
int i, j;
|
||||
|
||||
spring_forward_gap ();
|
||||
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
|
||||
continue;
|
||||
time_t_max--;
|
||||
delta = time_t_max / 997; /* a suitable prime number */
|
||||
for (i = 0; i < N_STRINGS; i++)
|
||||
{
|
||||
if (tz_strings[i])
|
||||
putenv (tz_strings[i]);
|
||||
|
||||
for (t = 0; t <= time_t_max - delta; t += delta)
|
||||
mktime_test (t);
|
||||
mktime_test ((time_t) 60 * 60);
|
||||
mktime_test ((time_t) 60 * 60 * 24);
|
||||
|
||||
for (j = 1; 0 < j; j *= 2)
|
||||
bigtime_test (j);
|
||||
bigtime_test (j - 1);
|
||||
}
|
||||
irix_6_4_bug ();
|
||||
exit (0);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
jm_am_cv_func_working_mktime=yes, jm_am_cv_func_working_mktime=no,
|
||||
dnl When crosscompiling, assume mktime is missing or broken.
|
||||
jm_am_cv_func_working_mktime=no)
|
||||
])
|
||||
if test $jm_am_cv_func_working_mktime = no; then
|
||||
LIBOBJS="$LIBOBJS mktime.o"
|
||||
fi
|
||||
])
|
||||
43
m4/stat.m4
43
m4/stat.m4
@@ -1,20 +1,18 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether stat has the bug that it succeeds when given the
|
||||
dnl zero-length file name argument. The stat from SunOS4.1.4 does this.
|
||||
dnl zero-length file name argument. The stat from SunOS4.1.4 and the Hurd
|
||||
dnl (as of 1998-11-01) do this.
|
||||
dnl
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_stat if the replacement function should be used. */
|
||||
dnl #undef stat
|
||||
dnl If it does, then define HAVE_STAT_EMPTY_STRING_BUG and arrange to
|
||||
dnl compile the wrapper function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_STAT,
|
||||
[
|
||||
AC_CACHE_CHECK([for working stat], jm_cv_func_working_stat,
|
||||
AC_CACHE_CHECK([whether stat accepts an empty string],
|
||||
jm_cv_func_stat_empty_string_bug,
|
||||
[AC_TRY_RUN([
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
@@ -23,16 +21,31 @@ AC_DEFUN(jm_FUNC_STAT,
|
||||
main ()
|
||||
{
|
||||
struct stat sbuf;
|
||||
exit (stat ("", &sbuf) == 0 ? 1 : 0);
|
||||
exit (stat ("", &sbuf) ? 1 : 0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_stat=yes,
|
||||
jm_cv_func_working_stat=no,
|
||||
jm_cv_func_stat_empty_string_bug=yes,
|
||||
jm_cv_func_stat_empty_string_bug=no,
|
||||
dnl When crosscompiling, assume stat is broken.
|
||||
jm_cv_func_working_stat=no)
|
||||
jm_cv_func_stat_empty_string_bug=yes)
|
||||
])
|
||||
if test $jm_cv_func_working_stat = no; then
|
||||
if test $jm_cv_func_stat_empty_string_bug = yes; then
|
||||
|
||||
LIBOBJS="$LIBOBJS stat.o"
|
||||
AC_DEFINE_UNQUOTED(stat, rpl_stat)
|
||||
|
||||
if test $jm_cv_func_stat_empty_string_bug = yes; then
|
||||
if test x = y; then
|
||||
# This code is deliberately never run via ./configure.
|
||||
# FIXME: this is a hack to make autoheader put the corresponding
|
||||
# HAVE_* undef for this symbol in config.h.in. This saves me the
|
||||
# trouble of having to maintain the #undef in acconfig.h manually.
|
||||
AC_CHECK_FUNCS(STAT_EMPTY_STRING_BUG)
|
||||
fi
|
||||
# Defining it this way (rather than via AC_DEFINE) short-circuits the
|
||||
# autoheader check -- autoheader doesn't know it's already been taken
|
||||
# care of by the hack above.
|
||||
ac_kludge=HAVE_STAT_EMPTY_STRING_BUG
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
21
man/help2man
21
man/help2man
@@ -26,7 +26,7 @@ use strict;
|
||||
use Getopt::Long;
|
||||
use POSIX 'strftime';
|
||||
|
||||
my $RCS_Id = '$Id: help2man,v 1.2 1998/10/03 19:15:41 meyering Exp $';
|
||||
my $RCS_Id = '$Id: help2man,v 1.3 1998/10/06 04:07:25 meyering Exp $';
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '0.0';
|
||||
|
||||
@@ -129,16 +129,12 @@ if ($include or $opt_include)
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Grab help and version paragraphs from executable
|
||||
# Invoke program with `--manhelp' only if --name=STRING not specified.
|
||||
my @help = split /\n\n+/, `$ARGV[0] --manhelp 2>/dev/null`
|
||||
if !defined $opt_name;
|
||||
my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
|
||||
or die "$this_program: can't get `--help' info from $ARGV[0]\n";
|
||||
|
||||
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
|
||||
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
|
||||
|
||||
@help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
|
||||
or die "$this_program: can't get `--help' info from $ARGV[0]\n"
|
||||
unless @help;
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
@@ -187,14 +183,7 @@ else
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# Check for name in help output
|
||||
if ($help[0] =~ s/^(?:name|oneliner):\s*(\S.*)//)
|
||||
{
|
||||
($include{NAME} = "$program \\- $1") =~ s/\s+$//;
|
||||
shift @help unless length $help[0];
|
||||
}
|
||||
|
||||
# --name overrides --include contents and/or --manhelp oneliner
|
||||
# --name overrides --include contents
|
||||
$include{NAME} = "$program \\- $opt_name" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph
|
||||
|
||||
@@ -1,3 +1,127 @@
|
||||
1998-11-14 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0.
|
||||
|
||||
* Makefile.maint (cvs-dist): Search for `$tag:' rather than just $tag
|
||||
to avoid matching a prefix of another tag.
|
||||
|
||||
1998-11-10 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* configure.in (ALL_LINGUAS): Add greek (el).
|
||||
|
||||
1998-11-07 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b7.
|
||||
|
||||
Accommodate the Hurd (defining lstat to rpl_lstat via config.h didn't
|
||||
work on Hurd systems because of an inline definition of lstat in a
|
||||
system header file). This also makes it so that you may run `ls '' '
|
||||
on systems that let l?stat operate on the empty string.
|
||||
|
||||
* src/remove.c [HAVE_LSTAT_EMPTY_STRING_BUG]: Define lstat to rpl_lstat
|
||||
and declare the latter.
|
||||
* lib/stat.c [stat]: Remove #undef.
|
||||
(rpl_stat): Protoize.
|
||||
* lib/lstat.c [lstat]: Remove #undef.
|
||||
(rpl_lstat): Protoize. Use ENOENT, not EINVAL, to be consistent
|
||||
with lib/stat.c.
|
||||
* acconfig.h: Remove #undef's for lstat and stat.
|
||||
|
||||
1998-10-31 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* tests/rm/Makefile.am (TESTS): Add new test `empty-name',
|
||||
but comment it out.
|
||||
* tests/rm/empty-name: New file.
|
||||
|
||||
* acconfig.h (stat): New #undef.
|
||||
This omission was uncovered when Mark Kettenis reported that
|
||||
`rm -r ''' got a failed assertion on the Hurd. This change
|
||||
doesn't fix *that* problem -- see above.
|
||||
|
||||
1998-10-25 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b6.
|
||||
|
||||
* README: Man pages will now be supported to the extent that
|
||||
people send patches.
|
||||
|
||||
* tests/rm/unreadable: Two new tests.
|
||||
* tests/rm/Makefile.am (TESTS): Add new test `unreadable'. But comment
|
||||
it out since we're so close to release and since the test compares the
|
||||
text of diagnostics that are likely to vary between systems.
|
||||
(TEST_ENVIRONMENT): Add required framework.
|
||||
|
||||
* src/remove.c (remove_cwd_entries): Don't apply CLOSEDIR to a NULL
|
||||
pointer. (provoke with `mkdir -m 0100 x; rm -rf x')
|
||||
Upon CLOSEDIR failure, set `status' to RM_ERROR, not RM_OK.
|
||||
(remove_dir): Return `status', rather than always RM_OK.
|
||||
|
||||
1998-10-18 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b5.
|
||||
|
||||
* lib/mktime.c: Update from libc with this additional change from Paul.
|
||||
* lib/strftime.c: Likewise.
|
||||
|
||||
1998-10-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Don't invoke localtime_r or gmtime_r unless it's the GNU C
|
||||
library's localtime_r and gmtime_r; there are too many buggy
|
||||
implementations of localtime_r and gmtime_r out there, and
|
||||
it's not worth keeping track of all the different bugs.
|
||||
|
||||
* mktime.c (__EXTENSIONS__, HAVE_LOCALTIME_R): Remove.
|
||||
(my_mktime_localtime_r): Renamed from localtime_r; all uses changed.
|
||||
Base it on localtime unless _LIBC.
|
||||
|
||||
* strftime.c (__EXTENSIONS__): Remove.
|
||||
(my_strftime_gmtime_r): Renamed from gmtime_r; all uses changed.
|
||||
(my_strftime_localtime_r): Renamed from localtime_r; all uses changed.
|
||||
Base them on localtime/gmtime if not _LIBC.
|
||||
|
||||
1998-10-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b4.
|
||||
|
||||
* lib/mktime.c: Declare localtime_r if necessary.
|
||||
* lib/strftime.c: Likewise.
|
||||
|
||||
* tests/Fetish.pm (run_tests): Run $prog with --version only
|
||||
if $verbose.
|
||||
|
||||
1998-10-11 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b3.
|
||||
|
||||
1998-10-08 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mktime.c (__mktime_internal): When the requested time falls
|
||||
in a spring-forward gap of size DT, return a time that is DT
|
||||
away from the requested time, preferring a time whose tm_isdst
|
||||
differs from the requested value. Bump the max number of
|
||||
probes from 4 to 6 to account for the extra probes needed to
|
||||
discover a spring-forward gap in the worst case.
|
||||
|
||||
1998-10-08 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* mktime.c (my_mktime_localtime_r): Renamed from localtime_r.
|
||||
Define also if HAVE_LOCALTIME_R && defined (localtime_r), with
|
||||
a body that merely expands localtime_r; this works around a
|
||||
bug in Digital Unix 4.0A and 4.0D.
|
||||
|
||||
1998-10-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* po/Makefile.in.in (uninstall): Remove (historical?) command that
|
||||
removed po-Makefile.in.in. From Akim Demaille.
|
||||
|
||||
* src/install.c (long_options): Add entry for --suffix=SUFFIX option.
|
||||
From aldomel.
|
||||
|
||||
1998-10-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define PERL.
|
||||
From Kaveh Ghazi.
|
||||
|
||||
1998-10-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 4.0-b2.
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
Changes in release 3.17:
|
||||
Changes in release 4.0:
|
||||
[4.0-b7]
|
||||
* rm -rf '' no longer gets a failed assertion on the Hurd
|
||||
[4.0-b6]
|
||||
* rm simply fails as it should (rather than segfaulting) for
|
||||
`mkdir -m 0100 x; rm -rf x'
|
||||
[4.0-b5]
|
||||
* still *more* mktime.c portability tweaks
|
||||
[4.0-b4]
|
||||
* mktime.c portability tweak for headers with GNU libc 5.4.44.
|
||||
[4.0-b3]
|
||||
* mktime.c works around problems with Digital Unix 4.0A and 4.0D.
|
||||
* mktime.c handles dates in the spring-forward gap the same way other
|
||||
implementations do
|
||||
* install accepts long option --suffix=SUFFIX
|
||||
[4.0-b2]
|
||||
* man/Makefile.maint framework tweaks
|
||||
* add test for `mv -i' bug
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
1998-10-31 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
|
||||
* tests/Fetish.pm: New file.
|
||||
|
||||
* tests/factor/Makefile.am: Rewrite to use new testing framework.
|
||||
* tests/factor/Test.pm: Remove file.
|
||||
* tests/factor/factor-tests: Remove file.
|
||||
* tests/factor/basic: New file (rewrite of Test.pm).
|
||||
|
||||
* acconfig.h (stat): New #undef.
|
||||
|
||||
1998-10-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* man/Makefile.am: Switch to using help2man.
|
||||
|
||||
@@ -1,8 +1,35 @@
|
||||
1998-10-22 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Version 1.22g.
|
||||
|
||||
* src/fold.c (usage): Add mention of --version and --help.
|
||||
Reported by Matej Vela <mvela@public.srce.hr>.
|
||||
|
||||
1998-10-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* lib/fnmatch.h: New file. (unused)
|
||||
* lib/fnmatch.c: New file. (unused)
|
||||
* lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.
|
||||
|
||||
1998-10-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* man/Makefile.am: Switch to using help2man.
|
||||
(EXTRA_DIST): Add Makefile.summ.
|
||||
|
||||
* man/help2man: Invoke program with --manhelp option only if
|
||||
--name=STRING not specified. Otherwise, this would fail with `yes'.
|
||||
* man/Makefile.summ: New file.
|
||||
* man/Makefile.maint: Include it.
|
||||
* man/help2man: New file.
|
||||
* man/GNUmakefile: New file.
|
||||
* man/Makefile.maint: New file.
|
||||
* man/*.x: New files.
|
||||
* man/*.1: Remove files.
|
||||
|
||||
* src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
|
||||
(main): Output the leading backslash not just when there's a newline
|
||||
in the file name, but also when there's a backslash.
|
||||
Reported by Jim Dennis.
|
||||
|
||||
* tests/md5sum/basic-1: Add tests with filenames containing newline
|
||||
and backslash characters. (for the bug fixed above)
|
||||
|
||||
@@ -74,6 +74,8 @@ standard output.\n\
|
||||
-b, --bytes count bytes rather than columns\n\
|
||||
-s, --spaces break at spaces\n\
|
||||
-w, --width=WIDTH use WIDTH columns instead of 80\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
|
||||
}
|
||||
|
||||
@@ -193,6 +193,7 @@ static struct option const long_options[] =
|
||||
{"owner", required_argument, NULL, 'o'},
|
||||
{"preserve-timestamps", no_argument, NULL, 'p'},
|
||||
{"backup", no_argument, NULL, 'b'},
|
||||
{"suffix", required_argument, NULL, 'S'},
|
||||
{"version-control", required_argument, NULL, 'V'},
|
||||
{"verbose", no_argument, NULL, 'v'},
|
||||
{"help", no_argument, &show_help, 1},
|
||||
|
||||
20
src/remove.c
20
src/remove.c
@@ -51,6 +51,13 @@ typedef enum {false = 0, true = 1} bool;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* On systems with an lstat function that accepts the empty string,
|
||||
arrange to make lstat calls go through the wrapper function. */
|
||||
#if HAVE_LSTAT_EMPTY_STRING_BUG
|
||||
int rpl_lstat PARAMS((const char *, struct stat *));
|
||||
# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
|
||||
#endif
|
||||
|
||||
#ifdef D_INO_IN_DIRENT
|
||||
# define D_INO(dp) ((dp)->d_ino)
|
||||
# define ENABLE_CYCLE_CHECK
|
||||
@@ -575,12 +582,15 @@ remove_cwd_entries (const struct rm_options *x)
|
||||
}
|
||||
while (dirp == NULL);
|
||||
|
||||
if (CLOSEDIR (dirp))
|
||||
if (dirp)
|
||||
{
|
||||
error (0, errno, "%s", full_filename ("."));
|
||||
status = RM_OK;
|
||||
if (CLOSEDIR (dirp))
|
||||
{
|
||||
error (0, errno, "%s", full_filename ("."));
|
||||
status = RM_ERROR;
|
||||
}
|
||||
dirp = NULL;
|
||||
}
|
||||
dirp = NULL;
|
||||
|
||||
if (ht)
|
||||
{
|
||||
@@ -766,7 +776,7 @@ remove_dir (struct File_spec *fs, int need_save_cwd, const struct rm_options *x)
|
||||
return RM_ERROR;
|
||||
}
|
||||
|
||||
return RM_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Remove the file or directory specified by FS after checking appropriate
|
||||
|
||||
@@ -12,7 +12,7 @@ use FileHandle;
|
||||
use File::Compare qw(compare);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
($VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
|
||||
($VERSION = '$Revision: 1.6 $ ') =~ tr/[0-9].//cd;
|
||||
@EXPORT = qw (run_tests);
|
||||
|
||||
my $debug = $ENV{DEBUG};
|
||||
@@ -123,7 +123,7 @@ sub run_tests ($$$$$)
|
||||
return 1 if $found_duplicate;
|
||||
|
||||
# FIXME check exit status
|
||||
system ($prog, '--version');
|
||||
system ($prog, '--version') if $verbose;
|
||||
|
||||
my @junk_files;
|
||||
my $fail = 0;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -187,7 +188,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -201,24 +202,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
@@ -32,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -202,7 +202,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -216,24 +216,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,40 +1,11 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
||||
AUTOMAKE_OPTIONS = 1.3b gnits
|
||||
|
||||
##test-files-begin
|
||||
x = factor
|
||||
explicit =
|
||||
maint_gen = 1.X 1a.X 2.X 3.X 4.X a.X b.X c.X d.X e.X f.X g.X h.X i.X j.X k.X \
|
||||
l.X m.X n.X o.X p.X q.X s.X t.X u.X v.X w.X x.X y.X z.X
|
||||
run_gen = 1.O 1.E 1a.O 1a.E 2.O 2.E 3.O 3.E 4.O 4.E a.O a.E b.O b.E c.O c.E \
|
||||
d.O d.E e.O e.E f.O f.E g.O g.E h.O h.E i.O i.E j.O j.E k.O k.E l.O l.E m.O \
|
||||
m.E n.O n.E o.O o.E p.O p.E q.O q.E s.O s.E t.O t.E u.O u.E v.O v.E w.O w.E \
|
||||
x.O x.E y.O y.E z.O z.E
|
||||
##test-files-end
|
||||
|
||||
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
|
||||
noinst_SCRIPTS = $x-tests
|
||||
|
||||
PERL = @PERL@
|
||||
editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,@srcdir@,g'
|
||||
|
||||
TESTS = $x-tests
|
||||
|
||||
mk_script = $(srcdir)/../mk-script
|
||||
$(srcdir)/$x-tests: $(mk_script) Test.pm
|
||||
$(PERL) -I. -w -- $(mk_script) ../../src/$x > $@.n
|
||||
mv $@.n $@
|
||||
chmod 755 $@
|
||||
|
||||
MAINTAINERCLEANFILES = $x-tests $(maint_gen)
|
||||
CLEANFILES = $(run_gen)
|
||||
|
||||
check: $(maint_gen)
|
||||
|
||||
Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##test-files-begin/p' $< > $@t
|
||||
tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
|
||||
echo "x = $$tool" >> $@t
|
||||
$(PERL) -I. -w -- $(mk_script) --list >> $@t
|
||||
sed -n '/^##test-files-end/,$$p' $< >> $@t
|
||||
mv $@t $@
|
||||
TESTS = basic
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
top_srcdir=$(top_srcdir) \
|
||||
srcdir=$(srcdir) \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=factor
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -85,6 +86,7 @@ NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
@@ -98,32 +100,19 @@ VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
l = @l@
|
||||
|
||||
x = factor
|
||||
explicit =
|
||||
maint_gen = 1.X 1a.X 2.X 3.X 4.X a.X b.X c.X d.X e.X f.X g.X h.X i.X j.X k.X \
|
||||
l.X m.X n.X o.X p.X q.X s.X t.X u.X v.X w.X x.X y.X z.X
|
||||
run_gen = 1.O 1.E 1a.O 1a.E 2.O 2.E 3.O 3.E 4.O 4.E a.O a.E b.O b.E c.O c.E \
|
||||
d.O d.E e.O e.E f.O f.E g.O g.E h.O h.E i.O i.E j.O j.E k.O k.E l.O l.E m.O \
|
||||
m.E n.O n.E o.O o.E p.O p.E q.O q.E s.O s.E t.O t.E u.O u.E v.O v.E w.O w.E \
|
||||
x.O x.E y.O y.E z.O z.E
|
||||
AUTOMAKE_OPTIONS = 1.3b gnits
|
||||
|
||||
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
|
||||
noinst_SCRIPTS = $x-tests
|
||||
|
||||
PERL = @PERL@
|
||||
editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,@srcdir@,g'
|
||||
|
||||
TESTS = $x-tests
|
||||
|
||||
mk_script = $(srcdir)/../mk-script
|
||||
|
||||
MAINTAINERCLEANFILES = $x-tests $(maint_gen)
|
||||
CLEANFILES = $(run_gen)
|
||||
TESTS = basic
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
top_srcdir=$(top_srcdir) \
|
||||
srcdir=$(srcdir) \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=factor
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SCRIPTS = $(noinst_SCRIPTS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
@@ -131,7 +120,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
all: Makefile $(SCRIPTS)
|
||||
all: Makefile
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
@@ -189,7 +178,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -203,24 +192,19 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
@@ -237,21 +221,6 @@ install-data install uninstall all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
$(srcdir)/$x-tests: $(mk_script) Test.pm
|
||||
$(PERL) -I. -w -- $(mk_script) ../../src/$x > $@.n
|
||||
mv $@.n $@
|
||||
chmod 755 $@
|
||||
|
||||
check: $(maint_gen)
|
||||
|
||||
Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##test-files-begin/p' $< > $@t
|
||||
tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
|
||||
echo "x = $$tool" >> $@t
|
||||
$(PERL) -I. -w -- $(mk_script) --list >> $@t
|
||||
sed -n '/^##test-files-end/,$$p' $< >> $@t
|
||||
mv $@t $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# -*-perl-*-
|
||||
package Test;
|
||||
require 5.002;
|
||||
use strict;
|
||||
|
||||
sub test_vector
|
||||
{
|
||||
my @tvec =
|
||||
(
|
||||
# test-name options input expected-output expected-return-code
|
||||
#
|
||||
['1', '9', {}, '3 3', 0],
|
||||
['1a', '7', {}, '7', 0],
|
||||
['2', '4294967291', {}, '4294967291', 0],
|
||||
['3', '4294967292', {}, '2 2 3 3 7 11 31 151 331', 0],
|
||||
['4', '4294967293', {}, '9241 464773', 0],
|
||||
|
||||
['a', '4294966201', {}, '12197 352133', 0],
|
||||
['b', '4294966339', {}, '13187 325697', 0],
|
||||
['c', '4294966631', {}, '13729 312839', 0],
|
||||
['d', '4294966457', {}, '14891 288427', 0],
|
||||
['e', '4294966759', {}, '21649 198391', 0],
|
||||
['f', '4294966573', {}, '23071 186163', 0],
|
||||
['g', '4294967101', {}, '23603 181967', 0],
|
||||
['h', '4294966519', {}, '34583 124193', 0],
|
||||
['i', '4294966561', {}, '36067 119083', 0],
|
||||
['j', '4294966901', {}, '37747 113783', 0],
|
||||
['k', '4294966691', {}, '39241 109451', 0],
|
||||
['l', '4294966969', {}, '44201 97169', 0],
|
||||
['m', '4294967099', {}, '44483 96553', 0],
|
||||
['n', '4294966271', {}, '44617 96263', 0],
|
||||
['o', '4294966789', {}, '50411 85199', 0],
|
||||
['p', '4294966189', {}, '53197 80737', 0],
|
||||
['q', '4294967213', {}, '57139 75167', 0],
|
||||
['s', '4294967071', {}, '65521 65551', 0],
|
||||
['t', '4294966194', {}, '2 3 3 3 3 3 3 3 53 97 191', 0],
|
||||
['u', '4294966272', {}, '2 2 2 2 2 2 2 2 2 2 3 23 89 683', 0],
|
||||
['v', '4294966400', {}, '2 2 2 2 2 2 2 5 5 1342177', 0],
|
||||
['w', '4294966464', {}, '2 2 2 2 2 2 3 3 3 2485513', 0],
|
||||
['x', '4294966896', {}, '2 2 2 2 3 3 3 11 607 1489', 0],
|
||||
['y', '4294966998', {}, '2 3 7 3917 26107', 0],
|
||||
['z', '-1', {}, '', 1],
|
||||
);
|
||||
|
||||
my @tv;
|
||||
my $t;
|
||||
foreach $t (@tvec)
|
||||
{
|
||||
my ($test_name, $arg, $in, $exp, $ret) = @$t;
|
||||
# Append a newline to end of each expected string.
|
||||
my $prefixed_result = ($ret == 0 ? "$arg: $exp\n" : $exp);
|
||||
push (@tv, [$test_name, $arg, $in, $prefixed_result, $ret]);
|
||||
}
|
||||
|
||||
return @tv;
|
||||
}
|
||||
|
||||
1;
|
||||
81
tests/factor/basic
Executable file
81
tests/factor/basic
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
|
||||
: ${PERL=perl}
|
||||
: ${srcdir=.}
|
||||
|
||||
case "$PERL" in
|
||||
*'missing perl')
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
(my $program_name = $0) =~ s|.*/||;
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
|
||||
|
||||
my @Tests =
|
||||
(
|
||||
['1', '9', {OUT => '3 3'}],
|
||||
['1a', '7', {OUT => '7'}],
|
||||
['2', '4294967291', {OUT => '4294967291'}],
|
||||
['3', '4294967292', {OUT => '2 2 3 3 7 11 31 151 331'}],
|
||||
['4', '4294967293', {OUT => '9241 464773'}],
|
||||
|
||||
['a', '4294966201', {OUT => '12197 352133'}],
|
||||
['b', '4294966339', {OUT => '13187 325697'}],
|
||||
['c', '4294966631', {OUT => '13729 312839'}],
|
||||
['d', '4294966457', {OUT => '14891 288427'}],
|
||||
['e', '4294966759', {OUT => '21649 198391'}],
|
||||
['f', '4294966573', {OUT => '23071 186163'}],
|
||||
['g', '4294967101', {OUT => '23603 181967'}],
|
||||
['h', '4294966519', {OUT => '34583 124193'}],
|
||||
['i', '4294966561', {OUT => '36067 119083'}],
|
||||
['j', '4294966901', {OUT => '37747 113783'}],
|
||||
['k', '4294966691', {OUT => '39241 109451'}],
|
||||
['l', '4294966969', {OUT => '44201 97169'}],
|
||||
['m', '4294967099', {OUT => '44483 96553'}],
|
||||
['n', '4294966271', {OUT => '44617 96263'}],
|
||||
['o', '4294966789', {OUT => '50411 85199'}],
|
||||
['p', '4294966189', {OUT => '53197 80737'}],
|
||||
['q', '4294967213', {OUT => '57139 75167'}],
|
||||
['s', '4294967071', {OUT => '65521 65551'}],
|
||||
['t', '4294966194', {OUT => '2 3 3 3 3 3 3 3 53 97 191'}],
|
||||
['u', '4294966272', {OUT => '2 2 2 2 2 2 2 2 2 2 3 23 89 683'}],
|
||||
['v', '4294966400', {OUT => '2 2 2 2 2 2 2 5 5 1342177'}],
|
||||
['w', '4294966464', {OUT => '2 2 2 2 2 2 3 3 3 2485513'}],
|
||||
['x', '4294966896', {OUT => '2 2 2 2 3 3 3 11 607 1489'}],
|
||||
['y', '4294966998', {OUT => '2 3 7 3917 26107'}],
|
||||
['z', '-1',
|
||||
{ERR => "$prog: `-1' is not a valid positive integer\n"
|
||||
. "Try `factor --help' for more information.\n"},
|
||||
{EXIT => 1}],
|
||||
);
|
||||
|
||||
# Prepend the command line argument and append a newline to end
|
||||
# of each expected `OUT' string.
|
||||
my $t;
|
||||
foreach $t (@Tests)
|
||||
{
|
||||
my $arg1 = $t->[1];
|
||||
my $e;
|
||||
foreach $e (@$t)
|
||||
{
|
||||
$e->{OUT} = "$arg1: $e->{OUT}\n"
|
||||
if ref $e eq 'HASH' and exists $e->{OUT};
|
||||
}
|
||||
}
|
||||
|
||||
my $save_temps = $ENV{SAVE_TEMPS};
|
||||
my $verbose = $ENV{VERBOSE};
|
||||
|
||||
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
|
||||
exit $fail;
|
||||
EOF
|
||||
@@ -1,537 +0,0 @@
|
||||
#! /bin/sh
|
||||
# This script was generated automatically by build-script.
|
||||
case $# in
|
||||
0) xx='../../src/factor';;
|
||||
*) xx="$1";;
|
||||
esac
|
||||
test "$VERBOSE" && echo=echo || echo=:
|
||||
$echo testing program: $xx
|
||||
errors=0
|
||||
test "$srcdir" || srcdir=.
|
||||
test "$VERBOSE" && $xx --version 2> /dev/null
|
||||
|
||||
# Make sure we get English translations.
|
||||
LANGUAGE=C
|
||||
export LANGUAGE
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LANG=C
|
||||
export LANG
|
||||
|
||||
$xx 9 > 1.O 2> 1.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test 1 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp 1.O $srcdir/1.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed 1"; fi ;;
|
||||
1) $echo "Test 1 failed: files 1.O and $srcdir/1.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test 1 may have failed." 1>&2;
|
||||
$echo The command "cmp 1.O $srcdir/1.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s 1.E || rm -f 1.E
|
||||
$xx 7 > 1a.O 2> 1a.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test 1a failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp 1a.O $srcdir/1a.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed 1a"; fi ;;
|
||||
1) $echo "Test 1a failed: files 1a.O and $srcdir/1a.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test 1a may have failed." 1>&2;
|
||||
$echo The command "cmp 1a.O $srcdir/1a.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s 1a.E || rm -f 1a.E
|
||||
$xx 4294967291 > 2.O 2> 2.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test 2 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp 2.O $srcdir/2.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed 2"; fi ;;
|
||||
1) $echo "Test 2 failed: files 2.O and $srcdir/2.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test 2 may have failed." 1>&2;
|
||||
$echo The command "cmp 2.O $srcdir/2.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s 2.E || rm -f 2.E
|
||||
$xx 4294967292 > 3.O 2> 3.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test 3 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp 3.O $srcdir/3.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed 3"; fi ;;
|
||||
1) $echo "Test 3 failed: files 3.O and $srcdir/3.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test 3 may have failed." 1>&2;
|
||||
$echo The command "cmp 3.O $srcdir/3.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s 3.E || rm -f 3.E
|
||||
$xx 4294967293 > 4.O 2> 4.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test 4 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp 4.O $srcdir/4.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed 4"; fi ;;
|
||||
1) $echo "Test 4 failed: files 4.O and $srcdir/4.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test 4 may have failed." 1>&2;
|
||||
$echo The command "cmp 4.O $srcdir/4.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s 4.E || rm -f 4.E
|
||||
$xx 4294966201 > a.O 2> a.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test a failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp a.O $srcdir/a.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed a"; fi ;;
|
||||
1) $echo "Test a failed: files a.O and $srcdir/a.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test a may have failed." 1>&2;
|
||||
$echo The command "cmp a.O $srcdir/a.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s a.E || rm -f a.E
|
||||
$xx 4294966339 > b.O 2> b.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test b failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp b.O $srcdir/b.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed b"; fi ;;
|
||||
1) $echo "Test b failed: files b.O and $srcdir/b.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test b may have failed." 1>&2;
|
||||
$echo The command "cmp b.O $srcdir/b.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s b.E || rm -f b.E
|
||||
$xx 4294966631 > c.O 2> c.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test c failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp c.O $srcdir/c.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed c"; fi ;;
|
||||
1) $echo "Test c failed: files c.O and $srcdir/c.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test c may have failed." 1>&2;
|
||||
$echo The command "cmp c.O $srcdir/c.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s c.E || rm -f c.E
|
||||
$xx 4294966457 > d.O 2> d.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test d failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp d.O $srcdir/d.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed d"; fi ;;
|
||||
1) $echo "Test d failed: files d.O and $srcdir/d.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test d may have failed." 1>&2;
|
||||
$echo The command "cmp d.O $srcdir/d.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s d.E || rm -f d.E
|
||||
$xx 4294966759 > e.O 2> e.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test e failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp e.O $srcdir/e.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed e"; fi ;;
|
||||
1) $echo "Test e failed: files e.O and $srcdir/e.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test e may have failed." 1>&2;
|
||||
$echo The command "cmp e.O $srcdir/e.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s e.E || rm -f e.E
|
||||
$xx 4294966573 > f.O 2> f.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test f failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp f.O $srcdir/f.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed f"; fi ;;
|
||||
1) $echo "Test f failed: files f.O and $srcdir/f.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test f may have failed." 1>&2;
|
||||
$echo The command "cmp f.O $srcdir/f.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s f.E || rm -f f.E
|
||||
$xx 4294967101 > g.O 2> g.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test g failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp g.O $srcdir/g.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed g"; fi ;;
|
||||
1) $echo "Test g failed: files g.O and $srcdir/g.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test g may have failed." 1>&2;
|
||||
$echo The command "cmp g.O $srcdir/g.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s g.E || rm -f g.E
|
||||
$xx 4294966519 > h.O 2> h.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test h failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp h.O $srcdir/h.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed h"; fi ;;
|
||||
1) $echo "Test h failed: files h.O and $srcdir/h.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test h may have failed." 1>&2;
|
||||
$echo The command "cmp h.O $srcdir/h.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s h.E || rm -f h.E
|
||||
$xx 4294966561 > i.O 2> i.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test i failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp i.O $srcdir/i.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed i"; fi ;;
|
||||
1) $echo "Test i failed: files i.O and $srcdir/i.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test i may have failed." 1>&2;
|
||||
$echo The command "cmp i.O $srcdir/i.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s i.E || rm -f i.E
|
||||
$xx 4294966901 > j.O 2> j.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test j failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp j.O $srcdir/j.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed j"; fi ;;
|
||||
1) $echo "Test j failed: files j.O and $srcdir/j.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test j may have failed." 1>&2;
|
||||
$echo The command "cmp j.O $srcdir/j.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s j.E || rm -f j.E
|
||||
$xx 4294966691 > k.O 2> k.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test k failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp k.O $srcdir/k.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed k"; fi ;;
|
||||
1) $echo "Test k failed: files k.O and $srcdir/k.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test k may have failed." 1>&2;
|
||||
$echo The command "cmp k.O $srcdir/k.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s k.E || rm -f k.E
|
||||
$xx 4294966969 > l.O 2> l.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test l failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp l.O $srcdir/l.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed l"; fi ;;
|
||||
1) $echo "Test l failed: files l.O and $srcdir/l.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test l may have failed." 1>&2;
|
||||
$echo The command "cmp l.O $srcdir/l.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s l.E || rm -f l.E
|
||||
$xx 4294967099 > m.O 2> m.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test m failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp m.O $srcdir/m.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed m"; fi ;;
|
||||
1) $echo "Test m failed: files m.O and $srcdir/m.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test m may have failed." 1>&2;
|
||||
$echo The command "cmp m.O $srcdir/m.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s m.E || rm -f m.E
|
||||
$xx 4294966271 > n.O 2> n.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test n failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp n.O $srcdir/n.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed n"; fi ;;
|
||||
1) $echo "Test n failed: files n.O and $srcdir/n.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test n may have failed." 1>&2;
|
||||
$echo The command "cmp n.O $srcdir/n.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s n.E || rm -f n.E
|
||||
$xx 4294966789 > o.O 2> o.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test o failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp o.O $srcdir/o.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed o"; fi ;;
|
||||
1) $echo "Test o failed: files o.O and $srcdir/o.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test o may have failed." 1>&2;
|
||||
$echo The command "cmp o.O $srcdir/o.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s o.E || rm -f o.E
|
||||
$xx 4294966189 > p.O 2> p.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test p failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp p.O $srcdir/p.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed p"; fi ;;
|
||||
1) $echo "Test p failed: files p.O and $srcdir/p.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test p may have failed." 1>&2;
|
||||
$echo The command "cmp p.O $srcdir/p.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s p.E || rm -f p.E
|
||||
$xx 4294967213 > q.O 2> q.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test q failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp q.O $srcdir/q.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed q"; fi ;;
|
||||
1) $echo "Test q failed: files q.O and $srcdir/q.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test q may have failed." 1>&2;
|
||||
$echo The command "cmp q.O $srcdir/q.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s q.E || rm -f q.E
|
||||
$xx 4294967071 > s.O 2> s.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test s failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp s.O $srcdir/s.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed s"; fi ;;
|
||||
1) $echo "Test s failed: files s.O and $srcdir/s.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test s may have failed." 1>&2;
|
||||
$echo The command "cmp s.O $srcdir/s.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s s.E || rm -f s.E
|
||||
$xx 4294966194 > t.O 2> t.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test t failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp t.O $srcdir/t.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed t"; fi ;;
|
||||
1) $echo "Test t failed: files t.O and $srcdir/t.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test t may have failed." 1>&2;
|
||||
$echo The command "cmp t.O $srcdir/t.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s t.E || rm -f t.E
|
||||
$xx 4294966272 > u.O 2> u.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test u failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp u.O $srcdir/u.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed u"; fi ;;
|
||||
1) $echo "Test u failed: files u.O and $srcdir/u.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test u may have failed." 1>&2;
|
||||
$echo The command "cmp u.O $srcdir/u.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s u.E || rm -f u.E
|
||||
$xx 4294966400 > v.O 2> v.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test v failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp v.O $srcdir/v.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed v"; fi ;;
|
||||
1) $echo "Test v failed: files v.O and $srcdir/v.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test v may have failed." 1>&2;
|
||||
$echo The command "cmp v.O $srcdir/v.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s v.E || rm -f v.E
|
||||
$xx 4294966464 > w.O 2> w.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test w failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp w.O $srcdir/w.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed w"; fi ;;
|
||||
1) $echo "Test w failed: files w.O and $srcdir/w.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test w may have failed." 1>&2;
|
||||
$echo The command "cmp w.O $srcdir/w.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s w.E || rm -f w.E
|
||||
$xx 4294966896 > x.O 2> x.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test x failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp x.O $srcdir/x.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed x"; fi ;;
|
||||
1) $echo "Test x failed: files x.O and $srcdir/x.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test x may have failed." 1>&2;
|
||||
$echo The command "cmp x.O $srcdir/x.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s x.E || rm -f x.E
|
||||
$xx 4294966998 > y.O 2> y.E
|
||||
code=$?
|
||||
if test $code != 0 ; then
|
||||
$echo "Test y failed: ../../src/factor return code $code differs from expected value 0" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp y.O $srcdir/y.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed y"; fi ;;
|
||||
1) $echo "Test y failed: files y.O and $srcdir/y.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test y may have failed." 1>&2;
|
||||
$echo The command "cmp y.O $srcdir/y.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s y.E || rm -f y.E
|
||||
$xx -1 > z.O 2> z.E
|
||||
code=$?
|
||||
if test $code != 1 ; then
|
||||
$echo "Test z failed: ../../src/factor return code $code differs from expected value 1" 1>&2
|
||||
errors=`expr $errors + 1`
|
||||
else
|
||||
cmp z.O $srcdir/z.X > /dev/null 2>&1
|
||||
case $? in
|
||||
0) if test "$VERBOSE" ; then $echo "passed z"; fi ;;
|
||||
1) $echo "Test z failed: files z.O and $srcdir/z.X differ" 1>&2;
|
||||
errors=`expr $errors + 1` ;;
|
||||
2) $echo "Test z may have failed." 1>&2;
|
||||
$echo The command "cmp z.O $srcdir/z.X" failed. 1>&2 ;
|
||||
errors=`expr $errors + 1` ;;
|
||||
esac
|
||||
fi
|
||||
test -s z.E || rm -f z.E
|
||||
if test $errors = 0 ; then
|
||||
$echo Passed all 30 tests. 1>&2
|
||||
else
|
||||
$echo Failed $errors tests. 1>&2
|
||||
fi
|
||||
test $errors = 0 || errors=1
|
||||
exit $errors
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -182,7 +183,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -196,24 +197,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -185,7 +186,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -199,24 +200,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -12,5 +12,6 @@ TESTS_ENVIRONMENT = \
|
||||
MV=../../src/mv \
|
||||
RM=../../src/rm \
|
||||
TOUCH=../../src/touch \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=mv
|
||||
|
||||
@@ -103,6 +103,7 @@ TESTS_ENVIRONMENT = \
|
||||
MV=../../src/mv \
|
||||
RM=../../src/rm \
|
||||
TOUCH=../../src/touch \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=mv
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -225,7 +226,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -239,24 +240,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
||||
AUTOMAKE_OPTIONS = 1.1 gnits
|
||||
|
||||
TESTS = r-1 r-2 r-3 i-1 ir-1 f-1 sunos-1 deep-1
|
||||
TESTS = r-1 r-2 r-3 i-1 ir-1 f-1 sunos-1 deep-1 # unreadable empty-name
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = RM=../../src/rm MKDIR=../../src/mkdir
|
||||
TESTS_ENVIRONMENT = \
|
||||
RM=../../src/rm \
|
||||
MKDIR=../../src/mkdir \
|
||||
top_srcdir=$(top_srcdir) \
|
||||
srcdir=$(srcdir) \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=rm
|
||||
|
||||
@@ -92,9 +92,16 @@ l = @l@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.1 gnits
|
||||
|
||||
TESTS = r-1 r-2 r-3 i-1 ir-1 f-1 sunos-1 deep-1
|
||||
TESTS = r-1 r-2 r-3 i-1 ir-1 f-1 sunos-1 deep-1 # unreadable empty-name
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = RM=../../src/rm MKDIR=../../src/mkdir
|
||||
TESTS_ENVIRONMENT = \
|
||||
RM=../../src/rm \
|
||||
MKDIR=../../src/mkdir \
|
||||
top_srcdir=$(top_srcdir) \
|
||||
srcdir=$(srcdir) \
|
||||
PERL="@PERL@" \
|
||||
PATH=../../src:$$PATH \
|
||||
PROG=rm
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
|
||||
41
tests/rm/empty-name
Executable file
41
tests/rm/empty-name
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
# Make sure that rm -r '' fails.
|
||||
# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
|
||||
# actually remove files with names of entries in the current directory
|
||||
# but relative to `/' rather than relative to the current directory.
|
||||
|
||||
: ${PERL=perl}
|
||||
: ${srcdir=.}
|
||||
|
||||
case "$PERL" in
|
||||
*'missing perl')
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
(my $program_name = $0) =~ s|.*/||;
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
|
||||
|
||||
my @Tests =
|
||||
(
|
||||
# test-name options input expected-output
|
||||
#
|
||||
['empty-name-1', "''", {EXIT => 1},
|
||||
{ERR => "$prog: cannot remove `': No such file or directory\n"}],
|
||||
);
|
||||
|
||||
my $save_temps = $ENV{SAVE_TEMPS};
|
||||
my $verbose = $ENV{VERBOSE};
|
||||
|
||||
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
|
||||
exit $fail;
|
||||
EOF
|
||||
45
tests/rm/unreadable
Executable file
45
tests/rm/unreadable
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
: ${PERL=perl}
|
||||
: ${srcdir=.}
|
||||
|
||||
case "$PERL" in
|
||||
*'missing perl')
|
||||
echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
|
||||
exit 77
|
||||
;;
|
||||
esac
|
||||
|
||||
exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
|
||||
require 5.003;
|
||||
use strict;
|
||||
|
||||
(my $program_name = $0) =~ s|.*/||;
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
my $d = "dir-$$";
|
||||
my $mkdir = {PRE => sub {mkdir $d,0100 or die "$d: $!\n"}};
|
||||
my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
|
||||
|
||||
my @Tests =
|
||||
(
|
||||
# test-name options input expected-output
|
||||
#
|
||||
['unreadable-1', '-rf', $d,
|
||||
{EXIT => 1}, {ERR => "$prog: $d/.: Permission denied\n"}, $mkdir],
|
||||
['unreadable-2', '-rf', $d,
|
||||
{EXIT => 1},
|
||||
{ERR => "$prog: $d/.: Permission denied\n" .
|
||||
"$prog: cannot remove directory `$d': File exists\n"},
|
||||
{PRE => sub { (mkdir $d,0700 and mkdir "$d/x",0700 and chmod 0100,$d)
|
||||
or die "$d: $!\n"}} ],
|
||||
);
|
||||
|
||||
my $save_temps = $ENV{SAVE_TEMPS};
|
||||
my $verbose = $ENV{VERBOSE};
|
||||
|
||||
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
|
||||
exit $fail;
|
||||
EOF
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -205,7 +206,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -219,24 +220,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -172,7 +173,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -186,24 +187,19 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -185,7 +186,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -199,24 +200,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -187,7 +188,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -201,24 +202,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
@@ -32,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -221,7 +221,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -235,24 +235,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -189,7 +190,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -203,24 +204,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -177,7 +178,7 @@ check-TESTS: $(TESTS)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -191,24 +192,21 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
|
||||
Reference in New Issue
Block a user