diff --git a/lib/fmt.c b/lib/fmt.c index 5d3177d..6d8b085 100644 --- a/lib/fmt.c +++ b/lib/fmt.c @@ -80,8 +80,11 @@ # undef HAVE_SNPRINTF # endif #endif + #if defined(HAVE_QUADMATH_H) # include /* for quadmath_snprintf() */ +#elif defined(HAVE_QUADMATH_SNPRINTF) +extern int quadmath_snprintf (const char *str, size_t size, const char *format, ...); #endif #endif diff --git a/lib/hcl-s.c b/lib/hcl-s.c index 08301a1..415f4e1 100644 --- a/lib/hcl-s.c +++ b/lib/hcl-s.c @@ -316,7 +316,7 @@ static const hcl_bch_t* get_base_name (const hcl_bch_t* path) } -static HCL_INLINE int open_input (hcl_t* hcl, hcl_iosrarg_t* arg) +static HCL_INLINE int open_read_stream (hcl_t* hcl, hcl_iosrarg_t* arg) { worker_hcl_xtn_t* xtn = (worker_hcl_xtn_t*)hcl_getxtn(hcl); bb_t* bb = HCL_NULL; @@ -412,7 +412,7 @@ oops: return -1; } -static HCL_INLINE int close_input (hcl_t* hcl, hcl_iosrarg_t* arg) +static HCL_INLINE int close_read_stream (hcl_t* hcl, hcl_iosrarg_t* arg) { worker_hcl_xtn_t* xtn = (worker_hcl_xtn_t*)hcl_getxtn(hcl); bb_t* bb; @@ -545,10 +545,10 @@ static int read_handler (hcl_t* hcl, hcl_iocmd_t cmd, void* arg) switch (cmd) { case HCL_IO_OPEN: - return open_input(hcl, (hcl_iosrarg_t*)arg); + return open_read_stream(hcl, (hcl_iosrarg_t*)arg); case HCL_IO_CLOSE: - return close_input(hcl, (hcl_iosrarg_t*)arg); + return close_read_stream(hcl, (hcl_iosrarg_t*)arg); case HCL_IO_READ: return read_input(hcl, (hcl_iosrarg_t*)arg); diff --git a/lib/hcl-s.h b/lib/hcl-s.h index ee10a8e..605ae42 100644 --- a/lib/hcl-s.h +++ b/lib/hcl-s.h @@ -204,6 +204,18 @@ HCL_EXPORT int hcl_server_proto_feed_reply ( int escape ); +HCL_EXPORT int hcl_server_proto_feed_reply_bytes ( + hcl_server_proto_t* proto, + const hcl_bch_t* ptr, + hcl_oow_t len, + int escape +); + + +HCL_EXPORT int hcl_server_proto_handle_request ( + hcl_server_proto_t* proto +); + #if defined(__cplusplus) } #endif