add app0 loading
This commit is contained in:
parent
75c9fc23b2
commit
af827f2c7f
5 changed files with 158 additions and 24 deletions
src
22
src/util.h
22
src/util.h
|
@ -4,9 +4,27 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DEBUG_LOG
|
||||
#define DEBUG_LOG
|
||||
#else
|
||||
#define DEBUG_LOG(msg, ...) printf("[DEBUG] " ##msg "\n", __VA_ARGS__);
|
||||
#define DEBUG_LOG(...) printf("[DEBUG] "); printf(__VA_ARGS__); printf("\n")
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define PACK( data ) data __attribute((__packed__))
|
||||
|
||||
#include <byteswap.h>
|
||||
#define bswap_16 bswap_16
|
||||
#define bswap_32 bswap_32
|
||||
#define bswap_64 bswap_64
|
||||
#elif defined(_MSC_VER)
|
||||
#define PACK( data ) __pragma(pack(push, 1)) data __pragma(pack(pop))
|
||||
|
||||
#include <stdlib.h>
|
||||
#define bswap_16 _byteswap_ushort
|
||||
#define bswap_32 _byteswap_ulong
|
||||
#define bswap_64 _byteswap_uint64
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif // _UTIL_H
|
Loading…
Add table
Add a link
Reference in a new issue