summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-08-29* src/system.h (LOCALEDIR): Remove, since configmake.h now definesPaul Eggert
it for us.
2006-08-29(main): Don't test whether macros likePaul Eggert
S_ISLNK are defined, since they're always defined now.
2006-08-28* src/copy.c (copy_internal): Don't test whether macros likePaul Eggert
S_ISLNK are defined, since they're always defined now. * src/cp.c (main): Likewise. * src/ln.c (main): Likewise. * src/ls.c (get_link_name, make_link_name): Likewise. * src/mkfifo.c (usage): Likewise. * src/who.c (S_IWGRP): Likewise.
2006-08-28Adjust to recent gnulib changes for the gnulib module.Paul Eggert
* bootstrap.conf (gnulib_modules): Add fcntl. * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code is already assuming these macros are defined. (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK): (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT): Remove; the fcntl module now handles these.
2006-08-28Adjust to recent gnulib changes for the inttypes module.Paul Eggert
* bootstrap.conf (gnulib_modules): Remove stdint; add inttypes. (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4. * src/system.h: Don't bother to include <stdint.h>, since we can now assume inttypes.h does the equivalent of including stdint.h.
2006-08-27* src/copy.c (copy_internal): Don't make a backup if the lastJim Meyering
component of the source name is "." or "..". Reported by Andreas Schwab in https://savannah.gnu.org/bugs/?17540. * tests/cp/src-base-dot: New file. Test for the above fix. * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2006-08-27* src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...Jim Meyering
(dot_or_dotdot): ...new static inline function. * src/remove.c (rm_1): Reflect this renaming. * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2006-08-27Two of those comments apply only when "moving" (not when copying).Jim Meyering
Correct them.
2006-08-27* src/copy.c (copy_internal): Add comments.Jim Meyering
2006-08-27(AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,Paul Eggert
since Automake supplies them for us. It always did -I$(srcdir), and with the recent change to AC_CONFIG_HEADERS in configure.ac it is now also doing -I../lib.
2006-08-26* src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.Jim Meyering
2006-08-26Fix "mv --verbose --backup" so its output includes theJim Meyering
" (backup: foo.~1~)" suffix also when backing up a directory. * NEWS: Report this bug fix. * src/copy.c (emit_verbose): New function, factored out of... (copy_internal): ...here. Use the new function. * tests/mv/backup-dir: Test for the above fix.
2006-08-26Include <config.h> unconditionally, since we now assume config.h exists.Paul Eggert
2006-08-26"ls --color" would highlight other-writable and sticky directoriesJim Meyering
no differently than regular directories on a file system with dirent.d_type support. * NEWS: Say the above. * src/ls.c (gobble_file): With --color, also stat the file when we know it is a directory. Derived from an anonymous one-line fix and bug report: <https://savannah.gnu.org/bugs/?15043>. * tests/ls/color-dtype-dir: New file. Test for the above fix. * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2006-08-25* .cvsignore: Remove stamp-h1. Add coreutils-*, to ignorePaul Eggert
tarballs. * bootstrap.conf: Add configmake, verify. * lib/.cvsignore: Add configmake.h, stamp-h1. * src/.cvsignore: Remove localedir.h. * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove; subsumed by configmake. * src/system.h: Include configmake.h rather than localedir.h (LOCALEDIR): New macro.
2006-08-25Fix typo in previous checkin; a "&" went missing.Paul Eggert
2006-08-25Rewrite to avoid some unnecessary casts, macros, literals.Paul Eggert
(DEFAULT_PASSES, VERBOSE_UPDATE): Now constants, not macros. (SECTOR_SIZE, SECTOR_MASK): New constants. (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts, and use the SECTOR_* constants when applicable. Check for size < 0 rather than size == -1, since negative-size files are a sign of trouble anyway. (dopass): Assume a continuable error if EIO even if the current position is not a multiple of 512.
2006-08-24* src/stat.c (print_statfs): Fix typo: remove extra "sizeof".Jim Meyering
2006-08-23* src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. ThisPaul Eggert
macro was being used without being defined. (SB_F_NAMEMAX): Remove cast. (f_fsid) [BeOS]: Likewise. (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning. All uses changed. (out_string, out_int, out_uint, out_uint_o, out_uint_x): New functions. (xstrcat): Remove. All uses changed to use the above functions. (print_statfs, print_stat): 2nd arg is now the prefix len, not the buffer len. All uses changed. Output '?', not '*', for unknown data or errors. Do not assume signed values can be interchanged with unsigned when printing. (print_statfs): For %i, print the fsid as a single int, not as a pair. (print_it): Quote invalid format better. (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]: (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]: (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2006-08-23* NEWS: printf supports the I flag.Paul Eggert
* src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2006-08-23(SA_RESTART): Fallback define.Paul Eggert
2006-08-23* src/system.h (EDQUOT): Define if not already defined.Paul Eggert
2006-08-23* .cvsignore: Remove config.h, config.hin, as they are nowPaul Eggert
in lib. * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin to lib. * lib/.cvsignore: Add config.h, config.hin. * lib/Makefile.am (AM_CPPFLAGS): Remove; we no longer need '-I..'. * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2006-08-22* aclocal.m4, config.hin, configure:Paul Eggert
Remove from CVS, since ./bootstrap generates them automatically. * .cvsignore: Add INSTALL, Makefile.in, *.cache, *.lineno, *.log. Remove more-specific entries. This catches files like configure.lineno. * man/.cvsignore: Add Makefile.in. * src/.cvsignore: Add Makefile.in. Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c. For .cvsignore file under the tests directory: Add Makefile.in. Sort entries if necessary. Remove *.I, *.E, *.X, *.O, *-tests, build-script, mk-script if they're never created in this directory. * build-aux/.cvsignore: New file. * doc/.cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf, coreutils.ps, coreutils.tps. Remove coreutils.cm (dunno what it is, but the makefile doesn't mention it). Remove coreutils.info as it is subsumed by coreutils.info*. * lib/.cvsignore: Add Makefile.in, getdate.tab.h. Remove stat.c, sysexit.h. * m4/.cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4, inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4, lock.m4, printf-posix.m4, same-inode.m4, size_max.m4, uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4. Many of these are put in automatically by ../bootstrap, but that's a bootstrap bug that I plan to fix shortly. * po/.cvsignore: More ../bootstrap-related fixes, plus remove old cruft. Add *.po, LINGUAS, Makevars. Remove *.cat, *.msg, cat-id-dbl.c, messages.mo, stamp-cat-id.
2006-08-22BeOS portability.Paul Eggert
* src/uptime.c: Include OS.h if it exists. (print_uptime): On BeOS, use the get_system_info function (actually a macro). Loop through utmp entries only if utmp.h or utmpx.h exists. (uptime): Call read_utmp only if utmp.h or utmpx.h exists. * m4/boottime.m4 (GNULIB_BOOT_TIME): Test also for utmp.h, utmpx.h, OS.h. Don't require to have utmp.h or utmpx.h. Enable boottime support if <OS.h> is found.
2006-08-22Move the check-AUTHORS rule to be run as part of "make distcheck",Jim Meyering
rather than "make check". * src/Makefile.am (check): Don't depend on check-AUTHORS; it would cause "make check" to fail on systems unable to build all binaries. * Makefile.maint (check-AUTHORS): New rule. (local-checks-available): Add it here. Reported by Bruno Haible. Needed for BeOS.
2006-08-22(print_header, show_dev): Use a column width thatPaul Eggert
depends on the block size of -P is specified and not autoscaling.
2006-08-21* src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer definedJim Meyering
in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT. Otherwise, on a system with 4-byte longs, "od -t u8" fails with this: od: invalid type string `u8'; this system doesn't provide a 8-byte integral type FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2006-08-21Add a bootstrap procedure, so that the CVS version contains fewerPaul Eggert
files and we bootstrap the rest from gnulib, gettext, etc. * README-cvs: New file. * bootstrap: New file. * bootstrap.conf: New file. * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po. * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit of gnulib-tool. (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL): (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib. (gl_EARLY): Add. (gl_MACROS): Call just after gl_EARLY, just for clarity. * src/c99-to-c98.diff: Remove patch to ls.c; no longer needed. * src/kill.c (strtoimax): Remove decl. * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves. * src/wc.c: Likewise. * src/ls.c (sort_files): Rewrite to avoid need for C99-style declaration, so that we don't need to patch this file. * src/printf.c (strtoimax, strtoumax): Remove decls. * src/su.c: Include getpass.h. (getpass): remove. * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h. Include inttypes.h unconditionally; remove decls it handles. * lib/Makefile.am: include gnulib.mk, so that we can remove most of this file. (AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done for us. (noinst_LIBRARIES, LDDADD, DEFS): Remove. (libcoreutils_a_SOURCES): Trim down greatly, just to the files that aren't in gnulib. Remove defns gnulib does for us. * m4/check-decl.m4 (gl_CHECK_DECLS): Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h, time.h. Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin, getuid, lseek, malloc, memchr, realloc. Don't check for getutent, memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul, strtoull. (_gl_DECL_HEADERS): Remove; all uses removed. * m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac for the benefit of gnulib-tool. Call gl_INIT. Do not call or require macros that gnulib will handle for us. Don't check for fchmod, hasmntopt, isascii, lchown, listmntent, mempcpy, realpath, wcrtomb, tzset. (gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h, sys/mount.h. (gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT. Don't check for struct stat.st_blksize. Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T, gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T, gl_AC_TYPE_UNSIGNED_LONG_LONG. * m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO. Don't require macros that gnulib does for us. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for sys/sysmacros.h. Don't check for statvfs. Use AC_CHECK_HEADERS_ONCE for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h. Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert
2006-08-20the patch from 2006-08-18 broke on cygwin.Paul Eggert
2006-08-19.Jim Meyering
2006-08-19* NEWS: Fix cp --sparse so that it preserves tail-end sparseness, evenJim Meyering
when the file's apparent size is not a multiple of its block size. * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate. For some file sizes, writing that single byte would unnecessarily waste a few file blocks. That write may have been necessary in the early days of Linux, but now, removing it should be safe. Based on a patch by Alan Curry: <http://bugs.debian.org/370792> * tests/cp/sparse: New test for the above. * tests/cp/Makefile.am (TESTS): Add sparse. * tests/sparse-file: New file, essence factored out of... * tests/du/8gb: ... here. Use the new script.
2006-08-18Add support for NetBSD 3.0.Paul Eggert
* src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field f_fstypename. (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs' has a field f_fstypename. This undoes the 2006-08-15 to src/stat.c. * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h. (ME_DUMMY): Treat "kernfs" as a dummy. (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for sys/statvfs.h. When getmntinfo was found, check its declaration and set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Test also for f_fstypename in struct statvfs.
2006-08-18* src/system.h (select_plural): Reduce by 1000000, not 1000, sincePaul Eggert
the CVS gettext manual now suggests 1000000.
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert
2006-08-17ls -CF would misalign columns in some cases.Jim Meyering
* src/ls.c (get_type_indicator): New function. extracted from... (print_type_indicator): ...here. Use it. (length_of_file_name_and_frills): Use it here, too, rather than assuming stat.st_mode is valid. Reported by Andreas Schwab, here: <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774> FIXME: add a test for this: FYI, I did ls -CF /proc and visually inspected the result.
2006-08-17* src/copy.c (copy_internal, same_file_ok): Adjust comments notJim Meyering
to mention the now-removed cp_options.xstat member.
2006-08-17With this patch, permit building with Solaris cc on Solaris 7.Jim Meyering
* src/c99-to-c89.diff: Add diffs to convert more c99-isms. This integrates patches from Bruno Haible.
2006-08-16Fix bugs when printing plurals of numbers that are notPaul Eggert
unsigned long int values. * src/system.h (select_plural): New function. * src/md5sum.c (digest_check): Use select_plural to avoid bug. * src/uptime.c (print_uptime): Likewise. * src/dd.c (print_stats): Likewise. Also, don't use ngettext to print a floating point number, as reducing to 0 or 1 doesn't work for some languages. Instead, just use "s" for seconds since it doesn't need a plural form.
2006-08-15* NEWS: Mention that df exits with nonzero status if it generatesPaul Eggert
no output. This change was in 6.0 but inadvertently unmentioned. * doc/coreutils.texi (df invocation): df exits nonzero if it outpus nothing. * src/df.c (file_systems_processed): Renamed from n_valid_args, and now a boolean. (show_dev): Don't set it until we actually output something. Print the header if this is the first output. (main): Don't print a header, as that is now show_dev's job. * tests/misc/Makefile.am (TESTS): Add df. * tests/misc/df: New file.
2006-08-15(USE_STATVFS): Define to 0 if f_type is needed, butPaul Eggert
statvfs.f_type not present.
2006-08-15* src/dd.c (print_stats): Don't substitute "1" for number, as thisPaul Eggert
causes confusion for the Hungarian translators. Problem reported by Egmont Koblinger.
2006-08-15.Jim Meyering
2006-08-13* src/shred.c (usage): Don't indent the second line of an item.Jim Meyering
Otherwise, help2man would misformat the output. Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
2006-08-10(struct control): Remove fastmap member.Paul Eggert
(extract_regexp): Allocate fastmap separately, since otherwise it might move due to a realloc.
2006-08-10* src/dircolors.hin: Add a TERM directive for each of the following:Jim Meyering
ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin, rxvt-cygwin-native, screen.linux, xterm-256color. Sort the TERM directives. From Mike Frysinger.
2006-08-09Regenerate.Paul Eggert
2006-08-09Warn about oflag=append without conv=notrunc.Paul Eggert
2006-08-09Add mlterm, rxvt-unicode; this fixes Debian bug 317503.Paul Eggert