Changeset - r1812:a78a2f58cdc8
[Not reviewed]
master
0 6 0
Darkvater - 19 years ago 2005-05-14 23:48:39
darkvater@openttd.org
(svn r2316) - Fix: [ 1154454 ] Fix BeOS build on Trunk (myob)
6 files changed with 14 insertions and 5 deletions:
0 comments (0 inline, 0 general)
functions.h
Show inline comments
 
@@ -164,14 +164,12 @@ char *GetName(int id, char *buff);
 
#define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true)
 
#define AllocateName(name, skip) RealAllocateName(name, skip, false)
 
StringID RealAllocateName(const char *name, byte skip, bool check_double);
 
void ConvertDayToYMD(YearMonthDay *ymd, uint16 date);
 
uint ConvertYMDToDay(uint year, uint month, uint day);
 
uint ConvertIntDate(uint date);
 
void CSleep(int milliseconds);
 

	
 

	
 
/* misc functions */
 
void MarkTileDirty(int x, int y);
 
void MarkTileDirtyByTile(TileIndex tile);
 
void InvalidateWindow(byte cls, WindowNumber number);
 
void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index);
misc.c
Show inline comments
 
@@ -110,12 +110,14 @@ void SetDate(uint date)
 
#ifdef ENABLE_NETWORK
 
	_network_last_advertise_date = 0;
 
#endif /* ENABLE_NETWORK */
 
}
 

	
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
// multi os compatible sleep function
 

	
 
#ifdef __AMIGA__
 
// usleep() implementation
 
#	include <devices/timer.h>
 
#	include <dos/dos.h>
 
@@ -154,12 +156,14 @@ void CSleep(int milliseconds)
 
			WaitIO((struct IORequest *)TimerRequest);
 
		}
 
		#endif // __AMIGA__
 
	#endif
 
}
 

	
 
#endif /* ENABLE_NETWORK */
 

	
 
void InitializeVehicles(void);
 
void InitializeWaypoints(void);
 
void InitializeDepot(void);
 
void InitializeOrders(void);
 
void InitializeClearLand(void);
 
void InitializeRail(void);
network.h
Show inline comments
 
@@ -196,12 +196,13 @@ VARDEF bool _network_autoclean_companies
 
VARDEF uint8 _network_autoclean_unprotected; // Remove a company after X months
 
VARDEF uint8 _network_autoclean_protected;   // Unprotect a company after X months
 

	
 
VARDEF uint16 _network_restart_game_date;    // If this year is reached, the server automaticly restarts
 

	
 
NetworkGameList *NetworkQueryServer(const char* host, unsigned short port, bool game_info);
 
void CSleep(int milliseconds);
 

	
 
#endif /* ENABLE_NETWORK */
 

	
 
// Those variables must always be registered!
 
#define MAX_SAVED_SERVERS 10
 
VARDEF char *_network_host_list[MAX_SAVED_SERVERS];
network_core.h
Show inline comments
 
@@ -4,12 +4,14 @@
 
// Network stuff has many things that needs to be included
 
//  by default. All those things are in this file.
 

	
 
// =============================
 
// Include standard stuff per OS
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
// Windows stuff
 
#if defined(WIN32)
 
#include <windows.h>
 
#include <winsock2.h>
 
#include <ws2tcpip.h>
 

	
 
@@ -71,13 +73,13 @@ typedef struct ifreq IFREQ;
 
#		if defined(__BEOS__) && !defined(BEOS_NET_SERVER)
 
			// needed on Zeta
 
#			include <sys/sockio.h>
 
#		endif
 
#	endif // BEOS_NET_SERVER
 

	
 
#	if defined(__GLIBC__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)
 
#	if !defined(__BEOS__) && defined(__GLIBC__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 1)
 
		typedef uint32_t in_addr_t;
 
#	endif
 

	
 
#	include <errno.h>
 
#	include <sys/time.h>
 
#	include <netdb.h>
 
@@ -168,7 +170,9 @@ static inline bool SetNoDelay(int d)
 
	return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, (const char*)&b, sizeof(b)) == 0;
 
	#else
 
	return true;
 
	#endif
 
}
 

	
 
#endif // NETWORK_CORE_H
 
#endif /* ENABLE_NETWORK */
 

	
 
#endif /* NETWORK_CORE_H */
players.c
Show inline comments
 
@@ -710,12 +710,14 @@ int32 CmdPlayerCtrl(int x, int y, uint32
 
				/* XXX - UGLY! p2 (pid) is mis-used to fetch the client-id, done at server-side
 
				* in network_server.c:838, function DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) */
 
			NetworkClientInfo *ci = &_network_client_info[pid];
 
			ci->client_playas = OWNER_SPECTATOR;
 
			NetworkUpdateClientInfo(ci->client_index);
 
		}
 
#else
 
		}
 
#endif /* ENABLE_NETWORK */
 
	} break;
 

	
 
	case 1: /* Make a new AI player */
 
		if (!(flags & DC_EXEC)) return 0;
 

	
stdafx.h
Show inline comments
 
@@ -136,13 +136,13 @@ typedef unsigned char byte;
 
typedef unsigned char uint8;
 
typedef unsigned short uint16;
 
typedef unsigned int uint32;
 
#endif
 

	
 
// This is already defined in unix
 
#if !defined(UNIX) && !defined(__CYGWIN__)
 
#if !defined(UNIX) && !defined(__CYGWIN__) && !defined(__BEOS__)
 
	typedef unsigned int uint;
 
#endif
 
// Not defined in QNX Neutrino (6.x)
 
#if defined(__QNXNTO__)
 
	typedef unsigned int uint;
 
#endif
0 comments (0 inline, 0 general)