(libretro-common) retro_endianness.h - Get rid of warning: #warning Defining MSB_FIRST and LSB_FIRST in compile options is deprecated [-Wcpp]

#  warning Defining MSB_FIRST and LSB_FIRST in compile options is deprecated
    ^~~~~~~
This commit is contained in:
libretroadmin 2023-02-21 13:35:04 +01:00
parent 8eff57f4d6
commit 1f0a5f9615
2 changed files with 10 additions and 8 deletions

View File

@ -1586,7 +1586,8 @@ static bool gl_glsl_set_coords(void *shader_data,
}
#if defined(VITA)
if (uni->time >= 0) {
if (uni->time >= 0)
{
float t = (sceKernelGetSystemTimeWide()) / (scePowerGetArmClockFrequency() * 1000.0);
glUniform1f(uni->time, t);
}

View File

@ -74,28 +74,29 @@ static INLINE uint64_t SWAP64(uint64_t val)
}
#endif
#if defined (LSB_FIRST) || defined (MSB_FIRST)
# warning Defining MSB_FIRST and LSB_FIRST in compile options is deprecated
# undef LSB_FIRST
# undef MSB_FIRST
#endif
#ifdef _MSC_VER
/* MSVC pre-defines macros depending on target arch */
#if defined (_M_IX86) || defined (_M_AMD64) || defined (_M_ARM) || defined (_M_ARM64)
#ifndef LSB_FIRST
#define LSB_FIRST 1
#endif
#elif _M_PPC
#ifndef MSB_FIRST
#define MSB_FIRST 1
#endif
#else
/* MSVC can run on _M_ALPHA and _M_IA64 too, but they're both bi-endian; need to find what mode MSVC runs them at */
#error "unknown platform, can't determine endianness"
#endif
#else
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#ifndef MSB_FIRST
#define MSB_FIRST 1
#endif
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#ifndef LSB_FIRST
#define LSB_FIRST 1
#endif
#else
#error "Invalid endianness macros"
#endif