summaryrefslogtreecommitdiffhomepage
path: root/src/internal/perk_endian_impl.h
blob: 347e229bb8f58039cdccd35e5dbe7b585fb40899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/***************************************************************/
/*  perk: PE Resource Kit                                      */
/*  Copyright (C) 2015--2021  SysDeer Technologies, LLC        */
/*  Released under GPLv2 and GPLv3; see COPYING.PERK.          */
/***************************************************************/

#ifndef PERK_ENDIAN_IMPL_H
#define PERK_ENDIAN_IMPL_H

#include <stdbool.h>

#define PERK_LITTLE_ENDIAN	pe_little_endian_host()

static inline bool pe_little_endian_host(void)
{
	const long test = 1;
	return *((char *)&test);
}

#endif