$(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 \
$(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.
@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
endif
DEFINES = -DNETWARE
+ifndef USE_STDSOCKETS
+DEFINES += -DUSE_WINSOCK
+endif
#
# MetroWerks static Libraries
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
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
@echo -EP >> $@
@echo -nosyspath >> $@
@echo -w nocmdline >> $@
- @echo -DNETWARE >> $@
+ @echo $(DEFINES) >> $@
@echo -DCORE_PRIVATE >> $@
@echo -I..\include >> $@
@echo -I..\modules\http >> $@
ifneq "$(LDAPSDK)" ""
@echo -l $(LDAPSDK)/lib/nlm >> $@
endif
+ @echo -l $(APULDAP)/$(OBJDIR) >> $@
@echo -l $(XML)/$(OBJDIR) >> $@
@echo -nodefaults >> $@
@echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
XDEFINES += \
$(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
#
------------------------------------------------------------------*/
#include <netware.h>
//#include "stddef.h"
+#ifdef USE_WINSOCK
#include "novsock2.h"
+#endif
int _NonAppStart
(
#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 )
XDEFINES += \
$(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
#
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[] = {
&env_module,
&log_config_module,
&setenvif_module,
+#ifdef USE_WINSOCK
&nwssl_module,
+#endif
&netware_module,
NULL
};
{"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}
};
&env_module,
&log_config_module,
&setenvif_module,
+#ifdef USE_WINSOCK
&nwssl_module,
+#endif
&netware_module,
NULL
};
#include <sys/types.h>
#endif
+#ifndef USE_WINSOCK
+#include <sys/select.h>
+#endif
+
#define CORE_PRIVATE
#include "ap_config.h"
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();
}
APR_STATUS_IS_ENETUNREACH(stat)) {
;
}
+#ifdef USE_WINSOCK
else if (APR_STATUS_IS_ENETDOWN(stat)) {
/*
* When the network layer has been shut down, there
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)");
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;
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.
*/
puts(hoststring);
}
-#if defined(WIN32) || defined(NETWARE)
+#if defined(WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
WSACleanup();
#endif