Commit | Line | Data |
---|---|---|
2ae57758 MD |
1 | #ifndef _LTTNG_UST_ENDIAN_H |
2 | #define _LTTNG_UST_ENDIAN_H | |
3 | ||
4 | /* | |
5 | * lttng/ust-endian.h | |
6 | * | |
7 | * Copyright 2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
8 | * | |
9 | * endian.h compatibility layer. | |
10 | * | |
11 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED | |
12 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | |
13 | * | |
14 | * Permission is hereby granted to use or copy this program | |
15 | * for any purpose, provided the above notices are retained on all copies. | |
16 | * Permission to modify the code and to distribute modified code is granted, | |
17 | * provided the above notices are retained, and a notice that the code was | |
18 | * modified is included with the above copyright notice. | |
19 | */ | |
20 | ||
2928fe5a | 21 | #if (defined(__linux__) || defined(__CYGWIN__)) |
2ae57758 | 22 | #include <endian.h> |
75181c4b | 23 | #elif defined(__FreeBSD__) |
2ae57758 MD |
24 | #include <machine/endian.h> |
25 | #else | |
cc300254 | 26 | #error "Please add support for your OS." |
2ae57758 MD |
27 | #endif |
28 | ||
ad496c21 MD |
29 | #ifndef FLOAT_WORD_ORDER |
30 | #ifdef __FLOAT_WORD_ORDER | |
31 | #define FLOAT_WORD_ORDER __FLOAT_WORD_ORDER | |
32 | #else /* __FLOAT_WORD_ORDER */ | |
33 | #define FLOAT_WORD_ORDER BYTE_ORDER | |
34 | #endif /* __FLOAT_WORD_ORDER */ | |
35 | #endif /* FLOAT_WORD_ORDER */ | |
36 | ||
2ae57758 | 37 | #endif /* _LTTNG_UST_ENDIAN_H */ |