httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject svn commit: r161368 - in httpd/httpd/trunk: NWGNUmakefile build/NWGNUenvironment.inc build/NWGNUmakefile build/NWGNUtail.inc modules/aaa/NWGNUauthnzldap modules/arch/netware/libprews.c modules/ldap/NWGNUmakefile os/netware/modules.c server/mpm/netware/mpm_netware.c support/logresolve.c
Date Thu, 14 Apr 2005 23:42:23 GMT
Author: bnicholes
Date: Thu Apr 14 16:42:21 2005
New Revision: 161368

URL: http://svn.apache.org/viewcvs?view=rev&rev=161368
Log:
Allow httpd on NetWare to build using either the standard socket libraries or the Winsock
libraries.

Modified:
    httpd/httpd/trunk/NWGNUmakefile
    httpd/httpd/trunk/build/NWGNUenvironment.inc
    httpd/httpd/trunk/build/NWGNUmakefile
    httpd/httpd/trunk/build/NWGNUtail.inc
    httpd/httpd/trunk/modules/aaa/NWGNUauthnzldap
    httpd/httpd/trunk/modules/arch/netware/libprews.c
    httpd/httpd/trunk/modules/ldap/NWGNUmakefile
    httpd/httpd/trunk/os/netware/modules.c
    httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
    httpd/httpd/trunk/support/logresolve.c

Modified: httpd/httpd/trunk/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/NWGNUmakefile?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/NWGNUmakefile (original)
+++ httpd/httpd/trunk/NWGNUmakefile Thu Apr 14 16:42:21 2005
@@ -216,7 +216,6 @@
 	$(OBJDIR)/mod_mime.o \
 	$(OBJDIR)/mod_negotiation.o \
 	$(OBJDIR)/mod_netware.o \
-	$(OBJDIR)/mod_nw_ssl.o \
 	$(OBJDIR)/mod_setenvif.o \
 	$(OBJDIR)/mod_so.o \
 	$(OBJDIR)/modules.o \
@@ -241,6 +240,12 @@
 	$(OBJDIR)/vhost.o \
 	$(EOLIST)
 
+# Build in mod_nw_ssl if Winsock is being used
+ifndef USE_STDSOCKETS
+FILES_nlm_objs += $(OBJDIR)/mod_nw_ssl.o \
+	       $(EOLIST)
+endif
+
 #
 # These are the LIB files needed to create the NLM target above.
 # These will be added as a library command in the link.opt file.
@@ -280,9 +285,14 @@
 	@netware.imp \
 	@$(APR)/aprlib.imp \
 	@libc.imp \
-	@ws2nlm.imp \
 	GetCurrentAddressSpace \
 	$(EOLIST)
+
+# Build in mod_nw_ssl if Winsock is being used
+ifndef USE_STDSOCKETS
+FILES_nlm_Ximports += @ws2nlm.imp \
+	       $(EOLIST)
+endif
  
 #   
 # Any symbols exported to here

Modified: httpd/httpd/trunk/build/NWGNUenvironment.inc
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/build/NWGNUenvironment.inc?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/build/NWGNUenvironment.inc (original)
+++ httpd/httpd/trunk/build/NWGNUenvironment.inc Thu Apr 14 16:42:21 2005
@@ -127,6 +127,9 @@
 endif
 
 DEFINES		= -DNETWARE
+ifndef USE_STDSOCKETS
+DEFINES += -DUSE_WINSOCK
+endif
 
 #
 # MetroWerks static Libraries
@@ -271,6 +274,7 @@
 SRC		= $(AP_WORK)
 APR		= $(APR_WORK)
 APRUTIL		= $(APU_WORK)
+APULDAP		= $(APU_WORK)/ldap
 SUPMOD		= $(AP_WORK)/support
 PCRE		= $(AP_WORK)/srclib/pcre
 APRTEST		= $(APR_WORK)/test
@@ -284,6 +288,7 @@
 
 APRLIB		= $(APR)/$(OBJDIR)/aprlib.lib
 APRUTLIB	= $(APRUTIL)/$(OBJDIR)/aprutil.lib
