I have a huge problem adapting code in C ++ Builder.
What is the equivalent in C ++ Builder for __declspec (align (n))? I do not mean #pragma pack ([show] | [push | pop] [, identifier], n). I need something for the macro.
I have a problem accepting the code below (especially for __declspec(align(n))):
#elif defined(_MSC_VER)
#define LJ_NORET __declspec(noreturn)
#define LJ_ALIGN(n) __declspec(align(n))
#define LJ_INLINE __inline
#define LJ_AINLINE __forceinline
#define LJ_NOINLINE __declspec(noinline)
#if defined(_M_IX86)
#define LJ_FASTCALL __fastcall
#endif
static LJ_AINLINE uint32_t lj_ffs(uint32_t x)
{
uint32_t r; _BitScanForward(&r, x); return r;
}
static LJ_AINLINE uint32_t lj_fls(uint32_t x)
{
uint32_t r; _BitScanReverse(&r, x); return r;
}
#define lj_bswap(x) (_byteswap_ulong((x)))
#else
source
share