mv --verbose now distinguishes rename and copy operations.
+ stat -f -c %l, used to output the max file name length on a file system,
+ is now supported on FreeBSD and OpenBSD.
+
tail -f now exits immediately if the output is piped
and the reader of the pipe terminates.
[AC_DEFINE([STRUCT_STATVFS_F_FSID_IS_INTEGER], [1],
[Define to 1 if the f_fsid member of struct statvfs is an integer.])])
else
- AC_CHECK_MEMBERS([struct statfs.f_namelen, struct statfs.f_type,
- struct statfs.f_frsize],,, [$statfs_includes])
+ AC_CHECK_MEMBERS([struct statfs.f_namelen, struct statfs.f_namemax,
+ struct statfs.f_type, struct statfs.f_frsize],,,
+ [$statfs_includes])
if test $ac_cv_header_OS_h != yes; then
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
# define HAVE_STRUCT_STATXFS_F_TYPE HAVE_STRUCT_STATFS_F_TYPE
# if HAVE_STRUCT_STATFS_F_NAMELEN
# define SB_F_NAMEMAX(S) ((S)->f_namelen)
+# elif HAVE_STRUCT_STATFS_F_NAMEMAX
+# define SB_F_NAMEMAX(S) ((S)->f_namemax)
# endif
# define STATFS statfs
# if HAVE_OS_H /* BeOS */
#ifdef SB_F_NAMEMAX
# define OUT_NAMEMAX out_uint
#else
-/* NetBSD 1.5.2 has neither f_namemax nor f_namelen. */
-# define SB_F_NAMEMAX(S) "*"
+/* Depending on whether statvfs or statfs is used,
+ neither f_namemax or f_namelen may be available. */
+# define SB_F_NAMEMAX(S) "?"
# define OUT_NAMEMAX out_string
#endif
# Ensure we replace symlinks that don't or can't link to an existing target.
# coreutils-8.22 would fail to replace {ENOTDIR,ELOOP,ENAMETOOLONG}_link below.
-name_max=$(stat -f -c %l .) || skip_ 'Error determining NAME_MAX'
-# Apply a limit since AIX returns 2^32-1 which would trigger resource issues.
-name_limit=$((1024*1024))
-test "$name_max" -lt "$name_limit" || name_max="$name_limit"
+# We apply a limit since AIX returns 2^32-1 which would trigger resource issues.
+name_max=$(stat -f -c %l .) && test "$name_max" -lt $((1024*1024)) ||
+ name_max=1 # skip this portion of the test
name_max_plus1=$(expr $name_max + 1)
-test $name_max_plus1 -gt 1 || skip_ 'Error determining NAME_MAX'
long_name=$(printf '%0*d' $name_max_plus1 0)
for f in '' f; do