Subject: Fwd: libc without YP
To: None <tech-toolchain@netbsd.org>
From: Srinivasa Kanduru <ksraghavan@yahoo.com>
List: tech-toolchain
Date: 11/24/2003 10:50:03
--0-603524972-1069699803=:53312
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

The code snippet  (gen/getpwent.c) ..

The definition of the function __pwparse() is not in #ifdef YP

Version:
---------
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)getpwent.c  8.2 (Berkeley) 4/27/95";
#else
__RCSID("$NetBSD: getpwent.c,v 1.50 2002/04/16 19:10:07 groo Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

#ifdef YP
static char     *__ypcurrent, *__ypdomain;
static int      __ypcurrentlen;
static int      _pw_ypdone;             /* non-zero if no more yp records */
#endif


/*               
 * parse a passwd file line (from NIS or HESIOD).   
 * assumed to be `old-style' if maptype != YPMAP_MASTER.
 */
static int
__pwparse(pw, s)
     struct passwd *pw;
      char *s;
{                if (yp_match(__ypdomain, "passwd.adjunct.byname", pw->pw_name,
                    (int)strlen(pw->pw_name), &data, &datalen) == 0) {
                        strlcpy(adjunctpw, data, MIN((size_t)datalen,
                            sizeof(adjunctpw)));

                                /* skip name to get password */
                        if ((bp = strsep(&data, ":")) != NULL &&
                            (bp = strsep(&data, ":")) != NULL)
                                pw->pw_passwd = bp;
                }
...
}

...

Note: forwarded message attached.


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--0-603524972-1069699803=:53312
Content-Type: message/rfc822

  by mta117.mail.scd.yahoo.com with SMTP; Mon, 24 Nov 2003 10:36:18 -0800
  by mail.netbsd.org with SMTP; 24 Nov 2003 18:36:08 -0000
Date: Mon, 24 Nov 2003 10:36:08 -0800 (PST)
From: Srinivasa Kanduru <ksraghavan@yahoo.com>
Subject: libc without YP
To: tech-toolchain@netbsd.org
In-Reply-To: <Pine.LNX.4.43.0311210829560.13324-100000@pilchuck.reedmedia.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: tech-toolchain-owner@NetBSD.org
Content-Length: 689

Hi,

I was trying to build libc without YP dependency, but looks like there is some
dependency contradictory to what the libc/Makefile defines ..

In libc/Makefile

.if (${MKYP} != "no")
.include "${.CURDIR}/yp/Makefile.inc"
.endif

so the yp/*.c are not included , yet in  gen/getpwent.c there are some
references which are included only in the "#ifdef YP" code like

char *__ypdomain;
yp_match() /* defined in yp/yp_match.c

#define YPMAXRECORD 1024 /* This is in rpcsvc/yp_prot.h */ again included in
"#ifdef YP" code

Is there anyway that I can exclude it ?

Thanks,
Srini.

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--0-603524972-1069699803=:53312--