Compare commits

...

81 Commits

Author SHA1 Message Date
Jim Meyering
8e2e012dc9 . 2000-06-04 08:13:25 +00:00
Jim Meyering
3962d775bf Put kludge in if-then...fi block. 2000-06-04 07:30:07 +00:00
Jim Meyering
1faa6a399a *** empty log message *** 2000-06-04 06:53:32 +00:00
Jim Meyering
98a1d5e72a (show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]:
Cast undeclared `realpath' to char* to avoid warning.
2000-06-04 06:51:46 +00:00
Jim Meyering
985cf06296 (getugroups): Cast -1 to gid_t, for systems like
SunOS4.1.4 for which gid_t is an unsigned type.
2000-06-04 06:47:31 +00:00
Jim Meyering
377d7cdb85 *** empty log message *** 2000-06-04 06:41:13 +00:00
Jim Meyering
86c8226819 move vmp decl back out to the scope where it belongs 2000-06-03 22:09:03 +00:00
Jim Meyering
e5f1a12c6b *** empty log message *** 2000-06-03 21:47:48 +00:00
Jim Meyering
c588f96c37 [!HAVE_DECL_MEMCHR]: Declare memchr. 2000-06-03 21:47:37 +00:00
Jim Meyering
51cee2cf8d *** empty log message *** 2000-06-03 12:41:19 +00:00
Jim Meyering
b0619089c9 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
now that autoconf requires that.
2000-06-03 12:40:56 +00:00
Jim Meyering
e78fd6ee39 *** empty log message *** 2000-06-03 12:22:37 +00:00
Jim Meyering
2e8629e442 Add a kludge to make autoheader emit the required
#undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
2000-06-03 12:22:33 +00:00
Jim Meyering
111cdb39c3 . 2000-06-03 08:34:45 +00:00
Jim Meyering
1b306b070e (install-exec-local): On systems with glibc-2.1 or
newer, don't install charset.alias.
2000-06-03 08:34:34 +00:00
Jim Meyering
70ac95bbb2 Change the Linux/glibc rules so they become empty on glibc-2.1 or newer. 2000-06-03 08:34:18 +00:00
Jim Meyering
43585ddb5e *** empty log message *** 2000-06-03 08:33:04 +00:00
Jim Meyering
410cb32814 Add comment to AC_DEFINE_UNQUOTED use. 2000-06-03 08:29:33 +00:00
Jim Meyering
ea146bfd07 . 2000-06-03 08:26:05 +00:00
Jim Meyering
534576fad0 Use jm_GLIBC21. 2000-06-03 08:25:33 +00:00
Jim Meyering
6f7ac74eb3 New file. From Bruno Haible. 2000-06-03 08:23:54 +00:00
Jim Meyering
f6639dbe36 *** empty log message *** 2000-06-03 08:19:42 +00:00
Jim Meyering
f29147b4a1 *** empty log message *** 2000-06-03 08:18:18 +00:00
Jim Meyering
757e85d993 *** empty log message *** 2000-06-03 08:15:24 +00:00
Jim Meyering
b662dfc657 Allow -v as synonym for --verbose, to be consistent with other fileutils. 2000-06-03 08:11:08 +00:00
Jim Meyering
8cb9b753c5 Allow -v as synonym for --verbose, to be consistent with other fileutils. 2000-06-03 08:10:37 +00:00
Jim Meyering
2d5e52c70d (usage): Document that -v is a synonym for --verbose. 2000-06-03 08:09:53 +00:00
Jim Meyering
4eb4f8c624 *** empty log message *** 2000-06-02 21:49:50 +00:00
Jim Meyering
59ee5c9f35 *** empty log message *** 2000-06-02 11:54:35 +00:00
Jim Meyering
209099c9d9 Back out last change. Instead, do this...
(read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
member using the same `ignore'-testing code.
2000-06-02 11:20:47 +00:00
Jim Meyering
8f245c6f2c (ME_DUMMY): Add `autofs' to the list of ignored fs_type strings.
From Mark D. Roth.
2000-06-02 11:20:30 +00:00
Jim Meyering
8208033b86 *** empty log message *** 2000-05-29 21:06:20 +00:00
Jim Meyering
afa54698c9 Adapt to fit new semantics of `cp -d'. 2000-05-29 21:05:22 +00:00
Jim Meyering
a4791b30ea *** empty log message *** 2000-05-29 21:05:13 +00:00
Jim Meyering
f06a2374fd Allow `cp -d -u' to copy one symlink onto another that's identical.
(copy_internal): Change the || to ^ in the big sameness
test, so copying one symlink onto another, identical one doesn't fail here.
If the symlink call fails, don't report the failure if the destination
already exists and is a symlink pointing to the proper name.
2000-05-29 21:05:07 +00:00
Jim Meyering
ff9eb12809 . 2000-05-29 20:44:25 +00:00
Jim Meyering
472729831e (TESTS): Add slink-2-slink. 2000-05-29 20:44:03 +00:00
Jim Meyering
4fc0af40aa *** empty log message *** 2000-05-29 20:41:10 +00:00
Jim Meyering
11c6d21d52 (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
with the `ignore' attribute.  Based on a patch from Mark D. Roth.
2000-05-29 16:23:45 +00:00
Jim Meyering
ab2c79328e *** empty log message *** 2000-05-29 16:23:04 +00:00
Jim Meyering
40acdda1b3 . 2000-05-29 16:22:03 +00:00
Jim Meyering
ad435461eb *** empty log message *** 2000-05-29 16:20:07 +00:00
Jim Meyering
8b59f3a9e5 *** empty log message *** 2000-05-29 15:43:12 +00:00
Jim Meyering
1a0017092d . 2000-05-28 21:29:14 +00:00
Jim Meyering
769aaffc24 bump serial number 2000-05-28 21:28:05 +00:00
Jim Meyering
2981d74992 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2000-05-28 21:27:04 +00:00
Jim Meyering
5ccb8ddd83 *** empty log message *** 2000-05-28 21:24:54 +00:00
Jim Meyering
6aff8653fe (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2000-05-28 21:24:42 +00:00
Jim Meyering
42cfd00757 . 2000-05-28 21:21:42 +00:00
Jim Meyering
3cec0fda7b *** empty log message *** 2000-05-28 17:36:36 +00:00
Jim Meyering
4957557813 s/jm_FUNC_STRERROR_R/AC_FUNC_STRERROR_R/. 2000-05-28 16:49:22 +00:00
Jim Meyering
619bbd4ce6 . 2000-05-28 16:48:25 +00:00
Jim Meyering
15a9b83bdd . 2000-05-27 21:26:50 +00:00
Jim Meyering
d73513786d Arrange to call close_stdout upon exit.
Don't close stdout explicitly.
(usage): Add missing backslash at end of line.
(write_header): Remove now-unused COMMENT parameter.
Update all callers.
2000-05-27 21:17:39 +00:00
Jim Meyering
8ccf29f7fe Arrange to call close_stdout upon exit.
Don't close stdout explicitly.  Replace uses of global constant,
output_desc, with uses of STDOUT_FILENO.
2000-05-27 21:14:26 +00:00
Jim Meyering
c8afcbe2e7 *** empty log message *** 2000-05-26 21:39:19 +00:00
Jim Meyering
37cbfc8c6b Use $cross_compiling', not $ac_cv_prog_cc_cross'. 2000-05-26 21:39:16 +00:00
Jim Meyering
40b91250bc *** empty log message *** 2000-05-25 07:14:22 +00:00
Jim Meyering
87da84ba81 (close_stdout_wrapper): Don't dereference NULL pointer.
From Bob Proulx.
2000-05-25 07:14:13 +00:00
Jim Meyering
8b45419759 *** empty log message *** 2000-05-24 07:50:18 +00:00
Jim Meyering
9ca281e5b3 Use []-quoted list in AC_CHECK_MEMBERS, now that autoconf requires that. 2000-05-24 07:50:05 +00:00
Jim Meyering
d2586a214a Use []-quoted list in AC_CHECK_MEMBERS, now that autoconf requires that. 2000-05-24 07:49:38 +00:00
Jim Meyering
429093f9ad (jm_LIB_CHECK): Use []-quoted list in
AC_CHECK_MEMBERS, now that autoconf requires that.
2000-05-24 07:49:09 +00:00
Jim Meyering
35aaf0b09d (jm_PREREQ_READUTMP): Use []-quoted list in
AC_CHECK_MEMBERS, now that autoconf requires that.
2000-05-24 07:48:04 +00:00
Jim Meyering
3ed09573d7 (jm_CHECK_DECLS): Use []-quoted list in AC_CHECK_DECLS,
now that autoconf requires that.
2000-05-24 07:46:55 +00:00
Jim Meyering
449fa131d6 (head_file): Use STDIN_FILENO in place of `0'.
(main): Likewise.
2000-05-24 07:10:12 +00:00
Jim Meyering
0de83d1d81 *** empty log message *** 2000-05-23 21:14:40 +00:00
Jim Meyering
2aeb21d67a Add traps to clean up.
Correct broken running-as-root test.
2000-05-23 21:14:33 +00:00
Jim Meyering
dfdfbc22b3 Exit 77 when run as root. Reported by Andreas Schwab. 2000-05-23 21:13:28 +00:00
Jim Meyering
5f3b8f3038 . 2000-05-23 08:42:18 +00:00
Jim Meyering
f29de82520 . 2000-05-22 22:08:15 +00:00
Jim Meyering
1117d0586a *** empty log message *** 2000-05-22 22:07:29 +00:00
Jim Meyering
36595ef3f7 Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. 2000-05-22 08:35:36 +00:00
Jim Meyering
b8c130d091 Remove old, now-unnecessary `#ifdef __MSDOS__' block. 2000-05-22 06:24:50 +00:00
Jim Meyering
b5431fdfdf *** empty log message *** 2000-05-21 07:14:41 +00:00
Jim Meyering
24f2bd8c9f Arrange to call close_stdout upon exit. Don't close stdout explicitly. 2000-05-20 22:06:38 +00:00
Jim Meyering
ac81803363 Arrange to call close_stdout upon exit. Don't close stdout explicitly. 2000-05-20 22:04:40 +00:00
Jim Meyering
b2c7c6055d Arrange to call close_stdout upon exit. Don't close stdout explicitly. 2000-05-20 22:04:16 +00:00
Jim Meyering
c75dc9689e Arrange to call close_stdout upon exit. Don't close stdout explicitly. 2000-05-20 22:03:55 +00:00
Jim Meyering
02f7878928 Arrange to call close_stdout upon exit. Don't close stdout explicitly.
(but set exit status and file name, too)
2000-05-20 22:03:12 +00:00
Jim Meyering
a311f0eac5 . 2000-05-20 21:48:55 +00:00
82 changed files with 586 additions and 306 deletions

2
THANKS
View File

@@ -15,6 +15,7 @@ Andreas Luik luik@isa.de
Andreas Schwab schwab@suse.de
Andreas Stolcke stolcke@ICSI.Berkeley.EDU
Andres Soolo andres@soolo.matti.ee
Andrew Burgess aab@cichlid.com
Andrew Dalke dalke@bioreason.com
Andrew Tridgell tridge@samba.org
Andries Brouwer Andries.Brouwer@cwi.nl
@@ -153,6 +154,7 @@ Marc Olzheim marcolz@stack.nl
Marco Franzen Marco.Franzen@Thyron.com
Marcus Daniels marcus@ee.pdx.edu
Mark A. Thomas thommark@access.digex.net
Mark D. Roth roth@uiuc.edu
Mark Harris mark@monitor.designacc.com
Mark Hewitt mhewitt@armature.com
Mark Kettenis kettenis@phys.uva.nl

View File

@@ -1,3 +1,37 @@
2000-06-04 Jim Meyering <meyering@lucent.com>
* getugroups.c (getugroups): Cast -1 to gid_t, for systems like
SunOS4.1.4 for which gid_t is an unsigned type.
2000-06-03 Jim Meyering <meyering@lucent.com>
* strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
2000-05-26 Bruno Haible <haible@clisp.cons.org>
* Makefile.am (install-exec-local): On systems with glibc-2.1 or
newer, don't install charset.alias.
* config.charset: Change the Linux/glibc rules so they become empty
on glibc-2.1 or newer.
2000-06-02 Jim Meyering <meyering@lucent.com>
* mountlist.c: Back out last change. Instead, do this...
* mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
member using the same `ignore'-testing code.
* mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
fs_type strings.
From Mark D. Roth.
2000-05-29 Jim Meyering <meyering@lucent.com>
* mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
with the `ignore' attribute. Based on a patch from Mark D. Roth.
2000-05-22 Jim Meyering <meyering@lucent.com>
* makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
2000-05-18 Jim Meyering <meyering@lucent.com>
* hash.c (hash_rehash): Fix a nasty bug: copy the free entry list

View File

@@ -59,6 +59,8 @@ stat.c: xstat.in
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed
@@ -66,12 +68,17 @@ charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
install-exec-local: all-local
$(mkinstalldirs) $(DESTDIR)$(libdir)
test -f $(charset_alias) \
&& orig=$(charset_alias) \
|| orig=charset.alias; \
sed -f ref-add.sed $$orig > $(charset_tmp)
$(INSTALL_DATA) $(charset_tmp) $(charset_alias)
rm -f $(charset_tmp)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test @GLIBC21@ = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \

View File

@@ -797,16 +797,23 @@ stat.c: xstat.in
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed
install-exec-local: all-local
$(mkinstalldirs) $(DESTDIR)$(libdir)
test -f $(charset_alias) \
&& orig=$(charset_alias) \
|| orig=charset.alias; \
sed -f ref-add.sed $$orig > $(charset_tmp)
$(INSTALL_DATA) $(charset_tmp) $(charset_alias)
rm -f $(charset_tmp)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test @GLIBC21@ = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \

View File

@@ -31,7 +31,7 @@
# The current list of GNU canonical charset names is as follows.
#
# name used by which systems a MIME name?
# ASCII glibc solaris
# ASCII, ANSI_X3.4-1968 glibc solaris
# ISO-8859-1 glibc aix hpux irix osf solaris yes
# ISO-8859-2 glibc aix hpux irix solaris yes
# ISO-8859-4 solaris yes
@@ -72,6 +72,9 @@
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).
#
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
# must understand both names and treat them as equivalent.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
@@ -86,11 +89,12 @@ echo "# It was automatically generated from config.charset."
echo "# Packages using this file: "
case "$os" in
linux* | *-gnu*)
# With glibc we don't need any canonicalization, because glibc
# supports all GNU canonical names directly.
echo "ANSI_X3.4-1968 ASCII" # this is a nop
echo "ISO_646.IRV:1983 ASCII" # this is a nop
echo "BALTIC ISO-8859-13" # in glibc-2.2 or newer, this is a nop
# With glibc-2.1 or newer, we don't need any canonicalization,
# because glibc has iconv and both glibc and libiconv support all
# GNU canonical names directly. Therefore, the Makefile does not
# need to install the alias file at all.
# The following applies only to glibc-2.0.x and older libcs.
echo "ISO_646.IRV:1983 ASCII"
;;
aix*)
echo "ISO8859-1 ISO-8859-1"

