Commit | Line | Data |
---|---|---|
d68c6810 MD |
1 | #ifndef _URCU_RCUJA_ENDIAN_H |
2 | #define _URCU_RCUJA_ENDIAN_H | |
3 | ||
4 | /* | |
5 | * Copyright 2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
6 | * | |
7 | * endian.h compatibility layer. | |
8 | * | |
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
10 | * of this software and associated documentation files (the "Software"), to deal | |
11 | * in the Software without restriction, including without limitation the rights | |
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
13 | * copies of the Software, and to permit persons to whom the Software is | |
14 | * furnished to do so, subject to the following conditions: | |
15 | * | |
16 | * The above copyright notice and this permission notice shall be included in | |
17 | * all copies or substantial portions of the Software. | |
18 | */ | |
19 | ||
20 | #ifdef __FreeBSD__ | |
21 | #include <machine/endian.h> | |
22 | #else | |
23 | #include <endian.h> | |
24 | #endif | |
25 | ||
26 | #ifndef FLOAT_WORD_ORDER | |
27 | #ifdef __FLOAT_WORD_ORDER | |
28 | #define FLOAT_WORD_ORDER __FLOAT_WORD_ORDER | |
29 | #else /* __FLOAT_WORD_ORDER */ | |
30 | #define FLOAT_WORD_ORDER BYTE_ORDER | |
31 | #endif /* __FLOAT_WORD_ORDER */ | |
32 | #endif /* FLOAT_WORD_ORDER */ | |
33 | ||
34 | #endif /* _URCU_RCUJA_ENDIAN_H */ |