dep: zmqpp: don't define htonll and ntohll if already #defined

is the case with osx: defined in /usr/include/sys/_endian.h
This commit is contained in:
Bernd Lörwald
2014-10-22 23:54:57 +02:00
parent 2b6669c544
commit 46f26bb75e

View File

@@ -76,10 +76,12 @@ inline uint64_t swap_if_needed(uint64_t const value_to_check)
* \param hostlonglong unsigned 64 bit host order integer
* \return unsigned 64 bit network order integer
*/
#ifndef htonll
inline uint64_t htonll(uint64_t const hostlonglong)
{
return zmqpp::swap_if_needed(hostlonglong);
}
#endif
/*!
* 64 bit version of the ntohs/ntohl
@@ -89,10 +91,12 @@ inline uint64_t htonll(uint64_t const hostlonglong)
* \param networklonglong unsigned 64 bit network order integer
* \return unsigned 64 bit host order integer
*/
#ifndef ntohll
inline uint64_t ntohll(uint64_t const networklonglong)
{
return zmqpp::swap_if_needed(networklonglong);
}
#endif
/*!
* floating point version of the htons/htonl