Changeset 347 in Main for trunk/Server
- Timestamp:
- Oct 16, 2024, 1:33:28 AM (4 weeks ago)
- Location:
- trunk/Server
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/config.c
r318 r347 15 15 #endif 16 16 17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__ WATCOMC__))17 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) 18 18 #ifdef USE_WINSOCK1 19 19 #include <winsock.h> … … 32 32 #endif 33 33 34 #ifdef __NETWARE__ 35 #include <arpa/inet.h> 36 #endif 34 37 #include "tw_config.h" 35 38 #include "tw_module.h" -
trunk/Server/http.c
r338 r347 30 30 #elif defined(__NETWARE__) 31 31 #include <sys/socket.h> 32 #include <sys/select.h> 32 33 #else 33 34 #ifdef USE_POLL -
trunk/Server/main.c
r324 r347 38 38 #include <windows.h> 39 39 #elif defined(__NETWARE__) 40 #include <n wconio.h>41 #include < nwthread.h>40 #include <nks/thread.h> 41 #include <screen.h> 42 42 #endif 43 43 … … 549 549 parg->argc = argc; 550 550 parg->argv = argv; 551 DestroyScreen(GetCurrentScreen()); 552 SetCurrentScreen(CreateScreen("Tewi Console", 0)); 553 BeginThread(thread_stuff, NULL, 0, parg); 554 ThreadSwitch(); 555 ExitThread(EXIT_THREAD, 0); 551 thread_stuff(parg); 556 552 return 0; 557 553 } 558 559 #ifdef __NETWARE__560 void __WATCOM_Prelude(void){return;}561 #endif562 554 563 555 void thread_stuff(void* pargs) { -
trunk/Server/module.c
r339 r347 33 33 #include <os2.h> 34 34 #elif defined(__NETWARE__) 35 #include <nwadv.h> 36 #include <nwthread.h> 35 #include <dlfcn.h> 37 36 #else 38 37 #include <windows.h> … … 60 59 lib = (void*)mod; 61 60 #elif defined(__NETWARE__) 62 *hnd = FindNLMHandle(path); 63 lib = (void*)hnd; 61 lib = dlopen(path, RTLD_LAZY); 64 62 #else 65 63 lib = LoadLibraryA(path); … … 87 85 return ret; 88 86 #elif defined(__NETWARE__) 89 return ImportSymbol(*(unsigned int*)mod, sym);87 return dlsym(mod, sym); 90 88 #else 91 89 return GetProcAddress(mod, sym); -
trunk/Server/server.c
r342 r347 65 65 #elif defined(__NETWARE__) 66 66 #include <sys/socket.h> 67 #include < nwthread.h>68 # define IPPROTO_TCP 069 # define INADDR_ANY 067 #include <arpa/inet.h> 68 #include <sys/select.h> 69 #include <pthread.h> 70 70 #define htons(x) x 71 71 #include "strptime.h" … … 107 107 #endif 108 108 109 #if defined(__USLC__) || defined(__NeXT__) || defined(__NETWARE__)109 #if defined(__USLC__) || defined(__NeXT__) 110 110 typedef int socklen_t; 111 111 #endif … … 933 933 tw_http_error(s, sock, 403, name, port, vhost_entry); 934 934 } else { 935 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime); 935 #ifdef __NETWARE__ 936 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime.tv_sec, cmtime); 937 #else 938 tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime); 939 #endif 936 940 fclose(f); 937 941 } … … 961 965 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 962 966 #ifdef __NETWARE__ 963 ExitThread(EXIT_THREAD, 0);967 pthread_exit(NULL); 964 968 #else 965 969 _endthread(); … … 1072 1076 _beginthread(tw_server_pass, 0, 0, e); 1073 1077 #elif defined(__NETWARE__) 1074 BeginThread(tw_server_pass, 0, 0, e); 1078 pthread_t thr; 1079 pthread_create(&thr, NULL, (void* (*)(void*))tw_server_pass, e); 1080 pthread_detach(thr); 1075 1081 #else 1076 1082 _beginthread(tw_server_pass, 0, e); -
trunk/Server/tw_config.h
r328 r347 35 35 #define NO_IPV6 36 36 #endif 37 #endif38 39 #ifdef __NETWARE__40 struct in_addr {41 unsigned int s_addr;42 };43 44 struct sockaddr_in {45 unsigned short sin_family;46 unsigned short sin_port;47 struct in_addr sin_addr;48 char sin_zero[8];49 };50 37 #endif 51 38
Note:
See TracChangeset
for help on using the changeset viewer.