mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
initial import
This commit is contained in:
committed by
Ivan Grokhotkov
parent
668acc2c08
commit
5f3a205955
36
tools/sdk/include/nghttp/config.h
Normal file
36
tools/sdk/include/nghttp/config.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef __HAVE_CONFIG_H_
|
||||
#define __HAVE_CONFIG_H_
|
||||
|
||||
#define _U_
|
||||
|
||||
#define SIZEOF_INT_P 2
|
||||
|
||||
//#define DEBUGBUILD
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
|
||||
#if (!defined(nghttp_unlikely))
|
||||
#define nghttp_unlikely(Expression) !!(Expression)
|
||||
#endif
|
||||
|
||||
#define nghttp_ASSERT(Expression) do{if (!(Expression)) printf("%d\n", __LINE__);}while(0)
|
||||
|
||||
#define CU_ASSERT(a) nghttp_ASSERT(a)
|
||||
#define CU_ASSERT_FATAL(a) nghttp_ASSERT(a)
|
||||
|
||||
#if 1
|
||||
#define NGHTTP2_DEBUG_INFO() printf("%s %d\n", __FILE__, __LINE__)
|
||||
#else
|
||||
#define NGHTTP2_DEBUG_INFO()
|
||||
#endif
|
||||
|
||||
#define NGHTTP_PLATFORM_HTONS(_n) ((uint16_t)((((_n) & 0xff) << 8) | (((_n) >> 8) & 0xff)))
|
||||
#define NGHTTP_PLATFORM_HTONL(_n) ((uint32_t)( (((_n) & 0xff) << 24) | (((_n) & 0xff00) << 8) | (((_n) >> 8) & 0xff00) | (((_n) >> 24) & 0xff) ))
|
||||
|
||||
#define htons(x) NGHTTP_PLATFORM_HTONS(x)
|
||||
#define ntohs(x) NGHTTP_PLATFORM_HTONS(x)
|
||||
#define htonl(x) NGHTTP_PLATFORM_HTONL(x)
|
||||
#define ntohl(x) NGHTTP_PLATFORM_HTONL(x)
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user