+APULDAPLIB	= $(APULDAP)/$(OBJDIR)/apuldap.lib
 STMODLIB	= $(STDMOD)/$(OBJDIR)/stdmod.lib
 PCRELIB		= $(PCRE)/$(OBJDIR)/pcre.lib
 NWOSLIB		= $(NWOS)/$(OBJDIR)/netware.lib

Modified: httpd/httpd/trunk/build/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/build/NWGNUmakefile?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/build/NWGNUmakefile (original)
+++ httpd/httpd/trunk/build/NWGNUmakefile Thu Apr 14 16:42:21 2005
@@ -39,7 +39,7 @@
 	@echo -EP >> $@
 	@echo -nosyspath >> $@
 	@echo -w nocmdline >> $@
-	@echo -DNETWARE >> $@
+	@echo $(DEFINES) >> $@
 	@echo -DCORE_PRIVATE >> $@
 	@echo -I..\include >> $@
 	@echo -I..\modules\http >> $@

Modified: httpd/httpd/trunk/build/NWGNUtail.inc
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/build/NWGNUtail.inc?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/build/NWGNUtail.inc (original)
+++ httpd/httpd/trunk/build/NWGNUtail.inc Thu Apr 14 16:42:21 2005
@@ -241,6 +241,7 @@
 ifneq "$(LDAPSDK)" ""
 	@echo -l $(LDAPSDK)/lib/nlm >> $@
 endif
+	@echo -l $(APULDAP)/$(OBJDIR) >> $@
 	@echo -l $(XML)/$(OBJDIR) >> $@
 	@echo -nodefaults >> $@
 	@echo -map $(OBJDIR)\$(NLM_NAME).map>> $@

Modified: httpd/httpd/trunk/modules/aaa/NWGNUauthnzldap
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/aaa/NWGNUauthnzldap?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/modules/aaa/NWGNUauthnzldap (original)
+++ httpd/httpd/trunk/modules/aaa/NWGNUauthnzldap Thu Apr 14 16:42:21 2005
@@ -36,6 +36,14 @@
 			$(EOLIST)
 
 #
+#LDAP client requires the use of Winsock
+#
+ifdef USE_STDSOCKETS
+XDEFINES += -DUSE_WINSOCK \
+			$(EOLIST)
+endif
+
+#
 # These flags will be added to the link.opt file
 #
 XLFLAGS		+= \

Modified: httpd/httpd/trunk/modules/arch/netware/libprews.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/arch/netware/libprews.c?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/libprews.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/libprews.c Thu Apr 14 16:42:21 2005
@@ -26,7 +26,9 @@
 ------------------------------------------------------------------*/
 #include <netware.h>
 //#include "stddef.h"
+#ifdef USE_WINSOCK
 #include "novsock2.h"
+#endif
 
 int _NonAppStart
 (
@@ -54,14 +56,22 @@
 #pragma unused(messageCount)
 #pragma unused(messages)
 
+#ifdef USE_WINSOCK
     WSADATA wsaData;
     
     return WSAStartup((WORD) MAKEWORD(2, 0), &wsaData);
+#else
+    return 0;
+#endif
 }
 
 void _NonAppStop( void )
 {
+#ifdef USE_WINSOCK
     WSACleanup();
+#else
+    return;0;
+#endif
 }
 
 int  _NonAppCheckUnload( void )

Modified: httpd/httpd/trunk/modules/ldap/NWGNUmakefile
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/NWGNUmakefile?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/modules/ldap/NWGNUmakefile (original)
+++ httpd/httpd/trunk/modules/ldap/NWGNUmakefile Thu Apr 14 16:42:21 2005
@@ -38,6 +38,14 @@
 			$(EOLIST)
 
 #
+#LDAP client requires the use of Winsock
+#
+ifdef USE_STDSOCKETS
+XDEFINES += -DUSE_WINSOCK \
+			$(EOLIST)
+endif
+
+#
 # These flags will be added to the link.opt file
 #
 XLFLAGS		+= \

Modified: httpd/httpd/trunk/os/netware/modules.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/os/netware/modules.c?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/os/netware/modules.c (original)
+++ httpd/httpd/trunk/os/netware/modules.c Thu Apr 14 16:42:21 2005
@@ -36,7 +36,9 @@
 extern module env_module;
 extern module log_config_module;
 extern module setenvif_module;
+#ifdef USE_WINSOCK
 extern module nwssl_module;
+#endif
 extern module netware_module;
 
 module *ap_prelinked_modules[] = {
@@ -53,7 +55,9 @@
   &env_module,
   &log_config_module,
   &setenvif_module,
+#ifdef USE_WINSOCK
   &nwssl_module,
+#endif
   &netware_module,
   NULL
 };
@@ -72,7 +76,9 @@
   {"env_module", &env_module},
   {"log_config_module", &log_config_module},
   {"setenvif_module", &setenvif_module},
+#ifdef USE_WINSOCK
   {"nwssl_module", &nwssl_module},
+#endif
   {"netware_module", &netware_module},
   {NULL, NULL}
 };
@@ -91,7 +97,9 @@
   &env_module,
   &log_config_module,
   &setenvif_module,
+#ifdef USE_WINSOCK
   &nwssl_module,
+#endif
   &netware_module,
   NULL
 };

Modified: httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/netware/mpm_netware.c?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/trunk/server/mpm/netware/mpm_netware.c Thu Apr 14 16:42:21 2005
@@ -57,6 +57,10 @@
 #include <sys/types.h>
 #endif
 
+#ifndef USE_WINSOCK
+#include <sys/select.h>
+#endif
+
 #define CORE_PRIVATE
 
 #include "ap_config.h"
@@ -385,7 +389,7 @@
 
             if (srv <= 0) {
                 if (srv < 0) {
-                    ap_log_error(APLOG_MARK, APLOG_NOTICE, WSAGetLastError(), ap_server_conf,
+                    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
                         "select() failed on listen socket");
                     apr_thread_yield();
                 }
@@ -468,6 +472,7 @@
                     APR_STATUS_IS_ENETUNREACH(stat)) {
                         ;
                 }
+#ifdef USE_WINSOCK
                 else if (APR_STATUS_IS_ENETDOWN(stat)) {
                        /*
                         * When the network layer has been shut down, there
@@ -488,6 +493,7 @@
                         clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, ptrans, 
                                          bucket_alloc);
                 }
+#endif
                 else {
                         ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
                             "apr_socket_accept: (client socket)");
@@ -970,8 +976,10 @@
         free (addrname);
     }
 
-    /* The following call has been moved to the mod_nw_ssl pre-config handler
-    ap_listen_pre_config(); */
+#ifndef USE_WINSOCK
+    /* The following call has been moved to the mod_nw_ssl pre-config handler */
+    ap_listen_pre_config();
+#endif
 
     ap_threads_to_start = DEFAULT_START_THREADS;
     ap_threads_min_free = DEFAULT_MIN_FREE_THREADS;

Modified: httpd/httpd/trunk/support/logresolve.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/support/logresolve.c?view=diff&r1=161367&r2=161368
==============================================================================
--- httpd/httpd/trunk/support/logresolve.c (original)
+++ httpd/httpd/trunk/support/logresolve.c Thu Apr 14 16:42:21 2005
@@ -305,7 +305,7 @@
     char *bar, hoststring[MAXDNAME + 1], line[MAXLINE], *statfile;
     int i, check;
 
-#if defined(WIN32) || defined(NETWARE)
+#if defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
     /*  If we apr'ify this code, apr_pool_create/apr_pool_destroy
      *  should perform the WSAStartup/WSACleanup for us. 
      */
@@ -367,7 +367,7 @@
 	    puts(hoststring);
     }
 
-#if defined(WIN32) || defined(NETWARE)
+#if defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
      WSACleanup();
 #endif
 



Mime
View raw message