Changeset - r5841:c7ac3e15da3e
[Not reviewed]
master
0 1 0
truelight - 18 years ago 2007-01-26 08:27:59
truelight@openttd.org
(svn r8411) [MorphOS] -Fix: tons of unneeded warnings in networking code, because MorphOS wants UBYTE arrays and we use char arrays. Solution is a bit hackish.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/network/core/os_abstraction.h
Show inline comments
 
@@ -115,24 +115,27 @@ typedef unsigned long in_addr_t;
 
#	define INADDR_NONE 0xffffffff
 

	
 
typedef int socklen_t;
 
#if !defined(__INNOTEK_LIBC__)
 
typedef unsigned long in_addr_t;
 
#endif /* __INNOTEK_LIBC__ */
 
#endif /* OS/2 */
 

	
 
/* MorphOS and Amiga stuff */
 
#if defined(__MORPHOS__) || defined(__AMIGA__)
 
#	include <exec/types.h>
 
#	include <proto/exec.h>   // required for Open/CloseLibrary()
 
	/* MorphOS defines his network functions with UBYTE arrays while we
 
	 *  use char arrays. This gives tons of unneeded warnings */
 
#	define UBYTE char
 
#	if defined(__MORPHOS__)
 
#		include <sys/filio.h>  // FIO* defines
 
#		include <sys/sockio.h> // SIO* defines
 
#		include <netinet/in.h>
 
#	else /* __AMIGA__ */
 
#		include	<proto/socket.h>
 
#	endif
 

	
 
/* Make the names compatible */
 
#	define closesocket(s) CloseSocket(s)
 
#	define GET_LAST_ERROR() Errno()
 
#	define ioctlsocket(s,request,status) IoctlSocket((LONG)s,(ULONG)request,(char*)status)
0 comments (0 inline, 0 general)