X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fendian.h;fp=include%2Fbabeltrace%2Fendian.h;h=cadb98aead1cfed744e04c76967395fe9297eee7;hp=0000000000000000000000000000000000000000;hb=dd6f7e0fae723d0a15c60436c0d6c4d7a123cdf6;hpb=6148d997a80b7522c233ce29a45126f03f54ad71 diff --git a/include/babeltrace/endian.h b/include/babeltrace/endian.h new file mode 100644 index 00000000..cadb98ae --- /dev/null +++ b/include/babeltrace/endian.h @@ -0,0 +1,37 @@ +#ifndef _BABELTRACE_ENDIAN_H +#define _BABELTRACE_ENDIAN_H + +/* + * babeltrace/endian.h + * + * Copyright 2012 (c) - Mathieu Desnoyers + * + * endian.h compatibility layer. + * + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. + * + * Permission is hereby granted to use or copy this program + * for any purpose, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + +#ifdef __linux__ +#include +#elif defined(__FreeBSD__) +#include +#else +#error "Please add support for your OS." +#endif + +#ifndef FLOAT_WORD_ORDER +#ifdef __FLOAT_WORD_ORDER +#define FLOAT_WORD_ORDER __FLOAT_WORD_ORDER +#else /* __FLOAT_WORD_ORDER */ +#define FLOAT_WORD_ORDER BYTE_ORDER +#endif /* __FLOAT_WORD_ORDER */ +#endif /* FLOAT_WORD_ORDER */ + +#endif /* _BABELTRACE_ENDIAN_H */