REORG: include: move shctx to haproxy/shctx{,-t}.h

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).
This commit is contained in:
Willy Tarreau 2020-06-03 18:38:48 +02:00
parent 3afc4c4bb0
commit 334099c324
5 changed files with 30 additions and 14 deletions

View 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 */

View 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
*
@ -11,13 +11,12 @@
* 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 */

View 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>

View 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)

View 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>