Subject: Re: Fwd: libc without YP
To: NetBSD Toolchain Technical Discussion List <tech-toolchain@NetBSD.ORG>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-toolchain
Date: 11/28/2003 08:19:32
On Thu, Nov 27, 2003 at 01:45:35AM -0500, Greg A. Woods wrote:
| [ On Wednesday, November 26, 2003 at 11:50:24 (+1100), Luke Mewburn wrote: ]
| > Subject: Re: Fwd: libc without YP
| >
| > I've fixed gen/getpwent.c when compiling with -UYP -DHESIOD
| > (AKA 'make MKYP=no MKHESIOD=yes')
|
| I've not looked at your changes in -current yet (and won't have time for
| many weeks I'm afraid), but while I'm skimming through these messages to
| get caught up to date I will note that in netbsd-1-6 there are some
| other minor changes necessary (over and above what I initially found to
| be necessary just to get the compile to work) in order to actually
| eliminated all the unnecessary code. There may be some other changes
| necessary outside of getpwent.c too, but if so I forget where. :-)
|
| BTW, I also remove /etc/nsswitch.conf as opening and reading it just
| slows things down even more and the default is now effectively the only
| valid configuration.
Some points:
* The compat routine needs to exist _especially_ in the default
case, since the default for passwd: is "compat".
* There is no point doing
#ifdef YP
NS_NIS_CB(_nis_getpw, NULL)
#endif
since the definition for NS_NIS_CB() already does the right
thing if YP isn't defined. (See <nsswitch.h>)
* The compat code is for more than just YP (it's also for HESIOD),
so doing
#ifdef YP
NS_NIS_CB(_nis_getpw, NULL)
NS_COMPAT_CB(_compat_getpwent, NULL)
#endif
is not correct _anyway_.
* We generally try to avoid "whitespace cleanups" in the same
commit as "functionality changes".
* "cvs diff -p" is our friend :-)
In short, I don't think this diff is necessary or correct.
Cheers,
Luke.