bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils on interix: mods to savewd.c and who.c


From: Jim Meyering
Subject: Re: coreutils on interix: mods to savewd.c and who.c
Date: Mon, 17 Sep 2007 18:57:57 +0200

Martin Koeppe <address@hidden> wrote:
> Hi all,
...
> Another issue: I first tried to configure with
> --enable-no-install-program=who, but nevertheless who.c is tried to be
> built.

That's deliberate.  Otherwise, the usually-not-installed
programs would tend to decay.

> Shouldn't --enable-no-install-program also disable compilation
> of who.c? One might try to disable it, because it doesn't build :-)

...

> --- coreutils-6.10~20070907/gnulib/m4/ls-mntd-fs.m4.orig      Sun Sep 24 
> 08:49:03 2006
> +++ coreutils-6.10~20070907/gnulib/m4/ls-mntd-fs.m4   Sat Sep 15 20:58:50 2007
...
> -  AC_MSG_ERROR([could not determine how to read list of mounted file 
> systems])
> +  AC_MSG_WARN([could not determine how to read list of mounted file systems])

There's an Interix-specific patch to address this properly, but afaik,
the author never filed copyright paperwork, so I can't use it.
Maybe someone else will look into it.

> --- coreutils-6.10~20070907/gnulib/lib/savewd.c.orig  Wed Mar 21 09:07:20 2007
> +++ coreutils-6.10~20070907/gnulib/lib/savewd.c       Sat Sep 15 22:10:47 2007
> @@ -54,7 +54,11 @@
>           wd->val.fd = fd;
>           break;
>         }
> -     if (errno != EACCES && errno != ESTALE)
> +     if (errno != EACCES
> +#ifndef __INTERIX
> +      && errno != ESTALE
> +#endif
> +     )
>         {
>           wd->state = ERROR_STATE;
>           wd->val.errnum = errno;

Thanks.
I've addressed that differently (I'm against in-function #ifdefs):

        * lib/savewd.c (ESTALE) [!defined]: Define.
        Reported to be required on Interix by Martin Koeppe.

Index: lib/savewd.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/savewd.c,v
retrieving revision 1.6
diff -u -p -r1.6 savewd.c
--- lib/savewd.c        21 Mar 2007 08:07:20 -0000      1.6
+++ lib/savewd.c        17 Sep 2007 16:50:10 -0000
@@ -35,6 +35,9 @@
 #include "dirname.h"
 #include "fcntl-safer.h"

+#ifndef ESTALE
+# define ESTALE -1
+#endif

 /* Save the working directory into *WD, if it hasn't been saved
    already.  Return true if a child has been forked to do the real




reply via email to

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