httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: [PATCH] 2.0.x pre-alpha support for Cygwin
Date Thu, 30 Aug 2001 06:02:19 GMT
From: "Stipe Tolj" <>
Sent: Saturday, August 11, 2001 6:35 AM

> Attached is a first patch to support the Cygwin 1.x platform. 
> It is made against 2.0.22-alpha, due to the fact that I am currently
> on vacation and don't have the bandwidth (GSM modem :(( to grap a
> fresh CVS tree. Hope someone with commit access to CVS can incorporate
> the changes anyway, Martin?!

Done, except as noted below.

I'll stop and pause just a moment so we don't continue to have the same
somewhat frustrating conflict (for both of us ;) and add my 2c, which I
believe are the general concensus.

I'd like to specifically request that you do not imply that the cygwin support
in Apache 2.0 is provided for the "Windows" platform, but only for the "cygwin"
platform.  That is, there is native Win32 support built into the server, for the 
native Win32 filesystem and system calls.  In fact, APR has turned this entire 
concept on it's head, so that Apache could even support Mac OS 9 (gasp!!!)

That said, I am a strong supporter of our users (anyone who drops in on can attest :) so I'd like to assure we leverage as much
common code to support these unix wolves trapped in win32 sheep's clothing.  
Please refer to the file in srclib/apr/file_io/win32/pathname.c for the reference 
to the canonicalization facilities in Apache 2.0.  I expect you will want to 
leverage a cygwin optimized flavor of apr_stat/lstat that returns the proper (long)
filename, but substitute the appropriate path rooting for the cygwin platform.  
You may also (with just a little bit of thunking) implement detection of the 
shortcuts-as-symlinks (which I detest :) in your lstat call, so that FollowSymLinks
functionallity is properly supported under the cygwin platform.

Please take the time to study pathname.c, since OS2 and Netware already share that
code branch.  The Unix branch will eventually be extended to properly handle samba
shares (the one weakness in Apache on unix, no surprize) but that's probably not
sufficient for cygwin.

Finally, I'll encourage anyone who wants to offer up a mingw toolchain schema
of the Apache build environment, as it uses the native api and semantics.  I'd
be happy to assist in dealing with some of the newer api's that aren't there just
yet - when I'm able.

Here are my comments on the two exceptions to your patch (and yes - the change to
the config.guess in apr was previously commited.)

> 2.0.22 configures, build and runs with prefork MPM (non-threaded) on
> Cygwin 1.1.8 and 1.3.2. Cygwin 1.3.2 supports pthreads, but I have
> still problems in getting the threaded MPM to work, so that's why
> prefork is assumed as default MPM. 

That's fine.  However...

I see no reason not to enable threads, unless you have a specific issue,
even when running prefork.  Feel free to correct me.  This obviously will
be a versioning issue, from your comments, so I dropped the following lines
from this patch...

--- httpd-2_0_22/srclib/apr/ Fri Jul 27 10:22:04 2001
+++ httpd-2_0_22-cygwin/srclib/apr/ Fri Aug 10 09:41:03 2001
+       enable_threads="no"
+       config_subdirs="shmem/unix/mm"

The others were applied, but this line struck me as odd;

+       eolstr="\\n"

true, I suppose, if the user entirely edits in cygwin/gnu/vi, but not if they
pick up a conf file in notepad :(

>   * srclib/apr/file_io/unix/dir.c: changed a suspicious #ifdef
> statement. Is this a missconfiguration of thread vs. non-thread #ifdef
> exclusion?!?!

I am leaving the question of this patch to the more gifted.  I see where you
are coming from, but I read the original (and patch) three times, and came to
three different conclusions.  Someone want to determine before we tag and roll?

--- httpd-2_0_22/srclib/apr/file_io/unix/dir.c Fri Jun 15 20:04:43 2001
+++ httpd-2_0_22-cygwin/srclib/apr/file_io/unix/dir.c Thu Aug  9 10:00:09 2001
@@ -112,7 +112,7 @@
     apr_status_t ret = 0;
-    && !defined(READDIR_IS_THREAD_SAFE)
+    && defined(READDIR_IS_THREAD_SAFE)
     struct dirent *retent;
     ret = readdir_r(thedir->dirstruct, thedir->entry, &retent);

View raw message