summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-10-30 23:04:17 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-10-30 23:04:17 +0000
commit3103c9009ba57195ee767984c350533472fa9b8c (patch)
treeb6f23b72e272d4e0cc2bb98808069671205fbf52 /m4
parenta54170c2a0726cc004768fed66c8f6251e0d4895 (diff)
downloadcoreutils-3103c9009ba57195ee767984c350533472fa9b8c.tar.xz
(gl_FUNC_FPENDING): Correct check for SCO systems,
where __ptr is null when no I/O is pending.
Diffstat (limited to 'm4')
-rw-r--r--m4/fpending.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index 87398b142..f43aaa419 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
# Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -42,7 +42,7 @@ AC_DEFUN([gl_FUNC_FPENDING],
'fp->_p - fp->_bf._base' \
\
'# SCO, Unixware' \
- 'fp->__ptr - fp->__base' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
\
'# old glibc?' \
'fp->__bufp - fp->__buffer' \