Re: Apache 1.3.31 RC Tarballs available
Jim Jagielski wrote: > > I have made the tarballs unavailable from the below URL. People > should contact me directly to obtain the correct URL... I'd like to give it a testing shoot for the cygwin platform on recent cygwin 1.5.x versions. Can you drop me an URL for it Jim please? Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: [SECURITY-PATCH] cygwin: Apache 1.3.29 and below directory traversal vulnerability
Stipe Tolj wrote: > > Hi Roy, > > "Roy T. Fielding" wrote > > > > -1. Reject the request with a 400 error instead. > > actually a standard (apache layout) install (from source) on a linux > box with the URI described in the bug report gives also a 404, and > *not* a 400 in response. > > So we get the same behaviour on cygwin as on linux?! Why is the > behaviour on cygwin then "more wrong"? which does not mean that I'm veto'ing the -1 in terms of HTTP response code semantics. That's ok for me and actually I would be +1 for responding 400 to a "non-valid, abussing" URI. But just to mention that the linux install did the same. So either we should have it changed generically, but not specifically for cygwin IMO. Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: [SECURITY-PATCH] cygwin: Apache 1.3.29 and below directory traversal vulnerability
"William A. Rowe, Jr." wrote: > > At 05:45 PM 2/4/2004, Roy T. Fielding wrote: > >-1. Reject the request with a 400 error instead. > > ++1 to Roy's suggestion. > > I believe that Win32 may accept the back slash (with the changes proposed > for the cygwin port.) However ... here's the trick ... the cygwin httpd port > is emulating Unix, so it should behave as a unix port. which means actually what? ... I didn't get the point. Maybe it's too late here... ;) Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: [SECURITY-PATCH] cygwin: Apache 1.3.29 and below directory traversal vulnerability
Hi Roy, "Roy T. Fielding" wrote > > -1. Reject the request with a 400 error instead. actually a standard (apache layout) install (from source) on a linux box with the URI described in the bug report gives also a 404, and *not* a 400 in response. So we get the same behaviour on cygwin as on linux?! Why is the behaviour on cygwin then "more wrong"? Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
[PATCH] cygwin: build and compile fix
Hi list, in order to have dbm support for mod_rewrite and correct the build and install process on the cygwin platform, please see attached patch. Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK- apache_1.3.29-cygwin-build-fix.diff Description: application/unknown-content-type-diff_auto_file
[SECURITY-PATCH] cygwin: Apache 1.3.29 and below directory traversal vulnerability
Hi list, attached patch fixes the bug# 26152 as described in http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26152 Main purpose was to handle backslashes in the URI to avoid misleading interpretation via the underlying cygwin OS layer, which allows backslashes as directory delimiters. Therefore src/os/cygwin/util_cygwin.c implements it's own ap_os_canonical_filename() routine to map backslashes to slashes and relly on the afterlying directory_walk() and file_walk() security mechanisms. Please review and apply to cvs. I will update the binary apache 1.3.29-x distribution package for the cygwin net distribution with this fix. Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK- apache_1.3.29-cygwin-bug-26152.diff Description: application/unknown-content-type-diff_auto_file
[FYI] latest apache 1.3.27 binaries for cygwin
Hi guys, seems Martin is pretty busy and doesn't not have the time for this, so please handle appropriate. Could you please upload the latest binaries for the Cygwin platform to apache.org, see http://apache.dev.wapme.net/binaries/latest/ Stipe [EMAIL PROTECTED] --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: book about apache 2?
> > i have been asked to recommend a book about apache version 2 > > that would give useful background and reference information > > for people providing support to customers using it. so, probably > > along the lines of 'apache server unleashed' rather than an > > internals reference. > > > > any suggestions? > > Daniel Lopez > Teach yourself Apache 2 in 24 hours yep, add me to the fans here :) Stipe [EMAIL PROTECTED] --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[REQ] 1.3: cygwin changes
Hi Jim, Hi others, there are still some open patches that I send in and have yet not been commited, except the long standing src/helpers/install.sh issue. I'm just wondering if this is to be commited for 1.3.25? Open are patches to (send in 31 May): * src/helpers/binbuild.sh * src/modules/standard/Makefile.Cygwin * Makefile.tmpl \ * src/Configure | for de-hardcoding $SHLIB_PREFIX_NAME * src/Makefile.tmpl / Regards, Stipe [EMAIL PROTECTED] --- Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: 1.3.25 release status
Jim Jagielski wrote: > > There are 2 outstanding questions regarding the Cygwin patches that > Stipe submitted, which I would like resolved before the T&R. It's also > looking like the 2 patches noted in STATUS will *not* be added in. > T&R set for the morning of June4. I'll check about the src/helpers/install.sh issue this day and get back to the list. The src/main/http_main.c patch is definitly needed IMO for a stable running httpd on Cygwin, at least live tests on apache.dev.wapme.net have proofen this. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PATCH] 1.3: Cygwin specifics in http_main.c
Jim Jagielski wr0te: > > This looks safe to me... I'll give it a day or so for any vetos > to pop up, but if they don't I'll committ thanks Jim. Stipe -- Hope to see you at my presentations: "Virtual Server solution for Linux using FreeVSD" at O'Reilly Open Source Convention 2002, Sheraton San Diego Hotel and Marina, San Diego, CA. USA July 22-26, 2002 [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PATCH] 1.3: Cygwin specific changes to the build process
Jim Jagielski wrote: > > At 11:12 AM +0200 5/31/02, Stipe Tolj wrote: > >diff -ur apache-1.3/src/helpers/install.sh apache-1.3-cygwin/src/helpers/install.sh > >--- apache-1.3/src/helpers/install.sh Tue Jun 12 10:24:53 2001 > >+++ apache-1.3-cygwin/src/helpers/install.sh Tue May 28 11:15:10 2002 > >@@ -89,12 +89,8 @@ > > > > # Check if we need to add an executable extension (such as ".exe") > > # on specific OS to src and dst > >-if [ -f "$src.exe" ]; then > >- if [ -f "$src" ]; then > >-: # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ] > >- else > >-ext=".exe" > >- fi > >+if [ -f "$src.exe" ] && [ ! -f "$src." ]; then > >+ ext=".exe" > > fi > > src="$src$ext" > > dst="$dst$ext" > > Why the above change?? If [] is fixed, what about backwards compatibility? the problem is Cygwin's behaviour for the -f shell condition. I'll check if I can solve it on another way. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: Cygwin specifics in http_main.c
Attached is a patch for allowing user changes on the cygwin platform and a #define wrapper for the timeout singal we use to kill of pending open childs that do not react on "usual" signals. The signalling issue seems to be a problem on the Cygwin platform, but it's abstracted, so other platforms may benefit from it. Again, nothing else is changed in behaviour. Changes are: * src/include/ap_config.h: added the system uid for Cygwin that is the "root" user on Cygwin * src/main/http_main.c: some cygwin specific #defines around setpgrp() and getuid() calls. Adding the #define SIG_TIMEOUT_KILL to define which singal should be used to kill of timed out childs. Defaulting to the know value for all other plaforms. * src/modules/proxy/proxy_cache.c: cygwin specific #define around setpgrp() Please review and apply to cvs if suitable. Thanks in advance. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/include/ap_config.h apache-1.3-cygwin/src/include/ap_config.h --- apache-1.3/src/include/ap_config.h Wed Mar 13 20:05:29 2002 +++ apache-1.3-cygwin/src/include/ap_config.h Tue May 28 11:15:10 2002 @@ -1003,8 +1003,10 @@ #define NEED_HASHBANG_EMUL #elif defined(CYGWIN) /* Cygwin 1.x POSIX layer for Win32 */ +#define SYSTEM_UID 18 #define JMP_BUF jmp_buf #define NO_KILLPG +#define NO_SETSID #define USE_LONGJMP #define GDBM_STATIC #define HAVE_MMAP 1 diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Mon May 27 17:39:24 2002 +++ apache-1.3-cygwin/src/main/http_main.c Tue May 28 11:15:10 2002 @@ -3409,6 +3409,13 @@ #elif defined(MPE) /* MPE uses negative pid for process group */ pgrp = -getpid(); +#elif defined(CYGWIN) +/* Cygwin does not take any argument for setpgrp() */ +if ((pgrp = setpgrp()) == -1) { +perror("setpgrp"); +fprintf(stderr, "%s: setpgrp failed\n", ap_server_argv0); +exit(1); +} #else if ((pgrp = setpgrp(getpid(), 0)) == -1) { perror("setpgrp"); @@ -4225,8 +4232,15 @@ } GETUSERMODE(); #else -/* Only try to switch if we're running as root */ +/* + * Only try to switch if we're running as root + * In case of Cygwin we have the special super-user named SYSTEM + */ +#ifdef CYGWIN +if (getuid() == SYSTEM_UID && ( +#else if (!geteuid() && ( +#endif #ifdef _OSD_POSIX os_init_job_environment(server_conf, ap_user_name, one_process) != 0 || #endif @@ -4798,13 +4812,16 @@ * is greater then ap_daemons_max_free. Usually we will use SIGUSR1 * to gracefully shutdown, but unfortunatly some OS will need other * signals to ensure that the child process is terminated and the - * scoreboard pool is not growing to infinity. This effect has been - * seen at least on Cygwin 1.x. -- Stipe Tolj <[EMAIL PROTECTED]> + * scoreboard pool is not growing to infinity. Also set the signal we + * use to kill of childs that exceed timeout. This effect has been +* seen at least on Cygwin 1.x. -- Stipe Tolj <[EMAIL PROTECTED]> */ #if defined(CYGWIN) #define SIG_IDLE_KILL SIGKILL +#define SIG_TIMEOUT_KILL SIGUSR2 #else #define SIG_IDLE_KILL SIGUSR1 +#define SIG_TIMEOUT_KILL SIGALRM #endif static void perform_idle_server_maintenance(void) @@ -4876,7 +4893,7 @@ else if (ps->last_rtime + ss->timeout_len < now) { /* no progress, and the timeout length has been exceeded */ ss->timeout_len = 0; - kill(ps->pid, SIGALRM); + kill(ps->pid, SIG_TIMEOUT_KILL); } } #endif @@ -5492,8 +5509,16 @@ } GETUSERMODE(); #else - /* Only try to switch if we're running as root */ +/* + * Only try to switch if we're running as root + * In case of Cygwin we have the special super-user named SYSTEM + * with a pre-defined uid. + */ +#ifdef CYGWIN +if ((getuid() == SYSTEM_UID) && setuid(ap_user_id) == -1) { +#else if (!geteuid() && setuid(ap_user_id) == -1) { +#endif ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf, "setuid: unable to change to uid: %ld", (long) ap_user_id); @@ -7686,7 +7711,7 @@ #endif -int ap_main(int argc, char *argv[]); /* Load time linked from libhttpd.dll */ +int ap_main(int argc, char *argv[]); /* Load time linked from cyghttpd.dll */ int main(int argc, char *argv[]) { diff -ur apache-1.3/src/modu
[PATCH] 1.3: Cygwin specific changes to the build process
Attached is a patch against cvs of 2002-05-28 with changes for the Cygwin platform build process. Again, everything is designed not to hurt other platforms. The changes are: * src/helpers/binbuild.sh: adding a MAKERERUN variable to run "make" twice on Cygwin platforms while binbuild.sh is executed. This is necessary because the we need to link shared modules against the shared core library, which is not present throughout the first make run, so we need to run it twice. Cygwin now has the same configure flags in binbuild.sh as other unix flavors. * src/helpers/install.sh: this is a long standing issue. The patch fixes the "make install" problem we still see with .exe files. I hope this is suitable to all for commitment. * src/modules/standard/Makefile.Cygwin: minor text changes to indicate we use the filename "cyghttpd.dll" instead of "libhttpd.dll" as shared core lib. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/helpers/binbuild.sh apache-1.3-cygwin/src/helpers/binbuild.sh --- apache-1.3/src/helpers/binbuild.sh Wed May 15 15:27:55 2002 +++ apache-1.3-cygwin/src/helpers/binbuild.sh Tue May 28 11:15:10 2002 @@ -7,10 +7,11 @@ # See http://www.apache.org/docs/LICENSE OS=`src/helpers/GuessOS` +MAKERERUN="no" case "x$OS" in x*OS390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";; - *cygwin*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most \ - --enable-rule=SHARED_CORE --libexecdir=bin";; + *cygwin*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most +--enable-shared=max" +MAKERERUN="yes";; *) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";; esac APDIR=`pwd` @@ -55,6 +56,7 @@ rm -rf bindist install-bindist.sh *.bindist echo "--" && \ make && \ + if [ "x$MAKERERUN" = "xyes" ]; then make; fi && \ echo "--" && \ make install-quiet root="bindist/" && \ echo "--" && \ diff -ur apache-1.3/src/helpers/install.sh apache-1.3-cygwin/src/helpers/install.sh --- apache-1.3/src/helpers/install.sh Tue Jun 12 10:24:53 2001 +++ apache-1.3-cygwin/src/helpers/install.shTue May 28 11:15:10 2002 @@ -89,12 +89,8 @@ # Check if we need to add an executable extension (such as ".exe") # on specific OS to src and dst -if [ -f "$src.exe" ]; then - if [ -f "$src" ]; then -: # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ] - else -ext=".exe" - fi +if [ -f "$src.exe" ] && [ ! -f "$src." ]; then + ext=".exe" fi src="$src$ext" dst="$dst$ext" diff -ur apache-1.3/src/modules/standard/Makefile.Cygwin apache-1.3-cygwin/src/modules/standard/Makefile.Cygwin --- apache-1.3/src/modules/standard/Makefile.Cygwin Thu Jan 17 12:20:51 2002 +++ apache-1.3-cygwin/src/modules/standard/Makefile.Cygwin Tue May 28 11:15:10 +2002 @@ -4,7 +4,7 @@ # On Cygwin OS the user needs to run twice "make" if shared modules have # been requested using the --enable-shared= configure flag. # This is because when we pass the module mod_foo.c we have no import -# library, usually src/libhttpd.dll to link against in this case. So the +# library, usually src/cyghttpd.dll to link against in this case. So the # two "make" runs do the following: # # 1st run: builds all static modules and links everything to the @@ -42,7 +42,7 @@ else \ if [ ! -f "$(SRCDIR)/$(SHCORE_IMPLIB).$$" ]; then \ echo "++"; \ - echo "| There is no shared core 'libhttpd.dll' available! |"; \ + echo "| There is no shared core 'cyghttpd.dll' available! |"; \ echo "||"; \ echo "| This is obviously your first 'make' run with configure |"; \ echo "| flag SHARED_CORE enabled and shared modules. |"; \
[PATCH] 1.3: de-harcoding SHLIB_PREFIX_NAME in Makefile.tmpl
The attached patch will allow non hardcoded names for the shared library, which is currently harcoded to lib$(TARGET).$${SHLIB_SUFFIX_NAME} by adding a SHLIB_PREFIX_NAME and resulting in a new $${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} value in the Makefile templates. This is mainly used for the Cygwin platform, which uses conventions to use cygfoobar.dll names of shared system libraries instead of libfoobar.dll, but other platforms may benefit from it too and it does not break or change anything in the other platforms. The changes against cvs tree of 2002-05-28 are: * Makfile.tmpl: substituting lib$(TARGET).$${SHLIB_SUFFIX_NAME} to $${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} and adding another substitution regexp for Cygwin's .dll extensions of shared libs. * src/Configure: added default SHLIB_PREFIX_NAME="lib" before processing platform specific blocks. Changes Cygwin's define block to use "cyg" prefix instead of "lib". * src/Makefile.tmpl: same substitutions as in upper directory. Please review and apply to cvs head. Thanks. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/Makefile.tmpl apache-1.3-cygwin/Makefile.tmpl --- apache-1.3/Makefile.tmplWed Mar 13 20:05:27 2002 +++ apache-1.3-cygwin/Makefile.tmpl Tue May 28 11:15:10 2002 @@ -304,19 +304,20 @@ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \ fi -@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \ + SHLIB_PREFIX_NAME="`grep '^SHLIB_PREFIX_NAME=' $(TOP)/$(SRC)/Makefile +| sed -e 's:^.*=::'`"; \ SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ - echo "$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep"; \ - $(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \ - echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}"; \ - $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}; \ + echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).ep +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).ep"; \ + $(INSTALL_CORE) $(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).ep +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).ep; \ + echo "$(INSTALL_DSO) +$(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}"; \ + $(INSTALL_DSO) +$(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}; \ if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \ - echo "$(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \ - $(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \ + echo "$(RM) +$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \ + $(RM) +$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \ for suffix in $${SHLIB_SUFFIX_LIST} ""; do \ [ ".$${suffix}" = . ] && continue; \ - echo "$(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; \ - $(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; \ + echo "$(LN) +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; + \ + $(LN) +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; +\ done; \ fi; \ fi @@ -341,7 +342,7 @@ sed -e 's:SharedModule:AddModule:' \ -e 's:modules/[^/]*/::' \ -e 's:[ ]lib: mod_:' \ - -e 's:\.[soam].*$$:.c:' >>$(SRC)/.apaci.install.conf; \ +
[PATCH] 1.3 cygwin: new htdocs/manual/cygwin.html
the default Apache directory layout, you can start httpd as follows: $ /usr/local/apache/bin/httpd An explicit background indicator (&) is not required. The parent process is automatically detached from the current terminal. Check the global error_log to see if Apache started cleanly without any major problems. Stopping Apache To stop Apache send at least a SIGTERM signal to the parent httpd process: $ kill -TERM `cat /usr/local/apache/logs/httpd.pid` Gracefully Restarting Apache In order to update configuration directives and reload the httpd.conf configuration file, send a SIGHUP to the parent httpd process: $ kill -HUP `cat /usr/local/apache/logs/httpd.pid` Running Apache for Cygwin as a Service Apache on Cygwin can be invoked as a Windows NT or Windows 2000 service. Cygwin has its own cygrunsrv.exe facility to define, remove, start, and stop services as follows: Installing Apache as a new Service Use the following statement to install httpd.exe as a new service: $ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a arguments] \ [-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd] Where -a is used to pass command line arguments (such as -DFOO defines) to httpd.exe, and -e is used to pass environment variables. If necessary you may use the -t options to set the autostart configuration for the service. If you want the new service to run under a different userid, you will have to supply the -u and -w options. Starting Apache as a Service After the new service is installed it can be started using the following command: $ cygrunsrv -S service_name Check your process table and global error_log file to ensure Apache has started without any major problems. Stopping an Apache Service A running Apache service may be stopped using the following command: $ cygrunsrv -E service_name This will stop all running httpd.exe processes and shutdown the HTTP service for the machine. Removing an Apache Service An installed Apache service may be removed from Windows NT or Windows 2000 using the following command: $ cygrunsrv -R service_name This will remove your previously defined and installed service from the machine. Please refer to the man page for cygrunsrv and the Cygwin mailing list for further details of how services are invoked. Any additional contributions to this document and the Cygwin support for Apache are highly welcome. Please send them to Stipe Tolj <[EMAIL PROTECTED]>. Apache HTTP Server
[PATCH] 1.3 cygwin: adding Cygwin layout style
Hi list, attached is a patch used within our Cygwin net distro binary package. I'd like to add this to cvs in order for future support. Changes: * config.layout: added Cygwin specific layout definitions Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are Index: config.layout === RCS file: /home/cvspublic/apache-1.3/config.layout,v retrieving revision 1.21 diff -r1.21 config.layout 284a285,306 > > # Cygwin 1.x layout > > prefix:/usr > exec_prefix: $prefix > bindir:$prefix/bin > sbindir: $prefix/sbin > libexecdir:$prefix/lib/apache > mandir:$prefix/man > sysconfdir:/etc/apache > datadir: /var/www > iconsdir: $datadir/icons > htdocsdir: $datadir/htdocs > manualdir: $htdocsdir/manual > cgidir:$datadir/cgi-bin > includedir:$prefix/include/apache > localstatedir: /var > runtimedir:$localstatedir/run > logfiledir:$localstatedir/log/apache > proxycachedir: $localstatedir/cache/apache > >
Re: PROPOSAL: Release 1.3.25
David Reid wrote: > > What about fixing build issues? > > ab is currently broken on non writev and non ssl platforms (though I have > Dirk's patch applied and it correct the issue) and I have one other small > patch I'd like to finish and then apply to allow a build for beos to > complete... > > I'll hopefully get the patch done today and send it. > > I'm +1 on a 1.3.25 though can we add a couple of Cygwin specific build issues too before shooting 1.3.25? I'll send a patch in ASAP. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: WXP
Ben Hyde wrote: > > Rodent of Unusual Size wrote: > > There's a FAQ I'm getting more and more to which I don't > > know the answer; to wit, does Apache 1.3.* run on Windows XP? > > What *is* the answer? > > "Not known not to work." at least our Cygwin 1.3 based port of 1.3.x works on Windows XP. So this is something like a "yeno". Stipe
Re: WXP
Jim Jagielski wrote: > > Does *anything* "run" on Windows XP?? :) Cygwin 1.3.x port of 1.3 at least *seems* to run on WinXP, but I haven' tested long run processes here, so don't beat me for failures. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PATCH] 1.3: changing accept mutex for Cygwin
Jeff Trawick wrote: > > Jeff Trawick <[EMAIL PROTECTED]> writes: > > > Jim Jagielski <[EMAIL PROTECTED]> writes: > > > > > >diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c > > > >--- apache-1.3/src/main/http_main.cWed Oct 17 14:45:30 2001 > > > >+++ apache-1.3-cygwin/src/main/http_main.c Tue Jan 1 16:05:19 2002 > > > >@@ -662,11 +662,17 @@ > > > > perror("pthread_mutexattr_init"); > > > > exit(APEXIT_INIT); > > > > } > > > >X-Mozilla-Status: 8009n has problems with this pthread call claiming that these > > > >+ * are "Invalid arguements", Stipe Tolj <[EMAIL PROTECTED]> > > > >+ */ > > > >+#if !defined(CYGWIN) > > > > if ((errno = pthread_mutexattr_setpshared(&mattr, > > > > PTHREAD_PROCESS_SHARED))) { > > > > perror("pthread_mutexattr_setpshared"); > > > > exit(APEXIT_INIT); > > > > } > > > >+#endif > > > > > > This looks mangled though :) :) > > > > manglement aside, I'm -1 without an answer to the question on this > > code which I posted previously... > > > > the answer may simply be > > > > "with Cygwin, all pthread mutexes are cross-process, so there is no > > need for such a call" > > > > Since on other systems pthread mutexes are intra-process without > > such a call, I can't help but wonder. > > Let me clarify my concern, in case somebody can find a flaw in my > logic or in case it helps Stipe know what I would like him to verify > (and document in comments). > > base facts/assumptions: > > 1) pthread mutexes are normally intra process, but if the following >conditions are met, pthread mutexes can be used cross-process > >a) the mutex itself lives in shared memory which is addressible by > the processes which need to serialize via the mutex > >b) the pthread_mutexattr_setpshared(,PTHREAD_PROCESS_SHARED) call > is used to tell the pthreads library that the mutex is > cross-process > > 2) not all systems which support pthread mutexes have the support to >make them work cross-process; such systems either neglect to define >PTHREAD_PROCESS_SHARED or return an error from >pthread_mutexattr_setpshared(,PTHREAD_PROCESS_SHARED) > > 3) Cygwin always returns an error from >pthread_mutexattr_setpshared(,PTHREAD_PROCESS_SHARED) > > 4) it is possible for Apache to appear to work correctly without >proper accept serialization > > My conclusion from these facts/assumptions is that with Stipe's change > he is falling into #4 above. In other words, he isn't getting working > accept serialization. If that is true, I would prefer that for Cygwin > we (Stipe) set whatever is required so that we don't try to do accept > serialization at all, rather than using the pthread mutex support in a > non-working manner. > > I accept that Cygwin may have certain nuances/deviations that result > in Stipe's code to be appropriate (perhaps on Cygwin all pthread > mutexes are cross-process and returning an error from > pthread_mutexattr_setpshared() is Cygwin's way of telling you that the > call is unnecessary), but I would like to see such nuances spelled out > in comments adjacent to "#if !defined(CYGWIN)". As it stands, the > code looks broken. > > I suspect that deep knowledge of Cygwin pthread mutex support (i.e., > communication with one of the developers or examining the source) is > necessary to address the concern. If it is unclear why > pthread_mutexattr_setpshared() returns EINVAL then probably we don't > have the information to know why skipping that call is appropriate. yep, I forwarded the issue to Robert Collins <[EMAIL PROTECTED]> which is the one dealing with Cygwin's pthreads. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PROPOSAL] 1.3: introducing SHLIB_PREFIX_NAME for config and build process
What about this proposal Jim and others?! It's essential to garantee we build "cyghttpd.dll" instead of "libhttpd.dll". I don't see a reason why "lib" should be hard-coded to the Makefiles. The patch is pre-compatible, which means it breaks nothing on other OS, as long there is no explicit definition of SHLIB_PREFIX_NAME in the src/Configure for the specific OS. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: cvs commit: apache-1.3/src/os/cygwin os.h
Jeff Trawick wrote: > > Jim Jagielski <[EMAIL PROTECTED]> writes: > > > Oops... I guess I didn't see that veto. Sorry 'bout that. > > > > Do you prefer that I back out that whole section (since the addition > > of the pthread mutex must be disabled if we back out just the below) > > or keep this, with the understanding that if it's not addressed > > within X days, we back it out then? > > Let's not do anything for the moment... I anticipate that my concern > will be cleared up very soon. I just didn't want my request to get > lost in case I get run over by a truck on the way home. Jeff your request is pipelined in my desktop! -- At least I won't be driving :) > I will clarify my objection in another post and copy it to Stipe > directly in case he is behind in his mailing list reading. Yep, he is. But he tried to sync. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: timeout kill signaling
Attached is a patch which fixes a signaling issue for the timeout kills on the Cygwin plaform. Additionaly it introduces a SIG_TIMEOUT_KILL macro to be used if needed. Here are the changes: * src/main/http_main.c: changing signal behaviour for Cygwin and adding SIG_TIMEOUT_KILL macro. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Wed Oct 17 14:45:30 2001 +++ apache-1.3-cygwin/src/main/http_main.c Tue Jan 1 16:05:19 2002 @@ -4152,11 +4235,15 @@ #endif #endif signal(SIGALRM, alrm_handler); -#ifdef TPF +#ifdef CYGWIN +signal(SIGUSR2, alrm_handler); +#endif +#if defined(TPF) || defined(CYGWIN) signal(SIGHUP, just_die); signal(SIGTERM, just_die); signal(SIGUSR1, just_die); -#endif /* TPF */ +#endif /* TPF || CYGWIN */ + #ifdef OS2 /* Stop Ctrl-C/Ctrl-Break signals going to child processes */ @@ -4672,13 +4759,16 @@ * is greater then ap_daemons_max_free. Usually we will use SIGUSR1 * to gracefully shutdown, but unfortunatly some OS will need other * signals to ensure that the child process is terminated and the - * scoreboard pool is not growing to infinity. This effect has been + * scoreboard pool is not growing to infinity. Also set the signal we + * use to kill of childs that exceed timeout. This effect has been * seen at least on Cygwin 1.x. -- Stipe Tolj <[EMAIL PROTECTED]> */ #if defined(CYGWIN) #define SIG_IDLE_KILL SIGKILL +#define SIG_TIMEOUT_KILL SIGUSR2 #else #define SIG_IDLE_KILL SIGUSR1 +#define SIG_TIMEOUT_KILL SIGALRM #endif static void perform_idle_server_maintenance(void) @@ -4750,7 +4840,7 @@ else if (ps->last_rtime + ss->timeout_len < now) { /* no progress, and the timeout length has been exceeded */ ss->timeout_len = 0; - kill(ps->pid, SIGALRM); + kill(ps->pid, SIG_TIMEOUT_KILL); } } #endif
[PATCH] 1.3: changing accept mutex for Cygwin
Attached is a patch that fixes a bug for the accept mutex on the Cygwin platform. The bug was reported by Sami Tikka <[EMAIL PROTECTED]> while trying to use multiple Listen directives. We change the accept mutex from fcntl to pthread, which works even with several Listen directives set in httpd.conf. Here are the changes: * src/include/ap_config.h: adding HAVE_PTHREAD_SERIALIZED_ACCEPT to Cygwin block and defaulting to it. * src/main/http_main.c: exluding pthread_mutexattr_setpshared() call for Cygwin platform. This calls seems yet not fully functional on this platform. Forwarding problem to Cygwin core developers. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/include/ap_config.h apache-1.3-cygwin/src/include/ap_config.h --- apache-1.3/src/include/ap_config.h Tue Oct 9 19:29:46 2001 +++ apache-1.3-cygwin/src/include/ap_config.h Tue Jan 1 16:07:48 2002 @@ -1002,7 +1012,11 @@ #define USE_MMAP_FILES #define HAVE_SYSLOG 1 #define HAVE_FCNTL_SERIALIZED_ACCEPT +#define HAVE_PTHREAD_SERIALIZED_ACCEPT #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT +#if !defined(USE_FNCTL_SERIALIZED_ACCEPT) +#define USE_PTHREAD_SERIALIZED_ACCEPT +#endif #else diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Wed Oct 17 14:45:30 2001 +++ apache-1.3-cygwin/src/main/http_main.c Tue Jan 1 16:05:19 2002 @@ -662,11 +662,17 @@ perror("pthread_mutexattr_init"); exit(APEXIT_INIT); } +/* + * Cygwin has problems with this pthread call claiming that these + * are "Invalid arguements", Stipe Tolj <[EMAIL PROTECTED]> + */ +#if !defined(CYGWIN) if ((errno = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) { perror("pthread_mutexattr_setpshared"); exit(APEXIT_INIT); } +#endif if ((errno = pthread_mutex_init(accept_mutex, &mattr))) { perror("pthread_mutex_init"); exit(APEXIT_INIT);
[PATCH] 1.3: fixing libproxy building for Cygwin
Attached is a patch which fixes current problem for --enable-module=most flag (which includes src/modules/proxy) on the Cygwin platform. Main problem is that the Makefile of proxy is too OS/2 specific hardcoded and we have to tweak a bit here for the shared target to get it compiled cleanly on Cygwin. Here are the changes: * src/Configure: changed OS_MODULE_INCLUDE var for the Cygwin platform block to refer to the (absolute) relative path for the Makefile.Cygwin file. * src/modules/proxy/Makefile.tmpl: target libproxy.dll is hardcoded for OS/2. That's not good. We have the same target on Cygwin, but use other calls for it, so if construct here. * src/modules/standard/Makefile.Cygwin: adding a dummy target %.def : %.c to satisfy OS/2 related dependacies on Cygwin too. Changed the "run make twice" screen slightly. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureMon Oct 8 20:59:36 2001 +++ apache-1.3-cygwin/src/Configure Thu Dec 13 21:11:10 2001 @@ -1419,7 +1425,7 @@ LIBS_SHLIB='$(EXTRA_LIBS)' SHARED_CORE_EP='lib$(TARGET).ep' SHCORE_IMPLIB='lib$(TARGET).dll' - OS_MODULE_INCLUDE='Makefile.Cygwin' + OS_MODULE_INCLUDE='$(SRCDIR)/modules/standard/Makefile.Cygwin' ;; *) ## ok, no known explict support for shared objects diff -ur apache-1.3/src/modules/proxy/Makefile.tmpl apache-1.3-cygwin/src/modules/proxy/Makefile.tmpl --- apache-1.3/src/modules/proxy/Makefile.tmpl Thu Jun 22 23:22:36 2000 +++ apache-1.3-cygwin/src/modules/proxy/Makefile.tmpl Sat Nov 10 17:02:58 2001 @@ -21,10 +21,18 @@ rm -f $@ $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB) -libproxy.dll: $(OBJS_PIC) mod_proxy.def - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB) - emxbind -b -q -s -h0 -dmod_proxy.def $* && \ - rm $* +libproxy.dll: $(OBJS_PIC) mod_proxy.def + if [ "x$(OS)" = "xCygwin" ]; then \ + rm -f $@; \ + if [ -f "$(SRCDIR)/$(SHCORE_IMPLIB)" ]; then \ + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $*.dll $(OBJS_PIC) $(LIBS_SHLIB) \ + $(SRCDIR)/$(SHCORE_IMPLIB) $(LIBS1); \ + fi \ + else \ + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB); \ + emxbind -b -q -s -h0 -dmod_proxy.def $* && \ + rm $*; \ + fi .SUFFIXES: .o .lo .dll diff -ur apache-1.3/src/modules/standard/Makefile.Cygwin apache-1.3-cygwin/src/modules/standard/Makefile.Cygwin --- apache-1.3/src/modules/standard/Makefile.Cygwin Fri Sep 28 11:29:02 2001 +++ apache-1.3-cygwin/src/modules/standard/Makefile.Cygwin Sat Nov 10 17:05:50 +2001 @@ -28,23 +28,30 @@ $(SRCDIR)/$(SHCORE_IMPLIB) $(LIBS1) endef +%.def : %.c + touch $*.def + %.lo : %.c $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo %.dll : %.lo @if [ -f "$(SRCDIR)/$(SHCORE_IMPLIB)" ]; then \ +rm -f $(SRCDIR)/$(SHCORE_IMPLIB).$$; \ echo $(shared_dll); \ $(shared_dll); \ else \ - echo "++"; \ - echo "| There is no shared core 'libhttpd.dll' available! |"; \ - echo "||"; \ - echo "| This is obviously your first 'make' run with configure |"; \ - echo "| flag SHARED_CORE enabled and shared modules. |"; \ - echo "||"; \ - echo "| You will have to re-run 'make' after this run builds |"; \ - echo "| the required shared import library!|"; \ - echo "++"; \ -sleep 10; \ +if [ ! -f "$(SRCDIR)/$(SHCORE_IMPLIB).$$" ]; then \ + echo "++"; \ + echo "| There is no shared core 'libhttpd.dll' available! |"; \ + echo "||"; \ + echo "| This is obviously your first 'make' run with configure |"; \ + echo "| flag SHARED_CORE enabled and shared modules. |"; \ + echo "||"; \ + echo "| You will have to re-run 'make' after this run builds |"; \ + echo "| the required shared import library!
[PATCH] 1.3: CYGWIN_WINSOCK rule
The attached patch introduces a new rule to src/Configuration.tmpl called CYGWIN_WINSOCK. It may be used for the Cygwin 1.x platform to use the native Win32 calls for the socket operations instead of Cygwin's own POSIX.1 wrappers. A performance gain of about 5-10% has been detected if used. Here are the changes: * src/Configuration.tmpl: added rule CYGWIN_WINSOCK=no * src/Configure: added loading of rule CYGWIN_WINSOCK and Cygwin platform block specific if statement to include libwsock32.a lib for Cygwin. * src/main/buff.c: added a couple of #define add-ons for CYGWIN_WINSOCK * src/main/http_main.c: added two #defines for CYGWIN_WINSOCK and compilation flag information output if set at configure time. * src/os/cygwin/os.h: added required #defines for CYGWIN_WINSOCK and declarations for Win32 native calls. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/Configuration.tmpl apache-1.3-cygwin/src/Configuration.tmpl --- apache-1.3/src/Configuration.tmpl Mon Oct 8 17:52:12 2001 +++ apache-1.3-cygwin/src/Configuration.tmplSat Nov 10 16:48:46 2001 @@ -173,6 +173,13 @@ # Rule EXPAT=default : If Expat can be found at the system or # in lib/expat-lite, use it; otherwise # skip it +# +# CYGWIN_WINSOCK: +# Use Win32 API system calls for socket communication instead +# of Cygwin's POSIX.1 wrappers. This avoids the Cygwin specific +# implementation and uses the Win32 native calls. Should be faster +# and more reliable for high-load systems. +# Rule SOCKS4=no Rule SOCKS5=no @@ -180,6 +187,7 @@ Rule IRIXN32=yes Rule PARANOID=no Rule EXPAT=default +Rule CYGWIN_WINSOCK=no # DEV_RANDOM: # Note: this rule is only used when compiling mod_auth_digest. diff -ur apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureMon Oct 8 20:59:36 2001 +++ apache-1.3-cygwin/src/Configure Thu Dec 13 21:11:10 2001 @@ -235,6 +235,7 @@ RULE_IRIXN32=`./helpers/CutRule IRIXN32 $file` RULE_PARANOID=`./helpers/CutRule PARANOID $file` RULE_EXPAT=`./helpers/CutRule EXPAT $file` +RULE_CYGWIN_WINSOCK=`./helpers/CutRule CYGWIN_WINSOCK $file` RULE_SHARED_CORE=`./helpers/CutRule SHARED_CORE $file` RULE_SHARED_CHAIN=`./helpers/CutRule SHARED_CHAIN $file` @@ -849,6 +850,11 @@ DEF_WANTHSREGEX=yes DBM_LIB="-lgdbm" LIBS="$LIBS -lcrypt $DBM_LIB" + if [ "x$RULE_CYGWIN_WINSOCK" = "xyes" ]; then + CFLAGS="$CFLAGS -DCYGWIN_WINSOCK" + LIBS="$LIBS -lwsock32" + fi + ;; *atheos*) DEF_WANTSREGEX=yes diff -ur apache-1.3/src/main/buff.c apache-1.3-cygwin/src/main/buff.c --- apache-1.3/src/main/buff.c Mon Jan 15 17:04:56 2001 +++ apache-1.3-cygwin/src/main/buff.c Tue Jan 1 15:12:49 2002 @@ -121,7 +122,7 @@ * futher I/O will be done */ -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) /* select() sometimes returns 1 even though the write will block. We must work around this. @@ -283,7 +282,7 @@ { int rv; -#if defined (WIN32) || defined(NETWARE) +#if defined (WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) if (fb->flags & B_SOCKET) { rv = recvwithtimeout(fb->fd_in, buf, nbyte, 0); if (rv == SOCKET_ERROR) @@ -1465,7 +1477,7 @@ rc1 = ap_bflush(fb); else rc1 = 0; -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) if (fb->flags & B_SOCKET) { rc2 = ap_pclosesocket(fb->pool, fb->fd); if (fb->fd_in != fb->fd) { @@ -1475,7 +1487,7 @@ rc3 = 0; } } -#ifndef NETWARE +#if !defined(NETWARE) && !defined(CYGWIN_WINSOCK) else if (fb->hFH != INVALID_HANDLE_VALUE) { rc2 = ap_pcloseh(fb->pool, fb->hFH); rc3 = 0; @@ -1500,7 +1512,7 @@ else { rc3 = 0; } -#if defined(WIN32) || defined (BEOS) || defined(NETWARE) +#if defined(WIN32) || defined (BEOS) || defined(NETWARE) || defined(CYGWIN_WINSOCK) } #endif diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Wed Oct 17 14:45:30 2001 +++ apache-1.3-cygwin/src/main/http_main.c Tue Jan 1 16:05:19 2002 @@ -1494,7 +1570,7 @@ #ifndef NETWARE static APACHE_TLS void (*volatile alarm_fn) (int) = NULL; #endif -#ifdef WIN32 +#if defined(WIN32) || defined(CYGWIN_WINSOCK) static APACHE_TLS unsigned int alarm_expiry_time = 0; #endif /* WIN32 */ @@ -1554,7 +1630,7 @@ } -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NET
Cygwin platform support patches
I'm trying to re-post a couple of patches for the 1.3 cvs tree. The latest patch posted (Msg-ID: [EMAIL PROTECTED]) included several issues. It seems to be too complex to review it easily and commit changes to cvs, so I'm splitting it up to several patches, one per issue. Hopefully you guys can then more easily review and commit changes. The latest two are the first part of the serie: * [PATCH] 1.3: Cygwin layout (config.layout) Msg-ID: [EMAIL PROTECTED] * [PATCH] 1.3: fixing src/helpers/find-dbm-lib for Cygwin Msg-ID: [EMAIL PROTECTED] Others are following. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PROPOSAL] 1.3: introducing SHLIB_PREFIX_NAME for config and build process
This is a proposal in extending the 1.3 cvs tree to use SHLIB_PREFIX_NAME as a macro for the shared library prefix name. Currently this is hardcoded in any relevant file to "lib". The attached file makes the use of SHLIB_PREFIX_NAME more flexible and hence allows to set different prefix names for specific platforms. Basicly the need for that was raised, while the Cygwin Group was preparing the 1.3.22 package to be included in the official net distribution. There we require to have a cyghttpd.dll instead of libhttpd.dll. Here are the changes: * Makefile.tmpl: added definition of SHLIB_PREFIX_NAME, similar to SHLIB_SUFFIX_NAME. Changed the hardcoded references from lib$(TARGET).$${SHLIB_SUFFIX_NAME} to $${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}. * src/Configure: added default value SHLIB_PREFIX_NAME="lib". This makes the previously hardcoded prefix the default if not overriden by platform specific calls. Added line to export the macro value to Makefile.config, so it gets included everywhere. Changed the Cygwin platform specific block to use "cyg" as prefix. * src/Makefile.tmpl: once again changed hardcoded references from lib$(TARGET).$${SHLIB_SUFFIX_NAME} to $${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are --- apache-1.3/Makefile.tmplWed Jan 2 00:12:01 2002 +++ apache-1.3-new/Makefile.tmplSat Jan 12 20:16:04 2002 @@ -304,19 +304,20 @@ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \ fi -@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \ + SHLIB_PREFIX_NAME="`grep '^SHLIB_PREFIX_NAME=' $(TOP)/$(SRC)/Makefile +| sed -e 's:^.*=::'`"; \ SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \ - echo "$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep"; \ - $(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \ - echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}"; \ - $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}; \ + echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).ep +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).ep"; \ + $(INSTALL_CORE) $(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).ep +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).ep; \ + echo "$(INSTALL_DSO) +$(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}"; \ + $(INSTALL_DSO) +$(TOP)/$(SRC)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}; \ if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \ - echo "$(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \ - $(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \ + echo "$(RM) +$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \ + $(RM) +$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \ for suffix in $${SHLIB_SUFFIX_LIST} ""; do \ [ ".$${suffix}" = . ] && continue; \ - echo "$(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; \ - $(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; \ + echo "$(LN) +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; + \ + $(LN) +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME} +$(root)$(libexecdir)/$${SHLIB_PREFIX_NAME}$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; +\ done; \ fi; \ fi --- apache-1.3/src/ConfigureWed Jan 2 00:12:02 2002 +++ apache-1.3-new/src/ConfigureSat Jan 12 20:49:30 2002 @@ -253,6 +254,7 @@ DB_LIB="-ld
[PATCH] 1.3: fixing src/helpers/find-dbm-lib for Cygwin
Attached is a patch against current 1.3 cvs tree to fix the detection of the gdbm library for the Cygwin platform to support dbm-enabled mod_rewrite. Could someone please apply the patch to the cvs tree. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are --- apache-1.3/src/helpers/find-dbm-lib Wed Mar 21 03:09:46 2001 +++ apache-1.3-cygwin/src/helpers/find-dbm-lib Sat Jan 12 20:24:38 2002 @@ -31,6 +31,15 @@ found_dbm=1 fi ;; +*-cygwin*) +# we use the shared DLL version of gdbm if available +DBM_LIB="" +if ./helpers/TestCompile lib gdbm dbm_open; then +DBM_LIB="-lgdbm" +LIBS="$LIBS $DBM_LIB" +found_dbm=1 +fi +;; *) if [ "x$DBM_LIB" != "x" ]; then oldLIBS="$LIBS"
[PATCH] 1.3: Cygwin layout (config.layout)
Attached is a patch for the Cygwin installation layout for the 1.3 cvs branch. It would be great when someone would commit this to cvs. BTW, this layout will be used for the upcoming inclusion of Apache 1.3.22 to the official Cygwin package installation routine. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are --- apache-1.3/config.layoutSat Oct 6 22:01:10 2001 +++ apache-1.3-cygwin/config.layout Sat Jan 12 20:09:27 2002 @@ -261,3 +261,25 @@ logfiledir:$prefix/logs proxycachedir: $prefix/proxy + +# Cygwin 1.x layout + +prefix:/usr +exec_prefix: $prefix +bindir:$prefix/bin +sbindir: $prefix/sbin +libexecdir:$prefix/lib/apache +mandir:$prefix/man +sysconfdir:/etc/apache +datadir: /var/www +iconsdir: $datadir/icons +htdocsdir: $datadir/htdocs +manualdir: $htdocsdir/manual +cgidir:$datadir/cgi-bin +includedir:$prefix/include/apache +localstatedir: /var +runtimedir:$localstatedir/run +logfiledir:$localstatedir/log/apache +proxycachedir: $localstatedir/cache/apache + +
Re: [PATCH] 1.3: further Cygwin platform support
Hi Martin, > Sorry to be picky here (Slowly, you're beginning to convince > me that the extra test for "! -f $src" is not worth the trouble > of fighting against cygwin's stupidity)... > > Testing for [ ! -f "$src." ] is not the same thing > as testing for [ ! -f "$src" ]. I know! -- somehow I have to trick the beast on Cygwin to get a clean make install to copy the whole executables. Should I add a uname case switch here to be on the same side?! Or maybe a checking of env var $OSTYPE?! Have you any other proposal for getting this *done*? > And it is the latter which I was worried about: > what happens if -on a unix platform- I happen > to have a $src.exe in my directory? Yes, Apache will assume > that my platform uses the .exe extension. And it will break. That's true -- but, there is no Unix platform (at least currently) that *build* httpd.exe (or any other .exe extension executable), is there?! > But if it breaks on Cygwin, I am much less worried that when > it breaks on unix, to be honest. So IMHO, it is cygwin that > should be fixed so that it will allow us to make such a test. I agree and I'll try to propose a change to that. But the stupidity was introduced to demands the Cygwin folks had, so I'm not that eager that the change will be done on that side very easily. Wie wär's mit einem Treffen auf der CeBIT? Schätze werden einige von uns da sein?! Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: cygwin: fixing AddModule statements in httpd.conf while installation
On Cygwin we have shared module DLLs named mod_foo.dll. Unfortunatly the current Makefile.tmpl does not seem to be DLL safe and we result after installation with make install for httpd.conf with: LoadModule mod_foo.dll ... AddModule mod_foo.dll ... ^^^ The attached patch fixes that problem and substitutes the .dll extensions accordingly for the installation and pre-configuration process. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -u apache-1.3/Makefile.tmpl apache-1.3-cygwin/Makefile.tmpl --- apache-1.3/Makefile.tmplSat Oct 6 22:01:09 2001 +++ apache-1.3-cygwin/Makefile.tmpl Tue Jan 1 15:01:00 2002 @@ -341,7 +341,7 @@ sed -e 's:SharedModule:AddModule:' \ -e 's:modules/[^/]*/::' \ -e 's:[ ]lib: mod_:' \ - -e 's:\.[soam].*$$:.c:' >>$(SRC)/.apaci.install.conf; \ + -e 's:\.[soamd].*$$:.c:' >>$(SRC)/.apaci.install.conf; \ fi @echo "<=== [programs]"
Re: [PATCH] 1.3: further Cygwin platform support
Fix for a typo in the patch for src/helpers/install.sh: I forgot the semicolon in the if statement line which oviously breaks the beast. Of course this has to be: > diff -ur apache-1.3/src/helpers/install.sh apache-1.3-cygwin/src/helpers/install.sh > --- apache-1.3/src/helpers/install.sh Tue Jun 12 10:24:54 2001 > +++ apache-1.3-cygwin/src/helpers/install.shSat Nov 10 17:07:48 2001 > @@ -88,13 +88,9 @@ > fi > > # Check if we need to add an executable extension (such as ".exe") > -# on specific OS to src and dst > -if [ -f "$src.exe" ]; then > - if [ -f "$src" ]; then > -: # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ] > - else > -ext=".exe" > - fi > +# on specific OS to src and dst. > +if [ -f "$src.exe" ] && [ ! -f "$src." ]; then > + ext=".exe" > fi > src="$src$ext" > dst="$dst$ext" Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: mod_perl 2.0 on Apache 2
> Dunno if this is the right place to ask, but anyhow: Where can I find > information on building / installing mod_perl 2.0 on Windows? Is this > already possible? if it's currently "impossible" for native Win32 and possible for Unix flavors, I guess we may get it work under Cygwin for Win32. My 2ct. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: further Cygwin platform support
->fd_in != fb->fd) { @@ -1475,7 +1487,7 @@ rc3 = 0; } } -#ifndef NETWARE +#if !defined(NETWARE) && !defined(CYGWIN_WINSOCK) else if (fb->hFH != INVALID_HANDLE_VALUE) { rc2 = ap_pcloseh(fb->pool, fb->hFH); rc3 = 0; @@ -1500,7 +1512,7 @@ else { rc3 = 0; } -#if defined(WIN32) || defined (BEOS) || defined(NETWARE) +#if defined(WIN32) || defined (BEOS) || defined(NETWARE) || defined(CYGWIN_WINSOCK) } #endif diff -ur apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Wed Oct 17 14:45:30 2001 +++ apache-1.3-cygwin/src/main/http_main.c Tue Jan 1 16:05:19 2002 @@ -662,11 +662,17 @@ perror("pthread_mutexattr_init"); exit(APEXIT_INIT); } +/* + * Cygwin has problems with this pthread call claiming that these + * are "Invalid arguements", Stipe Tolj <[EMAIL PROTECTED]> + */ +#if !defined(CYGWIN) if ((errno = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))) { perror("pthread_mutexattr_setpshared"); exit(APEXIT_INIT); } +#endif if ((errno = pthread_mutex_init(accept_mutex, &mattr))) { perror("pthread_mutex_init"); exit(APEXIT_INIT); @@ -1494,7 +1570,7 @@ #ifndef NETWARE static APACHE_TLS void (*volatile alarm_fn) (int) = NULL; #endif -#ifdef WIN32 +#if defined(WIN32) || defined(CYGWIN_WINSOCK) static APACHE_TLS unsigned int alarm_expiry_time = 0; #endif /* WIN32 */ @@ -1554,7 +1630,7 @@ } -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) API_EXPORT(int) ap_check_alarm(void) { #ifdef NETWARE @@ -3987,6 +4067,9 @@ #ifdef AP_ACCEPTFILTER_OFF printf(" -D AP_ACCEPTFILTER_OFF\n"); #endif +#ifdef CYGWIN_WINSOCK +printf(" -D CYGWIN_WINSOCK\n"); +#endif /* This list displays the compiled-in default paths: */ #ifdef HTTPD_ROOT @@ -4152,11 +4235,15 @@ #endif #endif signal(SIGALRM, alrm_handler); -#ifdef TPF +#ifdef CYGWIN +signal(SIGUSR2, alrm_handler); +#endif +#if defined(TPF) || defined(CYGWIN) signal(SIGHUP, just_die); signal(SIGTERM, just_die); signal(SIGUSR1, just_die); -#endif /* TPF */ +#endif /* TPF || CYGWIN */ + #ifdef OS2 /* Stop Ctrl-C/Ctrl-Break signals going to child processes */ @@ -4672,13 +4759,16 @@ * is greater then ap_daemons_max_free. Usually we will use SIGUSR1 * to gracefully shutdown, but unfortunatly some OS will need other * signals to ensure that the child process is terminated and the - * scoreboard pool is not growing to infinity. This effect has been + * scoreboard pool is not growing to infinity. Also set the signal we + * use to kill of childs that exceed timeout. This effect has been * seen at least on Cygwin 1.x. -- Stipe Tolj <[EMAIL PROTECTED]> */ #if defined(CYGWIN) #define SIG_IDLE_KILL SIGKILL +#define SIG_TIMEOUT_KILL SIGUSR2 #else #define SIG_IDLE_KILL SIGUSR1 +#define SIG_TIMEOUT_KILL SIGALRM #endif static void perform_idle_server_maintenance(void) @@ -4750,7 +4840,7 @@ else if (ps->last_rtime + ss->timeout_len < now) { /* no progress, and the timeout length has been exceeded */ ss->timeout_len = 0; - kill(ps->pid, SIGALRM); + kill(ps->pid, SIG_TIMEOUT_KILL); } } #endif diff -ur apache-1.3/src/modules/proxy/Makefile.tmpl apache-1.3-cygwin/src/modules/proxy/Makefile.tmpl --- apache-1.3/src/modules/proxy/Makefile.tmpl Thu Jun 22 23:22:36 2000 +++ apache-1.3-cygwin/src/modules/proxy/Makefile.tmpl Sat Nov 10 17:02:58 2001 @@ -21,10 +21,18 @@ rm -f $@ $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB) -libproxy.dll: $(OBJS_PIC) mod_proxy.def - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB) - emxbind -b -q -s -h0 -dmod_proxy.def $* && \ - rm $* +libproxy.dll: $(OBJS_PIC) mod_proxy.def + if [ "x$(OS)" = "xCygwin" ]; then \ + rm -f $@; \ + if [ -f "$(SRCDIR)/$(SHCORE_IMPLIB)" ]; then \ + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $*.dll $(OBJS_PIC) $(LIBS_SHLIB) \ + $(SRCDIR)/$(SHCORE_IMPLIB) $(LIBS1); \ + fi \ + else \ + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB); \ + emxbind -b -q -s -h0 -dmod_proxy.def $* && \ + rm $*; \ + fi .SUFFIXES: .o .lo .dll diff -ur apache-1.3/src/modules/standard/Makefile.Cygwin apache-1.3-cygwin/src/modules/standard/Makefile.Cygwin --- apache-1.3/src/modules/standard/Makefile.Cygwin Fri Sep 28 11:29:02 2001 +++ apache-1.3-cygwin/src/modules/
Re: connections are hanging for 2.0 cvs on Cygwin 1.x (worker mpm)
> Yup, it is. So, this isn't just FreeBSD. Good. Or, not so good. > This may be our bug. -- justin If you have traced that error, can you point me to the location the code where this is happening and I'll try to check this on the Cygwin platform. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
connections are hanging for 2.0 cvs on Cygwin 1.x (worker mpm)
Hi guys, I have tried to sync up with the latest development in the 2.0 cvs branch for the Cygwin 1.x platform and hence compiled and tested latest cvs tree for two workers: prefork: everything runs fine and connections are servered immediatly. worker: this has been at least the first successfull build using Cygwin's pthread support which are now known to work accordingly. (basicly httpd.conf left as make install copied it) httpd starts and listens to port 80, client A connects and requests a URI, the server starts to do something, but yet no reply (taking time, time, time ). When a second client B connects and requests a URI the first request from client A gets responded and the response of client B is now in "idle mode", vise versa. Can someone be so kind to point me on where to look for this in the code? I will try to figure out why this is happening and if it is a OS specific thing or if it can be solved within the 2.0 code. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: stuck in keepalive (apache 1.3)
I have reported such hanginf keepalive childs on the Cygwin 1.x platform. These come up after some days of load and ussually go up to 50-60 "blocked" keepalive childs. Recently (after 16 days httpd uptime) the whole scoreboard "flushed" and the hanging keepalive processes disapeared (without restarting apache). I thought this was a Cygwin specific problem, but as the PRs report similiar effect I think this is related to Apache itself. BTW, this was not caused by third-party modules! -- the installation had only distribution modules activated. Regards, Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
1.3.22 binaries _are_ available for i686
This is repost. I mentioned already a couple of times that > i686-whatever-cygwin no Stipe Tolj should be set to "yes" for the current [STATUS](apache-1.3) Regards, Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: Problems with Keep-Alive and still not exiting childs
> Win32 doesn't use read/write, it uses send/recv. While the read/write > oftentimes works, it's less than effective on occasion. > > I suspect either the cygwin thunk is misbehaving, or we have compensated > in the server but the cygwin port doesn't pick up those exceptions. Grep > throughout the source for send/recv where we've #ifdef'ed Win32, consider > including CYGWIN in those exceptions and see what you observe. thanks a lot for the hint. Attached is a patch that shows what I have changed in current CVS to make apache-1.3 run with Win32 API specific send/recv functions. I have this apache-1.3.23-dev version running on apache.dev.wapme.net and will see how it behaves for the upcoming days. If it is considered better, I would suggest to include the patch to official CVS tree. Here are the ChangeLog entries: * src/Configuration.tmpl: added rule CYGWIN_WINSOCK which may be used at configure time to indicate that we want Win32 API style functions instead of POSIX. * src/Configure: added necessary line for helpers/CutRule to fetch CYGWIN_WINSOCK rule and an additional if statement to Cygwin's compile flag block to include a seperate define CYGWIN_WINSOCK and the required import library libwsock32.a. * src/main/buff.c: added additional #ifdef ORs for CYGWIN_WINSOCK to include Win32 API code. * src/main/http_main.c: added additional #ifdef ORs for CYGWIN_WINSOCK to include Win32 API code. * src/os/cygwin/os.h: added necessary #define's and function prototype declaration for Win32 API functions. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/src/Configuration.tmpl apache-1.3-cygwin/src/Configuration.tmpl --- apache-1.3/src/Configuration.tmpl Mon Oct 29 00:39:02 2001 +++ apache-1.3-cygwin/src/Configuration.tmplSun Oct 28 16:42:58 2001 @@ -173,6 +173,11 @@ # Rule EXPAT=default : If Expat can be found at the system or # in lib/expat-lite, use it; otherwise # skip it +# +# CYGWIN_WINSOCK: +# Use Win32 API system calls for socket communication instead +# of Cygwin's POSIX.1 style. +# Rule SOCKS4=no Rule SOCKS5=no @@ -180,6 +185,7 @@ Rule IRIXN32=yes Rule PARANOID=no Rule EXPAT=default +Rule CYGWIN_WINSOCK=no # DEV_RANDOM: # Note: this rule is only used when compiling mod_auth_digest. diff -ur apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureMon Oct 29 00:39:08 2001 +++ apache-1.3-cygwin/src/Configure Sun Oct 28 16:54:58 2001 @@ -235,6 +235,7 @@ RULE_IRIXN32=`./helpers/CutRule IRIXN32 $file` RULE_PARANOID=`./helpers/CutRule PARANOID $file` RULE_EXPAT=`./helpers/CutRule EXPAT $file` +RULE_CYGWIN_WINSOCK=`./helpers/CutRule CYGWIN_WINSOCK $file` RULE_SHARED_CORE=`./helpers/CutRule SHARED_CORE $file` RULE_SHARED_CHAIN=`./helpers/CutRule SHARED_CHAIN $file` @@ -849,6 +850,11 @@ DEF_WANTHSREGEX=yes DBM_LIB="-lgdbm" LIBS="$LIBS -lcrypt $DBM_LIB" +if [ "x$RULE_CYGWIN_WINSOCK" = "xyes" ]; then + OS="$OS w/Win32 API" + CFLAGS="$CFLAGS -DCYGWIN_WINSOCK" + LIBS="$LIBS -lwsock32" + fi ;; *atheos*) DEF_WANTSREGEX=yes diff -ur apache-1.3/src/main/buff.c apache-1.3-cygwin/src/main/buff.c --- apache-1.3/src/main/buff.c Mon Oct 29 00:39:14 2001 +++ apache-1.3-cygwin/src/main/buff.c Sun Oct 28 16:55:38 2001 @@ -121,7 +121,7 @@ * futher I/O will be done */ -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) /* select() sometimes returns 1 even though the write will block. We must work around this. @@ -283,7 +283,7 @@ { int rv; -#if defined (WIN32) || defined(NETWARE) +#if defined (WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) if (fb->flags & B_SOCKET) { rv = recvwithtimeout(fb->fd_in, buf, nbyte, 0); if (rv == SOCKET_ERROR) @@ -356,7 +356,7 @@ { int rv; -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) if (fb->flags & B_SOCKET) { rv = sendwithtimeout(fb->fd, buf, nbyte, 0); if (rv == SOCKET_ERROR) @@ -1465,7 +1465,7 @@ rc1 = ap_bflush(fb); else rc1 = 0; -#if defined(WIN32) || defined(NETWARE) +#if defined(WIN32) || defined(NETWARE) || defined(CYGWIN_WINSOCK) if (fb->flags & B_SOCKET) { rc2 = ap_pclosesocket(fb->pool, fb->fd); if (fb->fd_in != fb->fd) { @@ -1475,7 +1475,7 @@ rc3 = 0; } } -#ifndef NETWARE +#if !defined(NETWARE) && !defined(CYGWIN_WINSOCK)
Problems with Keep-Alive and still not exiting childs
Hi list, this problem is Cygwin 1.x specific, but I'm ask the list for a hint on where I can start figuring out what we have here: On the Cygwin 1.x platform (running both 1.1.8-2 and 1.3.3-2) I have the following effect. While running Apache the load is quite good handled using the standard MaxServers MinServers and MaxSpareServers settings. After a while I see from /server-status that ther are keep-alive slots that seem to stay (as it seems forever). So the scoreboard fills up in non-determinable intervals with "still" keep-alive connections, even while the server is not responding to the connctions. My questions is what could be causing this? Isn't there a build in timeout for Keep-Alive connections?! It is AFAIK, but why do they stay? Any hint on how I can track this down? For those who are interested: The machine I'm seeing this (Win200 based, but same on NT4sp6) has an Apache uptime of 14 days 16 hours, served 35816 hits and 2.9 GB traffic (.0283 requests/sec - 2494 B/second - 86.2 kB/request). It has currently 60 requests currently being processed (allmost all "K"), 2 idle servers. Any help would be highly welcome. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [STATUS] (apache-1.3) Wed Oct 17 23:45:04 EDT 2001
> i686-whatever-cygwin no Stipe Tolj is available! Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: 1.3 src/Configure
> Isn't apache-1.3/src/Configure called by apache-1.3/configure ? At least, > when I fixed my build in src/Configure, things started working. See my patch > of earlier today. yes -- Cygwin 1.x uses src/Configure for Makefile variable configuration too. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PATCH] 1.3: transparent configure and build of shared DLL modules
sorry to be pendantic, but current CVS of apache-1.3 is broken for Cygwin platform, since Martin missed to commit first hunk of the patch for src/Configure: Please commit to CVS. diff -urN apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureSun Jul 15 10:04:35 2001 +++ apache-1.3-cygwin/src/Configure Wed Sep 26 00:56:20 2001 @@ -1388,16 +1388,18 @@ ;; *-cygwin*) DEF_SHARED_CORE=yes - LDFLAGS_SHLIB="-g" + LDFLAGS_SHLIB="--export-all" LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB SHLIB_SUFFIX_NAME=dll + SHMOD_SUFFIX_NAME=dll SHLIB_SUFFIX_DEPTH=0 - DLL_IMPORT_LIB='lib$(TARGET).a' - DLL_IMPORT_DEF='lib$(TARGET).def' - LD_SHLIB='dllwrap --export-all --output-def $(DLL_IMPORT_DEF) --implib $(DLL_IMPORT_LIB) --driver-name $(CC)' - LD_SHCORE_LIBS='$(LIBS)' + LD_SHLIB='dllwrap' + LD_SHCORE_DEF='' + LD_SHCORE_LIBS="$LIBS" LIBS_SHLIB='$(EXTRA_LIBS)' - SHARED_CORE_EP='' + SHARED_CORE_EP='lib$(TARGET).ep' + SHCORE_IMPLIB='lib$(TARGET).dll' + OS_MODULE_INCLUDE='Makefile.Cygwin' ;; *) ## ok, no known explict support for shared objects [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
Re: [PATCH] 1.3: serialized accept for Cygwin OS
Hi Martin, > The idea was to make sure that .exe was assumed ONLY in the case that > no file _without_ .exe had been created. If both exist, then I don't > want to automatically assume that .exe is the default extension. > > By removing the code above, you would do just that: favor .exe over > "no extension" if both cases are found. > > Originally, I coded that as [ -f "$src.exe" ] && [ ! -f "$src" ] but > you told me that Cygwin's "test" is to dumb to grok this syntax. > > Thus let's keep it the way it is. (Thanks, Jim!) AFAIK, the code would have no inpact on over OS?! And as Cygwin does not create executables (at least from ld) "without" .exe extension I would prefer the change. The problem is that both operands of the arbitary AND operaion are true on Cygwin 1.x, even if there physicaly only exists $src.exe. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: transparent configure and build of shared DLL modules
odules + mod_foo.dll. + +Unfortunatly while Apache's build process the shared modules are linked + before the shared core import library src/libhttpd.dll has + been made. The shared modules depend on this import library, so they + can not link for the first time you run make. -Create an empty file to satisfy make and - restart the make process again: +Re-run make to build the shared module DLLs and install the +whole package to the installation directory: - $ touch /path/to/module.so $ make $ make install -This will build the core dynamic library libhttpd.dll as - described in the previous scenario. +All shared modules are placed into libexec, including the + shared core DLL libhttpd.dll. When Apache's +/bin/httpd + is started it has to dynamicly link libhttpd.dll while runtime. + That is why you have to place the shared core DLL libhttpd.dll to + the same direcotry where httpd.exe resides, i.e. + /usr/local/apache/bin. -Now we have to link the shared module against that library: - - $ cd /path/to/module - $ gcc --shared -o module.dll module.lo /path/to/libhttpd.dll - -The shared DLL module has to be placed in Apache's - bin directory, where libhttpd.dll also resides. Add configuration directives to conf/httpd.conf to load and activate shared DLL modules at runtime: # httpd.conf [...] - LoadModule foo_module bin/mod_foo.dll + LoadModule foo_module libexec/mod_foo.dll AddModule mod_foo.c [...] -The above steps have to be repeated for each shared DLL module you want - to build. Using apxs to create shared DLL modules To make the extending httpd with shared DLL modules @@ -318,7 +324,7 @@ $ apxs -c mod_foo.c -o mod_foo.dll - Place the resulting DLL in Apache's bin directory, so + Place the resulting DLL in Apache's libexec directory, so the dlopen() function within the compiled in mod_so.c module can find and load it at runtime. diff -urN apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureSun Jul 15 10:04:35 2001 +++ apache-1.3-cygwin/src/Configure Wed Sep 26 00:56:20 2001 @@ -1388,16 +1388,18 @@ ;; *-cygwin*) DEF_SHARED_CORE=yes - LDFLAGS_SHLIB="-g" + LDFLAGS_SHLIB="--export-all" LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB SHLIB_SUFFIX_NAME=dll + SHMOD_SUFFIX_NAME=dll SHLIB_SUFFIX_DEPTH=0 - DLL_IMPORT_LIB='lib$(TARGET).a' - DLL_IMPORT_DEF='lib$(TARGET).def' - LD_SHLIB='dllwrap --export-all --output-def $(DLL_IMPORT_DEF) --implib $(DLL_IMPORT_LIB) --driver-name $(CC)' - LD_SHCORE_LIBS='$(LIBS)' + LD_SHLIB='dllwrap' + LD_SHCORE_DEF='' + LD_SHCORE_LIBS="$LIBS" LIBS_SHLIB='$(EXTRA_LIBS)' - SHARED_CORE_EP='' + SHARED_CORE_EP='lib$(TARGET).ep' + SHCORE_IMPLIB='lib$(TARGET).dll' + OS_MODULE_INCLUDE='Makefile.Cygwin' ;; *) ## ok, no known explict support for shared objects @@ -1924,12 +1926,6 @@ if [ "x$TCFLAGS_SHLIB" = "x" ]; then echo "CFLAGS_SHLIB=$CFLAGS_SHLIB -DSHARED_MODULE" >> Makefile.config fi -if [ "x$TDLL_IMPORT_DEF" = "x" ]; then - echo "DLL_IMPORT_DEF=$DLL_IMPORT_DEF" >> Makefile.config -fi -if [ "x$TDLL_IMPORT_LIB" = "x" ]; then - echo "DLL_IMPORT_LIB=$DLL_IMPORT_LIB" >> Makefile.config -fi if [ "x$TLD_SHLIB" = "x" ]; then echo "LD_SHLIB=$LD_SHLIB" >> Makefile.config fi diff -urN apache-1.3/src/Makefile.tmpl apache-1.3-cygwin/src/Makefile.tmpl --- apache-1.3/src/Makefile.tmplMon Apr 2 09:22:05 2001 +++ apache-1.3-cygwin/src/Makefile.tmpl Wed Sep 26 00:54:12 2001 @@ -41,7 +41,7 @@ target_shared: $(SHCORE_IMPLIB) $(SHARED_CORE_EP) lib$(TARGET).$(SHLIB_SUFFIX_NAME) $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ -o $(TARGET) -DSHARED_CORE_BOOTSTRAP main/http_main.c \ - ap/libap.a $(LIBS) $(SHCORE_IMPLIB) $(DLL_IMPORT_LIB) + ap/libap.a $(LIBS) $(SHCORE_IMPLIB) lib$(TARGET).ep: lib$(TARGET).$(SHLIB_SUFFIX_NAME) $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \ diff -urN apache-1.3/src/main/http_main.c apache-1.3-cygwin/src/main/http_main.c --- apache-1.3/src/main/http_main.c Mon Sep 10 16:12:02 2001 +++ apache-1.3-cygwin/src/main/http_main.c Tue Sep 25 15:43:07 2001 @@ -5137,6 +5137,15 @@ extern char *optarg; extern int optind; +/* Cygwin 1.x SHARED_CORE support needs REALMAIN to be declared as dllexport,
Re: FW: Apache Web Server for Windows CE
> - Forwarded message from Falle Rainer <[EMAIL PROTECTED]> - > > From: Falle Rainer <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Apache Web Server for Windows CE > Date: Wed, 5 Sep 2001 15:48:08 +0200 > > Dear Sirs, > > I am interested in a port of the Apache Web Server for Windows CE. > > Currently we are using the Apache Web Server Version 1.3.20 with the > PHP- Extension for one of our projects. The Web- Server is running on > a standard desktop PC (OS: Win98, Win200 or WinNT). This PC is > connected to a smart device, which is used for facility management, > via a serial link. > > In our next release we want to port the web- server functionality to > the smart- device. This device comes with Windows CE. > > I would appreciate if you could provide me with information if there > is already a port for Windows CE available. It's been in my mind -- at least as one application using the Cygwin POSIX.1 layer for Win32. There have been attempts to port (basicly using a cross-compiler to the ARM platform) Cywin 1.x to Windows CE. If this is done you may use the Apache 1.3 port for Cygwin which is commited to the official sources to build a working Apache on Windows CE. Please investigate the Cygwin mailing lists on www.cygwin.com if there have been successfull Windows CE cross-compiles. If so, I may assist to get Apache running on that Cygwin version. Regards, Stipe Stipe Tolj Department Management Technology Center & Research Lab [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are
[PATCH] 1.3: serialized accept for Cygwin OS
Apache for Cygwin is currently broken because of no HAVE_*_SERIALIZED_ACCEPT #defines within src/include/ap_config.h, so here are a couple of Cygwin specific changes. Please commit changes to CVS. Here is what has been changed: * src/include/ap_config.h: added two #define statements to support serialized accept on Cygwin too. * src/helpers/install.sh: Martin added the last time to much concerning the ".exe" extension detection while "make install", which in fact then did not work. This will work and has no impact on other OS. * src/Configure: made a slight change to Cygwin specific LD_SHLIB definition. * htdocs/manual/cygwin.html: added a couple of extra information that should be usefull for anyone attempting to compile using shared DLLs. Stipe [EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de --- wapme.net - wherever you are diff -ur apache-1.3/htdocs/manual/cygwin.html apache-1.3-cygwin/htdocs/manual/cygwin.html --- apache-1.3/htdocs/manual/cygwin.htmlWed Aug 22 18:20:25 2001 +++ apache-1.3-cygwin/htdocs/manual/cygwin.html Fri Sep 21 13:18:02 2001 @@ -216,6 +216,14 @@ libhttpd.dll and create the libhttpd.a import library which is required for linking httpd.exe. +Note: After make install is performed you will + find the resulting core DLL module libhttpd.dll within + /usr/local/apache/libexec. This is due to the installation process. + Please move the file to Apache's bin directory, i.e. + + $ mv /usr/local/apache/libexec/libhttpd.dll /usr/local/apache/bin + + Shared DLL modules linked version This method is currently ONLY supported using a patched version of ld.exe. Please see the @@ -257,7 +265,7 @@ $ gcc --shared -o module.dll module.lo /path/to/libhttpd.dll The shared DLL module has to be placed in Apache's - bindirectory, where libhttpd.dll also goes. + bin directory, where libhttpd.dll also resides. Add configuration directives to conf/httpd.conf to load and activate shared DLL modules at runtime: @@ -275,13 +283,35 @@ to build. Using apxs to create shared DLL modules -To make the extendinghttpd with shared DLL modules +To make the extending httpd with shared DLL modules easier, you can use apxs. Make sure you have configured $CFG_LDFLAGS_SHLIB within apxs to include the --shared directive and the path to the shared code DLL libhttpd.dll. + +After performing make install you will probably have the + following lines within your apxs: + + # apxs + [...] + my $CFG_LD_SHLIB = q(dllwrap --export-all --output-def libhttpd.def --implib +libhttpd.a --driver-name gcc); # substituted via Makefile.tmpl + my $CFG_LDFLAGS_SHLIB = q(-g); # substituted via Makefile.tmpl + my $CFG_LIBS_SHLIB= q();# substituted via Makefile.tmpl + [...] + + Change these to reflect the new compile options needed for shared DLL + modules as follows: + + # apxs + [...] + my $CFG_LD_SHLIB = q(gcc); # substituted via Makefile.tmpl + my $CFG_LDFLAGS_SHLIB = q(-g --shared); # substituted via Makefile.tmpl + my $CFG_LIBS_SHLIB= q(/path/to/libhttpd.dll);# substituted via +Makefile.tmpl + [...] + + Now you should be able to create a shared DLL module from a mod_foo.c source file with: diff -ur apache-1.3/src/Configure apache-1.3-cygwin/src/Configure --- apache-1.3/src/ConfigureSun Jul 15 10:04:35 2001 +++ apache-1.3-cygwin/src/Configure Tue Sep 18 00:28:06 2001 @@ -1394,7 +1394,8 @@ SHLIB_SUFFIX_DEPTH=0 DLL_IMPORT_LIB='lib$(TARGET).a' DLL_IMPORT_DEF='lib$(TARGET).def' - LD_SHLIB='dllwrap --export-all --output-def $(DLL_IMPORT_DEF) --implib $(DLL_IMPORT_LIB) --driver-name $(CC)' + LD_SHLIB='dllwrap --export-all --implib $(DLL_IMPORT_LIB) --driver-name +$(CC)' LD_SHCORE_LIBS='$(LIBS)' LIBS_SHLIB='$(EXTRA_LIBS)' SHARED_CORE_EP='' diff -ur apache-1.3/src/helpers/install.sh apache-1.3-cygwin/src/helpers/install.sh --- apache-1.3/src/helpers/install.sh Tue Jun 12 10:24:53 2001 +++ apache-1.3-cygwin/src/helpers/install.shFri Sep 21 12:54:06 2001 @@ -88,13 +88,10 @@ fi # Check if we need to add an executable extension (such as ".exe") -# on specific OS to src and dst +# on specific OS to src and dst. +# At least Cygwin requires this to ensure a clean "make install". if [ -f "$src.exe" ]; then - if [ -f "$src" ]; then -: # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ] - else ext=".exe" - fi fi src="$src$ext" dst="$dst$ext" diff -ur apache-1.3/src/include/ap_config.h apache-1.3-cygwin/src/include/ap_config.h --- apache-1.3/src/include/ap_config.h Mon Sep