You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by David Reid <dr...@jetnet.co.uk> on 2000/11/16 14:34:01 UTC
[PATCH] Homedir.c
FreeBSD doesn't use this piece of code, but shouldn't it be a pointer...
Index: user/unix/homedir.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/user/unix/homedir.c,v
retrieving revision 1.1
diff -u -r1.1 homedir.c
--- user/unix/homedir.c 2000/11/13 03:18:18 1.1
+++ user/unix/homedir.c 2000/11/16 13:32:00
@@ -67,7 +67,7 @@
{
struct passwd *pw;
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- struct passwd pwd;
+ struct passwd *pwd;
char pwbuf[512];
#endif
Re: [PATCH] Homedir.c
Posted by rb...@covalent.net.
On Thu, 16 Nov 2000, David Reid wrote:
> FreeBSD doesn't use this piece of code, but shouldn't it be a pointer...
No, because we pass it as a pointer to getpwnam_r. This value is an
actual structure that we fill out using memory from the buf. Then a
pointer is returned to this exact structure in the final argument. It is
kind of convoluted, but it works.
Ryan
>
> Index: user/unix/homedir.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/lib/apr/user/unix/homedir.c,v
> retrieving revision 1.1
> diff -u -r1.1 homedir.c
> --- user/unix/homedir.c 2000/11/13 03:18:18 1.1
> +++ user/unix/homedir.c 2000/11/16 13:32:00
> @@ -67,7 +67,7 @@
> {
> struct passwd *pw;
> #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
> - struct passwd pwd;
> + struct passwd *pwd;
> char pwbuf[512];
> #endif
>
>
>
>
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------