Compare commits

...

114 Commits

Author SHA1 Message Date
Jim Meyering
80fd95a91d . 2000-01-11 07:28:22 +00:00
Jim Meyering
ca974b3755 *** empty log message *** 2000-01-10 12:52:18 +00:00
Jim Meyering
9f5307f1d3 *** empty log message *** 2000-01-10 11:53:22 +00:00
Jim Meyering
97085c8df7 *** empty log message *** 2000-01-10 11:53:16 +00:00
Jim Meyering
de1cb33196 *** empty log message *** 2000-01-10 11:36:05 +00:00
Jim Meyering
741c7303a5 (alpha): Use scp, not ncftp. 2000-01-10 11:35:44 +00:00
Jim Meyering
f23b3eb47a *** empty log message *** 2000-01-10 09:37:50 +00:00
Jim Meyering
f488edddf7 . 2000-01-10 09:21:14 +00:00
Jim Meyering
60dabf5cd1 . 2000-01-10 09:20:49 +00:00
Jim Meyering
44381ed288 *** empty log message *** 2000-01-10 08:11:56 +00:00
Jim Meyering
4717bb93f2 (announcement): Include URLs for xdelta files. 2000-01-10 08:11:41 +00:00
Jim Meyering
9442b6050b *** empty log message *** 2000-01-10 07:31:52 +00:00
Jim Meyering
6adb0e4d56 *** empty log message *** 2000-01-10 07:31:31 +00:00
Jim Meyering
6f06aad852 (noinst_HEADERS): Add nanosleep.h. 2000-01-10 07:31:14 +00:00
Jim Meyering
baf8720297 *** empty log message *** 2000-01-10 07:27:52 +00:00
Jim Meyering
94966b9515 *** empty log message *** 2000-01-09 16:21:39 +00:00
Jim Meyering
55d80ad41a *** empty log message *** 2000-01-09 16:20:44 +00:00
Jim Meyering
7b9c964fde *** empty log message *** 2000-01-09 16:17:52 +00:00
Jim Meyering
c4b800d7b6 *** empty log message *** 2000-01-09 16:17:26 +00:00
Jim Meyering
913e134b2d *** empty log message *** 2000-01-09 08:26:42 +00:00
Jim Meyering
5f2d0e3d6c *** empty log message *** 2000-01-09 08:26:15 +00:00
Jim Meyering
58cba22668 (do_link): Produce the same sort of one-line output for
`--backup --verbose' as cp, mv, install.  Before this, the backup
file name wasn't printed at all.
2000-01-09 08:23:51 +00:00
Jim Meyering
efe3229edb This affects cp, install, and mv.
(copy_internal): When making backup files in verbose
mode, print the backup file name on the same line as the rest of the
information, e.g., `a -> b (backup: b.~13~)' rather than on a line
by itself.
2000-01-09 08:20:45 +00:00
Jim Meyering
1279be6f8a *** empty log message *** 2000-01-08 18:03:08 +00:00
Jim Meyering
c852bc40d3 *** empty log message *** 2000-01-08 18:02:47 +00:00
Jim Meyering
e02fd60260 (PAGES_OPTION, COLUMNS_OPTION): Define these and use them instead of
`CHAR_MAX + n'.
2000-01-08 18:02:42 +00:00
Jim Meyering
299882b8a4 (OUTPUT_DELIMITER_OPTION): Define this and use it instead of `CHAR_MAX + n'. 2000-01-08 18:02:09 +00:00
Jim Meyering
fee7991cbc remove stray define before _LIBC 2000-01-08 17:53:35 +00:00
Jim Meyering
d486a2e744 *** empty log message *** 2000-01-08 17:53:21 +00:00
Jim Meyering
6752f5570a *** empty log message *** 2000-01-08 17:23:22 +00:00
Jim Meyering
00c9ad3937 . 2000-01-08 16:48:29 +00:00
Jim Meyering
9a0a8e29b0 *** empty log message *** 2000-01-08 16:46:20 +00:00
Jim Meyering
e5f283604b (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-08 16:46:11 +00:00
Jim Meyering
1650a9459a *** empty log message *** 2000-01-08 16:44:27 +00:00
Jim Meyering
58edea6508 (error): Use __strerror_r's return value only if HAVE_WORKING_STRERROR_R.
(error_at_line): Likewise.
2000-01-08 16:44:19 +00:00
Jim Meyering
d15ab2c1be (null_AM_MAKEFLAGS): Define.
(my-distcheck): Use it to avoid distributing out of date files
whose derivation would require a maintainer tool.
2000-01-08 16:38:13 +00:00
Jim Meyering
cabbdf7bbf . 2000-01-08 16:35:26 +00:00
Jim Meyering
92999d559c . 2000-01-08 16:34:24 +00:00
Jim Meyering
625ce6a036 . 2000-01-08 16:32:02 +00:00
Jim Meyering
dfbeb59dc0 *** empty log message *** 2000-01-08 16:31:29 +00:00
Jim Meyering
b8342a9a20 (jm_FUNC_STRERROR_R): New file/macro. 2000-01-08 16:30:49 +00:00
Jim Meyering
2170503967 (jm_FUNC_STRERROR_R): Require it. 2000-01-08 16:25:57 +00:00
Jim Meyering
5693e5c586 Sync with the GNU C library. 2000-01-07 14:29:26 +00:00
Jim Meyering
b830d441bb . 2000-01-07 12:27:31 +00:00
Jim Meyering
923a32a0a8 tweak comment 2000-01-07 09:18:15 +00:00
Jim Meyering
a86b522044 *** empty log message *** 2000-01-07 08:56:48 +00:00
Jim Meyering
11eebed20f (TESTS_ENVIRONMENT): Add pwd/ prefix to exported PATH value (though not strictly necessary, here). 2000-01-07 08:56:38 +00:00
Jim Meyering
9bcff27f18 *** empty log message *** 2000-01-07 08:26:13 +00:00
Jim Meyering
858254d559 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:25:47 +00:00
Jim Meyering
f90f8cea87 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:25:26 +00:00
Jim Meyering
30a1c917c7 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:24:38 +00:00
Jim Meyering
36a3a59284 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:24:16 +00:00
Jim Meyering
aac32d403c add copyright/no-warranty comment 2000-01-07 07:33:19 +00:00
Jim Meyering
8606b093e4 *** empty log message *** 2000-01-07 07:31:03 +00:00
Jim Meyering
4e4c0e24d5 tweak copyright line 2000-01-07 07:03:01 +00:00
Jim Meyering
76bc7db5e2 (strpbrk): Ansideclify.
Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
2000-01-07 07:01:45 +00:00
Jim Meyering
fd3e041f5b Use #if' instead of #ifdef' for `HAVE_CONFIG_H'.
Capitalize all macro parameters.
(memcasecmp): Ansideclify.
Don't cast away `const'ness of parameters.
Suggestions from Franois Pinard.
2000-01-07 06:59:36 +00:00
Jim Meyering
ce2bd26821 . 2000-01-06 23:13:49 +00:00
Jim Meyering
1b470586fd . 2000-01-06 23:11:55 +00:00
Jim Meyering
198bd22923 . 2000-01-06 23:10:51 +00:00
Jim Meyering
8c5a80b069 . 2000-01-06 23:10:22 +00:00
Jim Meyering
a2e08f3047 *** empty log message *** 2000-01-06 22:58:02 +00:00
Jim Meyering
eff6393e39 Import version 1.020. 2000-01-06 22:49:01 +00:00
Jim Meyering
bbe0894eb2 . 2000-01-06 22:40:59 +00:00
Jim Meyering
c2d329d6c8 *** empty log message *** 2000-01-06 21:39:58 +00:00
Jim Meyering
136a8efd10 Use jm_CHECK_TYPE_STRUCT_UTIMBUF, renamed from jm_STRUCT_UTIMBUF. 2000-01-06 21:39:28 +00:00
Jim Meyering
567dae8b9c *** empty log message *** 2000-01-06 21:32:03 +00:00
Jim Meyering
f8c6ea241d Sync with the GNU C Library. 2000-01-06 21:31:48 +00:00
Jim Meyering
6784d83a62 Add #pragma STDC FENV_ACCESS ON if C99. 2000-01-06 21:01:06 +00:00
Jim Meyering
2f8c0d5542 Sync tm_diff with the GNU C Library.
(TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN.  All uses changed.
(tm_diff): Renamed from difftm.  All uses changed.
Replace body with that taken from GNU C Library 2.1.3pre1.
(get_date): Prefer tm_gmtoff to tm_diff if available.
2000-01-06 18:25:03 +00:00
Jim Meyering
1150e89832 *** empty log message *** 2000-01-06 18:24:51 +00:00
Jim Meyering
dd282c588b . 2000-01-06 17:13:39 +00:00
Jim Meyering
8301c1310b *** empty log message *** 2000-01-06 16:01:57 +00:00
Jim Meyering
8c0752d9be Tell the user just before sleeping for 7 seconds. 2000-01-06 16:01:43 +00:00
Jim Meyering
d9b2187a8c *** empty log message *** 2000-01-06 15:59:06 +00:00
Jim Meyering
d50599ae1a *** empty log message *** 2000-01-06 15:58:55 +00:00
Jim Meyering
6cb491d9df (TESTS): Remove fflush. It didn't
test the losing behavior, and left a stray tail process to boot.
2000-01-06 15:58:47 +00:00
Jim Meyering
21b43e0fe9 add blank line 2000-01-06 08:35:45 +00:00
Jim Meyering
2315cbdeaa (apply_suffix): Comment. 2000-01-06 08:35:21 +00:00
Jim Meyering
eee26242bb fix typo in comment 2000-01-06 08:29:10 +00:00
Jim Meyering
757861331e Minor code cleanup.
(clock_get_realtime): Return argument, for convenience.
(main): Use this to simplify main sleep loop.
2000-01-06 08:28:39 +00:00
Jim Meyering
e1cc2ace3c *** empty log message *** 2000-01-05 14:08:05 +00:00
Jim Meyering
f8d2a3f723 *** empty log message *** 2000-01-05 12:19:48 +00:00
Jim Meyering
3a673ed728 . 2000-01-05 12:19:04 +00:00
Jim Meyering
fd0797a4e4 Include nanosleep.h.
(AUTHORS): Add Paul Eggert.
2000-01-05 12:17:59 +00:00
Jim Meyering
3b979cf095 Add #pragma STDC FENV_ACCESS ON if C99.
(<fenv.h>): Include if available.
(main): Always round floating-point interval calculations upwards,
as we must sleep for at least the specified time.
Do the right thing with NaNs.
2000-01-05 12:17:19 +00:00
Jim Meyering
7f1c659ce3 whoops. fix typos 2000-01-05 12:06:39 +00:00
Jim Meyering
ec266f43d5 Include nanosleep.h.
Don't include time.h or sys/time.h here.
2000-01-05 12:03:53 +00:00
Jim Meyering
1885aeaaa4 *** empty log message *** 2000-01-05 12:03:06 +00:00
Jim Meyering
a2bee2bc6f (savedir): Don't store past the end of an array if
name_size is zero and the directory is empty.
2000-01-04 22:54:54 +00:00
Jim Meyering
1e01103713 *** empty log message *** 2000-01-04 17:18:15 +00:00
Jim Meyering
ce17dc2e94 Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings. 2000-01-04 17:18:05 +00:00
Jim Meyering
6ed0893953 bump serial # 2000-01-04 17:16:48 +00:00
Jim Meyering
483ed4cbfd *** empty log message *** 2000-01-04 17:16:34 +00:00
Jim Meyering
b75698cf72 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from jm_STRUCT_DIRENT_D_TYPE. 2000-01-04 17:16:26 +00:00
Jim Meyering
c26299c3d2 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from jm_STRUCT_DIRENT_D_INO. 2000-01-04 17:15:32 +00:00
Jim Meyering
82ca413ae4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from jm_STRUCT_UTIMBUF. 2000-01-04 17:13:58 +00:00
Jim Meyering
0d30a49178 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it. 2000-01-04 17:12:45 +00:00
Jim Meyering
cdff473cd3 *** empty log message *** 2000-01-04 17:12:12 +00:00
Jim Meyering
9a74f64d12 . 2000-01-04 15:11:03 +00:00
Jim Meyering
8714cce36a (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0.
(alpha): Create xdelta diffs.
2000-01-04 13:20:15 +00:00
Jim Meyering
1a7010a87f (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0. 2000-01-04 12:24:49 +00:00
Jim Meyering
556a7ac657 *** empty log message *** 2000-01-03 19:59:04 +00:00
Jim Meyering
eed8a2f5e1 tweak comment 2000-01-03 19:58:56 +00:00
Jim Meyering
2ff3485a8d (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
(for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
2000-01-03 19:58:09 +00:00
Jim Meyering
3206a63225 *** empty log message *** 2000-01-02 16:00:44 +00:00
Jim Meyering
ef4c445a55 . 2000-01-02 15:59:32 +00:00
Jim Meyering
20ca1d8601 *** empty log message *** 2000-01-02 15:57:02 +00:00
Jim Meyering
60ff88e110 *** empty log message *** 2000-01-02 09:59:01 +00:00
Jim Meyering
6e5a32d58f Escape `$' in $3 of dnl comment. I no longer remember if this is necessary. 2000-01-02 09:58:53 +00:00
Jim Meyering
5f55b410a6 *** empty log message *** 2000-01-02 09:53:03 +00:00
Jim Meyering
27f7343bf6 *** empty log message *** 2000-01-02 09:52:32 +00:00
Jim Meyering
141036e2ea sleep accepts arbitrary floating point numbers. 2000-01-02 09:50:15 +00:00
Jim Meyering
34c324d786 update usage 2000-01-02 09:31:15 +00:00
73 changed files with 1079 additions and 383 deletions

View File

@@ -38,6 +38,15 @@ cvs-dist: maintainer-check
cvs tag -c $(this-cvs-tag)
$(MAKE) dist
# Use this to make sure we don't run these programs when building
# from a virgin tgz file, below.
null_AM_MAKEFLAGS = \
ACLOCAL=false \
AUTOCONF=false \
AUTOMAKE=false \
AUTOHEADER=false \
MAKEINFO=false
t=./=test
my-distcheck:
-rm -rf $(t)
@@ -48,6 +57,7 @@ my-distcheck:
cd $(t)/$(distdir) \
&& ./configure --disable-nls \
&& $(MAKE) CFLAGS='-Wformat -Werror' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
&& $(MAKE) check \
&& rm -rf $(DEPDIR) \
@@ -62,7 +72,7 @@ my-distcheck:
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
# FIXME: this works only for Gnits-style test releases.
PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
PREV_VERSION := $(shell echo $(VERSION)|tr b-z a-y|sed 's/a$$//')
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
v = Version
@@ -76,7 +86,6 @@ a_real_dir=/fs/share/ftp/gnu/fetish
b_real_dir=/home/ftp/pub/gnu/fetish
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
real_dir_list = $(foreach x,a b,ftp://$($(x)_host)$($(x)_real_dir))
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
@@ -89,6 +98,10 @@ rel-check:
echo "$(md5) -" > $$md5_tmp; \
md5sum -c $$md5_tmp < $$tarz
release-archive-dir = ../release
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
announcement: NEWS ChangeLog $(distdir).tar.gz
@( \
echo Subject: $(distdir) released; \
@@ -99,6 +112,12 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
echo " $$url/$(distdir).tar.gz"; \
done; \
echo; \
echo And here are xdelta-style diffs; \
echo; \
for url in $(url_dir_list); do \
echo " $$url/$(xd-delta)"; \
done; \
echo; \
echo "$(md5) $(distdir).tar.gz"; \
echo; \
echo NEWS:; \
@@ -119,10 +138,14 @@ alpha:
$(MAKE) -s announcement > /tmp/announce-$(distdir)
ln $(distdir).tar.gz ../release
chmod a-w $(distdir).tar.gz
cd $(release-archive-dir) \
&& xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
ln $(release-archive-dir)/$(xd-delta) .
chmod a-w $(release-archive-dir)/$(xd-delta)
@echo =====================================
@for url in $(real_dir_list); do \
echo "ncftp -u $$url/"; \
done
@echo '# put $(distdir).tar.gz'
@echo =====================================
@echo 'scp $(xd-delta) $(distdir).tar.gz \'
@echo ' $(b_host):$(b_real_dir)'
@echo '# send the /tmp/announcement e-mail'
@echo =====================================
@echo =====================================

View File

@@ -3059,6 +3059,10 @@ hours
days
@end table
Historical implementations of @code{sleep} have required that
@var{number} be an integer. However, GNU @code{sleep} accepts
arbitrary floating point numbers.
The only options are @samp{--help} and @samp{--version}. @xref{Common
options}.

View File

@@ -21,8 +21,8 @@ libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
getdate.h getline.h getopt.h getpagesize.h \
group-member.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
group-member.h hash.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h nanosleep.h path-concat.h pathmax.h \
posixtm.h quotearg.h regex.h safe-read.h same.h save-cwd.h \
savedir.h strverscmp.h \
version-etc.h xalloc.h xstrtol.h

View File

@@ -123,8 +123,8 @@ libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
getdate.h getline.h getopt.h getpagesize.h \
group-member.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
group-member.h hash.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h nanosleep.h path-concat.h pathmax.h \
posixtm.h quotearg.h regex.h safe-read.h same.h save-cwd.h \
savedir.h strverscmp.h \
version-etc.h xalloc.h xstrtol.h
@@ -576,7 +576,7 @@ maintainer-clean-depend:
@AMDEP@CCDEPMODE = @CCDEPMODE@
.c.o:
@AMDEP@ source='$<' object='$@' @AMDEPBACKSLASH@
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c -o $@ $<

View File

@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990,91,92,93,94,95,96,97,98, 99 Free Software Foundation, Inc.
Copyright (C) 1990-2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
@@ -150,12 +150,16 @@ error (status, errnum, message, va_alist)
++error_message_count;
if (errnum)
{
#if defined HAVE_STRERROR_R || defined _LIBC
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
# if HAVE_WORKING_STRERROR_R || _LIBC
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
# else
/* Don't use __strerror_r's return value because on some systems
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
__strerror_r (errnum, errbuf, sizeof errbuf);
fprintf (stderr, ": %s", errbuf);
# endif
#else
fprintf (stderr, ": %s", strerror (errnum));
#endif
@@ -228,12 +232,16 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
++error_message_count;
if (errnum)
{
#if defined HAVE_STRERROR_R || defined _LIBC
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
# if HAVE_WORKING_STRERROR_R || _LIBC
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
# else
/* Don't use __strerror_r's return value because on some systems
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
__strerror_r (errnum, errbuf, sizeof errbuf);
fprintf (stderr, ": %s", errbuf);
# endif
#else
fprintf (stderr, ": %s", strerror (errnum));
#endif

View File

@@ -1,5 +1,5 @@
/* euidaccess -- check if effective user id can access file
Copyright (C) 1990, 1991, 1995, 1998 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1995, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -66,6 +66,9 @@ gid_t getegid ();
#ifndef errno
extern int errno;
#endif
#ifndef __set_errno
# define __set_errno(val) errno = (val)
#endif
#if defined(EACCES) && !defined(EACCESS)
# define EACCESS EACCES
@@ -93,6 +96,7 @@ extern int errno;
#ifdef _LIBC
# define group_member __group_member
# define euidaccess __euidaccess
#else
@@ -102,15 +106,6 @@ static uid_t uid;
/* The user's real group id. */
static gid_t gid;
/* The user's effective user id. */
static uid_t euid;
/* The user's effective group id. */
static gid_t egid;
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
static int have_ids = 0;
# if HAVE_GETGROUPS
int group_member ();
# else
@@ -119,6 +114,15 @@ int group_member ();
#endif
/* The user's effective user id. */
static uid_t euid;
/* The user's effective group id. */
static gid_t egid;
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
static int have_ids;
/* Return 0 if the user has permission of type MODE on file PATH;
otherwise, return -1 and set `errno' to EACCESS.
@@ -133,8 +137,9 @@ euidaccess (const char *path, int mode)
int granted;
#ifdef _LIBC
uid_t uid = getuid (), euid = geteuid ();
gid_t gid = getgid (), egid = getegid ();
if (! __libc_enable_secure)
/* If we are not set-uid or set-gid, access does the same. */
return __access (path, mode);
#else
if (have_ids == 0)
{
@@ -144,11 +149,11 @@ euidaccess (const char *path, int mode)
euid = geteuid ();
egid = getegid ();
}
#endif
if (uid == euid && gid == egid)
/* If we are not set-uid or set-gid, access does the same. */
return access (path, mode);
#endif
if (stat (path, &stats))
return -1;
@@ -161,6 +166,16 @@ euidaccess (const char *path, int mode)
if (mode == F_OK)
return 0; /* The file exists. */
#ifdef _LIBC
/* Now we need the IDs. */
if (have_ids == 0)
{
have_ids = 1;
euid = __geteuid ();
egid = __getegid ();
}
#endif
/* The super-user can read and write any file, and execute any file
that anyone can execute. */
if (euid == 0 && ((mode & X_OK) == 0
@@ -175,6 +190,40 @@ euidaccess (const char *path, int mode)
granted = (stats.st_mode & mode);
if (granted == mode)
return 0;
errno = EACCESS;
__set_errno (EACCESS);
return -1;
}
#undef euidaccess
#ifdef weak_alias
weak_alias (__euidaccess, euidaccess)
#endif
#ifdef TEST
# include <stdio.h>
# include <errno.h>
# include "error.h"
char *program_name;
int
main (argc, argv)
int argc;
char **argv;
{
char *file;
int mode;
int err;
program_name = argv[0];
if (argc < 3)
abort ();
file = argv[1];
mode = atoi (argv[2]);
err = euidaccess (file, mode);
printf ("%d\n", err);
if (err != 0)
error (0, errno, "%s", file);
exit (0);
}
#endif

View File

@@ -82,7 +82,7 @@
#endif
#define EPOCH_YEAR 1970
#define TM_YEAR_ORIGIN 1900
#define TM_YEAR_BASE 1900
#define HOUR(x) ((x) * 60)
@@ -664,26 +664,32 @@ lookup_zone (struct parser_control const *pc, char const *name)
return 0;
}
/* Yield A - B, measured in seconds. */
#if ! HAVE_TM_GMTOFF
/* Yield the difference between *A and *B,
measured in seconds, ignoring leap seconds.
The body of this function is taken directly from the GNU C Library;
see src/strftime.c. */
static int
difftm (struct tm *a, struct tm *b)
tm_diff (struct tm const *a, struct tm const *b)
{
int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
int days = (
/* difference in day of year */
a->tm_yday - b->tm_yday
/* + intervening leap days */
+ ((ay >> 2) - (by >> 2))
- (ay / 100 - by / 100)
+ ((ay / 100 >> 2) - (by / 100 >> 2))
/* + difference in years * 365 */
+ (int) (ay - by) * 365
);
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid int overflow in leap day calculations,
but it's OK to assume that A and B are close to each other. */
int a4 = (a->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (a->tm_year & 3);
int b4 = (b->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (b->tm_year & 3);
int a100 = a4 / 25 - (a4 % 25 < 0);
int b100 = b4 / 25 - (b4 % 25 < 0);
int a400 = a100 >> 2;
int b400 = b100 >> 2;
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
int years = a->tm_year - b->tm_year;
int days = (365 * years + intervening_leap_days
+ (a->tm_yday - b->tm_yday));
return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))
+ (a->tm_min - b->tm_min))
+ (a->tm_sec - b->tm_sec));
}
#endif /* ! HAVE_TM_GMTOFF */
static table const *
lookup_word (struct parser_control const *pc, char *word)
@@ -848,7 +854,7 @@ get_date (const char *p, const time_t *now)
return -1;
pc.input = p;
pc.year = tmp->tm_year + TM_YEAR_ORIGIN;
pc.year = tmp->tm_year + TM_YEAR_BASE;
pc.month = tmp->tm_mon + 1;
pc.day = tmp->tm_mday;
pc.hour = tmp->tm_hour;
@@ -934,7 +940,7 @@ get_date (const char *p, const time_t *now)
|| (pc.local_zones_seen && 1 < pc.local_isdst))
return -1;
tm.tm_year = to_year (pc.year) - TM_YEAR_ORIGIN + pc.rel_year;
tm.tm_year = to_year (pc.year) - TM_YEAR_BASE + pc.rel_year;
tm.tm_mon = pc.month - 1 + pc.rel_month;
tm.tm_mday = pc.day + pc.rel_day;
if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen))
@@ -981,7 +987,7 @@ get_date (const char *p, const time_t *now)
if (pc.zones_seen)
{
tm = tm0;
if (tm.tm_year <= EPOCH_YEAR - TM_YEAR_ORIGIN)
if (tm.tm_year <= EPOCH_YEAR - TM_YEAR_BASE)
{
tm.tm_mday++;
pc.time_zone += 24 * 60;
@@ -1009,11 +1015,15 @@ get_date (const char *p, const time_t *now)
if (pc.zones_seen)
{
int delta;
int delta = pc.time_zone * 60;
#ifdef HAVE_TM_GMTOFF
delta -= tm.tm_gmtoff;
#else
struct tm *gmt = gmtime (&Start);
if (! gmt)
return -1;
delta = pc.time_zone * 60 + difftm (gmt, &tm);
delta -= tm_diff (&tm, gmt);
#endif
if ((Start < Start - delta) != (delta < 0))
return -1; /* time_t overflow */
Start -= delta;

View File

@@ -1,5 +1,5 @@
/* Case-insensitive buffer comparator.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 2000 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
@@ -15,9 +15,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Jim Meyering (meyering@na-net.ornl.gov) */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -25,16 +25,16 @@
#include <ctype.h>
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
# define IN_CTYPE_DOMAIN(c) 1
# define IN_CTYPE_DOMAIN(Char) 1
#else
# define IN_CTYPE_DOMAIN(c) isascii(c)
# define IN_CTYPE_DOMAIN(Char) isascii(Char)
#endif
#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
#define ISLOWER(Char) (IN_CTYPE_DOMAIN (Char) && islower (Char))
#if _LIBC || STDC_HEADERS
# define TOUPPER(c) toupper (c)
# define TOUPPER(Char) toupper (Char)
#else
# define TOUPPER(c) (ISLOWER (c) ? toupper (c) : (c))
# define TOUPPER(Char) (ISLOWER (Char) ? toupper (Char) : (Char))
#endif
#include "memcasecmp.h"
@@ -44,14 +44,11 @@
join -i works with sort -f. */
int
memcasecmp (vs1, vs2, n)
const void *vs1;
const void *vs2;
size_t n;
memcasecmp (const void *vs1, const void *vs2, size_t n)
{
unsigned int i;
unsigned char *s1 = (unsigned char *) vs1;
unsigned char *s2 = (unsigned char *) vs2;
unsigned char const *s1 = (unsigned char const *) vs1;
unsigned char const *s2 = (unsigned char const *) vs2;
for (i = 0; i < n; i++)
{
unsigned char u1 = *s1++;

View File

@@ -1,5 +1,5 @@
/* Provide a replacement for the POSIX nanosleep function.
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2000 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
@@ -31,9 +31,7 @@ extern int errno;
# include <unistd.h>
#endif
#include <time.h>
/* FIXME: is including both like this kosher? */
#include <sys/time.h>
#include "nanosleep.h"
static int suspended;
int first_call = 1;

57
lib/nanosleep.h Normal file
View File

@@ -0,0 +1,57 @@
/* Copyright (C) 2000 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
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if ! defined NANOSLEEP_H
# define NANOSLEEP_H
# if HAVE_CONFIG_H
# include <config.h>
# endif
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
# include <sys/types.h>
# 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_STRUCT_TIMESPEC
/* Some systems don't define this struct, e.g., AIX 4.1, Ultrix 4.3. */
struct timespec
{
time_t tv_sec;
long tv_nsec;
};
# endif
int
nanosleep PARAMS ((const struct timespec *requested_delay,
struct timespec *remaining_delay));
#endif

View File

@@ -1,3 +1,22 @@
/* Determine whether two file names refer to the same file.
Copyright (C) 1997-2000 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
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* written by Jim Meyering */
#if HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,3 +1,20 @@
/* Determine whether two file names refer to the same file.
Copyright (C) 1997-2000 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
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef SAME_H_
# define SAME_H_ 1

View File

@@ -1,5 +1,5 @@
/* savedir.c -- save the list of files in a directory in a string
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -87,6 +87,10 @@ savedir (const char *dir, off_t name_size)
if (dirp == NULL)
return NULL;
/* Be sure name_size is at least `1' so there's room for
the final NUL byte. */
name_size += !name_size;
name_space = (char *) malloc (name_size);
if (name_space == NULL)
{

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1994, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -16,15 +16,13 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Find the first ocurrence in S of any character in ACCEPT. */
char *
strpbrk (s, accept)
register const char *s;
register const char *accept;
strpbrk (const char *s, const char *accept)
{
while (*s != '\0')
{

View File

@@ -4,7 +4,7 @@
/* Work around the bug in some systems whereby @xstat@ succeeds when
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
has this bug.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1997-2000 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

View File

@@ -1,5 +1,5 @@
/* xstrtod.c - error-checking interface to strtod
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 1999, 2000 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
@@ -32,6 +32,11 @@ double strtod ();
#include <limits.h>
#include "xstrtod.h"
/* Tell the compiler that non-default rounding modes are used. */
#if 199901 <= __STDC_VERSION__
#pragma STDC FENV_ACCESS ON
#endif
/* An interface to strtod that encapsulates all the error checking
one should usually perform. Like strtod, but upon successful
conversion put the result in *RESULT and return zero. Return

View File

@@ -1,5 +1,5 @@
/* A more useful interface to strtol.
Copyright 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1998-2000 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

View File

@@ -1,3 +1,32 @@
2000-01-08 Jim Meyering <meyering@ascend.com>
* strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
* jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
2000-01-04 Jim Meyering <meyering@ascend.com>
* d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
jm_STRUCT_DIRENT_D_TYPE.
* d-ino.m4: (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
jm_STRUCT_DIRENT_D_INO.
* utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
jm_STRUCT_UTIMBUF.
* jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings.
* utime.m4: Likewise.
* timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
* jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
2000-01-03 Paul Eggert <eggert@twinsun.com>
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
(for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
2000-01-02 Jim Meyering <meyering@ascend.com>
* search-libs.m4: Escape `$' in $3 of dnl comment. I no longer
remember if this is necessary.
1999-12-26 Jim Meyering <meyering@ascend.com>
* jm-macros.m4: Use it here.

View File

@@ -47,7 +47,9 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \
ulonglong.m4 \
uptime.m4 \

View File

@@ -70,9 +70,10 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
@@ -83,15 +84,24 @@ INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBOBJS = @LIBOBJS@
LIB_CRYPT = @LIB_CRYPT@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
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@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
@@ -147,7 +157,9 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \
ulonglong.m4 \
uptime.m4 \

View File

@@ -1,11 +1,11 @@
#serial 2
#serial 3
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_DIRENT_D_INO,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK([for d_ino member in directory struct],
jm_cv_struct_dirent_d_ino,

View File

@@ -1,11 +1,11 @@
#serial 2
#serial 3
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl
AC_DEFUN(jm_STRUCT_DIRENT_D_TYPE,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK([for d_type member in directory struct],
jm_cv_struct_dirent_d_type,

View File

@@ -1,4 +1,4 @@
#serial 11
#serial 12
dnl Misc type-related macros for fileutils, sh-utils, textutils.
@@ -19,9 +19,9 @@ AC_DEFUN(jm_MACROS,
AC_REQUIRE([jm_BISON])
AC_REQUIRE([jm_ASSERT])
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
AC_REQUIRE([jm_STRUCT_UTIMBUF])
AC_REQUIRE([jm_STRUCT_DIRENT_D_TYPE])
AC_REQUIRE([jm_STRUCT_DIRENT_D_INO])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO])
AC_REQUIRE([jm_CHECK_DECLS])
AC_REQUIRE([jm_PREREQ])
@@ -34,6 +34,7 @@ AC_DEFUN(jm_MACROS,
AC_REQUIRE([jm_FUNC_STAT])
AC_REQUIRE([jm_FUNC_REALLOC])
AC_REQUIRE([jm_FUNC_MALLOC])
AC_REQUIRE([jm_FUNC_STRERROR_R])
AC_REQUIRE([jm_FUNC_NANOSLEEP])
AC_REQUIRE([jm_FUNC_READDIR])
AC_REQUIRE([jm_FUNC_MEMCMP])
@@ -97,6 +98,7 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
AC_HEADER_STAT
AC_STRUCT_ST_MTIM_NSEC
AC_STRUCT_ST_DM_MODE
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_TIMESPEC])
AC_TYPE_GETGROUPS
AC_TYPE_MODE_T

View File

@@ -1,11 +1,16 @@
#serial 1
#serial 2
dnl From Jim Meyering.
dnl FIXME
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
AC_DEFUN(jm_FUNC_NANOSLEEP,
[
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
AC_SEARCH_LIBS(nanosleep, [rt posix4])
AC_CACHE_CHECK([whether nanosleep works],
jm_cv_func_nanosleep_works,
[AC_TRY_RUN([

View File

@@ -1,8 +1,8 @@
#serial 2
#serial 3
dnl A replacement for autoconf's macro by the same name. This version
dnl uses `ac_lib' rather than `i' for the loop variable, but more importantly
dnl moves the ACTION-IF-FOUND ($3) into the inner `if'-block so that it is
dnl moves the ACTION-IF-FOUND ([$]3) into the inner `if'-block so that it is
dnl run only if one of the listed libraries ends up being used (and not in
dnl the `none required' case.
dnl I hope it's only temporary while we wait for that version to be fixed.

40
m4/strerror_r.m4 Normal file
View File

@@ -0,0 +1,40 @@
#serial 1
dnl From Jim Meyering.
dnl Determine whether the strerror_r implementation is one of
dnl the broken ones that returns `int' rather than `char*'.
dnl Actually, this tests only whether it returns a scalar
dnl or an array, but that should be enough.
dnl On at least DEC UNIX 4.0[A-D], strerror_r returns `int'.
dnl This is used by lib/error.c.
AC_DEFUN(jm_FUNC_STRERROR_R,
[
# Check strerror_r
AC_CHECK_FUNCS([strerror_r])
if test $ac_cv_func_strerror_r = yes; then
AC_CHECK_HEADERS(string.h)
AC_CACHE_CHECK([for working strerror_r],
jm_cv_func_working_strerror_r,
[
AC_TRY_COMPILE(
[
# include <stdio.h>
# if HAVE_STRING_H
# include <string.h>
# endif
],
[
int buf; /* avoiding square brackets makes this easier */
char x = *strerror_r (0, buf, sizeof buf);
],
jm_cv_func_working_strerror_r=yes,
jm_cv_func_working_strerror_r=no
)
if test $jm_cv_func_working_strerror_r = yes; then
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
[Define to 1 if strerror_r returns a string.])
fi
])
fi
])

23
m4/timespec.m4 Normal file
View File

@@ -0,0 +1,23 @@
#serial 1
dnl From Jim Meyering
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared in time.h.
AC_DEFUN(jm_CHECK_TYPE_STRUCT_TIMESPEC,
[
AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
[AC_TRY_COMPILE(
[
#include <time.h>
],
[static struct timespec x; x.tv_sec = x.tv_nsec;],
fu_cv_sys_struct_timespec=yes,
fu_cv_sys_struct_timespec=no)
])
if test $fu_cv_sys_struct_timespec = yes; then
AC_DEFINE_UNQUOTED(HAVE_STRUCT_TIMESPEC, 1,
[Define if struct timespec is declared in <time.h>. ])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 2
#serial 3
dnl From Jim Meyering
@@ -6,7 +6,7 @@ dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
dnl usually in <utime.h>.
dnl Some systems have utime.h but don't declare the struct anywhere.
AC_DEFUN(jm_STRUCT_UTIMBUF,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_UTIMBUF,
[
AC_CHECK_HEADERS(utime.h)
AC_REQUIRE([AC_HEADER_TIME])

View File

@@ -1,4 +1,4 @@
#serial 1
#serial 2
dnl From Jim Meyering
dnl Replace the utime function on systems that need it.
@@ -8,7 +8,7 @@ dnl FIXME
AC_DEFUN(jm_FUNC_UTIME,
[
AC_CHECK_HEADERS(utime.h)
AC_REQUIRE([jm_STRUCT_UTIMBUF])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([AC_FUNC_UTIME_NULL])
if test $ac_cv_func_utime_null = no; then

View File

@@ -1,4 +1,4 @@
#!/sw/tools/bin/perl -w
#!/usr/bin/perl -w
# Generate a short man page from --help and --version output.
# Copyright © 1997, 98, 99 Free Software Foundation, Inc.
@@ -27,7 +27,7 @@ use Text::Tabs qw(expand);
use POSIX qw(strftime setlocale LC_TIME);
my $this_program = 'help2man';
my $this_version = '1.019';
my $this_version = '1.020';
my $version_info = <<EOT;
$this_program $this_version
@@ -239,7 +239,8 @@ if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
for (@syn)
{
$synopsis .= ".br\n" if $synopsis;
s/(\S+) *//;
s!^\S*/!!;
s/^(\S+) *//;
$synopsis .= ".B $1\n";
s/\s+$//;
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;

View File

@@ -1,3 +1,69 @@
2000-01-10 Jim Meyering <meyering@lucent.com>
* Version 4.0o.
* lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
2000-01-09 Jim Meyering <meyering@lucent.com>
* Version 4.0n.
* src/ln.c (do_link): Produce the same sort of one-line output for
`--backup --verbose' as cp, mv, install. Before this, the backup
file name wasn't printed at all.
This affects cp, install, and mv.
* src/copy.c (copy_internal): When making backup files in verbose
mode, print the backup file name on the same line as the rest of the
information, e.g., `a -> b (backup: b.~13~)' rather than on a separate
line by itself. Suggestion from Karl Berry.
2000-01-08 Jim Meyering <meyering@ascend.com>
* lib/error.c (error): Use __strerror_r's return value only if
HAVE_WORKING_STRERROR_R.
(error_at_line): Likewise.
* Makefile.maint (null_AM_MAKEFLAGS): Define.
(my-distcheck): Use it to avoid distributing out of date files
whose derivation would require a maintainer tool.
2000-01-07 Jim Meyering <meyering@ascend.com>
* lib/euidaccess.c: Sync with the GNU C library.
* tests/dir/Makefile.am: (TESTS_ENVIRONMENT): Add `pwd`/ prefix
to exported PATH value (though not strictly necessary, here).
* tests/dd/Makefile.am: Likewise.
* tests/dircolors/Makefile.am: Likewise.
* tests/rm/Makefile.am: Likewise.
* tests/rmdir/Makefile.am: Likewise.
* tests/shred/Makefile.am: Likewise.
* tests/touch/Makefile.am: Likewise.
* tests/shred/Makefile.am: Likewise.
2000-01-06 Jim Meyering <meyering@ascend.com>
* man/help2man: Import version 1.020.
* lib/strftime.c: Sync with the GNU C Library.
2000-01-06 Paul Eggert <eggert@set.twinsun.com>
* tar/lib/getdate.y: Sync tm_diff with the GNU C Library.
(TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
(tm_diff): Renamed from difftm. All uses changed.
Replace body with that taken from GNU C Library 2.1.3pre1.
(get_date): Prefer tm_gmtoff to tm_diff if available.
2000-01-04 Paul Eggert <eggert@twinsun.com>
* savedir.c (savedir): Don't store past the end of an array if
name_size is zero and the directory is empty.
* Makefile.maint (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0.
(alpha): Create xdelta diffs.
2000-01-02 Jim Meyering <meyering@ascend.com>
* Version 4.0m.

View File

@@ -1,4 +1,11 @@
Changes in release 4.1:
[4.0o]
* Include lib/nanosleep.h.
[4.0n]
* cp, install, ln, and mv: when making backup files in verbose mode, these
commands now print the backup file name on the same line as the rest of the
information, e.g., `a -> b (backup: b.~13~)' rather than on a separate line
as all but ln used to do. ln didn't output the backup file name at all.
[4.0m]
* mv accepts new option: --strip-trailing-slashes (soon, many other
programs will, too)

View File

@@ -1,3 +1,80 @@
2000-01-10 Jim Meyering <meyering@lucent.com>
* Version 2.0d.
* src/Makefile.am (sleep_LDADD): Add @POW_LIBM@, for systems that use
lib/strtod.c and need -lm to resolve its pow reference.
2000-01-07 Jim Meyering <meyering@ascend.com>
* Version 2.0c.
* tests/basename/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
to exported PATH value (though not strictly necessary, here).
* tests/factor/Makefile.am (TESTS_ENVIRONMENT): Likewise.
* tests/seq/Makefile.am (TESTS_ENVIRONMENT): Likewise.
* tests/stty/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2000-01-06 Paul Eggert <eggert@set.twinsun.com>
* tar/lib/getdate.y: Sync tm_diff with the GNU C Library.
(TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
(tm_diff): Renamed from difftm. All uses changed.
Replace body with that taken from GNU C Library 2.1.3pre1.
(get_date): Prefer tm_gmtoff to tm_diff if available.
2000-01-05 Paul Eggert <eggert@twinsun.com>
Minor code cleanup.
* src/sleep.c (clock_get_realtime): Return argument, for convenience.
(main): Use this to simplify main sleep loop.
2000-01-05 Jim Meyering <meyering@ascend.com>
Some systems lack a definition of struct timespec (AIX, Ultrix)
Reported by Christian Krackowizer.
* lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
* lib/nanosleep.h: New file.
* lib/nanosleep.c: Include it.
Don't include time.h or sys/time.h here.
* src/sleep.c: Include it.
(AUTHORS): Add Paul Eggert.
2000-01-04 Jim Meyering <meyering@ascend.com>
* lib/nanosleep.c: Include both time.h and sys/time.h only
#if TIME_WITH_SYS_TIME.
2000-01-03 Paul Eggert <eggert@twinsun.com>
Fix some porting and rounding problems with the new `sleep' code.
* configure.in (AC_CHECK_HEADERS): Add fenv.h.
(FESETROUND_LIBM): New macro.
* lib/xstrtod.c: Add #pragma STDC FENV_ACCESS ON if C99.
* src/sleep.c: Likewise.
* src/Makefile.am (sleep_LDADD, sleep_DEPENDENCIES): New macros.
* src/sleep.c (<fenv.h>): Include if available.
(main): Always round floating-point interval calculations upwards,
as we must sleep for at least the specified time.
Do the right thing with NaNs.
(main): Sleep forever if the time calculations overflow.
(apply_suffix): Don't assert that *s <= TIME_T_MAX.
(clock_get_realtime): Fix typo; address was improperly taken.
2000-01-02 Jim Meyering <meyering@ascend.com>
* Version 2.0b.
* lib/Makefile.in: Regenerate.
* Version 2.0a.
1999-12-26 Jim Meyering <meyering@ascend.com>
* lib/nanosleep.c (nanosleep): New file.

View File

@@ -1,7 +1,15 @@
Changes in release 2.1
[2.0d]
* fix portability problem with sleep vs lib/strtod.c's requirement for -lm
[2.0c]
* fix portability problems with nanosleep.c and with the new code in sleep.c
[2.0b]
* Regenerate lib/Makefile.in so that nanosleep.c is distributed.
[2.0a]
* sleep accepts floating point arguments on command line
* sleep continues sleeping after being suspended and continued
* sleep's clock continues counting down when sleep is suspended
* when a suspended sleep process is resumed, it continues sleeping if
there is any time remaining
* who once again prints whatever host information it has, even without --lookup
Changes in release 2.0
* disable stty tests (otherwise they fail) when `make check' is run via rsh

View File

@@ -1,3 +1,43 @@
2000-01-10 Jim Meyering <meyering@lucent.com>
* Version 2.0c.
* Makefile.maint (announcement): Include URLs for xdelta files.
(alpha): Use scp, not ncftp.
* lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.
2000-01-08 Jim Meyering <meyering@ascend.com>
* Version 2.0b.
More nits.
* src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it
instead of `CHAR_MAX + n'.
* src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise.
2000-01-07 Jim Meyering <meyering@ascend.com>
* tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
to exported PATH value (though not strictly necessary, here).
* tests/md5sum/Makefile.am: Likewise.
Nits.
* lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
Capitalize all macro parameters.
(memcasecmp): Ansideclify.
Don't cast away `const'ness of parameters.
* lib/strpbrk.c (strpbrk): Ansideclify.
Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
Suggestions from François Pinard.
2000-01-06 Jim Meyering <meyering@ascend.com>
* tests/tail-2/assert: Tell the user just before sleeping for 7 seconds.
* tests/tail-2/Makefile.am (TESTS): Remove fflush test. It didn't
test the losing behavior, and left a stray tail process to boot.
2000-01-01 Jim Meyering <meyering@ascend.com>
* Version 2.0a.

View File

@@ -1,4 +1,8 @@
Changes in release 2.1
[2.0c]
* include lib/nanosleep.h.
[2.0b]
* portability tweaks for error.c vs. systems with deficient strerror_r
[2.0a]
* `tail --follow=name' no longer gets a failed assertion for a
dev,inode-reusing race condition

View File

@@ -1,5 +1,5 @@
/* copy.c -- core functions for copying files and directories
Copyright (C) 89, 90, 91, 1995-1999 Free Software Foundation.
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -370,6 +370,7 @@ copy_internal (const char *src_path, const char *dst_path,
int src_type;
char *earlier_file;
char *dst_backup = NULL;
int backup_succeeded = 0;
int fix_mode = 0;
int rename_errno;
@@ -546,13 +547,13 @@ copy_internal (const char *src_path, const char *dst_path,
return 1;
}
else
dst_backup = NULL;
{
dst_backup = NULL;
}
}
else
{
/* rename succeeded */
if (x->verbose)
printf (_("%s -> %s (backup)\n"), dst_path, dst_backup);
backup_succeeded = 1;
}
new_dst = 1;
}
@@ -594,7 +595,12 @@ copy_internal (const char *src_path, const char *dst_path,
directory. So --verbose should not announce anything until we're
sure we'll create a directory. */
if (x->verbose && !S_ISDIR (src_type))
printf ("%s -> %s\n", src_path, dst_path);
{
printf ("%s -> %s", src_path, dst_path);
if (backup_succeeded)
printf (_(" (backup: %s)"), dst_backup);
putchar ('\n');
}
/* Did we copy this inode somewhere else (in this command line argument)
and therefore this is a second hard link to the inode? */

View File

@@ -171,6 +171,13 @@ static char *output_delimiter_string;
/* Nonzero if we have ever read standard input. */
static int have_read_stdin;
/* For long options that have no equivalent short option, use a
non-character as a pseudo short option, starting with CHAR_MAX + 1. */
enum
{
OUTPUT_DELIMITER_OPTION = CHAR_MAX + 1
};
static struct option const longopts[] =
{
{"bytes", required_argument, 0, 'b'},
@@ -178,7 +185,7 @@ static struct option const longopts[] =
{"fields", required_argument, 0, 'f'},
{"delimiter", required_argument, 0, 'd'},
{"only-delimited", no_argument, 0, 's'},
{"output-delimiter", required_argument, 0, CHAR_MAX + 1},
{"output-delimiter", required_argument, 0, OUTPUT_DELIMITER_OPTION},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0}
@@ -736,7 +743,7 @@ main (int argc, char **argv)
delim_specified = 1;
break;
case CHAR_MAX + 1:
case OUTPUT_DELIMITER_OPTION:
/* Interpret --output-delimiter='' to mean
`use the NUL byte as the delimiter.' */
output_delimiter_length = (optarg[0] == '\0'

View File

@@ -1,5 +1,5 @@
/* `ln' program to create links between files.
Copyright (C) 86, 89, 90, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 86, 89, 90, 91, 1995-2000 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
@@ -151,6 +151,7 @@ do_link (const char *source, const char *dest)
struct stat dest_stats;
char *dest_backup = NULL;
int lstat_status;
int backup_succeeded = 0;
/* Use stat here instead of lstat.
On SVR4, link does not follow symlinks, so this check disallows
@@ -276,6 +277,10 @@ do_link (const char *source, const char *dest)
else
dest_backup = NULL;
}
else
{
backup_succeeded = 1;
}
}
/* Try to unlink DEST even if we may have renamed it. In some unusual
@@ -295,7 +300,12 @@ do_link (const char *source, const char *dest)
}
if (verbose)
printf (_("create %s %s to %s\n"), link_type_string, dest, source);
{
printf (_("create %s %s to %s"), link_type_string, dest, source);
if (backup_succeeded)
printf (_(" (backup: %s)"), dest_backup);
putchar ('\n');
}
if ((*linkfunc) (source, dest) == 0)
{

View File

@@ -1,5 +1,5 @@
/* pr -- convert text files for printing.
Copyright (C) 88, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 88, 91, 1995-2000 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
@@ -725,11 +725,19 @@ static int last_line = FALSE;
-h HEADER using pr test-suite */
static int test_suite;
/* For long options that have no equivalent short option, use a
non-character as a pseudo short option, starting with CHAR_MAX + 1. */
enum
{
PAGES_OPTION = CHAR_MAX + 1,
COLUMNS_OPTION
};
static struct option const long_options[] =
{
{"test", no_argument, &test_suite, 1},
{"pages", required_argument, NULL, CHAR_MAX + 1},
{"columns", required_argument, NULL, CHAR_MAX + 2},
{"pages", required_argument, NULL, PAGES_OPTION},
{"columns", required_argument, NULL, COLUMNS_OPTION},
{"across", no_argument, NULL, 'a'},
{"show-control-chars", no_argument, NULL, 'c'},
{"double-space", no_argument, NULL, 'd'},
@@ -901,7 +909,7 @@ main (int argc, char **argv)
case 0: /* getopt long option */
break;
case CHAR_MAX + 1: /* --pages=FIRST_PAGE[:LAST_PAGE] */
case PAGES_OPTION: /* --pages=FIRST_PAGE[:LAST_PAGE] */
{ /* dominates old opt +... */
if (optarg)
first_last_page (optarg);
@@ -911,7 +919,7 @@ main (int argc, char **argv)
break;
}
case CHAR_MAX + 2: /* --columns=COLUMN */
case COLUMNS_OPTION: /* --columns=COLUMN */
{
long int tmp_long;
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK

View File

@@ -1,5 +1,5 @@
/* sleep - delay for a specified amount of time.
Copyright (C) 84, 1991-1997, 1999 Free Software Foundation, Inc.
Copyright (C) 84, 1991-1997, 1999-2000 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
@@ -34,12 +34,22 @@
#include "system.h"
#include "error.h"
#include "long-options.h"
#include "nanosleep.h"
#include "xstrtod.h"
#if HAVE_FENV_H
# include <fenv.h>
#endif
/* Tell the compiler that non-default rounding modes are used. */
#if 199901 <= __STDC_VERSION__
#pragma STDC FENV_ACCESS ON
#endif
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "sleep"
#define AUTHORS "Jim Meyering"
#define AUTHORS "Jim Meyering and Paul Eggert"
/* The name by which this program was run. */
char *program_name;
@@ -60,9 +70,10 @@ usage (int status)
printf (_("\
Usage: %s NUMBER[SUFFIX]...\n\
or: %s OPTION\n\
Pause for NUMBER seconds.\n\
SUFFIX may be s for seconds (the default), m for minutes,\n\
h for hours or d for days.\n\
Pause for NUMBER seconds. SUFFIX may be `s' for seconds (the default),\n\
`m' for minutes, `h' for hours or `d' for days. Unlike most implementations\n\
that require NUMBER be an integer, here NUMBER may be an arbitrary floating\n\
point number.\n\
\n\
--help display this help and exit\n\
--version output version information and exit\n\
@@ -73,15 +84,17 @@ h for hours or d for days.\n\
exit (status);
}
/* FIXME: describe */
/* Given a floating point value *X, and a suffix character, SUFFIX_CHAR,
scale *X by the multiplier implied by SUFFIX_CHAR. SUFFIX_CHAR may
be the NUL byte or `s' to denote seconds, `m' for minutes, `h' for
hours, or `d' for days. If SUFFIX_CHAR is invalid, don't modify *X
and return nonzero. Otherwise return zero. */
static int
apply_suffix (double *s, char suffix_char)
apply_suffix (double *x, char suffix_char)
{
unsigned int multiplier;
assert (*s <= TIME_T_MAX);
switch (suffix_char)
{
case 0:
@@ -104,7 +117,7 @@ apply_suffix (double *s, char suffix_char)
if (multiplier == 0)
return 1;
*s *= multiplier;
*x *= multiplier;
return 0;
}
@@ -142,12 +155,12 @@ timespec_subtract (struct timespec *diff,
return y->tv_sec < x->tv_sec;
}
static void
static struct timespec *
clock_get_realtime (struct timespec *ts)
{
int fail;
#if USE_CLOCK_GETTIME
fail = clock_gettime (CLOCK_REALTIME, &ts);
fail = clock_gettime (CLOCK_REALTIME, ts);
#else
struct timeval tv;
fail = gettimeofday (&tv, NULL);
@@ -160,6 +173,8 @@ clock_get_realtime (struct timespec *ts)
if (fail)
error (1, errno, _("cannot read realtime clock"));
return ts;
}
int
@@ -167,8 +182,10 @@ main (int argc, char **argv)
{
int i;
double seconds = 0.0;
double ns;
int c;
int fail = 0;
int forever;
struct timespec ts_start;
struct timespec ts_stop;
struct timespec ts_sleep;
@@ -202,38 +219,56 @@ main (int argc, char **argv)
usage (1);
}
#ifdef FE_UPWARD
/* Always round up, since we must sleep for at least the specified
interval. */
fesetround (FE_UPWARD);
#endif
for (i = optind; i < argc; i++)
{
double s;
const char *p;
if (xstrtod (argv[i], &p, &s)
/* No negative intervals. */
|| s < 0
/* S must fit in a time_t. */
|| TIME_T_MAX < s
/* Nonnegative interval. */
|| ! (0 <= s)
/* No extra chars after the number and an optional s,m,h,d char. */
|| (*p && *(p+1))
/* Check any suffix char and update S based on the suffix. */
|| apply_suffix (&s, *p)
/* Make sure the sum fits in a time_t. */
|| TIME_T_MAX < (seconds += s)
)
|| apply_suffix (&s, *p))
{
error (0, 0, _("invalid time interval `%s'"), argv[i]);
fail = 1;
}
seconds += s;
}
if (fail)
usage (1);
/* Add this here so we end up rounding to the nearest nanosecond.
This ensures that that tv_nsec will be no larger than 999,999,999. */
seconds += .0000000005;
/* Separate whole seconds from nanoseconds. */
/* Separate whole seconds from nanoseconds.
Be careful to detect any overflow. */
ts_sleep.tv_sec = seconds;
ts_sleep.tv_nsec = (seconds - ts_sleep.tv_sec) * 1000000000;
ns = 1e9 * (seconds - ts_sleep.tv_sec);
forever = ! (ts_sleep.tv_sec <= seconds && 0 <= ns && ns <= 1e9);
ts_sleep.tv_nsec = ns;
/* Round up to the next whole number, if necessary, so that we
always sleep for at least the requested amount of time. */
ts_sleep.tv_nsec += (ts_sleep.tv_nsec < ns);
/* Normalize the interval length. nanosleep requires this. */
if (1000000000 <= ts_sleep.tv_nsec)
{
time_t t = ts_sleep.tv_sec + 1;
/* Detect integer overflow. */
forever |= (t < ts_sleep.tv_sec);
ts_sleep.tv_sec = t;
ts_sleep.tv_nsec -= 1000000000;
}
ts_stop.tv_sec = ts_start.tv_sec + ts_sleep.tv_sec;
ts_stop.tv_nsec = ts_start.tv_nsec + ts_sleep.tv_nsec;
@@ -243,19 +278,22 @@ main (int argc, char **argv)
ts_stop.tv_nsec -= 1000000000;
}
while (1)
/* Detect integer overflow. */
forever |= (ts_stop.tv_sec < ts_start.tv_sec
|| (ts_stop.tv_sec == ts_start.tv_sec
&& ts_stop.tv_nsec < ts_start.tv_nsec));
if (forever)
{
struct timespec remaining;
struct timespec ts_now;
int any_remaining;
int suspended = nanosleep (&ts_sleep, &remaining);
if (!suspended)
break;
clock_get_realtime (&ts_now);
any_remaining = timespec_subtract (&ts_sleep, &ts_stop, &ts_now);
if (! any_remaining)
break;
/* Fix ts_sleep and ts_stop, which may be garbage due to overflow. */
ts_sleep.tv_sec = ts_stop.tv_sec = TIME_T_MAX;
ts_sleep.tv_nsec = ts_stop.tv_nsec = 999999999;
}
while (nanosleep (&ts_sleep, NULL) != 0
&& timespec_subtract (&ts_sleep, &ts_stop,
clock_get_realtime (&ts_start)))
continue;
exit (0);
}

View File

@@ -7,5 +7,5 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=basename

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
@@ -118,7 +119,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=basename
subdir = tests/basename

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@

View File

@@ -6,7 +6,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=ls
TESTS = misc

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=ls

View File

@@ -6,7 +6,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=dircolors
TESTS = simple

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=dircolors

View File

@@ -7,5 +7,5 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=factor

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
@@ -118,7 +119,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=factor
subdir = tests/factor

View File

@@ -6,7 +6,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=ls
TESTS = tests

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=ls

View File

@@ -6,7 +6,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=md5sum
TESTS = basic-1 newline-1

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=md5sum

View File

@@ -9,5 +9,5 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=rm

View File

@@ -111,7 +111,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=rm
subdir = tests/rm

View File

@@ -7,5 +7,5 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=rmdir

View File

@@ -109,7 +109,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=rmdir
subdir = tests/rmdir

View File

@@ -7,5 +7,5 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=seq

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
@@ -118,7 +119,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=seq
subdir = tests/seq

View File

@@ -6,6 +6,6 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH
PATH=`pwd`/../../src:$$PATH
TESTS = remove

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH
PATH=`pwd`/../../src:$$PATH
TESTS = remove

View File

@@ -3,4 +3,4 @@ AUTOMAKE_OPTIONS = 1.2f gnits
TESTS = row-col-1 basic-1
EXTRA_DIST = $(TESTS) input-tty
TESTS_ENVIRONMENT = PATH=../../src:$$PATH
TESTS_ENVIRONMENT = PATH=`pwd`/../../src:$$PATH

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
@@ -114,7 +115,7 @@ AUTOMAKE_OPTIONS = 1.2f gnits
TESTS = row-col-1 basic-1
EXTRA_DIST = $(TESTS) input-tty
TESTS_ENVIRONMENT = PATH=../../src:$$PATH
TESTS_ENVIRONMENT = PATH=`pwd`/../../src:$$PATH
subdir = tests/stty
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../config.h

View File

@@ -9,4 +9,4 @@ TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH \
PROG=tail
TESTS = assert fflush
TESTS = assert

View File

@@ -111,7 +111,7 @@ TESTS_ENVIRONMENT = \
PROG=tail
TESTS = assert fflush
TESTS = assert
subdir = tests/tail-2
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../config.h

View File

@@ -31,7 +31,7 @@ tail_pid=$!
# Arrange for the tail process to die after 12 seconds.
(sleep 12; kill $tail_pid) &
rm -f foo
# echo sleep 7...
echo sleeping for 7 seconds...
sleep 7
echo $ok > f
mv f foo

View File

@@ -70,6 +70,7 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
FESETROUND_LIBM = @FESETROUND_LIBM@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@

View File

@@ -4,4 +4,4 @@ AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = empty-file dir-1 dangling-symlink no-rights
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=../../src:$$PATH
PATH=`pwd`/../../src:$$PATH

View File

@@ -106,7 +106,7 @@ AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = empty-file dir-1 dangling-symlink no-rights
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=../../src:$$PATH
PATH=`pwd`/../../src:$$PATH
subdir = tests/touch
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

View File

@@ -6,7 +6,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=tsort
TESTS = basic-1

View File

@@ -107,7 +107,7 @@ TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=../../src:$$PATH \
PATH=`pwd`/../../src:$$PATH \
PROG=tsort