mirror of
https://github.com/openvswitch/ovs
synced 2025-09-02 07:15:17 +00:00
byte-order: htonll() and ntohll() for Windows.
These functions exist, so don't provide them. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include "openvswitch/types.h"
|
#include "openvswitch/types.h"
|
||||||
|
|
||||||
#ifndef __CHECKER__
|
#ifndef __CHECKER__
|
||||||
|
#ifndef _WIN32
|
||||||
static inline ovs_be64
|
static inline ovs_be64
|
||||||
htonll(uint64_t n)
|
htonll(uint64_t n)
|
||||||
{
|
{
|
||||||
@@ -33,6 +34,7 @@ ntohll(ovs_be64 n)
|
|||||||
{
|
{
|
||||||
return htonl(1) == 1 ? n : ((uint64_t) ntohl(n) << 32) | ntohl(n >> 32);
|
return htonl(1) == 1 ? n : ((uint64_t) ntohl(n) << 32) | ntohl(n >> 32);
|
||||||
}
|
}
|
||||||
|
#endif /* _WIN32 */
|
||||||
#else
|
#else
|
||||||
/* Making sparse happy with these functions also makes them unreadable, so
|
/* Making sparse happy with these functions also makes them unreadable, so
|
||||||
* don't bother to show it their implementations. */
|
* don't bother to show it their implementations. */
|
||||||
|
Reference in New Issue
Block a user