View File

@@ -1,5 +1,5 @@
/* getugroups.c -- return a list of the groups a user is in
Copyright (C) 1990, 1991, 1998, 1999 Free Software Foundation.
Copyright (C) 1990, 1991, 1998, 1999, 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
@@ -57,7 +57,7 @@ getugroups (int maxcount, GETGROUPS_T *grouplist, char *username, gid_t gid)
register char **cp;
register int count = 0;
if (gid != -1)
if (gid != (gid_t) -1)
{
if (maxcount != 0)
grouplist[count] = gid;

View File

@@ -114,11 +114,6 @@ extern int errno;
# define _(Text) Text
#endif
#ifdef __MSDOS__
typedef int uid_t;
typedef int gid_t;
#endif
#include "save-cwd.h"
#include "error.h"

View File

@@ -1,5 +1,5 @@
/* mountlist.c -- return a list of mounted filesystems
Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1991, 1992, 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
@@ -40,7 +40,6 @@ char *strstr ();
char *xmalloc ();
char *xrealloc ();
char *xstrdup ();
void error ();
#include <errno.h>
#ifndef errno
@@ -725,6 +724,8 @@ read_filesystem_list (int need_fs_type)
for (thisent = entries; thisent < entries + bufsize;
thisent += vmp->vmt_length)
{
char *options, *ignore;
vmp = (struct vmount *) thisent;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
@@ -748,7 +749,12 @@ read_filesystem_list (int need_fs_type)
}
me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype));
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off;
ignore = strstr (options, "ignore");
me->me_dummy = (ignore
&& (ignore == options || ignore[-1] == ',')
&& (ignore[sizeof "ignore" - 1] == ','
|| ignore[sizeof "ignore" - 1] == '\0'));
me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */
/* Add to the linked list. */

