Merge remote-tracking branch 'main/Preview4_0' into bugfix-msvc-compiler-warnings

This commit is contained in:
Robert MacGregor 2021-10-11 19:36:52 -04:00
commit aba091a97a
22 changed files with 315 additions and 275 deletions

View file

@ -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

View file

@ -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