From 46859c4ae3ce9df5df3916ad04aecab1c483219b Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 22 May 2014 17:37:06 +0000 Subject: [PATCH] Stop pulling pqueue.h into ssl_locl.h since only a small part of libssl actually needs it. Instead, just include it in the files where it is actually necessary. Also remove standard includes from pqueue.h so that they are not available as a side effect. Just add the two includes that are needed to pqueue.c. ok miod@ --- lib/libssl/d1_both.c | 2 ++ lib/libssl/d1_lib.c | 2 ++ lib/libssl/d1_pkt.c | 2 ++ lib/libssl/pqueue.c | 2 ++ lib/libssl/pqueue.h | 4 ---- lib/libssl/src/ssl/d1_both.c | 2 ++ lib/libssl/src/ssl/d1_lib.c | 2 ++ lib/libssl/src/ssl/d1_pkt.c | 2 ++ lib/libssl/src/ssl/pqueue.c | 2 ++ lib/libssl/src/ssl/pqueue.h | 4 ---- lib/libssl/src/ssl/ssl_locl.h | 2 -- lib/libssl/ssl_locl.h | 2 -- 12 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c index 10b62cd4104..0e328256959 100644 --- a/lib/libssl/d1_both.c +++ b/lib/libssl/d1_both.c @@ -123,6 +123,8 @@ #include #include +#include "pqueue.h" + #define RSMBLY_BITMASK_SIZE(msg_len) (((msg_len) + 7) / 8) #define RSMBLY_BITMASK_MARK(bitmask, start, end) { \ diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c index b6b765634da..a2500ee0bf9 100644 --- a/lib/libssl/d1_lib.c +++ b/lib/libssl/d1_lib.c @@ -64,6 +64,8 @@ #include #include + +#include "pqueue.h" #include "ssl_locl.h" const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c index df18e5bae37..a9ccc6d3496 100644 --- a/lib/libssl/d1_pkt.c +++ b/lib/libssl/d1_pkt.c @@ -121,6 +121,8 @@ #include #include +#include "pqueue.h" + /* mod 128 saturating subtract of two 64-bit values in big-endian order */ static int satsub64be(const unsigned char *v1, const unsigned char *v2) diff --git a/lib/libssl/pqueue.c b/lib/libssl/pqueue.c index daf5e21b3ae..af8530064fe 100644 --- a/lib/libssl/pqueue.c +++ b/lib/libssl/pqueue.c @@ -57,7 +57,9 @@ * */ +#include #include + #include "pqueue.h" typedef struct _pqueue { diff --git a/lib/libssl/pqueue.h b/lib/libssl/pqueue.h index 6e7df8f35b7..4b167871efd 100644 --- a/lib/libssl/pqueue.h +++ b/lib/libssl/pqueue.h @@ -60,10 +60,6 @@ #ifndef HEADER_PQUEUE_H #define HEADER_PQUEUE_H -#include -#include -#include - typedef struct _pqueue *pqueue; typedef struct _pitem { diff --git a/lib/libssl/src/ssl/d1_both.c b/lib/libssl/src/ssl/d1_both.c index 10b62cd4104..0e328256959 100644 --- a/lib/libssl/src/ssl/d1_both.c +++ b/lib/libssl/src/ssl/d1_both.c @@ -123,6 +123,8 @@ #include #include +#include "pqueue.h" + #define RSMBLY_BITMASK_SIZE(msg_len) (((msg_len) + 7) / 8) #define RSMBLY_BITMASK_MARK(bitmask, start, end) { \ diff --git a/lib/libssl/src/ssl/d1_lib.c b/lib/libssl/src/ssl/d1_lib.c index b6b765634da..a2500ee0bf9 100644 --- a/lib/libssl/src/ssl/d1_lib.c +++ b/lib/libssl/src/ssl/d1_lib.c @@ -64,6 +64,8 @@ #include #include + +#include "pqueue.h" #include "ssl_locl.h" const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; diff --git a/lib/libssl/src/ssl/d1_pkt.c b/lib/libssl/src/ssl/d1_pkt.c index df18e5bae37..a9ccc6d3496 100644 --- a/lib/libssl/src/ssl/d1_pkt.c +++ b/lib/libssl/src/ssl/d1_pkt.c @@ -121,6 +121,8 @@ #include #include +#include "pqueue.h" + /* mod 128 saturating subtract of two 64-bit values in big-endian order */ static int satsub64be(const unsigned char *v1, const unsigned char *v2) diff --git a/lib/libssl/src/ssl/pqueue.c b/lib/libssl/src/ssl/pqueue.c index daf5e21b3ae..af8530064fe 100644 --- a/lib/libssl/src/ssl/pqueue.c +++ b/lib/libssl/src/ssl/pqueue.c @@ -57,7 +57,9 @@ * */ +#include #include + #include "pqueue.h" typedef struct _pqueue { diff --git a/lib/libssl/src/ssl/pqueue.h b/lib/libssl/src/ssl/pqueue.h index 6e7df8f35b7..4b167871efd 100644 --- a/lib/libssl/src/ssl/pqueue.h +++ b/lib/libssl/src/ssl/pqueue.h @@ -60,10 +60,6 @@ #ifndef HEADER_PQUEUE_H #define HEADER_PQUEUE_H -#include -#include -#include - typedef struct _pqueue *pqueue; typedef struct _pitem { diff --git a/lib/libssl/src/ssl/ssl_locl.h b/lib/libssl/src/ssl/ssl_locl.h index a0c30178368..012a38cc5c1 100644 --- a/lib/libssl/src/ssl/ssl_locl.h +++ b/lib/libssl/src/ssl/ssl_locl.h @@ -164,8 +164,6 @@ #include #include -#include "pqueue.h" - #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \ l|=(((unsigned long)(*((c)++)))<< 8), \ l|=(((unsigned long)(*((c)++)))<<16), \ diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h index a0c30178368..012a38cc5c1 100644 --- a/lib/libssl/ssl_locl.h +++ b/lib/libssl/ssl_locl.h @@ -164,8 +164,6 @@ #include #include -#include "pqueue.h" - #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \ l|=(((unsigned long)(*((c)++)))<< 8), \ l|=(((unsigned long)(*((c)++)))<<16), \ -- 2.20.1