Import icculus.org release (2017-05-05)
This commit is contained in:
parent
0de664d0a8
commit
5673c1665a
26 changed files with 2211 additions and 824 deletions
29
src/unaligned.h
Normal file
29
src/unaligned.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef UNALIGNED_H
|
||||
#define UNALIGNED_H
|
||||
|
||||
// Anything using these types is not alignment and endian clean.
|
||||
|
||||
#if EMSCRIPTEN
|
||||
#include <emscripten.h>
|
||||
|
||||
typedef emscripten_align1_short unaligned_s16;
|
||||
typedef emscripten_align1_int unaligned_s32;
|
||||
typedef emscripten_align1_short unaligned_u16;
|
||||
typedef emscripten_align1_int unaligned_u32;
|
||||
typedef emscripten_align1_float unaligned_f32;
|
||||
typedef emscripten_align1_double unaligned_f64;
|
||||
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef int16_t unaligned_s16;
|
||||
typedef int32_t unaligned_s32;
|
||||
typedef uint16_t unaligned_u16;
|
||||
typedef uint32_t unaligned_u32;
|
||||
typedef float unaligned_f32;
|
||||
typedef double unaligned_f64;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue