platform/upstream/coreutils.git
19 years agoTest "touch -" too.
Paul Eggert [Mon, 26 Sep 2005 23:02:34 +0000 (23:02 +0000)]
Test "touch -" too.

19 years ago(touch): Handle "touch -c - >&-" by checking for EBADF
Paul Eggert [Mon, 26 Sep 2005 23:02:14 +0000 (23:02 +0000)]
(touch): Handle "touch -c - >&-" by checking for EBADF
and ENOSYS.
Do not pass "-" to futimens; pass NULL instead.
If close (STDIN_FILENO) fails, report the error separately instead
of letting the 'close' pollute errno.

19 years agoutimens.c portability fixes.
Paul Eggert [Mon, 26 Sep 2005 23:01:25 +0000 (23:01 +0000)]
utimens.c portability fixes.

19 years agoInclude unistd.h, for dup2.
Paul Eggert [Mon, 26 Sep 2005 23:01:00 +0000 (23:01 +0000)]
Include unistd.h, for dup2.
(futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
(futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.

19 years ago*** empty log message ***
Jim Meyering [Mon, 26 Sep 2005 09:10:54 +0000 (09:10 +0000)]
*** empty log message ***

19 years ago(gl_FUNC_UTIMES): Detect the version of utimes
Jim Meyering [Mon, 26 Sep 2005 09:10:50 +0000 (09:10 +0000)]
(gl_FUNC_UTIMES): Detect the version of utimes
from glibc-2.2.5 that fails for read-only files.

19 years ago.
Jim Meyering [Mon, 26 Sep 2005 07:34:41 +0000 (07:34 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Mon, 26 Sep 2005 07:33:53 +0000 (07:33 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Jim Meyering [Mon, 26 Sep 2005 07:32:14 +0000 (07:32 +0000)]
*** empty log message ***

19 years ago(TESTS): Add read-only.
Jim Meyering [Mon, 26 Sep 2005 07:32:08 +0000 (07:32 +0000)]
(TESTS): Add read-only.

19 years agoNew test, for root of chmod/usage failure.
Jim Meyering [Mon, 26 Sep 2005 07:31:57 +0000 (07:31 +0000)]
New test, for root of chmod/usage failure.

19 years ago*** empty log message ***
Jim Meyering [Mon, 26 Sep 2005 07:25:29 +0000 (07:25 +0000)]
*** empty log message ***

19 years agoWork around the root cause of alpha-linux-1.sf.net test failure.
Jim Meyering [Mon, 26 Sep 2005 07:25:23 +0000 (07:25 +0000)]
Work around the root cause of alpha-linux-1.sf.net test failure.

Remove all files in inner loop.
Otherwise, with a touch program that fails on unwritable files,
(this happens at least on linux-2.2.20) a -w file left behind
from a previous iteration could cause a spurious test failure.

19 years agoUndo the s/files/file/ change, but add
Jim Meyering [Mon, 26 Sep 2005 07:20:22 +0000 (07:20 +0000)]
Undo the s/files/file/ change, but add
comments about why the old version was desired.

19 years ago*** empty log message ***
Jim Meyering [Sun, 25 Sep 2005 20:46:34 +0000 (20:46 +0000)]
*** empty log message ***

19 years ago(setuid-etc): Work around output mismatch when
Jim Meyering [Sun, 25 Sep 2005 20:46:30 +0000 (20:46 +0000)]
(setuid-etc): Work around output mismatch when
a just-created test file cannot be made set-group-ID.

19 years ago.
Jim Meyering [Sun, 25 Sep 2005 17:01:54 +0000 (17:01 +0000)]
.

19 years ago.
Jim Meyering [Sun, 25 Sep 2005 12:54:04 +0000 (12:54 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Sun, 25 Sep 2005 09:59:30 +0000 (09:59 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Jim Meyering [Sun, 25 Sep 2005 09:59:23 +0000 (09:59 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Jim Meyering [Sun, 25 Sep 2005 09:58:04 +0000 (09:58 +0000)]
*** empty log message ***

19 years agoUse newer trap and tmpdir-creation framework.
Jim Meyering [Sun, 25 Sep 2005 09:58:00 +0000 (09:58 +0000)]
Use newer trap and tmpdir-creation framework.
Fix apparent typos (s/files/file/) in inner loop.

19 years agoProtect against multiple inclusion.
Jim Meyering [Sun, 25 Sep 2005 06:14:33 +0000 (06:14 +0000)]
Protect against multiple inclusion.

19 years ago(touch): "touch -" now touches standard output.
Paul Eggert [Sun, 25 Sep 2005 06:12:21 +0000 (06:12 +0000)]
(touch): "touch -" now touches standard output.
(usage): Document this.

19 years ago"touch -" now touches standard output.
Paul Eggert [Sun, 25 Sep 2005 06:11:45 +0000 (06:11 +0000)]
"touch -" now touches standard output.

19 years ago"touch -" now touches standard output.
Paul Eggert [Sun, 25 Sep 2005 06:09:51 +0000 (06:09 +0000)]
"touch -" now touches standard output.

19 years agoSupport having a null PATH if the file descriptor is nonnegative.
Paul Eggert [Sun, 25 Sep 2005 06:09:22 +0000 (06:09 +0000)]
Support having a null PATH if the file descriptor is nonnegative.

19 years ago(ENOSYS): Define if not already defined.
Paul Eggert [Sun, 25 Sep 2005 06:08:45 +0000 (06:08 +0000)]
(ENOSYS): Define if not already defined.
(ftimens): Support having a null PATH if the file descriptor
is nonnegative.

19 years ago(touch invocation): "touch -" now touches standard output.
Paul Eggert [Sun, 25 Sep 2005 06:08:17 +0000 (06:08 +0000)]
(touch invocation): "touch -" now touches standard output.

19 years ago"touch -" now touches standard output.
Paul Eggert [Sun, 25 Sep 2005 06:07:48 +0000 (06:07 +0000)]
"touch -" now touches standard output.

19 years agoUpgrade regex_internal.h patch.
Paul Eggert [Sun, 25 Sep 2005 04:18:54 +0000 (04:18 +0000)]
Upgrade regex_internal.h patch.

19 years ago(__GNUC_PREREQ, always_inline, inline, pure):
Paul Eggert [Sun, 25 Sep 2005 04:18:39 +0000 (04:18 +0000)]
(__GNUC_PREREQ, always_inline, inline, pure):
Remove.
(__attribute): Define to empty unless GCC 3.1 or later.
This works around a core dump on OpenBSD 3.4, which has GCC
2.95.3, which dumps core when given __attribute__(()).  It also
simplifies other tests, since we really don't want to bother with
worrying about which ancient version of GCC supported what.
Original problem reported by Yoann Vandoorselaere, with part of
the fix suggested by Derek Price.

19 years agoPrefer fchown to chown and fchmod to chmod when copying regular files.
Paul Eggert [Sun, 25 Sep 2005 03:08:40 +0000 (03:08 +0000)]
Prefer fchown to chown and fchmod to chmod when copying regular files.

19 years ago* jm-macros.m4 (gl_MACROS): Check for fchmod and fchown.
Paul Eggert [Sun, 25 Sep 2005 03:08:15 +0000 (03:08 +0000)]
* jm-macros.m4 (gl_MACROS): Check for fchmod and fchown.

19 years ago(gl_MACROS): Check for fchmod and fchown.
Paul Eggert [Sun, 25 Sep 2005 03:07:53 +0000 (03:07 +0000)]
(gl_MACROS): Check for fchmod and fchown.

19 years ago(HAVE_FCHMOD, HAVE_FCHOWN): Define to 0 if not defined.
Paul Eggert [Sun, 25 Sep 2005 03:07:33 +0000 (03:07 +0000)]
(HAVE_FCHMOD, HAVE_FCHOWN): Define to 0 if not defined.
(copy_reg): New args CHOWN_SUCCEDED and DST_SB.  All callers changed.
Add a "goto close_src_and_dst_desc;" that was missing in the
previous patch.
(copy_reg) [HAVE_FCHOWN]: Prefer fchown to chown.
(copy_reg) [HAVE_FCHMOD]: Prefer fchmod to chmod.
(copy_internal): Don't invoke chown if fchown worked,
and likewise for chmod and fchmod.

19 years ago* Makefile.am (libcoreutils_a_SOURCES): Remove mbchar.c.
Paul Eggert [Sat, 24 Sep 2005 23:14:21 +0000 (23:14 +0000)]
* Makefile.am (libcoreutils_a_SOURCES): Remove mbchar.c.

19 years ago(libcoreutils_a_SOURCES): Remove mbchar.c, since
Paul Eggert [Sat, 24 Sep 2005 23:14:04 +0000 (23:14 +0000)]
(libcoreutils_a_SOURCES): Remove mbchar.c, since
it doesn't build in OpenBSD 3.4.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.

19 years ago* mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h.
Paul Eggert [Sat, 24 Sep 2005 23:13:42 +0000 (23:13 +0000)]
* mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h.

19 years ago(gl_MBCHAR): Check for wchar.h and wctype.h, and
Paul Eggert [Sat, 24 Sep 2005 23:13:19 +0000 (23:13 +0000)]
(gl_MBCHAR): Check for wchar.h and wctype.h, and
don't compile mbchar.c unless both headers exist.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.

19 years ago* regex_internal.h (__attribute): Define to nothing for GCC 2.
Paul Eggert [Sat, 24 Sep 2005 22:59:22 +0000 (22:59 +0000)]
* regex_internal.h (__attribute): Define to nothing for GCC 2.

19 years ago(__attribute): Define to nothing for GCC 2.
Paul Eggert [Sat, 24 Sep 2005 22:59:06 +0000 (22:59 +0000)]
(__attribute): Define to nothing for GCC 2.
This works around a core dump on OpenBSD 3.4, which has GCC
2.95.3, which dumps core when given __attribute__(()).

19 years ago.
Jim Meyering [Sat, 24 Sep 2005 13:42:39 +0000 (13:42 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 13:42:30 +0000 (13:42 +0000)]
*** empty log message ***

19 years ago(EXTRA_DIST): Add .x-sc_no_if_have_config_h.
Jim Meyering [Sat, 24 Sep 2005 13:41:48 +0000 (13:41 +0000)]
(EXTRA_DIST): Add .x-sc_no_if_have_config_h.

19 years ago(sc_no_if_have_config_h): New rule.
Jim Meyering [Sat, 24 Sep 2005 13:41:20 +0000 (13:41 +0000)]
(sc_no_if_have_config_h): New rule.
(syntax-check-rules): Add it.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 13:41:01 +0000 (13:41 +0000)]
*** empty log message ***

19 years agoUse `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H', for consistency with gnulib.
Jim Meyering [Sat, 24 Sep 2005 13:40:37 +0000 (13:40 +0000)]
Use `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H', for consistency with gnulib.

19 years ago.
Jim Meyering [Sat, 24 Sep 2005 13:36:20 +0000 (13:36 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 13:32:36 +0000 (13:32 +0000)]
*** empty log message ***

19 years agoUse `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H', for consistency with gnulib.
Jim Meyering [Sat, 24 Sep 2005 13:32:31 +0000 (13:32 +0000)]
Use `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H', for consistency with gnulib.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 13:27:41 +0000 (13:27 +0000)]
*** empty log message ***

19 years agoInclude <config.h> from strintcmp.c, not from here.
Jim Meyering [Sat, 24 Sep 2005 13:27:34 +0000 (13:27 +0000)]
Include <config.h> from strintcmp.c, not from here.

19 years agoInclude <config.h> here, not from strnumcmp-in.h.
Jim Meyering [Sat, 24 Sep 2005 13:26:41 +0000 (13:26 +0000)]
Include <config.h> here, not from strnumcmp-in.h.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 10:44:33 +0000 (10:44 +0000)]
*** empty log message ***

19 years ago(gl_GETADDRINFO): Check for gethostbyname
Jim Meyering [Sat, 24 Sep 2005 10:44:30 +0000 (10:44 +0000)]
(gl_GETADDRINFO): Check for gethostbyname
in the inet and nsl libraries.  Required on Solaris 5.7.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 10:06:36 +0000 (10:06 +0000)]
*** empty log message ***

19 years ago(eq-wid-1, eq-wid-2): Disable these tests for now.
Jim Meyering [Sat, 24 Sep 2005 10:06:29 +0000 (10:06 +0000)]
(eq-wid-1, eq-wid-2): Disable these tests for now.
They fail with non-gcc compilers and some combinations
of options and libraries on Solaris systems.

19 years ago*** empty log message ***
Jim Meyering [Sat, 24 Sep 2005 07:57:42 +0000 (07:57 +0000)]
*** empty log message ***

19 years ago(uninit-64): Restore this test.
Jim Meyering [Sat, 24 Sep 2005 07:57:36 +0000 (07:57 +0000)]
(uninit-64): Restore this test.
Add start-up code to detect, and work around, the cases in
which the test might fail.

19 years ago* tests/misc/date (uninit-64): Remove this test.
Paul Eggert [Sat, 24 Sep 2005 07:05:52 +0000 (07:05 +0000)]
* tests/misc/date (uninit-64): Remove this test.

19 years ago(uninit-64): Remove this test. It wasn't
Paul Eggert [Sat, 24 Sep 2005 07:05:27 +0000 (07:05 +0000)]
(uninit-64): Remove this test.  It wasn't
portable in theory (it doesn't work on hosts where 'int' is 64
bits, example) or in practice (Solaris 8 localtime returns garbage
in tm_year for the specified date, but that's not coreutils's
fault).

19 years ago.
Jim Meyering [Sat, 24 Sep 2005 06:53:27 +0000 (06:53 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 23:05:44 +0000 (23:05 +0000)]
*** empty log message ***

19 years ago(verify_type__): Use `unsigned int' as the bitfield type
Jim Meyering [Fri, 23 Sep 2005 23:05:39 +0000 (23:05 +0000)]
(verify_type__): Use `unsigned int' as the bitfield type
so we can once again use a positive bitfield width of 1 -- now we
don't have to explain why we were using a bitfield width of 2.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 23:05:16 +0000 (23:05 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 22:49:10 +0000 (22:49 +0000)]
*** empty log message ***

19 years agoAdd lib/gai_strerror.c.
Jim Meyering [Fri, 23 Sep 2005 22:49:05 +0000 (22:49 +0000)]
Add lib/gai_strerror.c.

19 years agoUse 2, not 1, for bitfield size in verify.h.
Paul Eggert [Fri, 23 Sep 2005 21:49:59 +0000 (21:49 +0000)]
Use 2, not 1, for bitfield size in verify.h.

19 years ago(verify_type__): Use 2, not 1, for bitfield size, to avoid
Paul Eggert [Fri, 23 Sep 2005 21:49:31 +0000 (21:49 +0000)]
(verify_type__): Use 2, not 1, for bitfield size, to avoid
a warning with Irix 6.5 cc.

19 years agoLog recent changes.
Paul Eggert [Fri, 23 Sep 2005 21:40:12 +0000 (21:40 +0000)]
Log recent changes.

19 years ago(gl_REGEX): If replacing, define regcomp to rpl_regcomp,
Paul Eggert [Fri, 23 Sep 2005 21:17:57 +0000 (21:17 +0000)]
(gl_REGEX): If replacing, define regcomp to rpl_regcomp,
and similarly for the other external symbols.  Problem reported
by James Gallager.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 20:56:54 +0000 (20:56 +0000)]
*** empty log message ***

19 years ago(install_file_in_file): Be more conservative about the previous patch:
Paul Eggert [Fri, 23 Sep 2005 20:50:49 +0000 (20:50 +0000)]
(install_file_in_file): Be more conservative about the previous patch:
set time stamps on all non-regular files.

19 years ago(change_timestamps): First arg is source
Paul Eggert [Fri, 23 Sep 2005 20:39:04 +0000 (20:39 +0000)]
(change_timestamps): First arg is source
struct stat, not file name.  All uses changed.
(install_file_in_file): Stat the source file if necessary.
Don't try to change time stamps if copy_file did it.

19 years ago(copy_reg): Preserve time stamps if
Paul Eggert [Fri, 23 Sep 2005 20:38:34 +0000 (20:38 +0000)]
(copy_reg): Preserve time stamps if
x->preserve_timestamps is set, using futimens so that
we needn't resolve the path again.
(copy_internal): Don't preserve time stamps if copy_reg did it
already.

19 years agoDon't include utime.h; not needed.
Paul Eggert [Fri, 23 Sep 2005 20:35:41 +0000 (20:35 +0000)]
Don't include utime.h; not needed.
(struct utimbuf) [!defined HAVE_STRUCT_UTIMBUF]: Remove; not needed.

19 years ago(gl_MACROS): Don't require gl_CHECK_TYPE_STRUCT_UTIMBUF.
Paul Eggert [Fri, 23 Sep 2005 20:35:14 +0000 (20:35 +0000)]
(gl_MACROS): Don't require gl_CHECK_TYPE_STRUCT_UTIMBUF.
(gl_CHECK_ALL_HEADERS): Don't check for utime.h.

19 years agoUpdate copyright.
Paul Eggert [Fri, 23 Sep 2005 20:26:09 +0000 (20:26 +0000)]
Update copyright.

19 years ago(_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
Paul Eggert [Fri, 23 Sep 2005 20:23:59 +0000 (20:23 +0000)]
(_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
bug reported by Jim Meyering.

19 years ago.
Jim Meyering [Fri, 23 Sep 2005 20:14:20 +0000 (20:14 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 20:14:01 +0000 (20:14 +0000)]
*** empty log message ***

19 years agoUse `verify' to ensure that our hard-coded
Jim Meyering [Fri, 23 Sep 2005 20:13:49 +0000 (20:13 +0000)]
Use `verify' to ensure that our hard-coded
bytes_to_*_digits arrays are long enough.  Of course, 17+-byte
integral types aren't on the near horizon, but just in case...
(MAX_INTEGRAL_TYPE_SIZE): Move definition to precede new first use.
(bytes_to_oct_digits, bytes_to_signed_dec_digits):
(bytes_to_unsigned_dec_digits, bytes_to_hex_digits): Change base
type from `char' to the clearer `unsigned int'.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 20:00:19 +0000 (20:00 +0000)]
*** empty log message ***

19 years ago(gl_MACROS): AC_REQUIRE([gl_SOCKLEN_T]) here,
Jim Meyering [Fri, 23 Sep 2005 19:59:07 +0000 (19:59 +0000)]
(gl_MACROS): AC_REQUIRE([gl_SOCKLEN_T]) here,
now that it's no longer required by getaddrinfo.m4.

19 years agonot needed, since socklen is a prerequisite module.
Paul Eggert [Fri, 23 Sep 2005 19:40:04 +0000 (19:40 +0000)]
not needed, since socklen is a prerequisite module.

19 years ago* lib/utimens.c (futimens): Use futimesat if available.
Paul Eggert [Fri, 23 Sep 2005 19:18:27 +0000 (19:18 +0000)]
* lib/utimens.c (futimens): Use futimesat if available.
Prefer it to futimes since it doesn't have the futimes bug.
* m4/utimens.m4 (gl_UTIMENS): Check for futimesat.

19 years agoFix typo in comment.
Paul Eggert [Fri, 23 Sep 2005 17:52:22 +0000 (17:52 +0000)]
Fix typo in comment.

19 years ago(GL_CONCAT0, GL_CONCAT): Remove.
Paul Eggert [Fri, 23 Sep 2005 17:47:15 +0000 (17:47 +0000)]
(GL_CONCAT0, GL_CONCAT): Remove.
(verify): Don't use the __LINE__ trick, as it doesn't work in general.
Instead, declare a function that returns a pointer to an array,
and use verify_type__ to declare the size of the array.
Problem and germ of a solution reported by Bruno Haible.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 14:50:22 +0000 (14:50 +0000)]
*** empty log message ***

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 14:48:21 +0000 (14:48 +0000)]
*** empty log message ***

19 years agofrom gnulib
Jim Meyering [Fri, 23 Sep 2005 14:48:14 +0000 (14:48 +0000)]
from gnulib

19 years ago(gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
Jim Meyering [Fri, 23 Sep 2005 14:47:58 +0000 (14:47 +0000)]
(gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.

19 years ago*** empty log message ***
Jim Meyering [Fri, 23 Sep 2005 12:44:07 +0000 (12:44 +0000)]
*** empty log message ***

19 years agoInclude <config.h>. Otherwise builds with strict
Jim Meyering [Fri, 23 Sep 2005 12:42:45 +0000 (12:42 +0000)]
Include <config.h>.  Otherwise builds with strict
C89 (e.g., Sun's /opt/SUNWspro/bin/c89) would fail due to the use
of `inline'.

19 years ago(gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
Paul Eggert [Fri, 23 Sep 2005 05:13:15 +0000 (05:13 +0000)]
(gl_PREREQ_GETADDRINFO): Check for netinet/in.h.

19 years ago* lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
Paul Eggert [Fri, 23 Sep 2005 05:12:50 +0000 (05:12 +0000)]
* lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
Problem reported by Eric Blake.
(getaddrinfo): Initialize se so that it's not garbage.
Redo internal storage allocation so that it doesn't make unportable
assumptions about alignment.
Fix a memory leak.

19 years ago.
Jim Meyering [Thu, 22 Sep 2005 09:47:36 +0000 (09:47 +0000)]
.

19 years ago*** empty log message ***
Jim Meyering [Thu, 22 Sep 2005 07:10:17 +0000 (07:10 +0000)]
*** empty log message ***

19 years agoRegenerate.
Paul Eggert [Thu, 22 Sep 2005 07:07:36 +0000 (07:07 +0000)]
Regenerate.