I've found another issue with Cherokee compilation on Win32 - the 0.5.4
release has an issue with the way it detects readdir_r, and as a result won't
compile on MinGW. The attached patch (to cherokee/util.c) fixes the issue.
I'm working on a release now...
--
Phil. | Kitsune: Acorn RiscPC SA202 64M+6G ViewFinder
[EMAIL PROTECTED] | Cheetah: Athlon64 3200+ A8VDeluxeV2 512M+100G
http://www.philpem.me.uk/ | Tiger: Toshiba SatPro4600 Celeron700 256M+40G
--- util.c Sun Jul 2 22:07:30 2006
+++ util.c.new Fri Jul 28 13:23:07 2006
@@ -399,7 +399,8 @@
int
cherokee_readdir (DIR *dirstream, struct dirent *entry, struct dirent **result)
{
-#ifdef HAVE_READDIR_R_2
+#ifdef HAVE_READDIR_H
+# ifdef HAVE_READDIR_R_2
/* We cannot rely on the return value of readdir_r as it
* differs between various platforms (HPUX returns 0 on
* success whereas Solaris returns non-zero)
@@ -412,20 +413,21 @@
*result = entry;
return 0;
}
-
+
*result = NULL;
return errno;
-#elif defined(HAVE_READDIR_R_3)
+# elif defined(HAVE_READDIR_R_3)
return readdir_r (dirstream, entry, result);
+# endif
#else
struct dirent *ptr;
int ret = 0;
-
+
CHEROKEE_MUTEX_LOCK (&readdir_mutex);
-
- errno = 0;
+
+ errno = 0;
ptr = readdir(dirstream);
if (!ptr && errno != 0)
_______________________________________________
Cherokee mailing list
[email protected]
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee