curl-library
snprintf in http2.c
Date: Fri, 06 Sep 2013 13:52:40 +0200
I built NgHTTP2 some days ago using MSVC 2010. I was amazed
of how easy it was. Not very Unix/Posix centric at all. But using the
first little merge of nghttp2 into libcurl, I stumbeled on the missing
'snprintf' in MSVCRT. Isn't this how we do it for other libcurl files?
I.e. use 'curl_msnprintf' and not 'snprintf' directly:
--- Git-latest/lib/http2.c 2013-09-05 13:47:19 +0000
+++ lib/http2.c 2013-09-06 09:52:57 +0000
@@ -22,6 +22,9 @@
#include "curl_setup.h"
+#define _MPRINTF_REPLACE
+#include <curl/mprintf.h>
+
#ifdef USE_NGHTTP2
#include <nghttp2/nghttp2.h>
#include "http2.h"
----------------
--gv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-09-06