On Wed, Jan 22, 2003 at 09:46:28PM -0800, Justin Erenkrantz wrote:
> I have a hunch that NetWare (why the #define is only in apr.hnw) 
> doesn't have _POSIX_THREAD_SAFE_FUNCTIONS defined in its unistd.h. 
> It shouldn't be defined by any other platform.

The following comment in user/netware/userinfo.c seems to indicate otherwise:

#if APR_HAVE_UNISTD_H
#include <unistd.h> /* for _POSIX_THREAD_SAFE_FUNCTIONS */
#endif

According to CVS annotate, the commiter was:
1.1          (bnichole 31-Aug-01):

> 
> As a nit-pick, you'd need to wrap the include of unistd.h with #if 
> APR_HAVE_UNISTD_H/#endif.  -- justin

Fine, here's an update.

-- 
Craig Rodrigues        
http://home.attbi.com/~rodrigc
[EMAIL PROTECTED]
Index: file_io/unix/dir.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/unix/dir.c,v
retrieving revision 1.75
diff -u -r1.75 dir.c
--- file_io/unix/dir.c  7 Jan 2003 00:52:52 -0000       1.75
+++ file_io/unix/dir.c  23 Jan 2003 06:05:00 -0000
@@ -61,6 +61,9 @@
 #if APR_HAVE_LIMITS_H
 #include <limits.h>
 #endif
+#if APR_HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 static apr_status_t dir_cleanup(void *thedir)
 {
@@ -176,7 +179,7 @@
     apr_filetype_e type;
 #endif
 #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
-                    && !defined(READDIR_IS_THREAD_SAFE)
+    && (_POSIX_THREAD_SAFE_FUNCTIONS > 0) && !defined(READDIR_IS_THREAD_SAFE)
     struct dirent *retent;
 
     ret = readdir_r(thedir->dirstruct, thedir->entry, &retent);

Reply via email to