Compare commits

...

20 Commits

Author SHA1 Message Date
Jim Meyering
f055dbe669 *** empty log message *** 2000-10-29 13:50:25 +00:00
Jim Meyering
55408e0307 (__restrict_arr): Move definition out of #ifndef block.
Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
doesn't define __restrict_arr.
2000-10-29 13:49:56 +00:00
Jim Meyering
0dd327c851 . 2000-10-29 12:36:19 +00:00
Jim Meyering
1f60246c8b *** empty log message *** 2000-10-29 12:34:43 +00:00
Jim Meyering
76be42eef0 *** empty log message *** 2000-10-29 12:34:19 +00:00
Jim Meyering
018d1056e0 *** empty log message *** 2000-10-29 12:33:53 +00:00
Jim Meyering
17b6fd61c3 *** empty log message *** 2000-10-29 12:25:21 +00:00
Jim Meyering
03e6d30ae7 *** empty log message *** 2000-10-29 12:25:07 +00:00
Jim Meyering
78abfe5da3 (do_copy): When constructing dst_path for use with the
--parents option, first remove any trailing slashes from the command
line argument.  Otherwise, tests/cp/cp-parent would fail on NetBSD.
2000-10-29 12:25:03 +00:00
Jim Meyering
ffb5b5a2ad *** empty log message *** 2000-10-29 11:03:18 +00:00
Jim Meyering
12eea70d7d Fix grammar in comment. 2000-10-29 11:03:01 +00:00
Jim Meyering
9ffd4ae3df *** empty log message *** 2000-10-29 08:05:00 +00:00
Jim Meyering
c487c2b929 *** empty log message *** 2000-10-29 08:04:22 +00:00
Jim Meyering
fe62a85366 Add a test. 2000-10-29 08:04:17 +00:00
Jim Meyering
4b4c8534e6 *** empty log message *** 2000-10-29 07:55:27 +00:00
Jim Meyering
e716f459a5 *** empty log message *** 2000-10-29 07:50:07 +00:00
Jim Meyering
013d63bb67 (DT_INIT): Define.
[enum filetype]: Remove the #ifdef, and use DT_INIT on the
initializers instead.
2000-10-29 07:49:35 +00:00
Jim Meyering
f604c52243 (LC_COLLATE): Set it to the empty string and
export it.  Otherwise, tests/cp/cp-mv-backup would fail e.g., when
LC_COLLATE was set to en.  Reported by Vin Shelton.
2000-10-29 07:38:13 +00:00
Jim Meyering
e321b0bd06 [enum filetype] (arg_directory): Rather than `100', use
a number that should never conflict with another DT_* value.
From Ulrich Drepper.
2000-10-28 18:00:57 +00:00
Jim Meyering
007b5b4ba8 (main): In call to gobble_file with "."', use directory'
as the type, not `unknown'.  From Ulrich Drepper.
2000-10-28 17:58:25 +00:00
12 changed files with 86 additions and 23 deletions

1
THANKS
View File

@@ -156,6 +156,7 @@ Kalle Olavi Niemitalo tosi@stekt.oulu.fi
Kamal Paul Nigam Kamal_Paul_Nigam@gs35.sp.cs.cmu.edu
Karl Eichwalder keichwa@gmx.net
Karl Heuer kwzh@gnu.org
Karl-Michael Schneider schneide@phil.uni-passau.de
Karsten Thygesen karthy@kom.auc.dk
Kaveh R. Ghazi ghazi@caip.rutgers.edu
Keith Owens kaos@audio.apana.org.au

View File

@@ -1,3 +1,13 @@
2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
* regex.h (__restrict_arr): Move definition out of #ifndef block.
Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
doesn't define __restrict_arr.
2000-10-29 Jim Meyering <meyering@lucent.com>
* xstat.in: Fix grammar in comment.
2000-10-28 Jim Meyering <meyering@lucent.com>
* memchr.c: Update from libc.

View File

@@ -523,11 +523,11 @@ extern int re_exec _RE_ARGS ((const char *));
# define __restrict
# endif
# endif
#endif
/* For now unconditionally define __restrict_arr to expand to nothing.
Ideally we would have a test for the compiler which allows defining
it to restrict. */
# define __restrict_arr
#endif
#define __restrict_arr
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,

View File

