On Wed, 12 Sep 2001, Steve Langasek wrote: > Rather than a single jumbo patch, perhaps it would help to first add autoconf > support and a sample usage of getpwnam_r()? After that, adding proper > reentrant support to all of the modules should be fairly parallelizable. In fact, let's go ahead and get started on this. I've just committed changes to the autoconf code which add HAVE_GETPWNAM_R and HAVE_GETGRNAM_R defines if those functions are available. More can be added for the other NSS functions as we get farther along. Is the following ok for a first implementation, or do you have more ambitious plans? I believe you mentioned providing a wrapper for systems that don't have getpwnam_r(), but I'm personally quite content with this. Regards, Steve Langasek postmodern programmer struct passwd *pwd = NULL; #if HAVE_GETPWNAM_R char buf[512]; struct passwd pwd_buf; pwd = &pwd_buf; #endif ... #if HAVE_GETPWNAM_R getpwnam_r(name, pwd, buf, sizeof(buf), &pwd); #else pwd = getpwnam(name); #endif