View File

@@ -1,5 +1,5 @@
/* mountlist.h -- declarations for list of mounted filesystems
Copyright (C) 1991, 1992, 1998 Free Software Foundation, Inc.
Copyright (C) 1991, 1992, 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
@@ -39,7 +39,10 @@ struct mount_entry *read_filesystem_list PARAMS ((int need_fs_type));
#ifndef ME_DUMMY
# define ME_DUMMY(fs_name, fs_type) \
(!strcmp (fs_type, "auto") || !strcmp (fs_type, "ignore"))
(!strcmp (fs_type, "auto") \
|| !strcmp (fs_type, "autofs") \
/* for Irix 6.5 */ \
|| !strcmp (fs_type, "ignore"))
#endif
#ifndef ME_REMOTE

View File

@@ -19,6 +19,13 @@
#include <string.h>
#ifndef HAVE_DECL_MEMCHR
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL_MEMCHR
char *memchr ();
#endif
#undef __strnlen
#undef strnlen

View File

@@ -1,3 +1,48 @@
2000-06-03 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
now that autoconf requires that.
* jm-glibc-io.m4: Add a kludge to make autoheader emit the required
#undefs. E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
2000-05-26 Bruno Haible <haible@clisp.cons.org>
* glibc21.m4: New file.
* jm-macros.m4: (jm_MACROS): Call jm_GLIBC21.
2000-05-28 Jim Meyering <meyering@lucent.com>
* jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
* stat.m4: Likewise.
* lstat.m4: Likewise.
* lstat-slash.m4: Remove file (absorbed into autoconf).
* jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
* strerror_r.m4: Remove file (absorbed into autoconf).
2000-05-26 Jim Meyering <meyering@lucent.com>
* uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
2000-05-24 Jim Meyering <meyering@lucent.com>
* prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
autoconf requires that.
* lib-check.m4: Likewise.
* jm-macros.m4: Likewise.
* strftime.m4: Likewise.
* check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in AC_CHECK_DECLS,
now that autoconf requires that.
2000-05-22 Jim Meyering <meyering@lucent.com>
* stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
* lstat.m4: Likewise.
2000-05-20 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_HUMAN): New macro.

View File

@@ -20,6 +20,7 @@ getgroups.m4 \
getline.m4 \
getloadavg.m4 \
glibc.m4 \
glibc21.m4 \
group-member.m4 \
iconv.m4 \
inttypes_h.m4 \
@@ -36,7 +37,6 @@ lib-check.m4 \
libintl.m4 \
link-follow.m4 \
ls-mntd-fs.m4 \
lstat-slash.m4 \
lstat.m4 \
malloc.m4 \
memcmp.m4 \
@@ -53,7 +53,6 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \

View File

@@ -133,6 +133,7 @@ getgroups.m4 \
getline.m4 \
getloadavg.m4 \
glibc.m4 \
glibc21.m4 \
group-member.m4 \
iconv.m4 \
inttypes_h.m4 \
@@ -149,7 +150,6 @@ lib-check.m4 \
libintl.m4 \
link-follow.m4 \
ls-mntd-fs.m4 \
lstat-slash.m4 \
lstat.m4 \
malloc.m4 \
memcmp.m4 \
@@ -166,7 +166,6 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \

View File

@@ -1,4 +1,4 @@
#serial 11
#serial 12
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
@@ -43,7 +43,7 @@ AC_DEFUN(jm_CHECK_DECLS,
#endif
'
AC_CHECK_DECLS((
AC_CHECK_DECLS([
free,
getenv,
geteuid,
@@ -59,7 +59,7 @@ AC_DEFUN(jm_CHECK_DECLS,
strstr,
strtoul,
strtoull,
ttyname), , , $headers)
ttyname], , , $headers)
])
dnl FIXME: when autoconf has support for it.

26
m4/glibc21.m4 Normal file
View File

@@ -0,0 +1,26 @@
#serial 1
# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.
AC_DEFUN(jm_GLIBC21,
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
ac_cv_gnu_library_2_1,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2_1=yes,
ac_cv_gnu_library_2_1=no)
]
)
AC_DEFINE_UNQUOTED(GLIBC21, $ac_cv_gnu_library_2_1,
[we use GNU C Library 2.1 or newer])
]
)

View File