@@ -52,7 +52,7 @@ void free ();
char *xmalloc ();
/* lstat works different on Linux and Solaris systems. POSIX (see
/* lstat works differently on Linux and Solaris systems. POSIX (see
`pathname resolution' in the glossary) requires that programs like `ls'
take into consideration the fact that FILE has a trailing slash when
FILE is a symbolic link. On Linux systems, the lstat function already

View File

@@ -1,5 +1,30 @@
2000-10-29 Jim Meyering <meyering@lucent.com>
* Version 4.0.29.
* src/cp.c (do_copy): When constructing dst_path for use with the
--parents option, first remove any trailing slashes from the command
line argument. Otherwise, tests/cp/cp-parent would fail on NetBSD.
* tests/cp/cp-parents: Add a test.
* src/ls.c (DT_INIT): Define.
[enum filetype]: Remove the #ifdef, and use DT_INIT on the
initializers instead. `unknown' was undefined for some systems.
Reported by John David Anglin.
* tests/lang-default (LC_COLLATE): Set it to the empty string and
export it. Otherwise, tests/cp/cp-mv-backup would fail e.g., when
LC_COLLATE was set to en. Reported by Vin Shelton.
2000-10-28 Jim Meyering <meyering@lucent.com>
* src/ls.c (main): In call to gobble_file with `"."', use `directory'
as the type, not `unknown'.
[enum filetype] (arg_directory): Rather than `100', use
a number that should never conflict with another DT_* value.
From Ulrich Drepper.
* Version 4.0.28.
Make `ls' a lot more efficient on systems (e.g., linux-2.4.*)

View File

@@ -1,4 +1,6 @@
Changes in release 4.01:
[4.0.29]
* ls.c wouldn't compile on some systems: fix it
[4.0.28]
* ls is much more efficient on systems (e.g., linux-2.4.*) that store file
type information in directory entries.

View File

@@ -1,3 +1,7 @@
2000-10-29 Jim Meyering <meyering@lucent.com>
* Version 2.0.11.
2000-10-27 Jim Meyering <meyering@lucent.com>
* src/date.c (usage): Mention the time zone, UTC, and write the date
@@ -38,6 +42,7 @@
* src/date.c (TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove.
(batch_convert): Don't futz with TZ.
(main): -u now parses all dates as UTC, not just some.
Reported by Karl-Michael Schneider.
* tests/date/Test.pm (utc-0, utc-1, relative-2): Adjust to
above change.

View File

@@ -1,6 +1,8 @@
Changes in release 2.1
[2.0k]
[2.0.11]
* setting the date now works properly, even when using -u
* `date -f - < /dev/null' no longer dumps core
* some DOS/Windows portability changes
[2.0j]
* `date -d DATE' now parses certain relative DATEs correctly
[2.0i]

View File

@@ -518,13 +518,26 @@ do_copy (int n_files, char **file, const char *target_directory,
char *arg_in_concat = NULL;
char *arg = file[i];
/* Trailing slashes are meaningful (i.e., maybe worth preserving)
only in the source file names. */
if (remove_trailing_slashes)
strip_trailing_slashes (arg);
if (flag_path)
{
/* Append all of `arg' to `dest'. */
dst_path = path_concat (dest, arg, &arg_in_concat);
char *arg_no_trailing_slash;
/* Use `arg' without trailing slashes in constructing destination
file names. Otherwise, we can end up trying to create a
directory via `mkdir ("dst/foo/"...', which is not portable.
It fails, due to the trailing slash, on at least
NetBSD 1.[34] systems. */
ASSIGN_STRDUPA (arg_no_trailing_slash, arg);
strip_trailing_slashes (arg_no_trailing_slash);
/* Append all of `arg' (minus any trailing slash) to `dest'. */
dst_path = path_concat (dest, arg_no_trailing_slash,
&arg_in_concat);
if (dst_path == NULL)
xalloc_die ();

View File

@@ -199,28 +199,24 @@ int rpl_lstat PARAMS((const char *, struct stat *));
#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF
# define HAVE_STRUCT_DIRENT_D_TYPE 1
# define DT_INIT(Val) = Val
#else
# define HAVE_STRUCT_DIRENT_D_TYPE 0
# define DT_INIT(Val) /* empty */
#endif
enum filetype
{
#if HAVE_STRUCT_DIRENT_D_TYPE
unknown = DT_UNKNOWN,
fifo = DT_FIFO,
chardev = DT_CHR,
directory = DT_DIR,
blockdev = DT_BLK,
normal = DT_REG,
symbolic_link = DT_LNK,
sock = DT_SOCK,
arg_directory = 100
#else
symbolic_link,
directory,
arg_directory, /* Directory given as command line arg. */
normal /* All others. */
#endif
unknown DT_INIT (DT_UNKNOWN),
fifo DT_INIT (DT_FIFO),
chardev DT_INIT (DT_CHR),
directory DT_INIT (DT_DIR),
blockdev DT_INIT (DT_BLK),
normal DT_INIT (DT_REG),
symbolic_link DT_INIT (DT_LNK),
sock DT_INIT (DT_SOCK),
arg_directory DT_INIT (2 * (DT_UNKNOWN | DT_FIFO | DT_CHR | DT_DIR | DT_BLK
| DT_REG | DT_LNK | DT_SOCK))
};
struct fileinfo
@@ -894,7 +890,7 @@ main (int argc, char **argv)
if (dir_defaulted)
{
if (immediate_dirs)
gobble_file (".", unknown, 1, "");
gobble_file (".", directory, 1, "");
else
queue_directory (".", 0);
}

View File

@@ -18,6 +18,7 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir foo bar || framework_failure=1
mkdir -p a/b/c d || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
@@ -30,4 +31,11 @@ fail=0
# with the failed assertion from dirname.c.
cp -R --parents foo/ bar || fail=1
# Exercise the make_path and re_protect code in cp.c.
# FIXME: compare verbose output with expected output.
cp --verbose -a --parents a/b/c d > /dev/null 2>&1 || fail=1
test -d d/a/b/c || fail=1
# FIXME: add tests to check that re_protect works
(exit $fail); exit

View File

@@ -5,3 +5,4 @@
LANGUAGE=''; export LANGUAGE
LC_ALL=''; export LC_ALL
LANG=''; export LANG
LC_COLLATE=''; export LC_COLLATE