Subject: Re: Fwd: libc without YP
To: Luke Mewburn <>
From: Srinivasa Kanduru <>
List: tech-toolchain
Date: 11/25/2003 00:02:36
I have neither enabled YP nor HESIOD. But I think now I know what the problem
is .. Thanks for the hint. Do you think this is right ?

Leaving HESIOD undefined matches the following condition and enables HESIOD in
the CPPFLAGS which is not what is intended I think.

.if (${USE_HESIOD} != "no")

Maybe the right way to put the condition is

.if (${USE_HESIOD} == "yes")

That solves the problem.

In anycase the #includes of <sys/param.h> and <stdio.h> should be outside the
#ifdef YP I think as they are not related to YP.

So the minimal diffs would be the above change in the makefile and the
following diffs:diff -u getpwent.c*
--- getpwent.c  Mon Nov 24 23:51:12 2003
+++ getpwent.c.orig     Mon Nov 24 11:42:03 2003
@@ -59,13 +59,13 @@
 #include <syslog.h>
 #include <unistd.h>
 #include <utmp.h>
-#include <machine/param.h>
-#include <stdio.h>
 #ifdef HESIOD
 #include <hesiod.h>
 #ifdef YP
+#include <machine/param.h>
+#include <stdio.h>
 #include <rpc/rpc.h>
 #include <rpcsvc/yp_prot.h>
 #include <rpcsvc/ypclnt.h>


--- Luke Mewburn <> wrote:
> On Mon, Nov 24, 2003 at 10:50:03AM -0800, Srinivasa Kanduru wrote:
>   | The code snippet  (gen/getpwent.c) ..
>   | 
>   | The definition of the function __pwparse() is not in #ifdef YP
> __pwparse() is provided #ifdef _PASSWD_COMPAT, not #ifdef YP.
> _PASSWD_COMPAT is defined if either of YP or HESIOD is #define-d.
> so, it appears that you're trying to build with -UYP -DHESIOD.
> is that correct?
> if so, we need to improve the namespace protection in that case.

Do you Yahoo!?
Free Pop-Up Blocker - Get it now