REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/

These ones do not depend on any other file. One used to include
haproxy/api.h but that was solely for stddef.h.
This commit is contained in:
Willy Tarreau 2020-05-27 16:10:29 +02:00
parent d678805783
commit 8d36697dee
37 changed files with 55 additions and 55 deletions

View File

@ -1,8 +1,8 @@
/*
* include/common/base64.h
* include/haproxy/base64.h
* Ascii to Base64 conversion as described in RFC1421.
*
* Copyright 2006-2010 Willy Tarreau <w@1wt.eu>
* Copyright 2006-2020 Willy Tarreau <w@1wt.eu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -11,10 +11,10 @@
*
*/
#ifndef _COMMON_BASE64_H
#define _COMMON_BASE64_H
#ifndef _HAPROXY_BASE64_H
#define _HAPROXY_BASE64_H
#include <haproxy/api.h>
#include <stddef.h>
int a2base64(char *in, int ilen, char *out, int olen);
int base64dec(const char *in, size_t ilen, char *out, size_t olen);
@ -23,4 +23,4 @@ int b64tos30(const char *in);
extern const char base64tab[];
#endif /* _COMMON_BASE64_H */
#endif /* _HAPROXY_BASE64_H */

View File

@ -1,8 +1,8 @@
/*
* include/common/errors.h
* include/haproxy/errors.h
* Global error macros and constants
*
* Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu
* Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _COMMON_ERRORS_H
#define _COMMON_ERRORS_H
#ifndef _HAPROXY_ERRORS_H
#define _HAPROXY_ERRORS_H
/* These flags may be used in various functions which are called from within
* loops (eg: to start all listeners from all proxies). They provide enough
@ -56,7 +56,7 @@ enum {
PE_ARG_NOT_FOUND, /* argument references something not found */
};
#endif /* _COMMON_ERRORS_H */
#endif /* _HAPROXY_ERRORS_H */
/*
* Local variables:

View File

@ -1,8 +1,8 @@
/*
* include/common/hash.h
* include/haproxy/hash.h
* Macros for different hashing function.
*
* Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
* Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _COMMON_HASH_H_
#define _COMMON_HASH_H_
#ifndef _HAPROXY_HASH_H_
#define _HAPROXY_HASH_H_
#include <inttypes.h>
@ -30,4 +30,4 @@ unsigned int hash_sdbm(const void *input, int len);
unsigned int hash_crc32(const void *input, int len);
uint32_t hash_crc32c(const void *input, int len);
#endif /* _COMMON_HASH_H_ */
#endif /* _HAPROXY_HASH_H_ */

View File

@ -23,7 +23,7 @@
#ifndef _PROTO_STICK_TABLE_H
#define _PROTO_STICK_TABLE_H
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/ticks.h>
#include <common/time.h>
#include <types/stick_table.h>

View File

@ -4,7 +4,7 @@
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/buffer.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/hathreads.h>
#include <types/global.h>
#include <proto/arg.h>

View File

@ -27,7 +27,7 @@
#include <haproxy/api.h>
#include <types/global.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/hathreads.h>
#include <proto/acl.h>

View File

@ -22,7 +22,7 @@
#include <haproxy/api.h>
#include <common/buffer.h>
#include <common/debug.h>
#include <common/hash.h>
#include <haproxy/hash.h>
#include <common/htx.h>
#include <common/ticks.h>
#include <common/time.h>

View File

@ -15,7 +15,7 @@
#include <string.h>
#include <haproxy/api.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#define B64BASE '#' /* arbitrary chosen base value */
#define B64CMIN '+'

View File

@ -34,7 +34,7 @@
#include <common/cfgparse.h>
#include <common/hash.h>
#include <haproxy/hash.h>
#include <common/htx.h>
#include <common/net_helper.h>

View File

@ -32,7 +32,7 @@
#include <sys/types.h>
#include <haproxy/api.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <common/cfgparse.h>
#include <common/openssl-compat.h>

View File

@ -36,7 +36,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/standard.h>
#include <common/time.h>

