You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/07/20 14:36:13 UTC

cvs commit: apr/user/unix groupinfo.c userinfo.c

trawick     01/07/20 05:36:13

  Modified:    .        CHANGES
               user/unix groupinfo.c userinfo.c
  Log:
  include <unistd.h> to get _POSIX_THREAD_SAFE_FUNCTIONS defined
  (at least glibc 2.1)
  
  I didn't check to see if this was broken in a9, so I mentioned
  it in CHANGES just to be safe (or lazy)
  
  Revision  Changes    Path
  1.122     +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- CHANGES	2001/07/19 00:11:56	1.121
  +++ CHANGES	2001/07/20 12:36:13	1.122
  @@ -1,5 +1,9 @@
   Changes with APR b1  
   
  +  *) Use getpwnam_r() and getgrgid_r() instead of getpwnam() and getgrgid()
  +     with threaded builds on glibc (2.1, at least) to avoid thread safety
  +     issues.  [Jeff Trawick]
  +
     *) Added apr_lock_tryacquire.  It will attempt to acquire the lock, but 
        will not block if it can not acquire the lock.  Returns APR_EBUSY if 
        acquistion can not happen.  [Justin Erenkrantz]
  
  
  
  1.5       +3 -0      apr/user/unix/groupinfo.c
  
  Index: groupinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/unix/groupinfo.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- groupinfo.c	2001/02/16 04:16:24	1.4
  +++ groupinfo.c	2001/07/20 12:36:13	1.5
  @@ -62,6 +62,9 @@
   #if APR_HAVE_SYS_TYPES_H
   #include <sys/types.h>
   #endif
  +#if APR_HAVE_UNISTD_H
  +#include <unistd.h> /* for _POSIX_THREAD_SAFE_FUNCTIONS */
  +#endif
   
   APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, apr_gid_t groupid, apr_pool_t *p)
   {
  
  
  
  1.13      +3 -0      apr/user/unix/userinfo.c
  
  Index: userinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/unix/userinfo.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- userinfo.c	2001/07/02 11:56:22	1.12
  +++ userinfo.c	2001/07/20 12:36:13	1.13
  @@ -62,6 +62,9 @@
   #if APR_HAVE_SYS_TYPES_H
   #include <sys/types.h>
   #endif
  +#if APR_HAVE_UNISTD_H
  +#include <unistd.h> /* for _POSIX_THREAD_SAFE_FUNCTIONS */
  +#endif
   
   static apr_status_t getpwnam_safe(const char *username,
                                     struct passwd **pw)