summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-05-28 12:42:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-05-28 13:44:40 -0700
commit3b1046f80f3381af7f81aec7ed8041a883fb50fa (patch)
treed1271dfc142ccc0dbb12b8814cad21984b7aef94 /configure.ac
parent3a87ad51240b593c79f06ca98ca38117908a78c8 (diff)
downloadcoreutils-3b1046f80f3381af7f81aec7ed8041a883fb50fa.tar.gz
cp: fix /dev/stdin problem on Solaris
Problem reported by Jakub Kulik (Bug#35713). * NEWS: Mention this. * configure.ac (DEV_FD_MIGHT_BE_CHR): New macro. * src/copy.c (DEV_FD_MIGHT_BE_CHR): Default to false. (follow_fstatat): New function. (copy_internal): Use it. * src/copy.h (XSTAT): Remove; no longer used.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 781a305e2..d90c710e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,6 +353,15 @@ case $utils_cv_func_setpriority,$ac_cv_func_nice in
gl_ADD_PROG([optional_bin_progs], [nice])
esac
+if test "$cross_compiling" = yes || test -c /dev/stdin <.; then
+ AC_DEFINE([DEV_FD_MIGHT_BE_CHR], [1],
+ [Define to 1 if /dev/std{in,out,err} and /dev/fd/N, if they exist, might be
+ character-special devices whose minor device number is the file
+ descriptor number, such as on Solaris. Leave undefined if they are
+ definitely the actual files. This determination should be done after any
+ symbolic links are followed.])
+fi
+
AC_DEFUN([coreutils_DUMMY_1],
[
AC_REQUIRE([gl_READUTMP])