View File

@ -36,7 +36,7 @@
#include <common/time.h>
#include <common/uri_auth.h>
#include <haproxy/version.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <types/applet.h>
#include <types/global.h>

View File

@ -15,7 +15,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/namespace.h>
#include <common/hash.h>
#include <haproxy/hash.h>
#include <common/net_helper.h>
#include <proto/connection.h>

View File

@ -2,7 +2,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/http.h>
#include <types/global.h>
#include <proto/arg.h>

View File

@ -21,7 +21,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/time.h>
#include <common/ticks.h>
#include <common/net_helper.h>

View File

@ -13,7 +13,7 @@
#include <haproxy/api.h>
#include <common/chunk.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/standard.h>
#include <types/global.h>

View File

@ -14,7 +14,7 @@
#include <common/buffer.h>
#include <common/debug.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/htx.h>
#include <common/namespace.h>
#include <common/standard.h>

View File

@ -81,10 +81,10 @@
#include <haproxy/api.h>
#include <import/sha1.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/mini-clist.h>
#include <common/namespace.h>

View File

@ -14,7 +14,7 @@
*/
#include <common/hash.h>
#include <haproxy/hash.h>
unsigned int hash_wt6(const void *input, int len)

View File

@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <common/debug.h>
#include <common/htx.h>
#include <common/net_helper.h>

View File

@ -17,7 +17,7 @@
#include <time.h>
#include <haproxy/api.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <common/chunk.h>
#include <common/debug.h>
#include <common/h1.h>

View File

@ -20,7 +20,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>

View File

@ -22,7 +22,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <proto/log.h>
#include <proto/mworker.h>

View File

@ -12,8 +12,8 @@
#include <haproxy/api.h>
#include <common/namespace.h>
#include <common/hash.h>
#include <common/errors.h>
#include <haproxy/hash.h>
#include <haproxy/errors.h>
#include <proto/log.h>
#include <proto/signal.h>
#include <types/global.h>

View File

@ -28,7 +28,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>

View File

@ -32,7 +32,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/namespace.h>

View File

@ -28,7 +28,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>

View File

@ -14,7 +14,7 @@
#include <sys/socket.h>
#include <haproxy/api.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>

View File

@ -19,7 +19,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/time.h>

View File

@ -20,12 +20,12 @@
#include <types/global.h>
#include <common/chunk.h>
#include <common/hash.h>
#include <haproxy/hash.h>
#include <common/http.h>
#include <common/net_helper.h>
#include <common/standard.h>
#include <common/uri_auth.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <proto/arg.h>
#include <proto/auth.h>

View File

@ -18,7 +18,7 @@
#include <import/xxhash.h>
#include <common/cfgparse.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/namespace.h>
#include <common/time.h>

View File

@ -21,8 +21,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <common/base64.h>
#include <common/errors.h>
#include <haproxy/base64.h>
#include <haproxy/errors.h>
#include <common/standard.h>
#include <import/ebsttree.h>

View File

@ -15,7 +15,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/standard.h>
#include <dirent.h>

View File

@ -47,12 +47,12 @@
#include <common/buffer.h>
#include <common/chunk.h>
#include <common/debug.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <common/openssl-compat.h>
#include <common/standard.h>
#include <common/ticks.h>
#include <common/time.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <import/ebpttree.h>
#include <import/ebsttree.h>

View File

@ -36,7 +36,7 @@
#include <common/time.h>
#include <common/uri_auth.h>
#include <haproxy/version.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <types/applet.h>
#include <types/cli.h>

View File

@ -14,7 +14,7 @@
#include <string.h>
#include <haproxy/api.h>
#include <common/base64.h>
#include <haproxy/base64.h>
#include <common/uri_auth.h>
#include <types/stats.h>

View File

@ -5,7 +5,7 @@
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/buffer.h>
#include <common/errors.h>
#include <haproxy/errors.h>
#include <types/global.h>
#include <proto/arg.h>
#include <proto/log.h>