Changeset 349 in Main for trunk/Server
- Timestamp:
- Oct 16, 2024, 5:08:08 AM (4 weeks ago)
- Location:
- trunk/Server
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/config.c
r347 r349 33 33 34 34 #ifdef __NETWARE__ 35 #include < arpa/inet.h>35 #include <sys/socket.h> 36 36 #endif 37 37 #include "tw_config.h" -
trunk/Server/http.c
r347 r349 30 30 #elif defined(__NETWARE__) 31 31 #include <sys/socket.h> 32 #include <sys/select.h>33 32 #else 34 33 #ifdef USE_POLL -
trunk/Server/main.c
r347 r349 38 38 #include <windows.h> 39 39 #elif defined(__NETWARE__) 40 #include <nks/thread.h>41 #include <screen.h>42 40 #endif 43 41 -
trunk/Server/module.c
r347 r349 33 33 #include <os2.h> 34 34 #elif defined(__NETWARE__) 35 #include <dlfcn.h> 35 #include <nwadv.h> 36 #include <nwthread.h> 36 37 #else 37 38 #include <windows.h> … … 59 60 lib = (void*)mod; 60 61 #elif defined(__NETWARE__) 61 lib = dlopen(path, RTLD_LAZY); 62 *hnd = FindNLMHandle(path); 63 lib = (void*)hnd; 62 64 #else 63 65 lib = LoadLibraryA(path); … … 85 87 return ret; 86 88 #elif defined(__NETWARE__) 87 return dlsym(mod, sym);89 return ImportSymbol(*(unsigned int*)mod, sym); 88 90 #else 89 91 return GetProcAddress(mod, sym); -
trunk/Server/server.c
r348 r349 65 65 #elif defined(__NETWARE__) 66 66 #include <sys/socket.h> 67 #include <arpa/inet.h> 68 # include <sys/select.h>69 # include <pthread.h>67 68 #define IPPROTO_TCP 0 69 #define INADDR_ANY 0 70 70 #define htons(x) x 71 71 #include "strptime.h" 72 typedef int socklen_t; 72 73 #else 73 74 #ifdef USE_POLL … … 936 937 tw_http_error(s, sock, 403, name, port, vhost_entry); 937 938 } else { 938 #ifdef __NETWARE__ 939 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime.tv_sec, cmtime); 940 #else 941 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime); 942 #endif 939 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime); 943 940 fclose(f); 944 941 } … … 968 965 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 969 966 #ifdef __NETWARE__ 970 pthread_exit(NULL);971 967 #else 972 968 _endthread(); … … 1079 1075 _beginthread(tw_server_pass, 0, 0, e); 1080 1076 #elif defined(__NETWARE__) 1081 pthread_t thr; 1082 pthread_create(&thr, NULL, (void* (*)(void*))tw_server_pass, e); 1083 pthread_detach(thr); 1077 tw_server_pass(e); 1084 1078 #else 1085 1079 _beginthread(tw_server_pass, 0, e); -
trunk/Server/tw_config.h
r347 r349 35 35 #define NO_IPV6 36 36 #endif 37 #endif 38 39 #ifdef __NETWARE__ 40 struct in_addr { 41 uint32_t s_addr; 42 }; 43 struct sockaddr_in { 44 uint16_t sin_family; 45 uint16_t sin_port; 46 struct in_addr sin_addr; 47 uint8_t sin_zero[8]; 48 }; 37 49 #endif 38 50
Note:
See TracChangeset
for help on using the changeset viewer.