]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(gl_FUNC_FPENDING): Correct check for SCO systems,
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Oct 2005 23:04:17 +0000 (23:04 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 30 Oct 2005 23:04:17 +0000 (23:04 +0000)
where __ptr is null when no I/O is pending.

m4/fpending.m4

index 87398b142b4ba5e9ccccfd631ecac62be355c8de..f43aaa41958b3523715588f577373ac704cf54f2 100644 (file)
@@ -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'                         \