From: Paul Eggert Date: Mon, 14 Jun 2010 19:20:22 +0000 (-0700) Subject: priv-set: Don't assume that priv.h exists merely because getppriv does. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=823b6cf1431f71d7b5f939830444771d23346e66;p=pspp priv-set: Don't assume that priv.h exists merely because getppriv does. See Jan Andersen's bug report about AIX 5L in http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00019.html * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h. * lib/priv-set.c: Do nothing unless HAVE_PRIV_H. * lib/priv-set.h: Likewise. * tests/test-priv-set.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index dfcc99abd7..7cfad41f28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-06-14 Paul Eggert + + priv-set: Don't assume that priv.h exists merely because getppriv does. + See Jan Andersen's bug report about AIX 5L in + http://lists.gnu.org/archive/html/bug-tar/2010-06/msg00019.html + * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h. + * lib/priv-set.c: Do nothing unless HAVE_PRIV_H. + * lib/priv-set.h: Likewise. + * tests/test-priv-set.c: Likewise. + 2010-06-13 Bruno Haible relocatable: Make it easier to test whether to install wrappers. diff --git a/lib/priv-set.c b/lib/priv-set.c index 911c28000f..0ac1b977e2 100644 --- a/lib/priv-set.c +++ b/lib/priv-set.c @@ -20,7 +20,7 @@ #include #include "priv-set.h" -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include # include diff --git a/lib/priv-set.h b/lib/priv-set.h index b8f8b72723..5cac9cedec 100644 --- a/lib/priv-set.h +++ b/lib/priv-set.h @@ -17,7 +17,7 @@ Written by David Bartley. */ -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include diff --git a/m4/priv-set.m4 b/m4/priv-set.m4 index 205b00c6c1..aaa1896189 100644 --- a/m4/priv-set.m4 +++ b/m4/priv-set.m4 @@ -1,4 +1,4 @@ -# serial 6 +# serial 7 # Copyright (C) 2009, 2010 Free Software Foundation, Inc. # @@ -12,4 +12,5 @@ AC_DEFUN([gl_PRIV_SET], [ AC_REQUIRE([AC_C_INLINE]) AC_CHECK_FUNCS([getppriv]) + AC_CHECK_HEADERS_ONCE([priv.h]) ]) diff --git a/tests/test-priv-set.c b/tests/test-priv-set.c index 49ad388f1f..4b17f0c194 100644 --- a/tests/test-priv-set.c +++ b/tests/test-priv-set.c @@ -20,7 +20,7 @@ #include "priv-set.h" -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H # include #endif #include @@ -32,7 +32,7 @@ int main (void) { -#if HAVE_GETPPRIV +#if HAVE_GETPPRIV && HAVE_PRIV_H priv_set_t *set; ASSERT (set = priv_allocset ());