Files
TencentOS-tiny/components/connectivity/iotkit-embedded-3.0.1/3rdparty/external_libs/nghttp2/nghttp2_net.h
dcxajichu 8c24d921b0 support aliyun sdk on TencentOS tiny
sample: examples\aliyun_iotkit_csdk_mqtt
project: board\TencentOS_tiny_EVB_MX_Plus\KEIL\aliyun_iotkit_csdk_mqtt
2019-10-31 16:36:28 +08:00

45 lines
863 B
C

/*
* Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#ifndef NGHTTP2_NET_H
#define NGHTTP2_NET_H
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1234
#endif
#ifndef BIG_ENDIAN
#define BIG_ENDIAN 4321
#endif
#define IOT_BYTE_ORDER LITTLE_ENDIAN
#if IOT_BYTE_ORDER == BIG_ENDIAN
#define nghttp2_htonl(x) (x)
#define nghttp2_htons(x) (x)
#define nghttp2_ntohl(x) (x)
#define nghttp2_ntohs(x) (x)
#else
/* Windows requires ws2_32 library for ntonl family functions. We
define inline functions for those function so that we don't have
dependeny on that lib. */
#ifdef _MSC_VER
#define STIN
#else
#define STIN
#endif
STIN uint32_t nghttp2_htonl(uint32_t hostlong);
STIN uint16_t nghttp2_htons(uint16_t hostshort);
STIN uint32_t nghttp2_ntohl(uint32_t netlong);
STIN uint16_t nghttp2_ntohs(uint16_t netshort);
#endif
#endif /* NGHTTP2_NET_H */