[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bind-workers
Subject:    Re: Json-c on Windows
From:       Gisle Vanem <gvanem () yahoo ! no>
Date:       2016-11-11 11:04:23
Message-ID: e1a4f546-e61f-86af-f0c9-1403998dc29c () yahoo ! no
[Download RAW message or body]

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@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
_______________________________________________
bind-workers mailing list
bind-workers@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-workers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic