Changeset 315 in Main for trunk/Server/main.c
- Timestamp:
- Oct 14, 2024, 7:01:02 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/main.c
r312 r315 35 35 #include "tw_version.h" 36 36 37 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) )37 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) 38 38 #include <windows.h> 39 #elif defined(__NETWARE__) 40 #include <nwconio.h> 41 #include <nwthread.h> 39 42 #endif 40 43 … … 93 96 int startup(int argc, char** argv); 94 97 95 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) ) || defined(__BORLANDC__)98 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || defined(__BORLANDC__) 96 99 char* get_registry(const char* main, const char* sub) { 97 100 DWORD bufsize = 512; … … 533 536 534 537 #if !defined(BUILD_GUI_VALID) 538 void thread_stuff(void* pargs); 539 540 struct arg_struct { 541 int argc; 542 char** argv; 543 }; 544 535 545 int main(int argc, char** argv) { 536 546 int st; 547 #ifdef __NETWARE__ 548 struct arg_struct* parg = malloc(sizeof(*parg)); 549 parg->argc = argc; 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); 556 return 0; 557 } 558 559 void thread_stuff(void* pargs) { 560 int st; 561 int argc = ((struct arg_struct*)pargs)->argc; 562 char** argv = ((struct arg_struct*)pargs)->argv; 563 #endif 537 564 #ifdef SERVICE 538 565 SERVICE_TABLE_ENTRY table[] = {{"Tewi HTTPd", servmain}, {NULL, NULL}}; … … 707 734 ; 708 735 #endif 736 #ifdef __NETWARE__ 737 return; 738 #else 709 739 return st; 740 #endif 710 741 #endif 711 742 } … … 715 746 sceKernelExitGame(); 716 747 #endif 748 #ifdef __NETWARE__ 749 return; 750 #else 717 751 return 0; 752 #endif 718 753 } 719 754 #endif … … 722 757 int i; 723 758 char* r; 724 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) ) || defined(__BORLANDC__)759 #if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || defined(__BORLANDC__) 725 760 char* confpath = cm_strdup(PREFIX "/etc/tewi.conf"); 726 761 char* regpath = get_registry("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Tewi HTTPd", "InstallDir"); … … 806 841 signal(SIGCHLD, SIG_IGN); 807 842 signal(SIGPIPE, SIG_IGN); 808 #elif !defined(BUILD_GUI) && !defined(__OS2__) 843 #elif !defined(BUILD_GUI) && !defined(__OS2__) && !defined(__NETWARE__) 809 844 SetConsoleTitle(tw_server); 810 845 #endif
Note:
See TracChangeset
for help on using the changeset viewer.