[lib] Throw error for non-LE, non-BE architectures

This commit is contained in:
Matteo Cypriani 2011-07-24 19:44:15 +02:00
parent f7add0d8b7
commit 69a93abf0f
1 changed files with 2 additions and 0 deletions

View File

@ -285,6 +285,8 @@ float owl_swap_float(const float f) ;
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define owl_htonf(f) owl_swap_float(f)
# define owl_ntohf(f) owl_swap_float(f)
# else // __BYTE_ORDER == __LITTLE_ENDIAN
# error "This program does not handle strange architectures."
# endif // __BYTE_ORDER == __LITTLE_ENDIAN
#endif // __BYTE_ORDER == __BIG_ENDIAN