shithub: duke3d

Download patch

ref: 9f04350e58490525664e1f9213a177bf39c83124
parent: ebeba6bf9840047dbf1f6fdca1b61bb79da118d4
author: Tanguy Fautre <[email protected]>
date: Fri Feb 14 19:51:57 EST 2020

Fixed Linux compilation.
Commented out mmulti_unstable calls, we're not even compiling this file.

--- a/Engine/src/engine.c
+++ b/Engine/src/engine.c
@@ -3353,7 +3353,7 @@
 
 #ifdef WIN32
     permissions = S_IWRITE;
-#elif
+#else
     permissions = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
 #endif
 
--- a/Engine/src/mmulti_stable.cpp
+++ b/Engine/src/mmulti_stable.cpp
@@ -1,4 +1,5 @@
 
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/Engine/src/network.c
+++ b/Engine/src/network.c
@@ -7,10 +7,10 @@
 //
 
 #include "network.h"
+#include "mmulti_stable.h"
 
 int nNetMode = 0;
 
-//#include "mmulti_stable.h"
 void Setup_UnstableNetworking()
 {
 	nNetMode = 0;
@@ -32,9 +32,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:		
-            unstable_callcommit();
-            break;
+        //case 0:		
+        //    unstable_callcommit();
+        //    break;
         case 1:
             stable_callcommit();
             break;		
@@ -46,9 +46,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:	
-            unstable_initcrc();
-            break;
+        //case 0:	
+        //    unstable_initcrc();
+        //    break;
         case 1:	
             stable_initcrc();
             break;
@@ -60,8 +60,8 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            return unstable_getcrc(buffer, bufleng);
+        //case 0:
+        //    return unstable_getcrc(buffer, bufleng);
         case 1:
             return stable_getcrc(buffer, bufleng);
 	}
@@ -73,9 +73,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_initmultiplayers(damultioption, dacomrateoption, dapriority);
-            break;
+        //case 0:
+        //    unstable_initmultiplayers(damultioption, dacomrateoption, dapriority);
+        //    break;
         case 1:
             stable_initmultiplayers(damultioption, dacomrateoption, dapriority);
             break;
@@ -87,9 +87,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_sendpacket(other, bufptr, messleng);
-            break;
+        //case 0:
+        //    unstable_sendpacket(other, bufptr, messleng);
+        //    break;
         case 1:
             stable_sendpacket(other, bufptr, messleng);
             break;
@@ -101,9 +101,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_setpackettimeout(datimeoutcount, daresendagaincount);
-            break;
+        //case 0:
+        //    unstable_setpackettimeout(datimeoutcount, daresendagaincount);
+        //    break;
         case 1:
             stable_setpackettimeout(datimeoutcount, daresendagaincount);
             break;
@@ -115,9 +115,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_uninitmultiplayers();
-            break;
+        //case 0:
+        //    unstable_uninitmultiplayers();
+        //    break;
         case 1:
             stable_uninitmultiplayers();
             break;
@@ -129,11 +129,11 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_sendlogon();
-            break;
+        //case 0:
+        //    unstable_sendlogon();
+        //    break;
         case 1:
-            unstable_sendlogon();
+            stable_sendlogon();
             break;
 	}
 #endif
@@ -143,9 +143,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_sendlogoff();
-            break;
+        //case 0:
+        //    unstable_sendlogoff();
+        //    break;
         case 1:
             stable_sendlogoff();
             break;
@@ -157,8 +157,8 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            return unstable_getoutputcirclesize();
+        //case 0:
+        //    return unstable_getoutputcirclesize();
         case 1:
             return stable_getoutputcirclesize();		
 	}
@@ -170,9 +170,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_setsocket(newsocket);
-            break;
+        //case 0:
+        //    unstable_setsocket(newsocket);
+        //    break;
         case 1:
             stable_setsocket(newsocket);
             break;
@@ -184,8 +184,8 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            return unstable_getpacket(other, bufptr); // default
+        //case 0:
+        //    return unstable_getpacket(other, bufptr); // default
         case 1:
             return stable_getpacket(other, bufptr);
 	}
@@ -197,9 +197,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_flushpackets();
-            break;
+        //case 0:
+        //    unstable_flushpackets();
+        //    break;
         case 1:
             stable_flushpackets();
             break;
@@ -211,9 +211,9 @@
 #ifndef USER_DUMMY_NETWORK
 	switch(nNetMode)
 	{
-        case 0:
-            unstable_genericmultifunction(other, bufptr, messleng, command);
-            break;
+        //case 0:
+        //    unstable_genericmultifunction(other, bufptr, messleng, command);
+        //    break;
         case 1:
             stable_genericmultifunction(other, bufptr, messleng, command);
             break;