[hurd,commited,2/3] hurd: Fix building io/tst-fchownat.c
Commit Message
* io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
_POSIX_CHOWN_RESTRICTED is defined to 0.
---
ChangeLog | 2 ++
io/tst-fchownat.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
Comments
On Jan 28 2018, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> * io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
> _POSIX_CHOWN_RESTRICTED is defined to 0.
_POSIX_CHOWN_RESTRICTED must not be undefined (and undefined is _not_
the same as 0). Fix the hurd header instead.
Andreas.
Andreas Schwab, on dim. 28 janv. 2018 18:35:37 +0100, wrote:
> On Jan 28 2018, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
>
> > * io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
> > _POSIX_CHOWN_RESTRICTED is defined to 0.
>
> _POSIX_CHOWN_RESTRICTED must not be undefined (and undefined is _not_
> the same as 0). Fix the hurd header instead.
So the #ifdef in posix/fpathconf.c should be dropped?
Samuel
Samuel Thibault, on dim. 28 janv. 2018 18:37:17 +0100, wrote:
> Andreas Schwab, on dim. 28 janv. 2018 18:35:37 +0100, wrote:
> > On Jan 28 2018, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> >
> > > * io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
> > > _POSIX_CHOWN_RESTRICTED is defined to 0.
> >
> > _POSIX_CHOWN_RESTRICTED must not be undefined (and undefined is _not_
> > the same as 0). Fix the hurd header instead.
>
> So the #ifdef in posix/fpathconf.c should be dropped?
I have reverted it.
Samuel
@@ -56,6 +56,8 @@
* libio/tst-memstream3.c (FWRITE): Rename to _FWRITE.
(do_test_bz20181): Rename accordingly.
* libio/tst-wmemstream3.c (FWRITE): Rename accordingly.
+ * io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
+ _POSIX_CHOWN_RESTRICTED is defined to 0.
2008-12-18 Thomas Schwinge <tschwinge@gnu.org>
@@ -20,7 +20,7 @@ static int dir_fd;
static void
prepare (void)
{
-#if _POSIX_CHOWN_RESTRICTED == 0
+#if !defined _POSIX_CHOWN_RESTRICTED || _POSIX_CHOWN_RESTRICTED == 0
if (pathconf (test_dir, _PC_CHOWN_RESTRICTED) != 0)
#endif
{