summaryrefslogtreecommitdiff
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-04-29 15:46:40 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-29 22:32:49 +0200
commit4f45240bc84a9aa648c8f7243be7b79e9f9323a5 (patch)
tree975f7e1e617df32c42db93cf0cbacfd10ff640c4 /lib/asyn-ares.c
parent63b5378a617437859da1e7ab5553d36eb83bdd44 (diff)
downloadcurl-4f45240bc84a9aa648c8f7243be7b79e9f9323a5.tar.gz
lib: include curl_printf.h as one of the last headers
curl_printf.h defines printf to curl_mprintf, etc. This can cause problems with external headers which may use __attribute__((format(printf, ...))) markers etc. To avoid that they cause problems with system includes, we include curl_printf.h after any system headers. That makes the three last headers to always be, and we keep them in this order: curl_printf.h curl_memory.h memdebug.h None of them include system headers, they all do funny #defines. Reported-by: David Benjamin Fixes #743
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index adb1a238a..51f61dee1 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -68,7 +68,6 @@
#include "connect.h"
#include "select.h"
#include "progress.h"
-#include "curl_printf.h"
# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
(defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
@@ -83,8 +82,9 @@
#define HAVE_CARES_CALLBACK_TIMEOUTS 1
#endif
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
-/* The last #include file should be: */
#include "memdebug.h"
struct ResolverResults {