bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] mountlist merge from coreutils


From: Paul Eggert
Subject: [Bug-gnulib] mountlist merge from coreutils
Date: Tue, 30 Mar 2004 23:31:02 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed this:

2004-03-30  Jim Meyering  <address@hidden>

        * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.

        Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
        * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
        on some systems one must include <grp.h> before it.
        Reported by Christian Krackowizer.

Index: lib/mountlist.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/mountlist.c,v
retrieving revision 1.44
diff -p -u -r1.44 mountlist.c
--- lib/mountlist.c     1 Nov 2003 06:00:46 -0000       1.44
+++ lib/mountlist.c     31 Mar 2004 07:27:04 -0000
@@ -1,5 +1,5 @@
 /* mountlist.c -- return a list of mounted filesystems
-   Copyright (C) 1991, 1992, 1997-2003 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997-2004 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -53,6 +53,8 @@ extern int errno;
 
 #if defined MOUNTED_GETFSSTAT  /* OSF_1 and Darwin1.3.x */
 # if HAVE_SYS_UCRED_H
+#  include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
+                     NGROUPS is used as an array dimension in ucred.h */
 #  include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
 # endif
 # if HAVE_SYS_MOUNT_H
Index: m4/ls-mntd-fs.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/ls-mntd-fs.m4,v
retrieving revision 1.25
diff -p -u -r1.25 ls-mntd-fs.m4
--- m4/ls-mntd-fs.m4    14 Aug 2003 23:34:39 -0000      1.25
+++ m4/ls-mntd-fs.m4    31 Mar 2004 07:27:04 -0000
@@ -1,4 +1,4 @@
-#serial 13
+#serial 14
 
 dnl From Jim Meyering.
 dnl
@@ -11,13 +11,19 @@ AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS],
   [
 AC_CHECK_FUNCS(listmntent getmntinfo)
 AC_CHECK_HEADERS_ONCE(sys/param.h)
-AC_CHECK_HEADERS(mntent.h sys/ucred.h sys/mount.h sys/fs_types.h)
+
+# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
+# NGROUPS (as the array dimension for a struct member) without a definition.
+AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>])
+
+AC_CHECK_HEADERS(mntent.h sys/mount.h sys/fs_types.h)
     getfsstat_includes="\
 $ac_includes_default
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
 #endif
 #if HAVE_SYS_UCRED_H
+# include <grp.h> /* needed for definition of NGROUPS */
 # include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
 #endif
 #if HAVE_SYS_MOUNT_H




reply via email to

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