@@ -1,4 +1,4 @@
#serial 3
#serial 4
dnl From Jim Meyering.
dnl
@@ -8,6 +8,13 @@ dnl
AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
[
# Kludge (not executed) to make autoheader do the right thing.
if test a = b; then
AC_CHECK_DECLS([clearerr_unlocked, feof_unlocked, ferror_unlocked,
fflush_unlocked, fputc_unlocked, fread_unlocked, fwrite_unlocked,
getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked])
fi
io_functions='clearerr_unlocked feof_unlocked ferror_unlocked
fflush_unlocked fputc_unlocked fread_unlocked fwrite_unlocked
getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked'
@@ -16,7 +23,7 @@ AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
# Otherwise, we'd get the Solaris5.5.1 functions that are not
# declared, and that have been removed from Solaris5.6. The resulting
# 5.5.1 binaries would not run on 5.6 due to shared library differences.
AC_CHECK_DECLS(($jm_io_func),
AC_CHECK_DECLS([$jm_io_func],
jm_declared=yes,
jm_declared=no,
[#include <stdio.h>])

View File

@@ -1,4 +1,4 @@
#serial 17
#serial 19
dnl Misc type-related macros for fileutils, sh-utils, textutils.
@@ -74,11 +74,11 @@ AC_DEFUN(jm_MACROS,
AC_REQUIRE([jm_FUNC_CHOWN])
AC_REQUIRE([jm_FUNC_MKTIME])
AC_REQUIRE([jm_FUNC_LSTAT])
AC_REQUIRE([jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
AC_REQUIRE([jm_FUNC_STAT])
AC_REQUIRE([jm_FUNC_REALLOC])
AC_REQUIRE([jm_FUNC_MALLOC])
AC_REQUIRE([jm_FUNC_STRERROR_R])
AC_REQUIRE([AC_FUNC_STRERROR_R])
AC_REQUIRE([jm_FUNC_NANOSLEEP])
AC_REQUIRE([jm_FUNC_READDIR])
AC_REQUIRE([jm_FUNC_MEMCMP])
@@ -188,7 +188,7 @@ AC_DEFUN(jm_MACROS,
test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
jm_LANGINFO_CODESET
jm_GLIBC21
jm_ICONV
# These tests are for df.
@@ -232,7 +232,7 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_MEMBERS((struct stat.st_blksize),,,[$ac_includes_default
AC_CHECK_MEMBERS([struct stat.st_blksize],,,[$ac_includes_default
#include <sys/stat.h>
])
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])

View File

@@ -1,4 +1,4 @@
#serial 3
#serial 4
dnl Misc lib-related macros for fileutils, sh-utils, textutils.
@@ -51,7 +51,7 @@ $ac_includes_default
# include <shadow.h>
#endif
"
AC_CHECK_MEMBERS((struct spwd.sp_pwdp),,,[$shadow_includes])
AC_CHECK_MEMBERS([struct spwd.sp_pwdp],,,[$shadow_includes])
AC_CHECK_FUNCS(getspnam)
# SCO-ODT-3.0 is reported to need -lufc for crypt.

View File

@@ -1,57 +0,0 @@
#serial 1
dnl From Jim Meyering.
dnl FIXME: describe
AC_DEFUN(jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
[
AC_CACHE_CHECK(
[whether lstat dereferences a symlink specified with a trailing slash],
jm_cv_func_lstat_dereferences_slashed_symlink,
[
rm -f conftest.sym conftest.file
: > conftest.file
if ln -s conftest.file conftest.sym; then
AC_TRY_RUN([
# include <sys/types.h>
# include <sys/stat.h>
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
}
],
jm_cv_func_lstat_dereferences_slashed_symlink=yes,
jm_cv_func_lstat_dereferences_slashed_symlink=no,
dnl When crosscompiling, be pessimistic so we will end up using the
dnl replacement version of lstat that checkes for trailing slashes
dnl and calls lstat a second time when necessary.
jm_cv_func_lstat_dereferences_slashed_symlink=no
)
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
jm_cv_func_lstat_dereferences_slashed_symlink=no
fi
])
test $jm_cv_func_lstat_dereferences_slashed_symlink = yes \
&& zero_one=1 \
|| zero_one=0
AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, $zero_one,
[Define if lstat dereferences a symlink specified with a trailing slash])
if test $jm_cv_func_lstat_dereferences_slashed_symlink = no; then
AC_SUBST(LIBOBJS)
# Append lstat.o if it's not already in $LIBOBJS.
case "$LIBOBJS" in
*lstat.$ac_objext*) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;;
esac
fi
])

View File

@@ -1,4 +1,4 @@
#serial 3
#serial 5
dnl From Jim Meyering.
dnl Determine whether lstat has the bug that it succeeds when given the
@@ -11,6 +11,7 @@ dnl
AC_DEFUN(jm_FUNC_LSTAT,
[
AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
AC_CACHE_CHECK([whether lstat accepts an empty string],
jm_cv_func_lstat_empty_string_bug,
[AC_TRY_RUN([

View File

@@ -1,4 +1,4 @@
#serial 7
#serial 9
dnl These are the prerequisite macros for files in the lib/
dnl directories of the fileutils, sh-utils, and textutils packages.
@@ -43,7 +43,7 @@ AC_DEFUN(jm_PREREQ_CANON_HOST,
AC_DEFUN(jm_PREREQ_HUMAN,
[
AC_CHECK_HEADERS(limits.h stdlib.h string.h)
AC_CHECK_DECLS((getenv))
AC_CHECK_DECLS([getenv])
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
])
@@ -79,10 +79,10 @@ $ac_includes_default
# include <utmp.h>
#endif
"
AC_CHECK_MEMBERS((struct utmpx.ut_user),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmp.ut_user),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmpx.ut_name),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmp.ut_name),,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmpx.ut_user],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes])
AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes])
])
AC_DEFUN(jm_PREREQ_REGEX,

View File

@@ -1,4 +1,4 @@
#serial 3
#serial 5
dnl From Jim Meyering.
dnl Determine whether stat has the bug that it succeeds when given the
@@ -11,6 +11,7 @@ dnl
AC_DEFUN(jm_FUNC_STAT,
[
AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
AC_CACHE_CHECK([whether stat accepts an empty string],
jm_cv_func_stat_empty_string_bug,
[AC_TRY_RUN([

View File

@@ -1,40 +0,0 @@
#serial 2
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] and HP-UX B.10.20, strerror_r
dnl returns `int'. 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
])

View File

@@ -1,4 +1,4 @@
#serial 13
#serial 14
dnl This macro is intended to be used solely in this file.
dnl These are the prerequisite macros for GNU's strftime.c replacement.
@@ -16,7 +16,7 @@ AC_DEFUN(_jm_STRFTIME_PREREQS,
AC_CHECK_FUNCS(mblen mbrlen)
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
[Define if struct tm has the tm_gmtoff member.])],
,

View File

@@ -1,4 +1,4 @@
#serial 2
#serial 3
AC_PREREQ(2.13)
@@ -8,7 +8,7 @@ AC_DEFUN(jm_SYS_PROC_UPTIME,
AC_CACHE_CHECK([for /proc/uptime], jm_cv_have_proc_uptime,
[jm_cv_have_proc_uptime=no
test -f /proc/uptime \
&& test $ac_cv_prog_cc_cross = no \
&& test $cross_compiling = no \
&& cat < /proc/uptime >/dev/null 2>/dev/null \
&& jm_cv_have_proc_uptime=yes])
if test $jm_cv_have_proc_uptime = yes; then

View File

@@ -1,3 +1,47 @@
2000-06-04 Jim Meyering <meyering@lucent.com>
* Version 4.0t.
* src/df.c (show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]:
Cast undeclared `realpath' to char* to avoid warning.
2000-06-03 Jim Meyering <meyering@lucent.com>
* src/install.c (usage): Document that -v is a synonym for --verbose.
* src/mkdir.c: Allow -v as synonym for --verbose, to be consistent
with other fileutils.
* src/rmdir.c: Likewise.
Suggestion from François Pinard.
2000-06-02 Jim Meyering <meyering@lucent.com>
* configure.in (ALL_LINGUAS): Add Danish (da).
2000-05-29 Jim Meyering <meyering@lucent.com>
Allow `cp -d -u' to copy one symlink onto another that's identical.
* src/copy.c (copy_internal): Change the || to ^ in the big sameness
test, so copying one symlink onto another, identical one doesn't fail
here.
If the symlink call fails, don't report the failure if the destination
already exists and is a symlink pointing to the proper name.
Reported by Andrew Burgess.
* tests/cp/slink-2-slink: New test.
* tests/cp/Makefile.am (TESTS): Add slink-2-slink.
* tests/cp/same-file: Adapt to fit new semantics of `cp -d'.
2000-05-25 Jim Meyering <meyering@lucent.com>
* src/dd.c (close_stdout_wrapper): Don't dereference NULL pointer.
From Bob Proulx.
2000-05-23 Jim Meyering <meyering@lucent.com>
* tests/shred/remove: Add traps to clean up.
Correct broken running-as-root test.
* tests/mv/i-2: Exit 77 when run as root. Reported by Andreas Schwab.
2000-05-20 Jim Meyering <meyering@lucent.com>
* Version 4.0s.

View File

@@ -1,4 +1,6 @@
Changes in release 4.1:
[4.0t]
* rmdir and mkdir accept -v as synonym for --verbose
[4.0s]
* rm no longer segfaults on certain very deep hierarchies
* IMPORTANT SECURITY FIX: a running `rm -r' may no longer be subverted to

View File

@@ -1,3 +1,14 @@
2000-05-29 Jim Meyering <meyering@lucent.com>
* tests/nice: Remove now-unused reference to srcdir.
* src/help-version: Use `WARNING', not just `Warning' in the
broken-/bin/sh diagnostic, to be consistent with other such warnings.
2000-05-21 Jim Meyering <meyering@lucent.com>
* tests/nice: Disable test on djgpp.
2000-05-15 Jim Meyering <meyering@lucent.com>
* tests/date/Test.pm (test_vector): Skip the %c test on SunOS4 systems.

View File

@@ -1,3 +1,54 @@
2000-05-27 Jim Meyering <meyering@lucent.com>
* src/tail.c: Arrange to call close_stdout upon exit.
Don't close stdout explicitly.
(usage): Add missing backslash at end of line.
(write_header): Remove now-unused COMMENT parameter.
Update all callers.
2000-05-24 Jim Meyering <meyering@lucent.com>
* src/head.c (head_file): Use STDIN_FILENO in place of `0'.
(main): Likewise.
2000-05-20 Jim Meyering <meyering@lucent.com>
* src/cat.c: Arrange to call close_stdout upon exit.
Don't close stdout explicitly. Replace uses of global constant,
output_desc, with uses of STDOUT_FILENO.
* src/tail.c: FIXME
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
* src/cksum.c: Likewise.
* src/comm.c: Likewise.
* src/csplit.c: Likewise.
* src/cut.c: Likewise.
* src/expand.c: Likewise.
* src/fmt.c: Likewise.
* src/fold.c: Likewise.
* src/head.c: Likewise.
* src/join.c: Likewise.
* src/md5sum.c: Likewise.
* src/nl.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/pr.c: Likewise.
* src/ptx.c: Likewise.
* src/sort.c: Likewise. (but set exit status and file name, too)
* src/split.c: Likewise.
* src/sum.c: Likewise.
* src/tac.c: Likewise.
* src/tr.c: Likewise.
* src/tsort.c: Likewise.
* src/unexpand.c: Likewise.
* src/uniq.c: Likewise.
* src/wc.c:: Likewise.
2000-05-13 Jim Meyering <meyering@lucent.com>
* src/help-version: Run each program successfully at least once.
2000-05-12 Jim Meyering <meyering@lucent.com>
* src/head.c (string_to_integer): Restrict base to 10.

View File

@@ -1,5 +1,5 @@
/* cat -- concatenate files and print on the standard output.
Copyright (C) 88, 90, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 88, 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
@@ -31,6 +31,7 @@
# include <sys/ioctl.h>
#endif
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "safe-read.h"
@@ -54,9 +55,6 @@ static char *infile;
/* Descriptor on which input file is open. */
static int input_desc;
/* Descriptor on which output file is open. Always is 1. */
static int output_desc;
/* Buffer for line numbers. */
static char line_buf[13] =
{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '0', '\t', '\0'};
@@ -136,8 +134,7 @@ next_line_num (void)
line_num_print--;
}
/* Plain cat. Copies the file behind `input_desc' to the file behind
`output_desc'. */
/* Plain cat. Copies the file behind `input_desc' to STDOUT_FILENO. */
static void
simple_cat (
@@ -172,7 +169,7 @@ simple_cat (
/* Write this block out. */
if (full_write (output_desc, buf, n_read) < 0)
if (full_write (STDOUT_FILENO, buf, n_read) < 0)
error (EXIT_FAILURE, errno, _("write error"));
}
}
@@ -253,7 +250,7 @@ cat (
unsigned char *wp = outbuf;
do
{
if (full_write (output_desc, wp, outsize) < 0)
if (full_write (STDOUT_FILENO, wp, outsize) < 0)
error (EXIT_FAILURE, errno, _("write error"));
wp += outsize;
}
@@ -306,7 +303,7 @@ cat (
{
int n_write = bpout - outbuf;
if (full_write (output_desc, outbuf, n_write) < 0)
if (full_write (STDOUT_FILENO, outbuf, n_write) < 0)
error (EXIT_FAILURE, errno, _("write error"));
bpout = outbuf;
}
@@ -465,6 +462,17 @@ cat (
}
}
/* This is gross, but necessary, because of the way close_stdout
works and because this program closes STDOUT_FILENO directly. */
static void (*closeout_func) (void) = close_stdout;
static void
close_stdout_wrapper (void)
{
if (closeout_func)
(*closeout_func) ();
}
int
main (int argc, char **argv)
{
@@ -537,6 +545,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
/* Parse command line options. */
while ((c = getopt_long (argc, argv,
@@ -622,11 +632,11 @@ main (int argc, char **argv)
}
}
output_desc = 1;
closeout_func = NULL;
/* Get device, i-node number, and optimal blocksize of output. */
if (fstat (output_desc, &stat_buf) < 0)
if (fstat (STDOUT_FILENO, &stat_buf) < 0)
error (EXIT_FAILURE, errno, _("standard output"));
outsize = ST_BLKSIZE (stat_buf);
@@ -659,13 +669,13 @@ main (int argc, char **argv)
with only CR-LF is an empty line. (Besides, if they ask for
one of these options, they don't care much about the original
file contents anyway). */
if ((!isatty (output_desc)
if ((!isatty (STDOUT_FILENO)
&& !(numbers || squeeze_empty_lines || mark_line_ends))
|| binary_files)
{
/* Switch stdout to BINARY mode. */
binary_output = 1;
SET_BINARY (output_desc);
SET_BINARY (STDOUT_FILENO);
/* When stdout is in binary mode, make sure all input files are
also read in binary mode. */
file_open_mode |= O_BINARY;
@@ -681,8 +691,8 @@ main (int argc, char **argv)
/* Setting stdin to binary switches the console device to
raw I/O, which also affects stdout to console. Undo that. */
if (isatty (output_desc))
setmode (output_desc, O_TEXT);
if (isatty (STDOUT_FILENO))
setmode (STDOUT_FILENO, O_TEXT);
}
#endif
@@ -715,7 +725,7 @@ main (int argc, char **argv)
This is so "cat > xyzzy" creates a DOS-style text
file, like people expect. */
if (tty_in && optind <= argc)
setmode (output_desc, O_TEXT);
setmode (STDOUT_FILENO, O_TEXT);
else
{
SET_BINARY (input_desc);
@@ -756,7 +766,7 @@ main (int argc, char **argv)
if (check_redirection
&& stat_buf.st_dev == out_dev && stat_buf.st_ino == out_ino
&& (input_desc != STDIN_FILENO || output_desc != STDOUT_FILENO))
&& (input_desc != STDIN_FILENO))
{
error (0, 0, _("%s: input file is output file"), infile);
exit_status = 1;
@@ -816,8 +826,6 @@ main (int argc, char **argv)
if (have_read_stdin && close (0) < 0)
error (EXIT_FAILURE, errno, "-");
if (close (1) < 0)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -113,6 +113,7 @@ main ()
# include <getopt.h>
# include <sys/types.h>
# include "system.h"
# include "closeout.h"
# include "long-options.h"
# include "error.h"
@@ -293,6 +294,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
AUTHORS, usage);

View File

@@ -1,5 +1,5 @@
/* comm -- compare two sorted files line by line.
Copyright (C) 86, 90, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 86, 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
@@ -23,6 +23,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "linebuffer.h"
#include "error.h"
#include "hard-locale.h"
@@ -215,11 +216,6 @@ compare_files (char **infiles)
ret = 1;
}
}
if (ferror (stdout) || fclose (stdout) == EOF)
{
error (0, errno, _("write error"));
ret = 1;
}
return ret;
}
@@ -233,6 +229,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
#ifdef ENABLE_NLS
hard_LC_COLLATE = hard_locale (LC_COLLATE);
#endif

View File

@@ -448,7 +448,7 @@ copy_internal (const char *src_path, const char *dst_path,
&& S_ISLNK (src_sb.st_mode)
&& !S_ISLNK (dst_sb.st_mode)))
&& !x->dereference
&& (S_ISLNK (dst_sb.st_mode) || S_ISLNK (src_sb.st_mode)))
&& (S_ISLNK (dst_sb.st_mode) ^ S_ISLNK (src_sb.st_mode)))
{
struct stat dst2_sb;
struct stat src2_sb;
@@ -848,8 +848,28 @@ copy_internal (const char *src_path, const char *dst_path,
if (symlink (link_val, dst_path))
{
error (0, errno, _("cannot create symbolic link `%s'"), dst_path);
goto un_backup;
int saved_errno = errno;
int same_link = 0;
if (x->update && !new_dst && S_ISLNK (dst_sb.st_mode))
{
/* See if the destination is already the desired symlink. */
char *dest_link_name = (char *) alloca (PATH_MAX + 2);
int dest_link_len = readlink (dst_path, dest_link_name,
PATH_MAX + 1);
if (dest_link_len > 0)
{
dest_link_name[dest_link_len] = '\0';
if (STREQ (dest_link_name, link_val))
same_link = 1;
}
}
if (! same_link)
{
error (0, saved_errno, _("cannot create symbolic link `%s'"),
dst_path);
goto un_backup;
}
}
if (x->preserve_owner_and_group)

View File

@@ -27,6 +27,7 @@
#include <signal.h>
#include "system.h"
#include "closeout.h"
#include <regex.h>
@@ -1383,6 +1384,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
global_argv = argv;
controls = NULL;
control_used = 0;
@@ -1489,9 +1492,6 @@ main (int argc, char **argv)
cleanup_fatal ();
}
if (!suppress_count && (ferror (stdout) || fclose (stdout) == EOF))
error (EXIT_FAILURE, errno, _("write error"));
exit (EXIT_SUCCESS);
}

View File

@@ -64,6 +64,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -698,6 +699,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
operating_mode = undefined_mode;
/* By default, all non-delimited lines are printed. */
@@ -798,8 +801,6 @@ main (int argc, char **argv)
error (0, errno, "-");
exit_status = 1;
}
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -1055,7 +1055,7 @@ static void (*closeout_func) (void) = close_stdout;
static void
close_stdout_wrapper (void)
{
if (*closeout_func)
if (closeout_func)
(*closeout_func) ();
}

View File

@@ -576,7 +576,7 @@ show_point (const char *point, const struct stat *statp)
}
# else
resolved = alloca (PATH_MAX + 1);
resolved = realpath (abspoint, resolved);
resolved = (char *) realpath (abspoint, resolved);
resolved_len = resolved ? strlen (resolved) : -1;
# endif

View File

@@ -1,5 +1,5 @@
/* expand - convert tabs to spaces
Copyright (C) 89, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 89, 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
@@ -39,6 +39,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -339,6 +340,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
while ((c = getopt_long (argc, argv, "it:,0123456789", longopts, NULL)) != -1)
{
switch (c)
@@ -388,8 +391,6 @@ main (int argc, char **argv)
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, "-");
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -1,5 +1,5 @@
/* GNU fmt -- simple text formatter.
Copyright (C) 1994-1999 Free Software Foundation, Inc.
Copyright (C) 1994-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
@@ -27,6 +27,7 @@
#define word unused_word_type
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -316,6 +317,8 @@ main (register int argc, register char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
crown = tagged = split = uniform = FALSE;
max_width = WIDTH;
prefix = "";
@@ -412,9 +415,6 @@ main (register int argc, register char **argv)
}
}
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (EXIT_SUCCESS);
}

View File

@@ -1,5 +1,5 @@
/* fold -- wrap each input line to fit in specified width.
Copyright (C) 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 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
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -242,6 +243,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
break_spaces = count_bytes = have_read_stdin = 0;
/* Turn any numeric options into -w options. */
@@ -302,8 +305,6 @@ main (int argc, char **argv)
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, "-");
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (errs == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -30,6 +30,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
#include "safe-read.h"
@@ -191,7 +192,7 @@ head_file (const char *filename, uintmax_t n_units, int count_lines)
filename = _("standard input");
if (print_headers)
write_header (filename);
return head (filename, 0, n_units, count_lines);
return head (filename, STDIN_FILENO, n_units, count_lines);
}
else
{
@@ -263,6 +264,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
print_headers = 0;
@@ -381,10 +384,8 @@ main (int argc, char **argv)
for (; optind < argc; ++optind)
exit_status |= head_file (argv[optind], n_units, count_lines);
if (have_read_stdin && close (0) < 0)
if (have_read_stdin && close (STDIN_FILENO) < 0)
error (EXIT_FAILURE, errno, "-");
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -658,7 +658,7 @@ In the third format, create all components of the given DIRECTORY(ies).\n\
to corresponding destination files\n\
-s, --strip strip symbol tables, only for 1st and 2nd formats\n\
-S, --suffix=SUFFIX override the usual backup suffix\n\
--verbose print the name of each directory as it is created\n\
-v, --verbose print the name of each directory as it is created\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\

View File

@@ -25,6 +25,7 @@
#include <getopt.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "hard-locale.h"
#include "linebuffer.h"
@@ -737,6 +738,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
#ifdef ENABLE_NLS
hard_LC_COLLATE = hard_locale (LC_COLLATE);
#endif
@@ -868,8 +871,6 @@ main (int argc, char **argv)
error (EXIT_FAILURE, errno, "%s", names[1]);
if ((fp1 == stdin || fp2 == stdin) && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, "-");
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (EXIT_SUCCESS);
}

View File

@@ -1,6 +1,6 @@
/* Compute MD5 checksum of files or strings according to the definition
of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995-1999 Free Software Foundation, Inc.
Copyright (C) 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
@@ -29,6 +29,7 @@
#include "md5.h"
#include "getline.h"
#include "system.h"
#include "closeout.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -472,6 +473,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL)) != -1)
switch (opt)
{
@@ -625,9 +628,6 @@ verifying checksums"));
}
}
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));

View File

@@ -46,7 +46,7 @@ static struct option const longopts[] =
{
{"mode", required_argument, NULL, 'm'},
{"parents", no_argument, NULL, 'p'},
{"verbose", no_argument, NULL, 2},
{"verbose", no_argument, NULL, 'v'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
@@ -66,7 +66,7 @@ Create the DIRECTORY(ies), if they do not already exist.\n\
\n\
-m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask\n\
-p, --parents no error if existing, make parent directories as needed\n\
--verbose print a message for each created directory\n\
-v, --verbose print a message for each created directory\n\
--help display this help and exit\n\
--version output version information and exit\n\
"));
@@ -94,7 +94,7 @@ main (int argc, char **argv)
create_parents = 0;
while ((optc = getopt_long (argc, argv, "pm:", longopts, NULL)) != -1)
while ((optc = getopt_long (argc, argv, "pm:v", longopts, NULL)) != -1)
{
switch (optc)
{
@@ -106,7 +106,7 @@ main (int argc, char **argv)
case 'm':
symbolic_mode = optarg;
break;
case 2: /* --verbose */
case 'v': /* --verbose */
verbose_fmt_string = _("created directory `%s'");
break;
case_GETOPT_HELP_CHAR;

View File

@@ -1,5 +1,5 @@
/* nl -- number lines of files
Copyright (C) 89, 92, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 89, 92, 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
@@ -25,6 +25,7 @@
#include <getopt.h>
#include "system.h"
#include "closeout.h"
#include <regex.h>
@@ -362,7 +363,7 @@ static enum section
check_section (void)
{
size_t len = line_buf.length - 1;
if (len < 2 || memcmp (line_buf.buffer, section_del, 2))
return Text;
if (len == header_del_len
@@ -453,6 +454,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,
@@ -604,8 +607,6 @@ main (int argc, char **argv)
error (0, errno, "-");
exit_status = 1;
}
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -1,5 +1,5 @@
/* od -- dump files in octal and other formats
Copyright (C) 92, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 92, 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
@@ -24,6 +24,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -1584,6 +1585,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
err = 0;
for (i = 0; i <= MAX_INTEGRAL_TYPE_SIZE; i++)
@@ -1928,8 +1931,5 @@ cleanup:;
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (err == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -41,6 +41,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -430,6 +431,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
serial_merge = 0;
delims = default_delims;
@@ -474,7 +477,5 @@ main (int argc, char **argv)
exit_status = paste_serial (argc - optind, &argv[optind]);
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, "-");
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -318,6 +318,7 @@
#include <sys/types.h>
#include <time.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -853,6 +854,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
n_files = 0;
file_names = (argc > 1
? (char **) xmalloc ((argc - 1) * sizeof (char *))
@@ -1162,8 +1165,6 @@ main (int argc, char **argv)
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
if (failed_opens > 0)
exit (EXIT_FAILURE);
exit (EXIT_SUCCESS);

View File

@@ -1,5 +1,5 @@
/* Permuted index for GNU, with keywords in their context.
Copyright (C) 1990, 1991, 1993, 1998-1999 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1993, 1998-2000 Free Software Foundation, Inc.
François Pinard <pinard@iro.umontreal.ca>, 1988.
This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "argmatch.h"
#include "bumpalloc.h"
#include "diacrit.h"
@@ -1942,6 +1943,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
#if HAVE_SETCHRCLASS
setchrclass (NULL);
#endif
@@ -2111,6 +2114,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"),
if (optind < argc)
{
/* FIXME: don't fclose here? */
fclose (stdout);
if (fopen (argv[optind], "w") == NULL)
error (EXIT_FAILURE, errno, "%s", argv[optind]);

View File

@@ -74,7 +74,7 @@ static struct option const longopts[] =
{"path", no_argument, NULL, 'p'},
{"parents", no_argument, NULL, 'p'},
{"verbose", no_argument, NULL, 14},
{"verbose", no_argument, NULL, 'v'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
@@ -152,7 +152,7 @@ Remove the DIRECTORY(ies), if they are empty.\n\
-p, --parents remove DIRECTORY, then try to remove each directory\n\
component of that path name. E.g., `rmdir -p a/b/c' is\n\
similar to `rmdir a/b/c a/b a'.\n\
--verbose output a diagnostic for every directory processed\n\
-v, --verbose output a diagnostic for every directory processed\n\
--help display this help and exit\n\
--version output version information and exit\n\
"));
@@ -176,7 +176,7 @@ main (int argc, char **argv)
empty_paths = 0;
while ((optc = getopt_long (argc, argv, "p", longopts, NULL)) != -1)
while ((optc = getopt_long (argc, argv, "pv", longopts, NULL)) != -1)
{
switch (optc)
{
@@ -188,7 +188,7 @@ main (int argc, char **argv)
case IGNORE_FAIL_ON_NON_EMPTY_OPTION:
ignore_fail_on_non_empty = 1;
break;
case 14:
case 'v':
verbose = 1;
break;
case_GETOPT_HELP_CHAR;

View File

@@ -28,6 +28,7 @@
#include <stdio.h>
#include <assert.h>
#include "system.h"
#include "closeout.h"
#include "long-options.h"
#include "error.h"
#include "hard-locale.h"
@@ -1854,6 +1855,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
close_stdout_set_status (SORT_FAILURE);
atexit (close_stdout);
#ifdef ENABLE_NLS
hard_LC_COLLATE = hard_locale (LC_COLLATE);
@@ -2123,6 +2127,7 @@ but lacks following character offset"));
else
outfile = argv[++i];
}
close_stdout_set_file_name (outfile);
goto outer;
case 's':
stable = 1;
@@ -2221,6 +2226,7 @@ but lacks following character offset"));
struct stat outstat;
if (stat (outfile, &outstat) == 0)
{
/* FIXME: warn about this */
/* The following code prevents a race condition when
people use the brain dead shell programming idiom:
cat file | sort -o file
@@ -2317,8 +2323,6 @@ but lacks following character offset"));
if (have_read_stdin && fclose (stdin) == EOF)
error (SORT_FAILURE, errno, "%s", outfile);
if (ferror (stdout) || fclose (stdout) == EOF)
error (SORT_FAILURE, errno, _("%s: write error"), outfile);
exit (EXIT_SUCCESS);
}

View File

@@ -1,5 +1,5 @@
/* split.c -- split a file into pieces.
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
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "safe-read.h"
#include "xstrtol.h"
@@ -348,6 +349,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
/* Parse command line options. */
infile = "-";

View File

@@ -1,5 +1,5 @@
/* sum -- checksum and count the blocks in a file
Copyright (C) 86, 89, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 86, 89, 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
@@ -25,6 +25,7 @@
#include <sys/types.h>
#include <getopt.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "safe-read.h"
@@ -213,6 +214,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
while ((optc = getopt_long (argc, argv, "rs", longopts, NULL)) != -1)

View File

@@ -1,5 +1,5 @@
/* tac - concatenate and print files in reverse
Copyright (C) 1988-1991, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 1988-1991, 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
@@ -41,6 +41,7 @@ tac -r -s '.\|
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include <regex.h>
@@ -615,6 +616,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
errors = 0;
separator = "\n";
sentinel_length = 1;
@@ -711,7 +714,5 @@ main (int argc, char **argv)
if (have_read_stdin && close (0) < 0)
error (EXIT_FAILURE, errno, "-");
if (ferror (stdout) || fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -32,6 +32,7 @@
#include <signal.h>
#include "system.h"
#include "closeout.h"
#include "argmatch.h"
#include "error.h"
#include "safe-read.h"
@@ -261,7 +262,7 @@ With no FILE, or when FILE is -, read standard input.\n\
with --follow=name, reopen a FILE which has not\n\
changed size after N (default %d) iterations\n\
to see if it has been unlinked or renamed\n\
(this is the usual case of rotated log files)\n
(this is the usual case of rotated log files)\n\
--pid=PID with -f, terminate after process ID, PID dies\n\
-q, --quiet, --silent never output headers giving file names\n\
-s, --sleep-interval=S with -f, each iteration lasts approximately S\n\
@@ -327,13 +328,11 @@ close_fd (int fd, const char *filename)
}
static void
write_header (const char *pretty_filename, const char *comment)
write_header (const char *pretty_filename)
{
static int first_file = 1;
printf ("%s==> %s%s%s <==\n", (first_file ? "" : "\n"), pretty_filename,
(comment ? ": " : ""),
(comment ? comment : ""));
printf ("%s==> %s <==\n", (first_file ? "" : "\n"), pretty_filename);
first_file = 0;
}
@@ -934,7 +933,7 @@ tail_forever (struct File_spec *f, int nfiles)
if (stats.st_size < f[i].size)
{
write_header (pretty_name (&f[i]), _("file truncated"));
error (0, 0, _("%s: file truncated"), pretty_name (&f[i]));
last = i;
/* FIXME: check lseek return value */
lseek (f[i].fd, stats.st_size, SEEK_SET);
@@ -945,7 +944,7 @@ tail_forever (struct File_spec *f, int nfiles)
if (i != last)
{
if (print_headers)
write_header (pretty_name (&f[i]), NULL);
write_header (pretty_name (&f[i]));
last = i;
}
f[i].size += dump_remainder (pretty_name (&f[i]), f[i].fd,
@@ -1148,7 +1147,7 @@ tail_file (struct File_spec *f, off_t n_units)
else
{
if (print_headers)
write_header (pretty_name (f), NULL);
write_header (pretty_name (f));
errors = tail (pretty_name (f), fd, n_units);
if (forever)
{
@@ -1511,6 +1510,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
{
@@ -1573,7 +1574,5 @@ main (int argc, char **argv)
if (have_read_stdin && close (0) < 0)
error (EXIT_FAILURE, errno, "-");
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -26,6 +26,7 @@
#include <getopt.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "safe-read.h"
#include "xstrtol.h"
@@ -1783,6 +1784,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
while ((c = getopt_long (argc, argv, "cdst", long_options, NULL)) != -1)
{
switch (c)
@@ -2006,9 +2009,6 @@ construct in string1 must be aligned with a corresponding construct\n\
}
}
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
if (close (0) != 0)
error (EXIT_FAILURE, errno, _("standard input"));

View File

@@ -30,6 +30,7 @@
#include <getopt.h>
#include "system.h"
#include "closeout.h"
#include "long-options.h"
#include "error.h"
#include "readtokens.h"
@@ -552,6 +553,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
exit_status = 0;
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
@@ -579,9 +582,6 @@ main (int argc, char **argv)
else
tsort ("-");
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));

View File

@@ -41,6 +41,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
@@ -407,6 +408,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
have_read_stdin = 0;
exit_status = 0;
convert_entire_line = 0;
@@ -473,7 +476,5 @@ main (int argc, char **argv)
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, "-");
if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}

View File

@@ -1,5 +1,5 @@
/* uniq -- remove duplicate lines from a sorted file
Copyright (C) 86, 91, 1995-1998, 1999 Free Software Foundation, Inc.
Copyright (C) 86, 91, 1995-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
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "linebuffer.h"
#include "error.h"
#include "xstrtol.h"
@@ -313,7 +314,9 @@ check_file (const char *infile, const char *outfile)
if (ferror (istream) || fclose (istream) == EOF)
error (EXIT_FAILURE, errno, _("error reading %s"), infile);
if (ferror (ostream) || fclose (ostream) == EOF)
/* Close ostream only if it's not stdout -- the latter is closed
via the atexit-invoked close_stdout. */
if (ostream != stdout && (ferror (ostream) || fclose (ostream) == EOF))
error (EXIT_FAILURE, errno, _("error writing %s"), outfile);
free (lb1.buffer);
@@ -331,6 +334,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
skip_chars = 0;
skip_fields = 0;
check_chars = 0;

View File

@@ -1,5 +1,5 @@
/* wc - print the number of bytes, words, and lines in files
Copyright (C) 85, 91, 1995-1999 Free Software Foundation, Inc.
Copyright (C) 85, 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
@@ -27,6 +27,7 @@
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
#include "closeout.h"
#include "error.h"
#include "human.h"
#include "safe-read.h"
@@ -309,6 +310,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
atexit (close_stdout);
exit_status = 0;
posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
print_lines = print_words = print_chars = print_linelength = 0;

View File

@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
same-file cp-mv-backup symlink-slash
same-file cp-mv-backup symlink-slash slink-2-slink
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH

View File

@@ -118,7 +118,7 @@ AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
same-file cp-mv-backup symlink-slash
same-file cp-mv-backup symlink-slash slink-2-slink
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \

View File

@@ -130,7 +130,7 @@ cat <<\EOF > $expected
0 -bdfl (foo foo.~1~)
1 [cp: `sl1' and `sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
1 -d [cp: `sl1' and `sl2' are the same file] (foo sl1 -> foo sl2 -> foo)
1 -d [cp: cannot create symbolic link `sl2': File exists] (foo sl1 -> foo sl2 -> foo)
0 -f (foo sl1 -> foo sl2)
0 -df (foo sl1 -> foo sl2 -> foo)
0 -b (foo sl1 -> foo sl2 sl2.~1~ -> foo)
@@ -138,7 +138,7 @@ cat <<\EOF > $expected
0 -bf (foo sl1 -> foo sl2 sl2.~1~ -> foo)
0 -bdf (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
0 -l (foo sl1 -> foo sl2 -> foo)
0 -dl (foo sl1 -> foo sl2 -> foo)
1 -dl [cp: cannot create link `sl2': File exists] (foo sl1 -> foo sl2 -> foo)
0 -fl (foo sl1 -> foo sl2 -> foo)
0 -bl (foo sl1 -> foo sl2 -> foo)
0 -bfl (foo sl1 -> foo sl2 -> foo)
@@ -163,7 +163,7 @@ cat <<\EOF > $expected
EOF
# Uncomment this if you see a failure and want to try to diagnose it.
# diff -u $expected $actual 1>&2
diff -u $expected $actual 1>&2
cmp $expected $actual
exit $?

49
tests/cp/slink-2-slink Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/sh
# `test cp --update A B' where A and B are both symlinks that point
# to the same file
if test "$VERBOSE" = yes; then
set -x
cp --version
fi
unset VERSION_CONTROL
if test "${VERSION_CONTROL+set}" = set; then
echo '$0: the VERSION_CONTROL envvar is set --' \
' unset it and rerun this test' >&2
exit 1
fi
# Make sure we get English translations.
LANGUAGE=C
export LANGUAGE
LC_ALL=C
export LC_ALL
LANG=C
export LANG
pwd=`pwd`
tmp=sl2sl-$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap 'exit $?' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp
touch file || framework_failure=1
ln -s file a || framework_failure=1
ln -s file b || framework_failure=1
ln -s no-such-file c || framework_failure=1
ln -s no-such-file d || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
exit 1
fi
fail=0
cp --update --no-dereference a b || fail=1
cp --update --no-dereference c d || fail=1
exit $fail

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -6,14 +6,16 @@ explicit = in in-1024
maint_gen = idem-0.I idem-0.X idem-1.I idem-1.X idem-2.I idem-2.X idem-3.I \
idem-3.X basic-0-10.I basic-0-10.X basic-0-09.I basic-0-09.X basic-0-11.I \
basic-0-11.X obs-0.I obs-0.X obs-1.I obs-1.X obs-2.I obs-2.X obs-3.I obs-3.X \
fail-1.I fail-1.X null-1.I null-1.X posix-0.I posix-0.X posix-1.I posix-1.X \
posix-2.I posix-2.X posix-3.I posix-3.X
fail-1.I fail-1.X null-1.I null-1.X no-octal-1.I no-octal-1.X no-octal-2.I \
no-octal-2.X no-octal-3.I no-octal-3.X no-octal-4.I no-octal-4.X posix-0.I \
posix-0.X posix-1.I posix-1.X posix-2.I posix-2.X posix-3.I posix-3.X
run_gen = idem-0.O idem-0.E idem-1.O idem-1.E idem-2.O idem-2.E idem-3.O \
idem-3.E basic-0-10.O basic-0-10.E basic-0-09.O basic-0-09.E basic-0-11.O \
basic-0-11.E obs-0.O obs-0.E obs-1.O obs-1.E obs-2.O obs-2.E obs-3.O obs-3.E \
obs-4.O obs-4.E obs-5.O obs-5.E fail-1.O fail-1.E null-1.O null-1.E posix-0.O \
posix-0.E posix-1.O posix-1.E posix-2.O posix-2.E posix-3.O posix-3.E \
posix-4.O posix-4.E posix-5.O posix-5.E
obs-4.O obs-4.E obs-5.O obs-5.E fail-1.O fail-1.E null-1.O null-1.E \
no-octal-1.O no-octal-1.E no-octal-2.O no-octal-2.E no-octal-3.O no-octal-3.E \
no-octal-4.O no-octal-4.E posix-0.O posix-0.E posix-1.O posix-1.E posix-2.O \
posix-2.E posix-3.O posix-3.E posix-4.O posix-4.E posix-5.O posix-5.E
##test-files-end
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -119,15 +119,17 @@ explicit = in in-1024
maint_gen = idem-0.I idem-0.X idem-1.I idem-1.X idem-2.I idem-2.X idem-3.I \
idem-3.X basic-0-10.I basic-0-10.X basic-0-09.I basic-0-09.X basic-0-11.I \
basic-0-11.X obs-0.I obs-0.X obs-1.I obs-1.X obs-2.I obs-2.X obs-3.I obs-3.X \
fail-1.I fail-1.X null-1.I null-1.X posix-0.I posix-0.X posix-1.I posix-1.X \
posix-2.I posix-2.X posix-3.I posix-3.X
fail-1.I fail-1.X null-1.I null-1.X no-octal-1.I no-octal-1.X no-octal-2.I \
no-octal-2.X no-octal-3.I no-octal-3.X no-octal-4.I no-octal-4.X posix-0.I \
posix-0.X posix-1.I posix-1.X posix-2.I posix-2.X posix-3.I posix-3.X
run_gen = idem-0.O idem-0.E idem-1.O idem-1.E idem-2.O idem-2.E idem-3.O \
idem-3.E basic-0-10.O basic-0-10.E basic-0-09.O basic-0-09.E basic-0-11.O \
basic-0-11.E obs-0.O obs-0.E obs-1.O obs-1.E obs-2.O obs-2.E obs-3.O obs-3.E \
obs-4.O obs-4.E obs-5.O obs-5.E fail-1.O fail-1.E null-1.O null-1.E posix-0.O \
posix-0.E posix-1.O posix-1.E posix-2.O posix-2.E posix-3.O posix-3.E \
posix-4.O posix-4.E posix-5.O posix-5.E
obs-4.O obs-4.E obs-5.O obs-5.E fail-1.O fail-1.E null-1.O null-1.E \
no-octal-1.O no-octal-1.E no-octal-2.O no-octal-2.E no-octal-3.O no-octal-3.E \
no-octal-4.O no-octal-4.E posix-0.O posix-0.E posix-1.O posix-1.E posix-2.O \
posix-2.E posix-3.O posix-3.E posix-4.O posix-4.E posix-5.O posix-5.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -32,6 +32,16 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp
touch file || framework_failure=1
chmod u-w file || framework_failure=1
(echo foo >> file) >/dev/null 2>&1 && {
echo '********************************************'
echo "$0: NOTICE: This test case cannot be run as root."
echo '********************************************'
exit 77
}
for i in a b c d e f g h; do
echo $i > $i || framework_failure=1
done

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -6,7 +6,10 @@ if test "$VERBOSE" = yes; then
shred --version
fi
pwd=`pwd`
tmp=t-shred.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap 'exit $?' 1 2 13 15
# The length of the basename is what matters.
# In this case, shred would try to rename the file 256^10 times
@@ -16,16 +19,16 @@ file=$tmp/0123456789
framework_failure=0
mkdir $tmp || framework_failure=1
touch $file || framework_failure=1
chmod u-w $tmp || framework_failure=1
chmod u-w $file || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
exit 1
fi
(echo foo >> $tmp/file) >/dev/null 2>&1 && {
(echo foo >> $file) >/dev/null 2>&1 && {
echo '********************************************'
echo 'NOTICE: This test case cannot be run as root.'
echo "$0: NOTICE: This test case cannot be run as root."
echo '********************************************'
exit 77
}

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@

View File

@@ -31,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -90,7 +88,9 @@ INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@