From 35648f2e799cf861b1acc9175e465e6fa5951775 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 24 Mar 2015 23:12:03 +0100 Subject: curl_memory: make curl_memory.h the second-last header file loaded This header file must be included after all header files except memdebug.h, as it does similar memory function redefinitions and can be similarly affected by conflicting definitions in system or dependent library headers. --- lib/vtls/axtls.c | 7 ++++--- lib/vtls/cyassl.c | 4 ++-- lib/vtls/nss.c | 4 ++-- lib/vtls/openssl.c | 4 ++-- lib/vtls/vtls.c | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/vtls') diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c index 930136a23..08db9c568 100644 --- a/lib/vtls/axtls.c +++ b/lib/vtls/axtls.c @@ -40,11 +40,12 @@ #include "connect.h" /* for the connect timeout */ #include "select.h" #include "curl_printf.h" -#include "curl_memory.h" +#include "hostcheck.h" #include -/* The last #include file should be: */ + +/* The last #include files should be: */ +#include "curl_memory.h" #include "memdebug.h" -#include "hostcheck.h" /* Global axTLS init, called from Curl_ssl_init() */ diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 00f2a05cb..d400b3f2c 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -44,7 +44,6 @@ #include "select.h" #include "rawstr.h" #include "curl_printf.h" -#include "curl_memory.h" #include #include @@ -55,7 +54,8 @@ #endif #include -/* The last #include file should be: */ +/* The last #include files should be: */ +#include "curl_memory.h" #include "memdebug.h" static Curl_recv cyassl_recv; diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index ec807c5c2..feb00ca81 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -63,12 +63,12 @@ #include #endif -#include "curl_memory.h" #include "rawstr.h" #include "warnless.h" #include "x509asn1.h" -/* The last #include file should be: */ +/* The last #include files should be: */ +#include "curl_memory.h" #include "memdebug.h" #define SSL_DIR "/etc/pki/nssdb" diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 56b5ff112..7a5a7dc30 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -73,10 +73,10 @@ #endif #include "warnless.h" -#include "curl_memory.h" #include "non-ascii.h" /* for Curl_convert_from_utf8 prototype */ -/* The last #include file should be: */ +/* The last #include files should be: */ +#include "curl_memory.h" #include "memdebug.h" #ifndef OPENSSL_VERSION_NUMBER diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c index 4980d674f..6973de42a 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -63,7 +63,6 @@ #include "sendf.h" #include "rawstr.h" #include "url.h" -#include "curl_memory.h" #include "progress.h" #include "share.h" #include "timeval.h" @@ -72,7 +71,8 @@ #include "curl_base64.h" #include "curl_printf.h" -/* The last #include file should be: */ +/* The last #include files should be: */ +#include "curl_memory.h" #include "memdebug.h" /* convenience macro to check if this handle is using a shared SSL session */ -- cgit v1.2.3