]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move shctx to haproxy/shctx{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Jun 2020 16:38:48 +0000 (18:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
Minor cleanups were applied, some includes were missing from the types
file and some were incorrect in a few C files (duplicated or not using
path).

include/haproxy/shctx-t.h [moved from include/types/shctx.h with 64% similarity]
include/haproxy/shctx.h [moved from include/proto/shctx.h with 96% similarity]
src/cache.c
src/shctx.c
src/ssl_sock.c

similarity index 64%
rename from include/types/shctx.h
rename to include/haproxy/shctx-t.h
index 7d9d8c8a16d862cb5c058d22d3183b2301dd7b81..ea835af3d468830f891bed001089795a717c30f3 100644 (file)
@@ -1,5 +1,23 @@
-#ifndef __TYPES_SHCTX
-#define __TYPES_SHCTX
+/*
+ * include/haproxy/shctx-t.h - shared context management functions for SSL
+ *
+ * Copyright (C) 2011-2012 EXCELIANCE
+ *
+ * Author: Emeric Brun - emeric@exceliance.fr
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#ifndef __HAPROXY_SHCTX_T_H
+#define __HAPROXY_SHCTX_T_H
+
+#if !defined (USE_PRIVATE_CACHE) && defined(USE_PTHREAD_PSHARED)
+#include <pthread.h>
+#endif
+#include <haproxy/list.h>
 
 #ifndef SHSESS_BLOCK_MIN_SIZE
 #define SHSESS_BLOCK_MIN_SIZE 128
@@ -46,4 +64,4 @@ struct shared_context {
        unsigned char data[0];
 };
 
-#endif
+#endif /* __HAPROXY_SHCTX_T_H */
similarity index 96%
rename from include/proto/shctx.h
rename to include/haproxy/shctx.h
index 76f498f53692889e13d9d481a091100ecddbd8c2..b258f3ce01e8e3dac42d4b9fb3a31e4b7b7a28f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * shctx.h - shared context management functions for SSL
+ * include/haproxy/shctx.h - shared context management functions for SSL
  *
  * Copyright (C) 2011-2012 EXCELIANCE
  *
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifndef SHCTX_H
-#define SHCTX_H
+#ifndef __HAPROXY_SHCTX_H
+#define __HAPROXY_SHCTX_H
 
+#include <haproxy/api-t.h>
 #include <haproxy/list.h>
-#include <types/shctx.h>
-
-#include <inttypes.h>
+#include <haproxy/shctx-t.h>
 
 #ifndef USE_PRIVATE_CACHE
 #ifdef USE_PTHREAD_PSHARED
@@ -215,5 +214,5 @@ static inline void shctx_block_set_avail(struct shared_context *shctx,
        LIST_ADDQ(&shctx->avail, &s->list);
 }
 
-#endif /* SHCTX_H */
+#endif /* __HAPROXY_SHCTX_H */
 
index 754cb44274dba8f6e875bcd1456328b032e7d425..02083c05cea3ab44b04c5cdf41ce059d8f2d1652 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <haproxy/api.h>
+#include <haproxy/shctx.h>
 #include <import/eb32tree.h>
 #include <import/sha1.h>
 
@@ -18,7 +19,6 @@
 #include <types/cli.h>
 #include <types/filters.h>
 #include <types/proxy.h>
-#include <types/shctx.h>
 
 #include <proto/channel.h>
 #include <proto/cli.h>
@@ -30,7 +30,6 @@
 #include <proto/log.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/shctx.h>
 
 
 #include <common/cfgparse.h>
index 113828adb5e75a8d923db140f11b3ce3155f43f6..1a38b9148b140e79715498489d95a1eea3abeabd 100644 (file)
@@ -16,7 +16,7 @@
 #include <import/ebmbtree.h>
 #include <types/global.h>
 #include <haproxy/list.h>
-#include "proto/shctx.h"
+#include <haproxy/shctx.h>
 
 #if !defined (USE_PRIVATE_CACHE)
 
index 61560125ec4553be90b1a4a76b59115db3494ab4..44818d0af2af5de44d2d201ba4665616d20d3b33 100644 (file)
@@ -48,6 +48,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/errors.h>
 #include <haproxy/openssl-compat.h>
+#include <haproxy/shctx.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -79,7 +80,6 @@
 #include <proto/stream_interface.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
-#include <proto/shctx.h>
 #include <proto/ssl_ckch.h>
 #include <proto/ssl_crtlist.h>
 #include <proto/ssl_sock.h>