2013-04-16 23:59:09 -04:00
|
|
|
#ident "Copyright (c) 2007-2010 Tokutek Inc. All rights reserved."
|
|
|
|
|
2013-04-16 23:57:28 -04:00
|
|
|
#ifndef _TOKU_HTONL_H
|
|
|
|
#define _TOKU_HTONL_H
|
|
|
|
|
2013-04-16 23:57:54 -04:00
|
|
|
#if !__linux__ && !__FreeBSD__ && !__sun__
|
2013-04-17 00:00:25 -04:00
|
|
|
//#error
|
2013-04-16 23:57:28 -04:00
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:59:09 -04:00
|
|
|
#if defined(__cplusplus) || defined(__cilkplusplus)
|
2013-04-16 23:57:28 -04:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
|
|
|
static inline uint32_t toku_htonl(uint32_t i) {
|
|
|
|
return htonl(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline uint32_t toku_ntohl(uint32_t i) {
|
|
|
|
return ntohl(i);
|
|
|
|
}
|
|
|
|
|
2013-04-16 23:59:09 -04:00
|
|
|
#if defined(__cplusplus) || defined(__cilkplusplus)
|
2013-04-16 23:57:28 -04:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|