mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-14 19:03:20 +00:00
Fix endianness issues in unit test
This commit is contained in:
1 parent
b5355307a3
commit
88097f1829
7 files changed
+41
-73
No files matched your search
+3
-15
@@ -34,21 +34,6 @@
|
||||
#define MG_ARCH MG_ARCH_RP2040
|
||||
#endif
|
||||
|
||||
/*
|
||||
* clang with std=-c99 uses __LITTLE_ENDIAN, by default
|
||||
* while for ex, RTOS gcc - LITTLE_ENDIAN, by default
|
||||
* it depends on __USE_BSD, but let's have everything
|
||||
*/
|
||||
#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER)
|
||||
#define BYTE_ORDER __BYTE_ORDER
|
||||
#ifndef LITTLE_ENDIAN
|
||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#endif /* LITTLE_ENDIAN */
|
||||
#ifndef BIG_ENDIAN
|
||||
#define BIG_ENDIAN __LITTLE_ENDIAN
|
||||
#endif /* BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#if !defined(MG_ARCH)
|
||||
#include "mongoose_custom.h" // keep this include
|
||||
#endif
|
||||
@@ -58,6 +43,9 @@
|
||||
#endif
|
||||
#endif // !defined(MG_ARCH)
|
||||
|
||||
// http://esr.ibiblio.org/?p=5095
|
||||
#define MG_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)
|
||||
|
||||
#include "arch_esp32.h"
|
||||
#include "arch_esp8266.h"
|
||||
#include "arch_freertos_lwip.h"
|
||||
|
||||
Reference in new issue
Block a user