bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small patch for chdir-long.m4 and fpending.m4


From: Kean Johnston
Subject: Small patch for chdir-long.m4 and fpending.m4
Date: Fri, 28 Oct 2005 23:52:49 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

All,

Attached is a patch to teh files in $subject. Here's the
rationale. chdir-long.h checks to see if PATH_MAX is defined,
and if not, defined it to MAXPATHLEN, if that is defined.
However, the m4 check only checks for PATH_MAX, when it should
really be checking for both.

As for the fpending.m4 patch, on SCO systems, the stdio library
sets __ptr to 0 when there is no pending I/O, so a simple
subtraction of __ptr and __base is guaranteed to fail (and
always did).

Please let me know if you have any comments / questions. I dont
subscribe to the list so please include me explicitly.

Thanks for a great package!

Kean
2005-10-28  Kean Johnston  <address@hidden>

        * m4/chdir-long.m4: Check for MAXPATHLEN as well as PATH_MAX.
        * m4/fpending.m4: Correct check for SCO systems, where __ptr is
        set to 0 when no I/O is pending.


Index: m4/chdir-long.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/chdir-long.m4,v
retrieving revision 1.7
diff -u -3 -p -r1.7 chdir-long.m4
--- m4/chdir-long.m4    2 Oct 2005 10:09:14 -0000       1.7
+++ m4/chdir-long.m4    29 Oct 2005 06:45:53 -0000
@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_CHDIR_LONG],
     [AC_EGREP_CPP([have_path_max_definition],
                   [#include <unistd.h>
 #include <limits.h>
-#ifdef PATH_MAX
+#if defined(PATH_MAX) || defined(MAXPATHLEN)
 have_path_max_definition
 #endif],
     gl_have_path_max_definition=yes,
Index: m4/fpending.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/fpending.m4,v
retrieving revision 1.14
diff -u -3 -p -r1.14 fpending.m4
--- m4/fpending.m4      29 Jan 2005 00:16:39 -0000      1.14
+++ m4/fpending.m4      29 Oct 2005 06:45:53 -0000
@@ -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'                         \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]