Json-c on Windows

Gisle Vanem gvanem at yahoo.no
Fri Nov 11 11:04:23 UTC 2016


Mark Andrews wrote:

> The following should work.  It hasn't yet been compiled but
> it should account for the minor differences between win32 and unix.
> 
> Mark
> 
> commit 5e2f540ba3c4358fce7f5219a8457d29f27ce72c
> Author: Mark Andrews <marka at isc.org>
> Date:   Thu Nov 10 15:53:33 2016 +1100
> 
>     add isc_socketmgr_renderjson
> 
> diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c
> index eaef4cb..6389f93 100644
> --- a/lib/isc/win32/socket.c
> +++ b/lib/isc/win32/socket.c
> @@ -4113,6 +4113,145 @@ error:
>  }
>  #endif /* HAVE_LIBXML2 */
>  
> +#ifdef HAVE_JSON
> +#define CHECKMEM(m) do { \
> +	if (m == NULL) { \
> +		result = ISC_R_NOMEMORY;\
> +		goto error;\
> +	} \
> +} while(0)

This works fine. Thanks.

BTW. an error in the ISC_FORMAT_PRINTF():

--- a/lib/isc/win32/socket.c 2016-10-28 11:50:41
+++ b/lib/isc/win32/socket.c 2016-11-11 11:46:50
@@ -442,7 +442,7 @@
 socket_log(int lineno, isc_socket_t *sock, isc_sockaddr_t *address,
           isc_logcategory_t *category, isc_logmodule_t *module, int level,
           isc_msgcat_t *msgcat, int msgset, int message,
-          const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
+          const char *fmt, ...) ISC_FORMAT_PRINTF(10, 11);

'fmt' is the 10th parameter. Noted by using MinGW-TDM  (gcc 5.1.0).

-- 
--gv


More information about the bind-workers mailing list