#define INCL_DOSERRORS
#include <os2.h>
#elif defined(__NETWARE__)
-#include <dlfcn.h>
+#include <nwadv.h>
+#include <nwthread.h>
#else
#include <windows.h>
#include <direct.h>
}
lib = (void*)mod;
#elif defined(__NETWARE__)
- lib = dlopen(path, RTLD_LAZY);
+ *hnd = FindNLMHandle(path);
+ lib = (void*)hnd;
#else
lib = LoadLibraryA(path);
#endif
}
return ret;
#elif defined(__NETWARE__)
- return dlsym(mod, sym);
+ return ImportSymbol(*(unsigned int*)mod, sym);
#else
return GetProcAddress(mod, sym);
#endif
typedef int socklen_t;
#elif defined(__NETWARE__)
#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <sys/select.h>
-#include <pthread.h>
+
+#define IPPROTO_TCP 0
+#define INADDR_ANY 0
#define htons(x) x
#include "strptime.h"
+typedef int socklen_t;
#else
#ifdef USE_POLL
#ifdef __PPU__
if(f == NULL) {
tw_http_error(s, sock, 403, name, port, vhost_entry);
} else {
-#ifdef __NETWARE__
- tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime.tv_sec, cmtime);
-#else
- tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime);
-#endif
+ tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime);
fclose(f);
}
}
close_socket(sock);
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
#ifdef __NETWARE__
- pthread_exit(NULL);
#else
_endthread();
#endif
#ifdef __OS2__
_beginthread(tw_server_pass, 0, 0, e);
#elif defined(__NETWARE__)
- pthread_t thr;
- pthread_create(&thr, NULL, (void* (*)(void*))tw_server_pass, e);
- pthread_detach(thr);
+ tw_server_pass(e);
#else
_beginthread(tw_server_pass, 0, e);
#endif