X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-endian.h;fp=lttng-endian.h;h=e86dab7f925db5fa7e148d354a7c4e47591159a1;hb=a90917c3f8c4ed79117f1caa333b29a2108084ec;hp=0000000000000000000000000000000000000000;hpb=edb5c2da83545004c5f556accb79d010a6b1e3a9;p=lttng-modules.git diff --git a/lttng-endian.h b/lttng-endian.h new file mode 100644 index 00000000..e86dab7f --- /dev/null +++ b/lttng-endian.h @@ -0,0 +1,31 @@ +#ifndef _LTTNG_ENDIAN_H +#define _LTTNG_ENDIAN_H + +/* + * lttng-endian.h + * + * Copyright 2010-2011 (c) - Mathieu Desnoyers + * + * Dual LGPL v2.1/GPL v2 license. + */ + +#ifdef __KERNEL__ +# include +# ifdef __BIG_ENDIAN +# define __BYTE_ORDER __BIG_ENDIAN +# elif defined(__LITTLE_ENDIAN) +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# error "unknown endianness" +# endif +#ifndef __BIG_ENDIAN +# define __BIG_ENDIAN 4321 +#endif +#ifndef __LITTLE_ENDIAN +# define __LITTLE_ENDIAN 1234 +#endif +#else +# include +#endif + +#endif /* _LTTNG_ENDIAN_H */