Closed

Description
This doesn't compile on OS X (10.8) because byteswap.h
doesn't exist on OS X. As far as I can tell it's included simply for bswap_64
. It looks like an equivalent method exists, OSSwapInt64
, in libkern
.
Looks like this might do the trick:
#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define bswap_64 OSSwapInt64
#else
#include <byteswap.h>
#endif
Also, there's a compiler flag bug:
cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fPIC -std=c99 -I. -I. -I/usr/local/Cellar/postgresql/9.2.1/include/server -I/usr/local/Cellar/postgresql/9.2.1/include/internal -I/usr/include/libxml2 -c -o hll.o hll.c
c++ -fPIC -std=c99 -I. -I. -I/usr/local/Cellar/postgresql/9.2.1/include/server -I/usr/local/Cellar/postgresql/9.2.1/include/internal -I/usr/include/libxml2 -c -o MurmurHash3.o MurmurHash3.cpp
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
Looks like Apple's clang doesn't like -std=c99
being passed to c++
. For reference, the version numbers for my clang are below:
[ timon@meatwad.local ] [ postgresql-hll ]
$> cc --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
[ timon@meatwad.local ] [ postgresql-hll ]
$> c++ --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
Metadata
Metadata
Assignees
Labels
No labels