Skip to content

Commit

Permalink
snappy: big-endian detection
Browse files Browse the repository at this point in the history
  • Loading branch information
nemequ committed Mar 12, 2016
1 parent cabd75b commit 589a8de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugins/snappy/snappy-stubs-public.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@
#define SNAPPY_VERSION \
((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL)

#if !defined(_WIN32)
# if !defined(BYTE_ORDER)
# include <libkern/OSByteOrder.h>
# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
# include <sys/endian.h>
# else
# include <endian.h>
# endif
# if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)
# define WORDS_BIGENDIAN
# endif
#endif

#include <string>

namespace snappy {
Expand Down

0 comments on commit 589a8de

Please sign in to comment.