libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 0e4d01f69081f5d9263cdf0a02a9bfb94f301ebb
parent 0f9972d7716295f978a32d0115ceec825080f36b
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Sun, 21 Dec 2025 17:43:42 +0100

Revert of "h2_huffman_codec: fixed clang++ error" + proper fix

Diffstat:
Msrc/mhd2/h2/hpack/h2_huffman_codec.c | 41++++++++++++++++++-----------------------
1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/src/mhd2/h2/hpack/h2_huffman_codec.c b/src/mhd2/h2/hpack/h2_huffman_codec.c @@ -71,11 +71,6 @@ # endif #endif -/* Broken IDEs compatibility */ -#ifdef __CDT_PARSER__ -# define mhd_ALIGNED_8 /* empty */ -#endif - /** * HTTP/2 static Huffman codes from RFC 7541 * @@ -814,8 +809,8 @@ static bool h2huff_decode_inited = false; 'X' ( 88) 11111100 [ 8] 'Z' ( 90) 11111101 [ 8] */ -static uint_least16_t -mhd_h2huff_SL_by_code_0p8c mhd_ALIGNED_64[HUFF_DTBL_SIZE (0, 8, 7)]; +mhd_ALIGNED_64 static +uint_least16_t mhd_h2huff_SL_by_code_0p8c[HUFF_DTBL_SIZE (0, 8, 7)]; /* Decode table for prefix 7 bits, table width 6 bits. Codes: @@ -828,8 +823,8 @@ mhd_h2huff_SL_by_code_0p8c mhd_ALIGNED_64[HUFF_DTBL_SIZE (0, 8, 7)]; ']' ( 93) 1111111 111100 [13] '~' (126) 1111111 111101 [13] */ -static uint_least16_t -mhd_h2huff_SL_by_code_7p6c mhd_ALIGNED_64[HUFF_DTBL_SIZE (7, 6, 12)]; +mhd_ALIGNED_64 static +uint_least16_t mhd_h2huff_SL_by_code_7p6c[HUFF_DTBL_SIZE (7, 6, 12)]; /* Decode table for prefix 12 bits, table width 3 bits. Codes: @@ -839,8 +834,8 @@ mhd_h2huff_SL_by_code_7p6c mhd_ALIGNED_64[HUFF_DTBL_SIZE (7, 6, 12)]; '`' ( 96) 111111111111 101 [15] '{' (123) 111111111111 110 [15] */ -static uint_least16_t -mhd_h2huff_SL_by_code_12p3c mhd_ALIGNED_8[HUFF_DTBL_SIZE (12,3,15)]; +mhd_ALIGNED_8 static +uint_least16_t mhd_h2huff_SL_by_code_12p3c[HUFF_DTBL_SIZE (12,3,15)]; /* Decode table for prefix 15 bits, table width 7 bits. Codes: @@ -853,8 +848,8 @@ mhd_h2huff_SL_by_code_12p3c mhd_ALIGNED_8[HUFF_DTBL_SIZE (12,3,15)]; (170) 111111111111111 1011110 [22] (173) 111111111111111 1011111 [22] */ -static uint_least16_t -mhd_h2huff_SL_by_code_15p7c mhd_ALIGNED_16[HUFF_DTBL_SIZE (15,7,17)]; +mhd_ALIGNED_16 static +uint_least16_t mhd_h2huff_SL_by_code_15p7c[HUFF_DTBL_SIZE (15,7,17)]; /* Decode table for prefix 17 bits, table width 6 bits. Codes: @@ -867,8 +862,8 @@ mhd_h2huff_SL_by_code_15p7c mhd_ALIGNED_16[HUFF_DTBL_SIZE (15,7,17)]; (234) 1111111111111111111 101110 [25] (235) 1111111111111111111 101111 [25] */ -static uint_least16_t -mhd_h2huff_SL_by_code_17p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (17,6,19)]; +mhd_ALIGNED_16 static +uint_least16_t mhd_h2huff_SL_by_code_17p6c[HUFF_DTBL_SIZE (17,6,19)]; /* Decode table for prefix 19 bits, table width 6 bits. Codes: @@ -881,8 +876,8 @@ mhd_h2huff_SL_by_code_17p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (17,6,19)]; (252) 111111111111111111111 101110 [27] (253) 111111111111111111111 101111 [27] */ -static uint_least16_t -mhd_h2huff_SL_by_code_19p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (19,6,21)]; +mhd_ALIGNED_16 static +uint_least16_t mhd_h2huff_SL_by_code_19p6c[HUFF_DTBL_SIZE (19,6,21)]; /* Decode table for prefix 21 bits, table width 6 bits. Codes: @@ -895,8 +890,8 @@ mhd_h2huff_SL_by_code_19p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (19,6,21)]; (252) 111111111111111111111 101110 [27] (253) 111111111111111111111 101111 [27] */ -static uint_least16_t -mhd_h2huff_SL_by_code_21p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (21,6,23)]; +mhd_ALIGNED_16 static +uint_least16_t mhd_h2huff_SL_by_code_21p6c[HUFF_DTBL_SIZE (21,6,23)]; /* Decode table for prefix 23 bits, table width 5 bits. Codes: @@ -909,8 +904,8 @@ mhd_h2huff_SL_by_code_21p6c mhd_ALIGNED_16[HUFF_DTBL_SIZE (21,6,23)]; (220) 11111111111111111111111 11101 [28] (249) 11111111111111111111111 11110 [28] */ -static uint_least16_t -mhd_h2huff_SL_by_code_23p5c mhd_ALIGNED_16[HUFF_DTBL_SIZE (23,5,28)]; +mhd_ALIGNED_16 static +uint_least16_t mhd_h2huff_SL_by_code_23p5c[HUFF_DTBL_SIZE (23,5,28)]; /* Decode table for prefix 28 bits, table width 2 bits. Codes: @@ -918,8 +913,8 @@ mhd_h2huff_SL_by_code_23p5c mhd_ALIGNED_16[HUFF_DTBL_SIZE (23,5,28)]; ( 13) 1111111111111111111111111111 01 [30] ( 22) 1111111111111111111111111111 10 [30] */ -static uint_least16_t -mhd_h2huff_SL_by_code_28p2c mhd_ALIGNED_8[HUFF_DTBL_SIZE (28,2,30)]; +mhd_ALIGNED_8 static +uint_least16_t mhd_h2huff_SL_by_code_28p2c[HUFF_DTBL_SIZE (28,2,30)]; /**