hce-node application
1.4.3
HCE Hierarchical Cluster Engine node application
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
cf_byte_order.h
Go to the documentation of this file.
1
/*
2
* Copyright 2013 Aerospike. All rights reserved.
3
*/
4
5
#pragma once
6
7
#ifndef CF_WINDOWS
8
#ifdef OSX
9
//====================================================================
10
// Mac OS
11
//
12
13
#include <libkern/OSByteOrder.h>
14
15
#define cf_byteswap64p(_p) (OSSwapBigToHostInt64(*(_p)))
16
17
18
#else
19
//====================================================================
20
// Linux
21
//
22
23
#include <netinet/in.h>
24
#include <asm/byteorder.h>
25
26
#define htonll(_n) (__cpu_to_be64(_n))
27
#define ntohll(_n) (__be64_to_cpu(_n))
28
29
#define cf_byteswap64p(_p) (__swab64p((const __u64*)(_p)))
30
31
32
#endif
33
#else // CF_WINDOWS
34
//====================================================================
35
// Windows
36
//
37
38
#include <stdint.h>
39
#include <stdlib.h>
40
#include <WinSock2.h>
41
42
#define cf_byteswap64p(_p) (_byteswap_uint64(*(uint64_t*)(_p)))
43
44
45
#endif // CF_WINDOWS
sources
utils
kvdb
src
citrusleaf
cf_byte_order.h
Generated on Tue Jun 30 2015 19:42:13 for hce-node application by
1.8.1.2