taocpp / taopq

C++ client library for PostgreSQL
Boost Software License 1.0
265 stars 40 forks source link

Missing byteswap.h on MSVC and macOS #23

Closed emmenlau closed 4 years ago

emmenlau commented 4 years ago

On MSVC and macOS I get build errors due to missing include byteswap.h, i.e.

C:\builds\taopq\include\tao/pq/internal/parameter_binary_traits.hpp(13): fatal error C1083: Cannot open include file: 'byteswap.h': No such file or directory

The docs only mention this header on glibc systems. Should I look for a drop-in replacement for other platforms?

ColinH commented 4 years ago

On macOS perhaps machine/endian.h or libkern/OSByteOrder.h could be used instead. We also have endian.hpp in the PEGTL which seems to work everywhere.

d-frey commented 4 years ago

I'll take care of it as soon as I find some time.

emmenlau commented 4 years ago

Thanks @d-frey !

d-frey commented 4 years ago

Should be fixed now.

emmenlau commented 4 years ago

Thanks, I confirm this works on macOS and MSVC!