Create align.h

This commit is contained in:
laiwei360735
2017-05-08 13:36:47 +08:00
committed by Simon
parent ef69585909
commit a08b9e2221

View File

@@ -0,0 +1,18 @@
#ifndef _align_h_
#define _align_h_
#ifdef ALIGN
#undef ALIGN
#endif
#if defined(__GNUC__)
#define ALIGN(x) __attribute__ ((aligned(x)))
#elif defined(_MSC_VER)
#define ALIGN(x) __declspec(align(x))
#elif defined(__ARMCC_VERSION)
#define ALIGN(x) __align(x)
#else
#define ALIGN(x)
#endif
#endif