Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 929 invoked by uid 500); 21 Sep 2001 13:39:41 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 917 invoked from network); 21 Sep 2001 13:39:40 -0000 Message-ID: <3BAB4213.74AA3C0F@wapme-systems.de> Date: Fri, 21 Sep 2001 15:35:15 +0200 From: Stipe Tolj Organization: Wapme Systems AG X-Mailer: Mozilla 4.7 [de]C-CCK-MCD QXW0322b (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [PATCH] 1.3: serialized accept for Cygwin OS Content-Type: multipart/mixed; boundary="------------23A95CC60102C7E85B360C3A" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Dies ist eine mehrteilige Nachricht im MIME-Format. --------------23A95CC60102C7E85B360C3A Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 tolj@wapme-systems.de ------------------------------------------------------------------- Wapme Systems AG M�nsterstr. 248 40470 D�sseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: info@wapme-systems.de Internet: http://www.wapme-systems.de ------------------------------------------------------------------- wapme.net - wherever you are --------------23A95CC60102C7E85B360C3A Content-Type: text/plain; charset=us-ascii; name="apache-1.3-cygwin.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="apache-1.3-cygwin.diff" diff -ur apache-1.3/htdocs/manual/cygwin.html apache-1.3-cygwin/htdocs/manual/cygwin.html --- apache-1.3/htdocs/manual/cygwin.html Wed 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/Configure Sun 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.sh Fri 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 10 22:12:02 2001 +++ apache-1.3-cygwin/src/include/ap_config.h Fri Sep 21 13:20:31 2001 @@ -976,7 +976,8 @@ #define USE_MMAP_SCOREBOARD #define USE_MMAP_FILES #define HAVE_SYSLOG 1 - +#define HAVE_FCNTL_SERIALIZED_ACCEPT +#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT #else /* Unknown system - Edit these to match */ --------------23A95CC60102C7E85B360C3A--