Blame src/internal/perk_endian_impl.h

8216f9
/***************************************************************/
8216f9
/*  perk: PE Resource Kit                                      */
425fb8
/*  Copyright (C) 2015--2021  SysDeer Technologies, LLC        */
8216f9
/*  Released under GPLv2 and GPLv3; see COPYING.PERK.          */
8216f9
/***************************************************************/
8216f9
8216f9
#ifndef PERK_ENDIAN_IMPL_H
8216f9
#define PERK_ENDIAN_IMPL_H
8216f9
8216f9
#include <stdbool.h>
8216f9
8216f9
#define PERK_LITTLE_ENDIAN	pe_little_endian_host()
8216f9
8216f9
static inline bool pe_little_endian_host(void)
8216f9
{
8216f9
	const long test = 1;
8216f9
	return *((char *)&test);
8216f9
}
8216f9
8216f9
#endif