-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_endian_priv.h
32 lines (24 loc) · 1.26 KB
/
ft_endian_priv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_endian_priv.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgillot- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/03/15 10:10:50 by lgillot- #+# #+# */
/* Updated: 2016/03/15 10:10:52 by lgillot- ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_ENDIAN_PRIV_H
# define FT_ENDIAN_PRIV_H
# ifndef __BYTE_ORDER__
# warning "__BYTE_ORDER__ macro not available, defaulting to little endian"
# endif
# if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define HTOBE(n) return (x)
# define HTOLE(n) return (invert##n(x))
# else
# define HTOBE(n) return (invert##n(x))
# define HTOLE(n) return (x)
# endif
#endif