aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asyn-ares.c6
-rw-r--r--lib/asyn-thread.c5
-rw-r--r--lib/base64.c4
-rw-r--r--lib/conncache.c5
-rw-r--r--lib/connect.c4
-rw-r--r--lib/cookie.c4
-rw-r--r--lib/curl_addrinfo.c5
-rw-r--r--lib/curl_ntlm_core.c5
-rw-r--r--lib/curl_ntlm_wb.c3
-rw-r--r--lib/curl_sasl.c3
-rw-r--r--lib/easy.c3
-rw-r--r--lib/escape.c3
-rw-r--r--lib/file.c3
-rw-r--r--lib/formdata.c3
-rw-r--r--lib/ftp.c3
-rw-r--r--lib/hostip.c2
-rw-r--r--lib/hostip4.c4
-rw-r--r--lib/hostip6.c3
-rw-r--r--lib/http.c4
-rw-r--r--lib/http2.c4
-rw-r--r--lib/http_digest.c3
-rw-r--r--lib/http_negotiate.c4
-rw-r--r--lib/http_ntlm.c4
-rw-r--r--lib/http_proxy.c4
-rw-r--r--lib/if2ip.c5
-rw-r--r--lib/imap.c4
-rw-r--r--lib/inet_ntop.c11
-rw-r--r--lib/krb5.c4
-rw-r--r--lib/ldap.c3
-rw-r--r--lib/memdebug.c4
-rw-r--r--lib/multi.c2
-rw-r--r--lib/netrc.c6
-rw-r--r--lib/openldap.c5
-rw-r--r--lib/pingpong.c4
-rw-r--r--lib/pop3.c2
-rw-r--r--lib/rtsp.c5
-rw-r--r--lib/sendf.c4
-rw-r--r--lib/smtp.c2
-rw-r--r--lib/socks_gssapi.c5
-rw-r--r--lib/socks_sspi.c2
-rw-r--r--lib/ssh.c3
-rw-r--r--lib/strerror.c4
-rw-r--r--lib/telnet.c4
-rw-r--r--lib/tftp.c4
-rw-r--r--lib/transfer.c4
-rw-r--r--lib/url.c2
-rw-r--r--lib/wildcard.c4
-rw-r--r--lib/x509asn1.c5
-rw-r--r--tests/libtest/testutil.c4
49 files changed, 90 insertions, 103 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 {
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 83ce0ce4e..81caedb09 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.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
@@ -69,10 +69,9 @@
#include "inet_ntop.h"
#include "curl_threads.h"
#include "connect.h"
+/* 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"
/***********************************************************************
diff --git a/lib/base64.c b/lib/base64.c
index 9facd3863..0ef24d51f 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -23,13 +23,13 @@
/* Base64 encoding/decoding */
#include "curl_setup.h"
-#include "curl_printf.h"
#include "urldata.h" /* for the SessionHandle definition */
#include "warnless.h"
#include "curl_base64.h"
#include "non-ascii.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/conncache.c b/lib/conncache.c
index 89086590a..930b932b7 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012, 2016, Linus Nielsen Feltzing, <linus@haxx.se>
* Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
@@ -32,10 +32,9 @@
#include "sendf.h"
#include "rawstr.h"
#include "conncache.h"
+/* 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"
static void conn_llist_dtor(void *user, void *element)
diff --git a/lib/connect.c b/lib/connect.c
index 6ed9b024a..8dfe9e2bf 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -56,7 +56,6 @@
#include <inet.h>
#endif
-#include "curl_printf.h"
#include "urldata.h"
#include "sendf.h"
#include "if2ip.h"
@@ -74,7 +73,8 @@
#include "conncache.h"
#include "multihandle.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/cookie.c b/lib/cookie.c
index 1f2239242..01ce270bb 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -88,7 +88,6 @@ Example set of cookies:
# include <libpsl.h>
#endif
-#include "curl_printf.h"
#include "urldata.h"
#include "cookie.h"
#include "strequal.h"
@@ -101,7 +100,8 @@ Example set of cookies:
#include "curl_memrchr.h"
#include "inet_pton.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index cc60ddb66..8fa0c84cc 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, 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
@@ -50,10 +50,9 @@
#include "curl_addrinfo.h"
#include "inet_pton.h"
#include "warnless.h"
+/* 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"
/*
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index 60a0bb4d7..ea7548dd1 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.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
@@ -107,9 +107,8 @@
#include "warnless.h"
#include "curl_endian.h"
#include "curl_des.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index 3defec7b5..afdea16c0 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -51,9 +51,8 @@
#include "curl_ntlm_wb.h"
#include "url.h"
#include "strerror.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 81b023523..94b39e4a6 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -46,9 +46,8 @@
#include "rawstr.h"
#include "sendf.h"
#include "non-ascii.h" /* included for Curl_convert_... prototypes */
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/easy.c b/lib/easy.c
index 390888a8d..ea7af5e52 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -73,9 +73,8 @@
#include "multiif.h"
#include "sigpipe.h"
#include "ssh.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/escape.c b/lib/escape.c
index 8299ab396..2c6a7f655 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -31,9 +31,8 @@
#include "warnless.h"
#include "non-ascii.h"
#include "escape.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/file.c b/lib/file.c
index 350c3eece..1eeb84d5a 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -61,9 +61,8 @@
#include "url.h"
#include "parsedate.h" /* for the week day and month names */
#include "warnless.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/formdata.c b/lib/formdata.c
index 667371c80..a71f099c8 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -36,9 +36,8 @@
#include "strequal.h"
#include "sendf.h"
#include "strdup.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/ftp.c b/lib/ftp.c
index 27f48b585..cfa1bbb80 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -77,10 +77,9 @@
#include "warnless.h"
#include "http_proxy.h"
#include "non-ascii.h"
+/* 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"
#ifndef NI_MAXHOST
diff --git a/lib/hostip.c b/lib/hostip.c
index 727b62dfe..ead78de72 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -56,9 +56,9 @@
#include "url.h"
#include "inet_ntop.h"
#include "warnless.h"
+/* 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"
#if defined(CURLRES_SYNCH) && \
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 25c452965..15895d7ce 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.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
@@ -48,9 +48,9 @@
#include "strerror.h"
#include "url.h"
#include "inet_pton.h"
+/* 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"
/***********************************************************************
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 2f58376d2..59bc4e4ac 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -49,10 +49,9 @@
#include "url.h"
#include "inet_pton.h"
#include "connect.h"
+/* 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"
/***********************************************************************
diff --git a/lib/http.c b/lib/http.c
index 471685001..f3805cc5b 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -77,9 +77,9 @@
#include "pipeline.h"
#include "http2.h"
#include "connect.h"
-#include "curl_printf.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/http2.c b/lib/http2.c
index eae8dac8d..557685b80 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -23,7 +23,6 @@
#include "curl_setup.h"
#ifdef USE_NGHTTP2
-#include "curl_printf.h"
#include <nghttp2/nghttp2.h>
#include "urldata.h"
#include "http2.h"
@@ -37,7 +36,8 @@
#include "connect.h"
#include "strtoofft.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 782a7a240..a1768b863 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -28,9 +28,8 @@
#include "rawstr.h"
#include "vauth/vauth.h"
#include "http_digest.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 92113eb07..999bc0c52 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -29,9 +29,9 @@
#include "rawstr.h"
#include "http_negotiate.h"
#include "vauth/vauth.h"
-#include "curl_printf.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 9ea5d70ee..935df25db 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -40,7 +40,6 @@
#include "curl_ntlm_wb.h"
#include "vauth/vauth.h"
#include "url.h"
-#include "curl_printf.h"
#if defined(USE_NSS)
#include "vtls/nssg.h"
@@ -48,7 +47,8 @@
#include "curl_sspi.h"
#endif
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 676f0cb5d..814c572f6 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -35,11 +35,11 @@
#include "progress.h"
#include "non-ascii.h"
#include "connect.h"
-#include "curl_printf.h"
#include "curlx.h"
+/* 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"
CURLcode Curl_proxy_connect(struct connectdata *conn)
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 63bea541d..2f92b2def 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.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
@@ -53,10 +53,9 @@
#include "inet_ntop.h"
#include "strequal.h"
#include "if2ip.h"
+/* 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"
/* ------------------------------------------------------------------ */
diff --git a/lib/imap.c b/lib/imap.c
index 89f0499d1..16ba402ca 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -80,10 +80,10 @@
#include "rawstr.h"
#include "curl_sasl.h"
#include "warnless.h"
-#include "curl_printf.h"
+/* 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"
/* Local API functions */
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index da9a3ab43..416005c03 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -32,9 +32,8 @@
#include <arpa/inet.h>
#endif
-#include "curl_printf.h"
-
#include "inet_ntop.h"
+#include "curl_printf.h"
#define IN6ADDRSZ 16
#define INADDRSZ 4
@@ -57,10 +56,10 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
tmp[0] = '\0';
(void)snprintf(tmp, sizeof(tmp), "%d.%d.%d.%d",
- ((int)((unsigned char)src[0])) & 0xff,
- ((int)((unsigned char)src[1])) & 0xff,
- ((int)((unsigned char)src[2])) & 0xff,
- ((int)((unsigned char)src[3])) & 0xff);
+ ((int)((unsigned char)src[0])) & 0xff,
+ ((int)((unsigned char)src[1])) & 0xff,
+ ((int)((unsigned char)src[2])) & 0xff,
+ ((int)((unsigned char)src[3])) & 0xff);
len = strlen(tmp);
if(len == 0 || len >= size) {
diff --git a/lib/krb5.c b/lib/krb5.c
index 992da5456..0b146e06b 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -47,9 +47,9 @@
#include "sendf.h"
#include "curl_sec.h"
#include "warnless.h"
-#include "curl_printf.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/ldap.c b/lib/ldap.c
index d355a6676..1f1f72fba 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -76,9 +76,8 @@
#include "curl_base64.h"
#include "rawstr.h"
#include "connect.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 804b5fa34..1618bbaf3 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -26,10 +26,12 @@
#include <curl/curl.h>
-#include "curl_printf.h"
#include "urldata.h"
#define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
+
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/multi.c b/lib/multi.c
index 1184482f2..ffc422c40 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -42,9 +42,9 @@
#include "multihandle.h"
#include "pipeline.h"
#include "sigpipe.h"
+/* 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"
/*
diff --git a/lib/netrc.c b/lib/netrc.c
index 541310e2b..46f427a2b 100644
--- a/lib/netrc.c
+++ b/lib/netrc.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
@@ -32,9 +32,9 @@
#include "strequal.h"
#include "strtok.h"
#include "rawstr.h"
-#include "curl_printf.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/openldap.c b/lib/openldap.c
index 7241bb906..01567acd1 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 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
@@ -46,9 +46,8 @@
#include "curl_ldap.h"
#include "curl_base64.h"
#include "connect.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/pingpong.c b/lib/pingpong.c
index 2aecf4e8a..ce2b58612 100644
--- a/lib/pingpong.c
+++ b/lib/pingpong.c
@@ -34,10 +34,10 @@
#include "multiif.h"
#include "non-ascii.h"
#include "vtls/vtls.h"
-#include "curl_printf.h"
+/* 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"
#ifdef USE_PINGPONG
diff --git a/lib/pop3.c b/lib/pop3.c
index 0c2446ded..a6b2c3f75 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -83,9 +83,9 @@
#include "curl_sasl.h"
#include "curl_md5.h"
#include "warnless.h"
+/* 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"
/* Local API functions */
diff --git a/lib/rtsp.c b/lib/rtsp.c
index 24bf801d9..5cb104488 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.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
@@ -36,9 +36,8 @@
#include "rawstr.h"
#include "select.h"
#include "connect.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/sendf.c b/lib/sendf.c
index 23bcfa2c9..22f3bf27c 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -31,11 +31,11 @@
#include "ssh.h"
#include "multiif.h"
#include "non-ascii.h"
-#include "curl_printf.h"
#include "strerror.h"
#include "select.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/smtp.c b/lib/smtp.c
index ed4c046ce..83eb1d623 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -82,9 +82,9 @@
#include "curl_gethostname.h"
#include "curl_sasl.h"
#include "warnless.h"
+/* 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"
/* Local API functions */
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index e3fc260cb..1214048bf 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
- * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 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
@@ -32,9 +32,10 @@
#include "timeval.h"
#include "socks.h"
#include "warnless.h"
+
+/* 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"
static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c
index c5f25b66f..ec564b488 100644
--- a/lib/socks_sspi.c
+++ b/lib/socks_sspi.c
@@ -34,9 +34,9 @@
#include "curl_sspi.h"
#include "curl_multibyte.h"
#include "warnless.h"
+/* 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"
/*
diff --git a/lib/ssh.c b/lib/ssh.c
index da19bf3dc..50a72ac6e 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -83,9 +83,10 @@
#include "multiif.h"
#include "select.h"
#include "warnless.h"
+
+/* 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"
#ifdef WIN32
diff --git a/lib/strerror.c b/lib/strerror.c
index ac616f2c8..0e268d5e3 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2004 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 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
@@ -44,9 +44,9 @@
#endif
#include "strerror.h"
+/* 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"
const char *
diff --git a/lib/telnet.c b/lib/telnet.c
index 068470b93..6b73bc5bd 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -51,7 +51,6 @@
#include "telnet.h"
#include "connect.h"
#include "progress.h"
-#include "curl_printf.h"
#define TELOPTS
#define TELCMDS
@@ -62,7 +61,8 @@
#include "rawstr.h"
#include "warnless.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/tftp.c b/lib/tftp.c
index 975ef2faf..3c3eb5e11 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -57,10 +57,10 @@
#include "url.h"
#include "rawstr.h"
#include "speedcheck.h"
-#include "curl_printf.h"
#include "select.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/transfer.c b/lib/transfer.c
index 11f9df38f..5b22003dc 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -75,9 +75,9 @@
#include "multiif.h"
#include "connect.h"
#include "non-ascii.h"
-#include "curl_printf.h"
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
diff --git a/lib/url.c b/lib/url.c
index 1251373c3..feffb7fb4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -130,9 +130,9 @@ bool curl_win32_idn_to_ascii(const char *in, char **out);
#include "pipeline.h"
#include "dotdot.h"
#include "strdup.h"
+/* 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"
/* Local static prototypes */
diff --git a/lib/wildcard.c b/lib/wildcard.c
index 216307304..dbbe45f6f 100644
--- a/lib/wildcard.c
+++ b/lib/wildcard.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
@@ -25,9 +25,9 @@
#include "wildcard.h"
#include "llist.h"
#include "fileinfo.h"
+/* 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"
CURLcode Curl_wildcard_init(struct WildcardData *wc)
diff --git a/lib/x509asn1.c b/lib/x509asn1.c
index dbe57c7b7..c221ba075 100644
--- a/lib/x509asn1.c
+++ b/lib/x509asn1.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
@@ -34,9 +34,10 @@
#include "inet_pton.h"
#include "curl_base64.h"
#include "x509asn1.h"
+
+/* 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"
diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c
index 2ff06b19d..b9c43de04 100644
--- a/tests/libtest/testutil.c
+++ b/tests/libtest/testutil.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, 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
@@ -20,7 +20,7 @@
*
***************************************************************************/
#include "curl_setup.h"
-
+#include <curl/curl.h>
#include "testutil.h"
#include "memdebug.h"