mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-11 08:20:45 +00:00
Merge remote-tracking branch 't3d/Preview4_0' into cpuinfo
This commit is contained in:
commit
27fd15de83
3829 changed files with 499856 additions and 197487 deletions
|
|
@ -282,7 +282,7 @@ void AsyncPacketBufferedInputStream< Stream, Packet >::_requestNext()
|
|||
if( resettable )
|
||||
{
|
||||
IPositionable< U32 >* positionable = dynamic_cast< IPositionable< U32 >* >( &Deref( stream ) );
|
||||
U32 pos;
|
||||
U32 pos = 0;
|
||||
if(positionable)
|
||||
pos = positionable->getPosition();
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ inline bool dCompareAndSwap( volatile U64& ref, U64 oldVal, U64 newVal )
|
|||
inline U32 dAtomicRead( volatile U32 &ref )
|
||||
{
|
||||
#if !defined(TORQUE_OS_MAC)
|
||||
return __sync_fetch_and_add( ( volatile long* ) &ref, 0 );
|
||||
return __sync_fetch_and_add( &ref, 0 );
|
||||
#else
|
||||
return OSAtomicAdd32( 0, (int32_t* ) &ref);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -95,36 +95,6 @@ typedef int SOCKET;
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(TORQUE_USE_WINSOCK)
|
||||
static const char* strerror_wsa( S32 code )
|
||||
{
|
||||
switch( code )
|
||||
{
|
||||
#define E( name ) case name: return #name;
|
||||
E( WSANOTINITIALISED );
|
||||
E( WSAENETDOWN );
|
||||
E( WSAEADDRINUSE );
|
||||
E( WSAEINPROGRESS );
|
||||
E( WSAEALREADY );
|
||||
E( WSAEADDRNOTAVAIL );
|
||||
E( WSAEAFNOSUPPORT );
|
||||
E( WSAEFAULT );
|
||||
E( WSAEINVAL );
|
||||
E( WSAEISCONN );
|
||||
E( WSAENETUNREACH );
|
||||
E( WSAEHOSTUNREACH );
|
||||
E( WSAENOBUFS );
|
||||
E( WSAENOTSOCK );
|
||||
E( WSAETIMEDOUT );
|
||||
E( WSAEWOULDBLOCK );
|
||||
E( WSAEACCES );
|
||||
#undef E
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "core/util/tVector.h"
|
||||
#include "platform/platformNetAsync.h"
|
||||
#include "console/console.h"
|
||||
|
|
@ -241,7 +211,7 @@ namespace PlatformNetState
|
|||
|
||||
struct addrinfo* pickAddressByProtocol(struct addrinfo* addr, int protocol)
|
||||
{
|
||||
for (addr; addr != NULL; addr = addr->ai_next)
|
||||
for (; addr != NULL; addr = addr->ai_next)
|
||||
{
|
||||
if (addr->ai_family == protocol)
|
||||
return addr;
|
||||
|
|
@ -1243,7 +1213,8 @@ void Net::process()
|
|||
}
|
||||
break;
|
||||
case PolledSocket::NameLookupRequired:
|
||||
U32 newState;
|
||||
{
|
||||
U32 newState = Net::NoError;
|
||||
|
||||
// is the lookup complete?
|
||||
if (!gNetAsync.checkLookup(
|
||||
|
|
@ -1262,7 +1233,7 @@ void Net::process()
|
|||
{
|
||||
// try to connect
|
||||
out_h_addr.port = currentSock->remotePort;
|
||||
const sockaddr *ai_addr = NULL;
|
||||
const sockaddr* ai_addr = NULL;
|
||||
int ai_addrlen = 0;
|
||||
sockaddr_in socketAddress;
|
||||
sockaddr_in6 socketAddress6;
|
||||
|
|
@ -1304,7 +1275,7 @@ void Net::process()
|
|||
else
|
||||
{
|
||||
Con::errorf("Error connecting to %s: Invalid Protocol",
|
||||
currentSock->remoteAddr);
|
||||
currentSock->remoteAddr);
|
||||
newState = Net::ConnectFailed;
|
||||
removeSock = true;
|
||||
removeSockHandle = currentSock->handleFd;
|
||||
|
|
@ -1319,7 +1290,7 @@ void Net::process()
|
|||
if (err != Net::WouldBlock)
|
||||
{
|
||||
Con::errorf("Error connecting to %s: %u",
|
||||
currentSock->remoteAddr, err);
|
||||
currentSock->remoteAddr, err);
|
||||
newState = Net::ConnectFailed;
|
||||
removeSock = true;
|
||||
removeSockHandle = currentSock->handleFd;
|
||||
|
|
@ -1340,6 +1311,7 @@ void Net::process()
|
|||
|
||||
smConnectionNotify->trigger(currentSock->handleFd, newState);
|
||||
break;
|
||||
}
|
||||
case PolledSocket::Listening:
|
||||
NetAddress incomingAddy;
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ typedef unsigned long U64;
|
|||
// This could be reconfigured for static builds, though minimal impact
|
||||
//# define TORQUE_SUPPORTS_NASM
|
||||
# endif
|
||||
#else
|
||||
#else
|
||||
# error "GCC: Unsupported Operating System"
|
||||
#endif
|
||||
|
||||
|
|
@ -169,5 +169,8 @@ typedef unsigned long U64;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif // INCLUDED_TYPES_GCC_H
|
||||
#define TORQUE_U16_ENDIANSWAP_BUILTIN __builtin_bswap16
|
||||
#define TORQUE_U32_ENDIANSWAP_BUILTIN __builtin_bswap32
|
||||
#define TORQUE_U64_ENDIANSWAP_BUILTIN __builtin_bswap64
|
||||
|
||||
#endif // INCLUDED_TYPES_GCC_H
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#ifndef INCLUDED_TYPES_VISUALC_H
|
||||
#define INCLUDED_TYPES_VISUALC_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// For more information on VisualC++ predefined macros
|
||||
// http://support.microsoft.com/default.aspx?scid=kb;EN-US;q65472
|
||||
|
|
@ -69,7 +70,7 @@ typedef unsigned _int64 U64;
|
|||
# define TORQUE_OS_WIN
|
||||
# define TORQUE_OS_WIN64
|
||||
# include "platform/types.win.h"
|
||||
#else
|
||||
#else
|
||||
# error "VC: Unsupported Operating System"
|
||||
#endif
|
||||
|
||||
|
|
@ -115,5 +116,8 @@ typedef unsigned _int64 U64;
|
|||
#define TORQUE_UNLIKELY
|
||||
#endif
|
||||
|
||||
#endif // INCLUDED_TYPES_VISUALC_H
|
||||
#define TORQUE_U16_ENDIANSWAP_BUILTIN _byteswap_ushort
|
||||
#define TORQUE_U32_ENDIANSWAP_BUILTIN _byteswap_ulong
|
||||
#define TORQUE_U64_ENDIANSWAP_BUILTIN _byteswap_uint64
|
||||
|
||||
#endif // INCLUDED_TYPES_VISUALC_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue