mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-14 15:45:12 -05:00
xrick: Fix up -wundef warnings in miniz library
Ensure that if a posistive condition results in "#define XXX 1", ensure we set "#define XXX 0" if that test fails. This is necessary because the code uses "#if XXX" isntead of "#ifdef XXX" all over the place. Change-Id: I16157fd6ae251a70331f48a895b6c53a6648ab2b
This commit is contained in:
parent
a5df7c2e02
commit
cbfaa49d3f
2 changed files with 14 additions and 7 deletions
15
apps/plugins/xrick/3rd_party/miniz/miniz.c
vendored
15
apps/plugins/xrick/3rd_party/miniz/miniz.c
vendored
|
|
@ -202,21 +202,32 @@
|
|||
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
|
||||
// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
|
||||
#define MINIZ_X86_OR_X64_CPU 1
|
||||
#else
|
||||
#define MINIZ_X86_OR_X64_CPU 0
|
||||
#endif
|
||||
|
||||
|
||||
#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
|
||||
// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
|
||||
#define MINIZ_LITTLE_ENDIAN 1
|
||||
#endif
|
||||
|
||||
#ifndef MINIZ_USE_UNALIGNED_LOADS_AND_STORES
|
||||
#if MINIZ_X86_OR_X64_CPU
|
||||
// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
|
||||
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
|
||||
#else
|
||||
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
|
||||
#ifndef MINIZ_HAS_64BIT_REGISTERS
|
||||
#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__)
|
||||
// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
|
||||
#define MINIZ_HAS_64BIT_REGISTERS 1
|
||||
#else
|
||||
#define MINIZ_HAS_64BIT_REGISTERS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ >= 7)
|
||||
|
|
@ -757,6 +768,8 @@ typedef struct
|
|||
|
||||
#if MINIZ_HAS_64BIT_REGISTERS
|
||||
#define TINFL_USE_64BIT_BITBUF 1
|
||||
#else
|
||||
#define TINFL_USE_64BIT_BITBUF 0
|
||||
#endif
|
||||
|
||||
#if TINFL_USE_64BIT_BITBUF
|
||||
|
|
|
|||
|
|
@ -25,12 +25,6 @@
|
|||
#define MINIZ_NO_MALLOC
|
||||
#ifdef ROCKBOX
|
||||
# define MINIZ_NO_ASSERT
|
||||
# ifndef SIMULATOR
|
||||
# define MINIZ_X86_OR_X64_CPU 0
|
||||
# define MINIZ_HAS_64BIT_REGISTERS 0
|
||||
# define TINFL_USE_64BIT_BITBUF 0
|
||||
# define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0
|
||||
# endif /* ndef SIMULATOR */
|
||||
#endif
|
||||
|
||||
#endif /* ndef _MINIZ_CONFIG_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue