Subject: Re: mntent.h include nested too many times (What should I do with
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/10/2003 11:41:50
On Fri, 10 Oct 2003, Jeremy C. Reed wrote:

> http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=23017 ??

I didn't receive any feedback. But the following patch works for me under
Linux and under NetBSD.

The problem is that -I. uses local header before system header which
makes it loop ... "#include nested too deeply".

Any comments or advice?

Index: sysutils/fam/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/distinfo,v
retrieving revision 1.5
diff -b -u -r1.5 distinfo
--- sysutils/fam/distinfo	2002/12/17 19:43:39	1.5
+++ sysutils/fam/distinfo	2003/10/10 18:37:04
@@ -5,19 +5,20 @@
 SHA1 (patch-aa) = 6aa9a0ecda1d51ffa3e4ac2a45c02a9e629bb8bd
 SHA1 (patch-ab) = 60897dc25f7e18f584cba0c6d22538b1d0b11ecf
 SHA1 (patch-ac) = 5e76e34ebb14e9db2c76f5bdcbfd31cb70991d70
-SHA1 (patch-ae) = e07e52e8011e2f22e0391d33764a223e6ac769a4
-SHA1 (patch-af) = c982b3e2ada3274881990c5ea183ca692ff543fe
+SHA1 (patch-ad) = 223f08e85d541b3ee96bf4104c267f37f5c345f3
+SHA1 (patch-ae) = a6a686d175ef3b82531a721f0375aee39237d72e
+SHA1 (patch-af) = 572b8aa1760b055a86e7046910ed58631d8b15d9
 SHA1 (patch-ag) = 059eb7191fc03765e0840a0faed0b27eb6919b74
 SHA1 (patch-ah) = a31f816d61127636663d16ad8e87169715661e3c
 SHA1 (patch-ai) = 62e013a8559aa5207085d80ed0bb77e005a4788e
 SHA1 (patch-aj) = c442ff2fd4afc1e011953b421d20f1adc9e92b06
 SHA1 (patch-ak) = dc18202214fc0ce153ecbab2a4f7759e32d9e11f
-SHA1 (patch-al) = dee33dd3c235be568b35a57a34f6ca703bc8f411
-SHA1 (patch-an) = 8416a0de32fec6cbf615083d44fd0b5add5cd8e3
-SHA1 (patch-ao) = aa9e0cd237460004d4e1f89a3f4bced11ee620b7
-SHA1 (patch-ap) = 75ca4b6a32f1c3ed1a085457b4de9bb228242fad
+SHA1 (patch-al) = 147c37fa689730680a2ce1e3d90d18ae1a09317f
+SHA1 (patch-an) = a79e11cd0aca300b328f2de356580423b0cdab02
+SHA1 (patch-ao) = a94b163691bfba8c548ea03f2c937787febfc225
+SHA1 (patch-ap) = 7ba84b1331291f972f2494a51f3f81ef5dc27082
 SHA1 (patch-at) = 83f5680d43ad0e06e5eca517cbba2d0866ae42bc
-SHA1 (patch-au) = f6ba3953b892f40158e6e4bde5d8b28bf930f241
+SHA1 (patch-au) = a8922a4e96321d20c74d61cbcee737796690518a
 SHA1 (patch-av) = 18a90c53d641305ef02f71bf443c84d50a2c3fff
 SHA1 (patch-aw) = a6b75b6c2b85d1b8247cee16fd23fbaffa346c05
 SHA1 (patch-ax) = 4f18da00e202b397615588480b78e4dc4248cc23
Index: sysutils/fam/patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-ae,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ae
--- sysutils/fam/patches/patch-ae	2002/08/25 19:23:21	1.2
+++ sysutils/fam/patches/patch-ae	2003/10/10 18:37:04
@@ -7,7 +7,7 @@
  #include "FileSystem.h"

 -#include <mntent.h>
-+#include "mntent.h"
++#include "fam-mntent.h"
  #include <string.h>

  #include "Event.h"
Index: sysutils/fam/patches/patch-af
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-af,v
retrieving revision 1.2
diff -b -u -r1.2 patch-af
--- sysutils/fam/patches/patch-af	2002/08/25 19:23:21	1.2
+++ sysutils/fam/patches/patch-af	2003/10/10 18:37:05
@@ -10,7 +10,7 @@
  #include "FileSystemTable.h"

 -#include <mntent.h>
-+#include "mntent.h"
++#include "fam-mntent.h"
  #include <stdlib.h>
  #include <string.h>
 +#include <sys/param.h>
Index: sysutils/fam/patches/patch-al
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-al,v
retrieving revision 1.2
diff -b -u -r1.2 patch-al
--- sysutils/fam/patches/patch-al	2002/08/25 19:23:21	1.2
+++ sysutils/fam/patches/patch-al	2003/10/10 18:37:05
@@ -6,7 +6,7 @@
    main.c++ \
    timeval.c++ \
    timeval.h \
-+  mntent_compat.c++ \
++  fam-mntent_compat.c++ \
    @IMON_FUNCS@.c++

  EXTRA_fam_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++
Index: sysutils/fam/patches/patch-an
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-an,v
retrieving revision 1.2
diff -b -u -r1.2 patch-an
--- sysutils/fam/patches/patch-an	2002/08/25 19:23:21	1.2
+++ sysutils/fam/patches/patch-an	2003/10/10 18:37:05
@@ -6,7 +6,7 @@

  #include <assert.h>
  #include <string.h>
-+#include "mntent.h"
++#include "fam-mntent.h"

  //  A StringTable maps C strings onto values.  It is a cheap O(n)
  //  implementation, suitable only for small tables that are
Index: sysutils/fam/patches/patch-ao
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-ao,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ao
--- sysutils/fam/patches/patch-ao	2002/08/25 19:23:22	1.2
+++ sysutils/fam/patches/patch-ao	2003/10/10 18:37:05
@@ -1,11 +1,11 @@
 $NetBSD: patch-ao,v 1.2 2002/08/25 19:23:22 jlam Exp $

---- fam/mntent.h.orig	Sun May 12 19:15:01 2002
-+++ fam/mntent.h
+--- fam/fam-mntent.h.orig	Sun May 12 19:15:01 2002
++++ fam/fam-mntent.h
 @@ -0,0 +1,56 @@
 +/*
 + *  mntent
-+ *  mntent.h - compatability header for BSD
++ *  fam-mntent.h - compatability header for BSD
 + *
 + *  Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
 + *  All rights reserved.
Index: sysutils/fam/patches/patch-ap
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-ap,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ap
--- sysutils/fam/patches/patch-ap	2002/08/25 19:23:22	1.2
+++ sysutils/fam/patches/patch-ap	2003/10/10 18:37:05
@@ -1,7 +1,7 @@
 $NetBSD: patch-ap,v 1.2 2002/08/25 19:23:22 jlam Exp $

---- fam/mntent_compat.c++.orig	Sun May 12 19:37:49 2002
-+++ fam/mntent_compat.c++
+--- fam/fam-mntent_compat.c++.orig	Sun May 12 19:37:49 2002
++++ fam/fam-mntent_compat.c++
 @@ -0,0 +1,174 @@
 +/*
 + * Copyright (c) 1980, 1989, 1993, 1994
@@ -41,7 +41,7 @@
 +/* most of this was ripped from the mount(3) source */
 +
 +#include "config.h"
-+#include "mntent.h"
++#include "fam-mntent.h"
 +#if !defined(HAVE_MNTENT_H)
 +#include <stdlib.h>
 +#include <string.h>
Index: sysutils/fam/patches/patch-au
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/fam/patches/patch-au,v
retrieving revision 1.3
diff -b -u -r1.3 patch-au
--- sysutils/fam/patches/patch-au	2002/12/17 19:43:43	1.3
+++ sysutils/fam/patches/patch-au	2003/10/10 18:37:06
@@ -15,7 +15,7 @@
    main.c++ \
    timeval.c++ \
    timeval.h \
-+  mntent_compat.c++ \
++  fam-mntent_compat.c++ \
    @IMON_FUNCS@.c++


@@ -23,7 +23,7 @@
  RPC_TCP_Connector.$(OBJEXT) Scanner.$(OBJEXT) Scheduler.$(OBJEXT) \
  ServerConnection.$(OBJEXT) ServerHost.$(OBJEXT) ServerHostRef.$(OBJEXT) \
  TCP_Client.$(OBJEXT) main.$(OBJEXT) timeval.$(OBJEXT) \
-+mntent_compat.$(OBJEXT) \
++fam-mntent_compat.$(OBJEXT) \
  @IMON_FUNCS@.$(OBJEXT)
  fam_DEPENDENCIES =  $(top_srcdir)/support/libsupport.a
  fam_LDFLAGS =

   Jeremy C. Reed
   http://www.reedmedia.net/