apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: [PATCH] Homedir.c
Date Thu, 16 Nov 2000 16:02:37 GMT
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
-------------------------------------------------------------------------------


Mime
View raw message