From 53583d8a9d6887ba9ccd858f02cf586a7300e65e Mon Sep 17 00:00:00 2001 From: zsxxsz Date: Sat, 18 May 2019 21:19:21 +0800 Subject: [PATCH] add compiling macro option ACL_CLIENT_ONLY to decrease the library's size for client software. --- lib_acl/changes.txt | 4 ++++ lib_acl/include/code/acl_gbcode.h | 4 ++++ lib_acl/include/code/acl_htmlcode.h | 3 +++ lib_acl/include/code/acl_xmlcode.h | 10 +++++++--- lib_acl/include/db/acl_dbpool.h | 3 +++ lib_acl/include/db/acl_dbsql.h | 3 +++ lib_acl/include/db/zdb.h | 3 +++ lib_acl/include/master/acl_aio_params.h | 7 +++++-- lib_acl/include/master/acl_master_conf.h | 9 ++++++--- lib_acl/include/master/acl_master_flow.h | 8 ++++++-- lib_acl/include/master/acl_master_proto.h | 7 +++++-- lib_acl/include/master/acl_master_type.h | 7 +++++-- lib_acl/include/master/acl_server_api.h | 11 +++++++---- lib_acl/include/master/acl_single_params.h | 7 +++++-- lib_acl/include/master/acl_threads_params.h | 7 +++++-- lib_acl/include/master/acl_trigger_params.h | 7 +++++-- lib_acl/include/master/acl_udp_params.h | 8 +++++--- lib_acl/include/msg/acl_aqueue.h | 5 +++-- lib_acl/src/code/acl_gbcode.c | 4 ++++ lib_acl/src/code/acl_htmlcode.c | 4 ++++ lib_acl/src/code/acl_xmlcode.c | 4 ++++ lib_acl/src/code/gb_ft2jt.h | 5 +++++ lib_acl/src/code/gb_jt2ft.h | 5 +++++ lib_acl/src/code/html_charset.h | 3 +++ lib_acl/src/db/acl_dbpool.c | 4 +++- lib_acl/src/db/acl_dbsql.c | 3 +++ lib_acl/src/db/mysql/acl_dbmysql.c | 3 +++ lib_acl/src/db/mysql/acl_dbmysql.h | 9 ++++++--- lib_acl/src/db/mysql/acl_dbpool_mysql.c | 5 +++-- lib_acl/src/db/mysql/acl_dbpool_mysql.h | 9 ++++++--- lib_acl/src/db/null/acl_dbnull.c | 4 ++++ lib_acl/src/db/null/acl_dbnull.h | 8 +++++--- lib_acl/src/db/null/acl_dbpool_null.c | 4 ++++ lib_acl/src/db/zdb/zdb.c | 3 +++ lib_acl/src/db/zdb/zdb_dat.c | 4 ++++ lib_acl/src/db/zdb/zdb_dat_iter.c | 4 ++++ lib_acl/src/db/zdb/zdb_dat_walk.c | 4 ++++ lib_acl/src/db/zdb/zdb_io.c | 4 ++++ lib_acl/src/db/zdb/zdb_key.c | 4 ++++ lib_acl/src/db/zdb/zdb_key_walk.c | 4 ++++ lib_acl/src/db/zdb/zdb_private.h | 3 +++ lib_acl/src/master/acl_master_flow.c | 2 ++ lib_acl/src/master/acl_master_params.c | 4 ++++ lib_acl/src/master/acl_master_proto.c | 3 +++ lib_acl/src/master/acl_server_sig.c | 4 ++++ lib_acl/src/master/template/acl_aio_server.c | 2 ++ lib_acl/src/master/template/acl_single_server.c | 2 ++ lib_acl/src/master/template/acl_threads_server.c | 3 +++ lib_acl/src/master/template/acl_trigger_server.c | 2 ++ lib_acl/src/master/template/acl_udp_server.c | 4 ++++ lib_acl/src/master/template/master_log.c | 4 ++++ lib_acl/src/master/template/master_log.h | 8 +++++--- lib_acl_cpp/changes.txt | 4 ++++ lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk.hpp | 4 ++++ .../include/acl_cpp/beanstalk/beanstalk_pool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/db_mysql.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/db_pgsql.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/db_service_mysql.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/mysql_conf.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/mysql_manager.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/mysql_pool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/pgsql_conf.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/pgsql_manager.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/db/pgsql_pool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/disque/disque.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/disque/disque_cond.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/disque/disque_job.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/disque/disque_node.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hsclient.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hserror.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hspool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hsproto.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hsrow.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/hsocket/hstable.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/http/HttpServlet.hpp | 4 ++++ .../include/acl_cpp/http/HttpServletRequest.hpp | 4 ++++ .../include/acl_cpp/http/HttpServletResponse.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/http/HttpSession.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/http/WebSocketServlet.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_aio.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_base.hpp | 5 +++++ lib_acl_cpp/include/acl_cpp/master/master_conf.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_proc.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_threads.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_trigger.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/master/master_udp.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/memcache/memcache.hpp | 4 ++++ .../include/acl_cpp/memcache/memcache_manager.hpp | 4 ++++ .../include/acl_cpp/memcache/memcache_pool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_client.hpp | 4 ++++ .../include/acl_cpp/redis/redis_client_cluster.hpp | 4 ++++ .../include/acl_cpp/redis/redis_client_pool.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_cluster.hpp | 5 +++++ lib_acl_cpp/include/acl_cpp/redis/redis_command.hpp | 4 ++++ .../include/acl_cpp/redis/redis_connection.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_geo.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_hash.hpp | 4 ++++ .../include/acl_cpp/redis/redis_hyperloglog.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_key.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_list.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_master.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_node.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_pubsub.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_result.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_role.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_script.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_sentinel.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_server.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_set.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_slave.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_slot.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_stream.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_string.hpp | 5 +++++ .../include/acl_cpp/redis/redis_transaction.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/serialize/gsoner.hpp | 4 ++++ .../include/acl_cpp/session/memcache_session.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/session/redis_session.hpp | 4 ++++ lib_acl_cpp/include/acl_cpp/session/session.hpp | 4 ++++ lib_acl_cpp/src/beanstalk/beanstalk.cpp | 4 ++++ lib_acl_cpp/src/beanstalk/beanstalk_pool.cpp | 4 ++++ lib_acl_cpp/src/db/db_mysql.cpp | 4 ++++ lib_acl_cpp/src/db/db_pgsql.cpp | 4 ++++ lib_acl_cpp/src/db/db_service_mysql.cpp | 4 ++++ lib_acl_cpp/src/db/mysql_conf.cpp | 4 ++++ lib_acl_cpp/src/db/mysql_manager.cpp | 4 ++++ lib_acl_cpp/src/db/mysql_pool.cpp | 4 ++++ lib_acl_cpp/src/db/pgsql_conf.cpp | 4 ++++ lib_acl_cpp/src/db/pgsql_manager.cpp | 4 ++++ lib_acl_cpp/src/db/pgsql_pool.cpp | 4 ++++ lib_acl_cpp/src/disque/disque.cpp | 4 ++++ lib_acl_cpp/src/disque/disque_cond.cpp | 4 ++++ lib_acl_cpp/src/disque/disque_job.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hsclient.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hserror.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hspool.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hsproto.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hsrow.cpp | 4 ++++ lib_acl_cpp/src/hsocket/hstable.cpp | 4 ++++ lib_acl_cpp/src/http/HttpCookie.cpp | 1 + lib_acl_cpp/src/http/HttpServlet.cpp | 4 ++++ lib_acl_cpp/src/http/HttpServletRequest.cpp | 4 ++++ lib_acl_cpp/src/http/HttpServletResponse.cpp | 4 ++++ lib_acl_cpp/src/http/HttpSession.cpp | 4 ++++ lib_acl_cpp/src/http/WebSocketServlet.cpp | 4 ++++ lib_acl_cpp/src/master/master_aio.cpp | 4 ++++ lib_acl_cpp/src/master/master_base.cpp | 4 ++++ lib_acl_cpp/src/master/master_conf.cpp | 4 ++++ lib_acl_cpp/src/master/master_proc.cpp | 4 ++++ lib_acl_cpp/src/master/master_threads.cpp | 4 ++++ lib_acl_cpp/src/master/master_trigger.cpp | 4 ++++ lib_acl_cpp/src/master/master_udp.cpp | 4 ++++ lib_acl_cpp/src/memcache/memcache.cpp | 4 ++++ lib_acl_cpp/src/memcache/memcache_manager.cpp | 4 ++++ lib_acl_cpp/src/memcache/memcache_pool.cpp | 4 ++++ lib_acl_cpp/src/redis/redis.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_client.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_client_cluster.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_client_pool.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_cluster.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_command.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_connection.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_geo.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_hash.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_hyperloglog.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_key.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_list.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_master.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_node.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_pubsub.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_request.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_request.hpp | 4 ++++ lib_acl_cpp/src/redis/redis_result.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_role.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_script.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_sentinel.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_server.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_set.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_slave.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_slot.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_stream.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_string.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_transaction.cpp | 4 ++++ lib_acl_cpp/src/redis/redis_zset.cpp | 4 ++++ lib_acl_cpp/src/serialize/gsoner.cpp | 3 +++ lib_acl_cpp/src/session/memcache_session.cpp | 4 ++++ lib_acl_cpp/src/session/redis_session.cpp | 4 ++++ lib_acl_cpp/src/session/session.cpp | 4 ++++ 189 files changed, 758 insertions(+), 44 deletions(-) diff --git a/lib_acl/changes.txt b/lib_acl/changes.txt index b589f7cb7..98b323711 100644 --- a/lib_acl/changes.txt +++ b/lib_acl/changes.txt @@ -1,5 +1,9 @@ 修改历史列表: +650) 2019.5.18 +650.1) compile: 增加宏编译选项 ACL_CLIENT_ONLY,当将 acl 库用于客户端模式时可以有效地 +减少编译库的大小 + 649) 2019.5.6 649.1) bugfix: acl_vstream_fflush() 当调用 loop_writen() 时其返回值 < 0,应该 将 fp->wbuf_dlen 值置 0,以防止在调用 acl_vstream_close() 时报错 diff --git a/lib_acl/include/code/acl_gbcode.h b/lib_acl/include/code/acl_gbcode.h index 68a2de898..559da5ef8 100644 --- a/lib_acl/include/code/acl_gbcode.h +++ b/lib_acl/include/code/acl_gbcode.h @@ -1,6 +1,8 @@ #ifndef ACL_GBCODE_INCLUDE_H #define ACL_GBCODE_INCLUDE_H +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif @@ -29,4 +31,6 @@ ACL_API void acl_gbft2jt(const char *data, size_t dlen, char *buf, size_t size); } #endif +#endif /* ACL_CLIENT_ONLY */ + #endif diff --git a/lib_acl/include/code/acl_htmlcode.h b/lib_acl/include/code/acl_htmlcode.h index 503ef8132..b15b52b39 100644 --- a/lib_acl/include/code/acl_htmlcode.h +++ b/lib_acl/include/code/acl_htmlcode.h @@ -1,6 +1,8 @@ #ifndef ACL_HTMLCODE_INCLUDE_H #define ACL_HTMLCODE_INCLUDE_H +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif @@ -15,4 +17,5 @@ ACL_API int acl_html_decode(const char *in, ACL_VSTRING *out); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/code/acl_xmlcode.h b/lib_acl/include/code/acl_xmlcode.h index 96fcd231e..d08db8f66 100644 --- a/lib_acl/include/code/acl_xmlcode.h +++ b/lib_acl/include/code/acl_xmlcode.h @@ -1,16 +1,18 @@ #ifndef __ACL_XMLCODE_INCLUDE_H__ #define __ACL_XMLCODE_INCLUDE_H__ +#include "../stdlib/acl_define.h" +#include "../stdlib/acl_vstring.h" + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" -#include "../stdlib/acl_vstring.h" - ACL_API int acl_xml_encode(const char *in, ACL_VSTRING *out); ACL_API int acl_xml_decode(const char *in, ACL_VSTRING *out); +#ifndef ACL_CLIENT_ONLY + /** * xml 字符编码器 * @param in {const char**} 源串地址的地址,函数返回后该地址记录未被处理的内容地址, @@ -35,6 +37,8 @@ ACL_API size_t acl_xml_encode2(const char** in, size_t ilen, ACL_API const char *acl_xml_decode2(const char *in, char **out, size_t *size); +#endif /* ACL_CLIENT_ONLY */ + #ifdef __cplusplus } #endif diff --git a/lib_acl/include/db/acl_dbpool.h b/lib_acl/include/db/acl_dbpool.h index bc14efa75..56b50fd2b 100644 --- a/lib_acl/include/db/acl_dbpool.h +++ b/lib_acl/include/db/acl_dbpool.h @@ -1,6 +1,8 @@ #ifndef ACL_DBPOOL_INCLUDE_H #define ACL_DBPOOL_INCLUDE_H +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif @@ -150,4 +152,5 @@ ACL_API void acl_dbpool_set_ping(ACL_DB_POOL *db_pool, int (*ping_fn)(ACL_DB_HAN } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/db/acl_dbsql.h b/lib_acl/include/db/acl_dbsql.h index 80105cc5b..aee514989 100644 --- a/lib_acl/include/db/acl_dbsql.h +++ b/lib_acl/include/db/acl_dbsql.h @@ -1,6 +1,8 @@ #ifndef ACL_DBSQL_INCLUDE_H #define ACL_DBSQL_INCLUDE_H +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif @@ -102,5 +104,6 @@ ACL_API int acl_dbsql_update(ACL_DB_HANDLE *handle, const char *sql, int *error) } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/db/zdb.h b/lib_acl/include/db/zdb.h index 3203ca68f..8cf8ee691 100644 --- a/lib_acl/include/db/zdb.h +++ b/lib_acl/include/db/zdb.h @@ -5,6 +5,8 @@ #include "../stdlib/acl_vstring.h" #include "../stdlib/acl_fhandle.h" +#ifndef ACL_CLIENT_ONLY + typedef struct ZDB ZDB; typedef struct ZDB_KEY_HDR ZDB_KEY_HDR; typedef struct ZDB_BLK ZDB_BLK; @@ -505,4 +507,5 @@ ACL_API void zdb_dat_iter_set(ZDB_DAT_STORE *store, int read_data); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_aio_params.h b/lib_acl/include/master/acl_aio_params.h index 36db9cb1e..8df9127a0 100644 --- a/lib_acl/include/master/acl_aio_params.h +++ b/lib_acl/include/master/acl_aio_params.h @@ -1,12 +1,14 @@ - #ifndef ACL_AIO_PARAMS_INCLUDE_H #define ACL_AIO_PARAMS_INCLUDE_H +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" #ifdef ACL_UNIX extern int acl_var_aio_pid; @@ -139,5 +141,6 @@ extern char *acl_var_aio_deny_info; } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_master_conf.h b/lib_acl/include/master/acl_master_conf.h index 71bedd4ed..074e1c63a 100644 --- a/lib_acl/include/master/acl_master_conf.h +++ b/lib_acl/include/master/acl_master_conf.h @@ -1,13 +1,15 @@ #ifndef ACL_MASTER_CONF_INCLUDE_H #define ACL_MASTER_CONF_INCLUDE_H +#include "../stdlib/acl_define.h" +#include "../master/acl_master_type.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" -#include "../master/acl_master_type.h" - ACL_API void acl_app_conf_load(const char *pathname); ACL_API void acl_app_conf_unload(void); ACL_API void acl_get_app_conf_int_table(ACL_CONFIG_INT_TABLE *table); @@ -20,4 +22,5 @@ ACL_API void acl_free_app_conf_str_table(ACL_CONFIG_STR_TABLE *table); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_master_flow.h b/lib_acl/include/master/acl_master_flow.h index 83e455266..da3951bd2 100644 --- a/lib_acl/include/master/acl_master_flow.h +++ b/lib_acl/include/master/acl_master_flow.h @@ -1,12 +1,14 @@ #ifndef __ACL_MASTER_FLOW_INCLUDED_H__ #define __ACL_MASTER_FLOW_INCLUDED_H__ +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - #ifdef ACL_UNIX /* @@ -23,6 +25,8 @@ extern int acl_master_flow_count(void); #ifdef __cplusplus } + +#endif /* ACL_CLIENT_ONLY */ #endif #endif diff --git a/lib_acl/include/master/acl_master_proto.h b/lib_acl/include/master/acl_master_proto.h index fb1b6184a..a959a9f0a 100644 --- a/lib_acl/include/master/acl_master_proto.h +++ b/lib_acl/include/master/acl_master_proto.h @@ -1,12 +1,14 @@ #ifndef __ACL_MASTER_PROTO_INCLUDE_H__ #define __ACL_MASTER_PROTO_INCLUDE_H__ +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - #ifdef ACL_UNIX /* @@ -81,4 +83,5 @@ int acl_master_notify(int, unsigned, int); /* encapsulate status msg */ } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_master_type.h b/lib_acl/include/master/acl_master_type.h index e64a0202b..4521d5340 100644 --- a/lib_acl/include/master/acl_master_type.h +++ b/lib_acl/include/master/acl_master_type.h @@ -1,12 +1,14 @@ #ifndef ACL_MASTER_TYPE_INCLUDE_H #define ACL_MASTER_TYPE_INCLUDE_H +#include "../stdlib/acl_xinetd_cfg.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_xinetd_cfg.h" - #define ACL_CONFIG_INT_TABLE ACL_CFG_INT_TABLE #define ACL_CONFIG_INT64_TABLE ACL_CFG_INT64_TABLE #define ACL_CONFIG_STR_TABLE ACL_CFG_STR_TABLE @@ -16,4 +18,5 @@ extern "C" { } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_server_api.h b/lib_acl/include/master/acl_server_api.h index 95facdba4..0b4185f2b 100644 --- a/lib_acl/include/master/acl_server_api.h +++ b/lib_acl/include/master/acl_server_api.h @@ -1,10 +1,6 @@ #ifndef ACL_MASTER_SERVER_API_INCLUDE_H #define ACL_MASTER_SERVER_API_INCLUDE_H -#ifdef __cplusplus -extern "C" { -#endif - #include "../stdlib/acl_define.h" /* @@ -15,6 +11,12 @@ extern "C" { #include "../aio/acl_aio.h" #include "../event/acl_events.h" +#ifndef ACL_CLIENT_ONLY + +#ifdef __cplusplus +extern "C" { +#endif + #define ACL_MASTER_SERVER_END 0 #define ACL_MASTER_SERVER_INT_TABLE 1 #define ACL_MASTER_SERVER_STR_TABLE 2 @@ -189,4 +191,5 @@ ACL_API void acl_server_sigterm_setup(void); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_single_params.h b/lib_acl/include/master/acl_single_params.h index dd8107b94..ce219de3c 100644 --- a/lib_acl/include/master/acl_single_params.h +++ b/lib_acl/include/master/acl_single_params.h @@ -1,12 +1,14 @@ #ifndef ACL_SINGLE_PARAMS_INCLUDE_H #define ACL_SINGLE_PARAMS_INCLUDE_H +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - #ifdef ACL_UNIX extern int acl_var_single_pid; /* get by call getpid() */ @@ -95,5 +97,6 @@ extern int acl_var_single_max_debug; } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_threads_params.h b/lib_acl/include/master/acl_threads_params.h index 3a4b60583..5e761512b 100644 --- a/lib_acl/include/master/acl_threads_params.h +++ b/lib_acl/include/master/acl_threads_params.h @@ -1,12 +1,14 @@ #ifndef ACL_THREADS_PARAMS_INCLUDE_H #define ACL_THREADS_PARAMS_INCLUDE_H +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - extern char *acl_var_threads_procname; extern char *acl_var_threads_log_file; @@ -150,4 +152,5 @@ extern char *acl_var_threads_dispatch_type; } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_trigger_params.h b/lib_acl/include/master/acl_trigger_params.h index ea1b86a2a..084cb88fa 100644 --- a/lib_acl/include/master/acl_trigger_params.h +++ b/lib_acl/include/master/acl_trigger_params.h @@ -1,12 +1,14 @@ #ifndef ACL_TRIGGER_PARAMS_INCLUDE_H #define ACL_TRIGGER_PARAMS_INCLUDE_H +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - #ifdef ACL_UNIX extern int acl_var_trigger_pid; /* get by call getpid() */ @@ -83,5 +85,6 @@ extern int acl_var_trigger_max_debug; } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/master/acl_udp_params.h b/lib_acl/include/master/acl_udp_params.h index 8b1ff6828..df4de5aae 100644 --- a/lib_acl/include/master/acl_udp_params.h +++ b/lib_acl/include/master/acl_udp_params.h @@ -1,13 +1,14 @@ - #ifndef __ACL_UDP_PARAMS_INCLUDE_H_ #define __ACL_UDP_PARAMS_INCLUDE_H_ +#include "../stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" - extern int acl_var_udp_pid; extern char *acl_var_udp_procname; extern char *acl_var_udp_log_file; @@ -112,4 +113,5 @@ extern char *acl_var_udp_private; } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/include/msg/acl_aqueue.h b/lib_acl/include/msg/acl_aqueue.h index 216dfcde0..542dde6f4 100644 --- a/lib_acl/include/msg/acl_aqueue.h +++ b/lib_acl/include/msg/acl_aqueue.h @@ -1,11 +1,12 @@ #ifndef ACL_AQUEUE_INCLUDE_H #define ACL_AQUEUE_INCLUDE_H +#include "../stdlib/acl_define.h" +#include "../thread/acl_thread.h" + #ifdef __cplusplus extern "C" { #endif -#include "../stdlib/acl_define.h" -#include "../thread/acl_thread.h" #define ACL_AQUEUE_ERR_UNKNOWN -1 #define ACL_AQUEUE_OK 0 diff --git a/lib_acl/src/code/acl_gbcode.c b/lib_acl/src/code/acl_gbcode.c index c5f192df1..0668f3ef3 100644 --- a/lib_acl/src/code/acl_gbcode.c +++ b/lib_acl/src/code/acl_gbcode.c @@ -8,6 +8,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "gb_jt2ft.h" #include "gb_ft2jt.h" @@ -57,3 +59,5 @@ void acl_gbft2jt(const char *data, size_t dlen, char *buf, size_t size) { gbtransfer(__ft2jt_tab, data, dlen, buf, size); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/code/acl_htmlcode.c b/lib_acl/src/code/acl_htmlcode.c index b37f5063b..ea8e757e0 100644 --- a/lib_acl/src/code/acl_htmlcode.c +++ b/lib_acl/src/code/acl_htmlcode.c @@ -14,6 +14,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "uni2utf8.h" #include "html_charset.h" @@ -144,3 +146,5 @@ int acl_html_decode(const char *in, ACL_VSTRING *out) ACL_VSTRING_TERMINATE(out); return (n); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/code/acl_xmlcode.c b/lib_acl/src/code/acl_xmlcode.c index ffe6823f4..a8e42373a 100644 --- a/lib_acl/src/code/acl_xmlcode.c +++ b/lib_acl/src/code/acl_xmlcode.c @@ -190,6 +190,8 @@ int acl_xml_decode(const char *in, ACL_VSTRING *out) /*--------------------------------------------------------------------------*/ +#ifndef ACL_CLIENT_ONLY + size_t acl_xml_encode2(const char **in, size_t ilen, char *out, size_t olen) { size_t olen_saved = olen; @@ -352,3 +354,5 @@ const char *acl_xml_decode2(const char *in, char **out, size_t *size) *out += 1; return ptr; } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/code/gb_ft2jt.h b/lib_acl/src/code/gb_ft2jt.h index 2bce20bd9..7fd6600a8 100644 --- a/lib_acl/src/code/gb_ft2jt.h +++ b/lib_acl/src/code/gb_ft2jt.h @@ -1,3 +1,6 @@ + +#ifndef ACL_CLIENT_ONLY + static const unsigned short __ft2jt_tab[] = { 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, @@ -8192,3 +8195,5 @@ static const unsigned short __ft2jt_tab[] = { 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, }; + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/code/gb_jt2ft.h b/lib_acl/src/code/gb_jt2ft.h index 529a227b0..9a8a18962 100644 --- a/lib_acl/src/code/gb_jt2ft.h +++ b/lib_acl/src/code/gb_jt2ft.h @@ -1,3 +1,6 @@ + +#ifndef ACL_CLIENT_ONLY + static const unsigned short __jt2ft_tab[] = { 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, @@ -8192,3 +8195,5 @@ static const unsigned short __jt2ft_tab[] = { 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, }; + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/code/html_charset.h b/lib_acl/src/code/html_charset.h index 83a62de19..2508e4ef6 100644 --- a/lib_acl/src/code/html_charset.h +++ b/lib_acl/src/code/html_charset.h @@ -1,6 +1,8 @@ #ifndef __HTML_CHARSET_INCLUDE_H__ #define __HTML_CHARSET_INCLUDE_H__ +#ifndef ACL_CLIENT_ONLY + static const char *html_charmap[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -8458,4 +8460,5 @@ static const HTML_SPEC html_tab[] = { { 9830, "♦", sizeof("♦") - 1 }, }; +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/src/db/acl_dbpool.c b/lib_acl/src/db/acl_dbpool.c index 9e9fa9d4f..62c2ce482 100644 --- a/lib_acl/src/db/acl_dbpool.c +++ b/lib_acl/src/db/acl_dbpool.c @@ -15,6 +15,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "mysql/acl_dbpool_mysql.h" #include "null/acl_dbpool_null.h" @@ -135,4 +137,4 @@ void acl_dbpool_set_ping(ACL_DB_POOL *db_pool, int (*ping_fn)(ACL_DB_HANDLE*)) db_pool->dbh_ping = ping_fn; } /*----------------------------------------------------------------------------*/ - +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/acl_dbsql.c b/lib_acl/src/db/acl_dbsql.c index 51d8a14dc..bb1dd59b4 100644 --- a/lib_acl/src/db/acl_dbsql.c +++ b/lib_acl/src/db/acl_dbsql.c @@ -16,6 +16,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + ACL_SQL_RES *acl_dbsql_select(ACL_DB_HANDLE *handle, const char *sql, int *error) { const char *myname = "acl_dbsql_select"; @@ -102,3 +104,4 @@ int acl_dbsql_update(ACL_DB_HANDLE *handle, const char *sql, int *error) return (n); } +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/mysql/acl_dbmysql.c b/lib_acl/src/db/mysql/acl_dbmysql.c index b4fc9e349..ac6f34613 100644 --- a/lib_acl/src/db/mysql/acl_dbmysql.c +++ b/lib_acl/src/db/mysql/acl_dbmysql.c @@ -12,6 +12,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #ifdef HAS_MYSQL #include "mysql.h" @@ -327,4 +329,5 @@ int acl_dbmysql_update(ACL_DB_HANDLE *handle, const char *sql, int *error) } #endif /* HAS_MYSQL */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/mysql/acl_dbmysql.h b/lib_acl/src/db/mysql/acl_dbmysql.h index b9de160d0..487f6ff14 100644 --- a/lib_acl/src/db/mysql/acl_dbmysql.h +++ b/lib_acl/src/db/mysql/acl_dbmysql.h @@ -1,13 +1,15 @@ #ifndef __ACL_DBMYSQL_INCLUDE_H__ #define __ACL_DBMYSQL_INCLUDE_H__ +#include "stdlib/acl_define.h" +#include "db/acl_dbpool.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "stdlib/acl_define.h" -#include "db/acl_dbpool.h" - #ifdef HAS_MYSQL ACL_SQL_RES *acl_dbmysql_select(ACL_DB_HANDLE *handle, const char *sql, int *error); @@ -24,5 +26,6 @@ int acl_dbmysql_update(ACL_DB_HANDLE *handle, const char *sql, int *error); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/src/db/mysql/acl_dbpool_mysql.c b/lib_acl/src/db/mysql/acl_dbpool_mysql.c index 02d95ce87..8f0cb4118 100644 --- a/lib_acl/src/db/mysql/acl_dbpool_mysql.c +++ b/lib_acl/src/db/mysql/acl_dbpool_mysql.c @@ -16,6 +16,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef HAS_MYSQL #include "mysql.h" @@ -491,5 +492,5 @@ void _dosmaperr(unsigned long error) #endif /* ACL_WINDOWS */ #endif -#endif /* HAS_MYSQL */ - +#endif /* HAS_MYSQL */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/mysql/acl_dbpool_mysql.h b/lib_acl/src/db/mysql/acl_dbpool_mysql.h index e071bfe62..0a386da8c 100644 --- a/lib_acl/src/db/mysql/acl_dbpool_mysql.h +++ b/lib_acl/src/db/mysql/acl_dbpool_mysql.h @@ -2,13 +2,15 @@ #ifndef __ACL_DBPOOL_MYSQL_INCLUDE_H__ #define __ACL_DBPOOL_MYSQL_INCLUDE_H__ +#include "stdlib/acl_define.h" +#include "db/acl_dbpool.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif -#include "stdlib/acl_define.h" -#include "db/acl_dbpool.h" - #ifdef HAS_MYSQL /* in acl_dbpool_mysql.c */ @@ -34,4 +36,5 @@ int sane_mysql_reopen(ACL_DB_HANDLE *handle); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/src/db/null/acl_dbnull.c b/lib_acl/src/db/null/acl_dbnull.c index 60b6b7945..21dea45db 100644 --- a/lib_acl/src/db/null/acl_dbnull.c +++ b/lib_acl/src/db/null/acl_dbnull.c @@ -15,6 +15,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "acl_dbnull.h" int acl_dbnull_results(ACL_DB_HANDLE *handle acl_unused, @@ -47,3 +49,5 @@ int acl_dbnull_update(ACL_DB_HANDLE *handle acl_unused, acl_msg_fatal("%s, %s(%d): not supported!", __FILE__, myname, __LINE__); return (-1); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/null/acl_dbnull.h b/lib_acl/src/db/null/acl_dbnull.h index 2cbe1e970..3b6ed8fc5 100644 --- a/lib_acl/src/db/null/acl_dbnull.h +++ b/lib_acl/src/db/null/acl_dbnull.h @@ -1,13 +1,14 @@ #ifndef __ACL_DB_NULL_INCLUDE_H__ #define __ACL_DB_NULL_INCLUDE_H__ +#include "stdlib/acl_define.h" +#include "db/acl_dbpool.h" + +#ifndef ACL_CLIENT_ONLY #ifdef __cplusplus extern "C" { #endif -#include "stdlib/acl_define.h" -#include "db/acl_dbpool.h" - int acl_dbnull_results(ACL_DB_HANDLE *handle, const char *sql, int *error, int (*walk_fn)(const void** my_row, void *arg), void *arg); int acl_dbnull_result(ACL_DB_HANDLE *handle, const char *sql, int *error, @@ -18,5 +19,6 @@ int acl_dbnull_update(ACL_DB_HANDLE *handle, const char *sql, int *error); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/src/db/null/acl_dbpool_null.c b/lib_acl/src/db/null/acl_dbpool_null.c index c52bfc896..695851f05 100644 --- a/lib_acl/src/db/null/acl_dbpool_null.c +++ b/lib_acl/src/db/null/acl_dbpool_null.c @@ -17,6 +17,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "acl_dbnull.h" #include "acl_dbpool_null.h" @@ -354,3 +356,5 @@ ACL_DB_POOL *acl_dbpool_null_create(const ACL_DB_INFO *db_info) return ((ACL_DB_POOL *) null_pool); } /*----------------------------------------------------------------------------*/ + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb.c b/lib_acl/src/db/zdb/zdb.c index cdca63d4f..0b04a4080 100644 --- a/lib_acl/src/db/zdb/zdb.c +++ b/lib_acl/src/db/zdb/zdb.c @@ -16,6 +16,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" /*----------------------------------------------------------------------------*/ @@ -394,3 +396,4 @@ int zdb_update(ZDB *db, zdb_key_t key, const ZDB_BLK_OFF *blk_off_saved, } /*----------------------------------------------------------------------------*/ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_dat.c b/lib_acl/src/db/zdb/zdb_dat.c index 522665234..ce66b540f 100644 --- a/lib_acl/src/db/zdb/zdb_dat.c +++ b/lib_acl/src/db/zdb/zdb_dat.c @@ -13,6 +13,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" int dat_store_header_sync(ZDB_DAT_STORE *store) @@ -1309,3 +1311,5 @@ int zdb_dat_check3(ZDB *db, const char *filepath, ZDB_DAT_HDR *dat_hdr) zdb_dat_store_close(store); return (ret); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_dat_iter.c b/lib_acl/src/db/zdb/zdb_dat_iter.c index 888605f4e..424db1718 100644 --- a/lib_acl/src/db/zdb/zdb_dat_iter.c +++ b/lib_acl/src/db/zdb/zdb_dat_iter.c @@ -8,6 +8,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" typedef struct { @@ -382,3 +384,5 @@ void zdb_dat_iter_set(ZDB_DAT_STORE *store, int read_data) ((ZDB_STORE*) store)->iter_next = (STORE_ITER) hdr_iter_next; } } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_dat_walk.c b/lib_acl/src/db/zdb/zdb_dat_walk.c index 740c8ab07..2c31b66aa 100644 --- a/lib_acl/src/db/zdb/zdb_dat_walk.c +++ b/lib_acl/src/db/zdb/zdb_dat_walk.c @@ -10,6 +10,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" static int zdb_dat_scan_path(ZDB *db, const char *path, @@ -81,3 +83,5 @@ int zdb_dat_walk(ZDB *db, int (*walk_fn)(ZDB_DAT_STORE *store)) return (ret); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_io.c b/lib_acl/src/db/zdb/zdb_io.c index 2c9794289..8705aa91f 100644 --- a/lib_acl/src/db/zdb/zdb_io.c +++ b/lib_acl/src/db/zdb/zdb_io.c @@ -28,6 +28,8 @@ #endif #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" #define KEY_LEN 21 @@ -433,3 +435,5 @@ int zdb_read(ZDB_STORE *store, void *buf, size_t size, zdb_off_t off) } /*----------------------------------------------------------------------------*/ + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_key.c b/lib_acl/src/db/zdb/zdb_key.c index 23fcb4d1d..a76244f9c 100644 --- a/lib_acl/src/db/zdb/zdb_key.c +++ b/lib_acl/src/db/zdb/zdb_key.c @@ -11,6 +11,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" int key_store_header_sync(ZDB_KEY_STORE *store) @@ -639,3 +641,5 @@ int zdb_key_init(ZDB *db, zdb_key_t key_begin, zdb_key_t key_end) return (0); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_key_walk.c b/lib_acl/src/db/zdb/zdb_key_walk.c index 7043552b4..79d55c9d1 100644 --- a/lib_acl/src/db/zdb/zdb_key_walk.c +++ b/lib_acl/src/db/zdb/zdb_key_walk.c @@ -11,6 +11,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #include "zdb_private.h" int zdb_key_walk(ZDB *db, int (*walk_fn)(ZDB_KEY_STORE*)) @@ -60,3 +62,5 @@ int zdb_key_walk(ZDB *db, int (*walk_fn)(ZDB_KEY_STORE*)) acl_scan_dir_close(scan); return (ret); } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/db/zdb/zdb_private.h b/lib_acl/src/db/zdb/zdb_private.h index bde03dbb0..009dc144e 100644 --- a/lib_acl/src/db/zdb/zdb_private.h +++ b/lib_acl/src/db/zdb/zdb_private.h @@ -1,6 +1,8 @@ #ifndef __ZDB_PRIVATE_INCLUDE_H__ #define __ZDB_PRIVATE_INCLUDE_H__ +#ifndef ACL_CLIENT_ONLY + #include "db/zdb.h" #define ZDB_DBG_BASE 500 @@ -195,4 +197,5 @@ int zdb_read(ZDB_STORE *store, void *buf, size_t size, zdb_off_t off); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl/src/master/acl_master_flow.c b/lib_acl/src/master/acl_master_flow.c index a73745504..d44cd72dc 100644 --- a/lib_acl/src/master/acl_master_flow.c +++ b/lib_acl/src/master/acl_master_flow.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -131,3 +132,4 @@ int acl_master_flow_count(void) } #endif /* ACL_UNIX */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/acl_master_params.c b/lib_acl/src/master/acl_master_params.c index 2945faaf1..5664078b0 100644 --- a/lib_acl/src/master/acl_master_params.c +++ b/lib_acl/src/master/acl_master_params.c @@ -17,6 +17,8 @@ #include "master/acl_master_conf.h" +#ifndef ACL_CLIENT_ONLY + /*-------------- global static inition and update functions ----------------*/ static void init_conf_int_vars(ACL_CONFIG_INT_TABLE cit[]) @@ -246,3 +248,5 @@ void acl_get_app_conf_bool_table(ACL_CONFIG_BOOL_TABLE *table) update_conf_bool_vars(table, name, value); } } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/acl_master_proto.c b/lib_acl/src/master/acl_master_proto.c index 47daf3d4c..3521289dc 100644 --- a/lib_acl/src/master/acl_master_proto.c +++ b/lib_acl/src/master/acl_master_proto.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -53,3 +54,5 @@ int acl_master_notify(int pid, unsigned generation, int status) } #endif /* ACL_UNIX */ + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/acl_server_sig.c b/lib_acl/src/master/acl_server_sig.c index a4b8fcaec..bb9a61349 100644 --- a/lib_acl/src/master/acl_server_sig.c +++ b/lib_acl/src/master/acl_server_sig.c @@ -16,6 +16,8 @@ #endif +#ifndef ACL_CLIENT_ONLY + #ifdef ACL_WINDOWS #include #endif @@ -96,3 +98,5 @@ void acl_server_sigterm_setup(void) __FUNCTION__, SIGTERM, strerror(errno)); #endif } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/acl_aio_server.c b/lib_acl/src/master/template/acl_aio_server.c index 3c091e720..3b0791efa 100644 --- a/lib_acl/src/master/template/acl_aio_server.c +++ b/lib_acl/src/master/template/acl_aio_server.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -1596,3 +1597,4 @@ void acl_aio_app2_main(int argc, char *argv[], ACL_AIO_RUN2_FN run2_fn, } #endif /* ACL_UNIX */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/acl_single_server.c b/lib_acl/src/master/template/acl_single_server.c index fb25c4bfc..c81c374a3 100644 --- a/lib_acl/src/master/template/acl_single_server.c +++ b/lib_acl/src/master/template/acl_single_server.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -750,3 +751,4 @@ void acl_single_server_main(int argc, char **argv, ACL_SINGLE_SERVER_FN service, } #endif /* ACL_UNIX */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/acl_threads_server.c b/lib_acl/src/master/template/acl_threads_server.c index f88feff13..757f78f93 100644 --- a/lib_acl/src/master/template/acl_threads_server.c +++ b/lib_acl/src/master/template/acl_threads_server.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -1601,3 +1602,5 @@ void acl_threads_server_main(int argc, char * argv[], /* not reached here */ /* acl_vstring_free(buf); */ } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/acl_trigger_server.c b/lib_acl/src/master/template/acl_trigger_server.c index 1552d2951..10791e0cc 100644 --- a/lib_acl/src/master/template/acl_trigger_server.c +++ b/lib_acl/src/master/template/acl_trigger_server.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -756,3 +757,4 @@ void acl_trigger_server_main(int argc, char **argv, ACL_TRIGGER_SERVER_FN servic } #endif /* ACL_UNIX */ +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/acl_udp_server.c b/lib_acl/src/master/template/acl_udp_server.c index 8068fe6f9..0889bba18 100644 --- a/lib_acl/src/master/template/acl_udp_server.c +++ b/lib_acl/src/master/template/acl_udp_server.c @@ -10,6 +10,7 @@ #endif +#ifndef ACL_CLIENT_ONLY #ifdef ACL_UNIX #include @@ -1246,3 +1247,6 @@ void acl_udp_server_main(int argc, char **argv, ACL_UDP_SERVER_FN service, ...) servers_start(__servers, acl_var_udp_threads); } + +#endif /* ACL_CLIENT_ONLY */ + diff --git a/lib_acl/src/master/template/master_log.c b/lib_acl/src/master/template/master_log.c index 9fcf19553..08379ee3b 100644 --- a/lib_acl/src/master/template/master_log.c +++ b/lib_acl/src/master/template/master_log.c @@ -8,6 +8,8 @@ #include "stdlib/acl_env.h" #include "master_log.h" +#ifndef ACL_CLIENT_ONLY + static int var_master_log_opened = 0; void master_log_open(const char *procname) @@ -35,3 +37,5 @@ void master_log_close() var_master_log_opened = 0; } } + +#endif /* ACL_CLIENT_ONLY */ diff --git a/lib_acl/src/master/template/master_log.h b/lib_acl/src/master/template/master_log.h index 9082ab6fa..bf728f673 100644 --- a/lib_acl/src/master/template/master_log.h +++ b/lib_acl/src/master/template/master_log.h @@ -1,12 +1,13 @@ #ifndef __MASTER_LOG_INCLUDE_H__ #define __MASTER_LOG_INCLUDE_H__ +#include "stdlib/acl_define.h" + +#ifndef ACL_CLIENT_ONLY + #ifdef __cplusplus extern "C" { #endif - -#include "stdlib/acl_define.h" - void master_log_open(const char *procname); void master_log_close(void); @@ -14,4 +15,5 @@ void master_log_close(void); } #endif +#endif /* ACL_CLIENT_ONLY */ #endif diff --git a/lib_acl_cpp/changes.txt b/lib_acl_cpp/changes.txt index cbac3c6a3..f2bde1899 100644 --- a/lib_acl_cpp/changes.txt +++ b/lib_acl_cpp/changes.txt @@ -1,5 +1,9 @@ 修改历史列表: +569) 2019.5.18 +569.1) compile: 增加宏编译选项 ACL_CLIENT_ONLY,当将 acl 库用于客户端模式时可以有效地 +减少编译库的大小 + 568) 2019.5.14 568.1) bugfix: redis_stream.cpp 中针对 XREADGROUP/XREAD 命令,当 block 为 0 时, 应该采用阻塞模式等待消息到达 diff --git a/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk.hpp b/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk.hpp index c8ab7777f..8cc6f5e45 100644 --- a/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk.hpp +++ b/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk.hpp @@ -6,6 +6,8 @@ #include "../stdlib/noncopyable.hpp" #include "../stream/socket_stream.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_ARGV; namespace acl { @@ -308,3 +310,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk_pool.hpp b/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk_pool.hpp index 817162563..7436085e3 100644 --- a/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/beanstalk/beanstalk_pool.hpp @@ -3,6 +3,8 @@ #include "../stdlib/noncopyable.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { class beanstalk; @@ -50,3 +52,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/db_mysql.hpp b/lib_acl_cpp/include/acl_cpp/db/db_mysql.hpp index 6a2f94e8c..774c74f8a 100644 --- a/lib_acl_cpp/include/acl_cpp/db/db_mysql.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/db_mysql.hpp @@ -3,6 +3,8 @@ #include "../stdlib/string.hpp" #include "../db/db_handle.hpp" +#ifndef ACL_CLIENT_ONLY + typedef struct st_mysql MYSQL; namespace acl { @@ -161,3 +163,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/db_pgsql.hpp b/lib_acl_cpp/include/acl_cpp/db/db_pgsql.hpp index a83a67b57..986af9e71 100644 --- a/lib_acl_cpp/include/acl_cpp/db/db_pgsql.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/db_pgsql.hpp @@ -3,6 +3,8 @@ #include "../stdlib/string.hpp" #include "../db/db_handle.hpp" +#ifndef ACL_CLIENT_ONLY + typedef struct pg_conn PGconn; namespace acl { @@ -103,3 +105,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/db_service_mysql.hpp b/lib_acl_cpp/include/acl_cpp/db/db_service_mysql.hpp index 59aab4d3a..4caa8e0ea 100644 --- a/lib_acl_cpp/include/acl_cpp/db/db_service_mysql.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/db_service_mysql.hpp @@ -3,6 +3,8 @@ #include "../stdlib/string.hpp" #include "../db/db_service.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class ACL_CPP_API db_service_mysql : public db_service @@ -54,3 +56,5 @@ private: }; } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/mysql_conf.hpp b/lib_acl_cpp/include/acl_cpp/db/mysql_conf.hpp index 0ea4ed95c..b1c4629ca 100644 --- a/lib_acl_cpp/include/acl_cpp/db/mysql_conf.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/mysql_conf.hpp @@ -1,6 +1,8 @@ #pragma once #include "../acl_cpp_define.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class ACL_CPP_API mysql_conf @@ -149,3 +151,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/mysql_manager.hpp b/lib_acl_cpp/include/acl_cpp/db/mysql_manager.hpp index e9fa24bb9..4af6058ce 100644 --- a/lib_acl_cpp/include/acl_cpp/db/mysql_manager.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/mysql_manager.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "../connpool/connect_manager.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class mysql_conf; @@ -58,3 +60,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/mysql_pool.hpp b/lib_acl_cpp/include/acl_cpp/db/mysql_pool.hpp index c18e89e4e..cda6fa886 100644 --- a/lib_acl_cpp/include/acl_cpp/db/mysql_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/mysql_pool.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../db/db_pool.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class db_handle; @@ -46,3 +48,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/pgsql_conf.hpp b/lib_acl_cpp/include/acl_cpp/db/pgsql_conf.hpp index 9cb7fd0b4..947a41eab 100644 --- a/lib_acl_cpp/include/acl_cpp/db/pgsql_conf.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/pgsql_conf.hpp @@ -1,6 +1,8 @@ #pragma once #include "../acl_cpp_define.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class ACL_CPP_API pgsql_conf @@ -127,3 +129,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/pgsql_manager.hpp b/lib_acl_cpp/include/acl_cpp/db/pgsql_manager.hpp index 32e3fe624..caadbeb5b 100644 --- a/lib_acl_cpp/include/acl_cpp/db/pgsql_manager.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/pgsql_manager.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "../connpool/connect_manager.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class pgsql_conf; @@ -37,3 +39,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/db/pgsql_pool.hpp b/lib_acl_cpp/include/acl_cpp/db/pgsql_pool.hpp index 2594496aa..223cc3717 100644 --- a/lib_acl_cpp/include/acl_cpp/db/pgsql_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/db/pgsql_pool.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../db/db_pool.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class db_handle; @@ -22,3 +24,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/disque/disque.hpp b/lib_acl_cpp/include/acl_cpp/disque/disque.hpp index cfcde0f6c..abebed605 100644 --- a/lib_acl_cpp/include/acl_cpp/disque/disque.hpp +++ b/lib_acl_cpp/include/acl_cpp/disque/disque.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "../redis/redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -252,3 +254,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/disque/disque_cond.hpp b/lib_acl_cpp/include/acl_cpp/disque/disque_cond.hpp index 5fd4866fb..211537766 100644 --- a/lib_acl_cpp/include/acl_cpp/disque/disque_cond.hpp +++ b/lib_acl_cpp/include/acl_cpp/disque/disque_cond.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/noncopyable.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -61,3 +63,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/disque/disque_job.hpp b/lib_acl_cpp/include/acl_cpp/disque/disque_job.hpp index 586c11aa4..3057478ac 100644 --- a/lib_acl_cpp/include/acl_cpp/disque/disque_job.hpp +++ b/lib_acl_cpp/include/acl_cpp/disque/disque_job.hpp @@ -4,6 +4,8 @@ #include "../stdlib/noncopyable.hpp" #include "../stdlib/string.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -127,3 +129,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/disque/disque_node.hpp b/lib_acl_cpp/include/acl_cpp/disque/disque_node.hpp index 56e96cddb..dc2ddc33a 100644 --- a/lib_acl_cpp/include/acl_cpp/disque/disque_node.hpp +++ b/lib_acl_cpp/include/acl_cpp/disque/disque_node.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/string.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -59,3 +61,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hsclient.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hsclient.hpp index 65e68b9be..c1e5fa987 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hsclient.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hsclient.hpp @@ -7,6 +7,8 @@ #include "../stream/socket_stream.hpp" #include "../hsocket/hsproto.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_ARGV; namespace acl { @@ -199,3 +201,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hserror.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hserror.hpp index ee3e3b6c1..626bc6a56 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hserror.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hserror.hpp @@ -1,6 +1,8 @@ #pragma once #include "../acl_cpp_define.hpp" +#ifndef ACL_CLIENT_ONLY + #define HS_ERR_INVALID_REPLY -7 // 服务器返回数据错误 #define HS_ERR_EMPTY -6 // 服务器返回数据为空 #define HS_ERR_PARAMS -5 // 输入参数错误 @@ -22,3 +24,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hspool.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hspool.hpp index 4b4f08a01..6de96dc4c 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hspool.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hspool.hpp @@ -3,6 +3,8 @@ #include "../stdlib/noncopyable.hpp" #include +#ifndef ACL_CLIENT_ONLY + struct ACL_HTABLE; namespace acl { @@ -54,3 +56,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hsproto.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hsproto.hpp index 134530b1e..b6ad9cbdf 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hsproto.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hsproto.hpp @@ -3,6 +3,8 @@ #include "../stdlib/noncopyable.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { class string; @@ -196,3 +198,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hsrow.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hsrow.hpp index 78faa756f..6774b60bf 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hsrow.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hsrow.hpp @@ -3,6 +3,8 @@ #include "../stdlib/noncopyable.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { class string; @@ -43,3 +45,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/hsocket/hstable.hpp b/lib_acl_cpp/include/acl_cpp/hsocket/hstable.hpp index ae4580d57..c3a4f22e0 100644 --- a/lib_acl_cpp/include/acl_cpp/hsocket/hstable.hpp +++ b/lib_acl_cpp/include/acl_cpp/hsocket/hstable.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/noncopyable.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class ACL_CPP_API hstable : public noncopyable @@ -23,3 +25,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/http/HttpServlet.hpp b/lib_acl_cpp/include/acl_cpp/http/HttpServlet.hpp index 0a3b47af8..d20896879 100644 --- a/lib_acl_cpp/include/acl_cpp/http/HttpServlet.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/HttpServlet.hpp @@ -4,6 +4,8 @@ #include "../stdlib/noncopyable.hpp" #include "http_header.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class session; @@ -262,3 +264,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/http/HttpServletRequest.hpp b/lib_acl_cpp/include/acl_cpp/http/HttpServletRequest.hpp index 280193fbc..3a16776fe 100644 --- a/lib_acl_cpp/include/acl_cpp/http/HttpServletRequest.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/HttpServletRequest.hpp @@ -7,6 +7,8 @@ #include "http_ctype.hpp" #include "http_type.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class dbuf_guard; @@ -372,3 +374,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/http/HttpServletResponse.hpp b/lib_acl_cpp/include/acl_cpp/http/HttpServletResponse.hpp index 13d85d9ec..6ab1df72d 100644 --- a/lib_acl_cpp/include/acl_cpp/http/HttpServletResponse.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/HttpServletResponse.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/noncopyable.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class dbuf_guard; @@ -262,3 +264,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/http/HttpSession.hpp b/lib_acl_cpp/include/acl_cpp/http/HttpSession.hpp index 13ecb1e8a..c9e0e1cd1 100644 --- a/lib_acl_cpp/include/acl_cpp/http/HttpSession.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/HttpSession.hpp @@ -4,6 +4,8 @@ #include "../session/session.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { class session; @@ -115,3 +117,5 @@ protected: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/http/WebSocketServlet.hpp b/lib_acl_cpp/include/acl_cpp/http/WebSocketServlet.hpp index b26f9cf52..a8952ff3e 100644 --- a/lib_acl_cpp/include/acl_cpp/http/WebSocketServlet.hpp +++ b/lib_acl_cpp/include/acl_cpp/http/WebSocketServlet.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "HttpServlet.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -146,3 +148,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_aio.hpp b/lib_acl_cpp/include/acl_cpp/master/master_aio.hpp index 5919c2b21..d2099ac95 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_aio.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_aio.hpp @@ -4,6 +4,8 @@ #include "../stream/aio_listen_stream.hpp" #include "master_base.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_VSTREAM; struct ACL_VSTRING; @@ -103,3 +105,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_base.hpp b/lib_acl_cpp/include/acl_cpp/master/master_base.hpp index f0a435bb8..c639c6614 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_base.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_base.hpp @@ -4,6 +4,8 @@ #include "master_conf.hpp" #include +#ifndef ACL_CLIENT_ONLY + struct ACL_EVENT; namespace acl @@ -120,3 +122,6 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY + diff --git a/lib_acl_cpp/include/acl_cpp/master/master_conf.hpp b/lib_acl_cpp/include/acl_cpp/master/master_conf.hpp index 82086ee22..32d454a06 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_conf.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_conf.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/noncopyable.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_XINETD_CFG_PARSER; struct ACL_CFG_INT_TABLE; struct ACL_CFG_INT64_TABLE; @@ -128,3 +130,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_proc.hpp b/lib_acl_cpp/include/acl_cpp/master/master_proc.hpp index 21e40a098..ae387e71d 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_proc.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_proc.hpp @@ -1,6 +1,8 @@ #pragma once #include "master_base.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_VSTREAM; struct ACL_EVENT; struct ACL_VSTRING; @@ -81,3 +83,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_threads.hpp b/lib_acl_cpp/include/acl_cpp/master/master_threads.hpp index 3c88d08e7..88fa4b10a 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_threads.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_threads.hpp @@ -2,6 +2,8 @@ #include "master_base.hpp" #include "../stdlib/thread_mutex.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_VSTREAM; struct ACL_EVENT; struct ACL_VSTRING; @@ -223,3 +225,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_trigger.hpp b/lib_acl_cpp/include/acl_cpp/master/master_trigger.hpp index f086e3ba8..985920ec4 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_trigger.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_trigger.hpp @@ -1,6 +1,8 @@ #pragma once #include "master_base.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_VSTRING; namespace acl { @@ -61,3 +63,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/master/master_udp.hpp b/lib_acl_cpp/include/acl_cpp/master/master_udp.hpp index 21901abdd..fb13f3732 100644 --- a/lib_acl_cpp/include/acl_cpp/master/master_udp.hpp +++ b/lib_acl_cpp/include/acl_cpp/master/master_udp.hpp @@ -3,6 +3,8 @@ #include "master_base.hpp" #include "../stdlib/thread_mutex.hpp" +#ifndef ACL_CLIENT_ONLY + struct ACL_VSTRING; namespace acl { @@ -109,3 +111,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/memcache/memcache.hpp b/lib_acl_cpp/include/acl_cpp/memcache/memcache.hpp index 8cd11304a..f82d5550d 100644 --- a/lib_acl_cpp/include/acl_cpp/memcache/memcache.hpp +++ b/lib_acl_cpp/include/acl_cpp/memcache/memcache.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "../mime/rfc2047.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class socket_stream; @@ -250,3 +252,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/memcache/memcache_manager.hpp b/lib_acl_cpp/include/acl_cpp/memcache/memcache_manager.hpp index 0e3dff68f..a525e1b0b 100644 --- a/lib_acl_cpp/include/acl_cpp/memcache/memcache_manager.hpp +++ b/lib_acl_cpp/include/acl_cpp/memcache/memcache_manager.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../connpool/connect_manager.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -25,3 +27,5 @@ protected: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/memcache/memcache_pool.hpp b/lib_acl_cpp/include/acl_cpp/memcache/memcache_pool.hpp index c9fa8b54e..677768396 100644 --- a/lib_acl_cpp/include/acl_cpp/memcache/memcache_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/memcache/memcache_pool.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../connpool/connect_pool.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -31,3 +33,5 @@ protected: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis.hpp index ddd480376..1d05e17b4 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis.hpp @@ -16,6 +16,8 @@ #include "redis_geo.hpp" #include "redis_stream.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -68,3 +70,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_client.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_client.hpp index 89ab53c47..0e9c6d01b 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_client.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_client.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "../connpool/connect_client.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -185,3 +187,5 @@ private: }; } // end namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_client_cluster.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_client_cluster.hpp index 698731a58..63370f574 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_client_cluster.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_client_cluster.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "../connpool/connect_manager.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -190,3 +192,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_client_pool.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_client_pool.hpp index cbf158a5e..0ff1ab37d 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_client_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_client_pool.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../connpool/connect_pool.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -70,3 +72,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_cluster.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_cluster.hpp index d31289e68..207a92c1d 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_cluster.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_cluster.hpp @@ -6,6 +6,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -312,3 +314,6 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY + diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_command.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_command.hpp index 9c0998e02..c6b7f0f81 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_command.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_command.hpp @@ -6,6 +6,8 @@ #include #include "redis_result.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -440,3 +442,5 @@ protected: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_connection.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_connection.hpp index 5d0d6ba5e..025baef45 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_connection.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_connection.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -81,3 +83,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_geo.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_geo.hpp index b84dd28bf..c0026f449 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_geo.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_geo.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -328,3 +330,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_hash.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_hash.hpp index f762f1964..d067ed553 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_hash.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_hash.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -359,3 +361,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_hyperloglog.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_hyperloglog.hpp index 1e37f4240..495354ca8 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_hyperloglog.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_hyperloglog.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -84,3 +86,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_key.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_key.hpp index a5f53e47d..5a87a0d43 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_key.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_key.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class redis_client; @@ -404,3 +406,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_list.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_list.hpp index d25f6c4d0..1dacd1bfe 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_list.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_list.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -439,3 +441,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_master.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_master.hpp index 8a7169af8..98be5f7e4 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_master.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_master.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/string.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -34,3 +36,5 @@ public: }; } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_node.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_node.hpp index acc965afe..40122f39f 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_node.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_node.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "../stdlib/noncopyable.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -262,3 +264,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_pubsub.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_pubsub.hpp index 9961cc1da..c54f75fb1 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_pubsub.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_pubsub.hpp @@ -4,6 +4,8 @@ #include #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -202,3 +204,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_result.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_result.hpp index b004b5a34..c7af6273f 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_result.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_result.hpp @@ -3,6 +3,8 @@ #include "../stdlib/noncopyable.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -222,3 +224,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_role.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_role.hpp index 1bf6ddc97..54057fcb8 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_role.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_role.hpp @@ -5,6 +5,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -116,3 +118,5 @@ private: }; } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_script.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_script.hpp index b87c15eb4..c1633d2f3 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_script.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_script.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -161,3 +163,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_sentinel.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_sentinel.hpp index cec155239..9b9d809ee 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_sentinel.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_sentinel.hpp @@ -5,6 +5,8 @@ #include "redis_master.hpp" #include "redis_slave.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -36,3 +38,5 @@ public: }; } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_server.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_server.hpp index 1560f3e64..61bda3012 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_server.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_server.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -212,3 +214,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_set.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_set.hpp index 8c92a2444..81060cd50 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_set.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_set.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -354,3 +356,5 @@ public: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_slave.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_slave.hpp index 27ce71475..e2fb1c410 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_slave.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_slave.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "../stdlib/string.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -34,3 +36,5 @@ public: }; } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_slot.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_slot.hpp index e3358ba34..3f18bd802 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_slot.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_slot.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -95,3 +97,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_stream.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_stream.hpp index 390626493..095be21b4 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_stream.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_stream.hpp @@ -3,6 +3,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -543,3 +545,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_string.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_string.hpp index 20a293969..4b553043e 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_string.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_string.hpp @@ -4,6 +4,8 @@ #include #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -528,3 +530,6 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY + diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_transaction.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_transaction.hpp index cdbe92c47..7dfe59729 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_transaction.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_transaction.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -146,3 +148,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp b/lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp index b589aa91a..54d606c11 100644 --- a/lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp +++ b/lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp @@ -5,6 +5,8 @@ #include #include "redis_command.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -553,3 +555,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/serialize/gsoner.hpp b/lib_acl_cpp/include/acl_cpp/serialize/gsoner.hpp index 039ad86e1..16c7941cf 100644 --- a/lib_acl_cpp/include/acl_cpp/serialize/gsoner.hpp +++ b/lib_acl_cpp/include/acl_cpp/serialize/gsoner.hpp @@ -16,6 +16,8 @@ #include #include +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -162,3 +164,5 @@ private: }; }//end of acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/session/memcache_session.hpp b/lib_acl_cpp/include/acl_cpp/session/memcache_session.hpp index ec50a8cdd..63b2c745f 100644 --- a/lib_acl_cpp/include/acl_cpp/session/memcache_session.hpp +++ b/lib_acl_cpp/include/acl_cpp/session/memcache_session.hpp @@ -2,6 +2,8 @@ #include "../acl_cpp_define.hpp" #include "session.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { class memcache; @@ -62,3 +64,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/session/redis_session.hpp b/lib_acl_cpp/include/acl_cpp/session/redis_session.hpp index 13116742b..5c0793e75 100644 --- a/lib_acl_cpp/include/acl_cpp/session/redis_session.hpp +++ b/lib_acl_cpp/include/acl_cpp/session/redis_session.hpp @@ -4,6 +4,8 @@ #include "../stdlib/string.hpp" #include "session.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -54,3 +56,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/include/acl_cpp/session/session.hpp b/lib_acl_cpp/include/acl_cpp/session/session.hpp index ed289e9c0..ad35c8f37 100644 --- a/lib_acl_cpp/include/acl_cpp/session/session.hpp +++ b/lib_acl_cpp/include/acl_cpp/session/session.hpp @@ -4,6 +4,8 @@ #include "../stdlib/dbuf_pool.hpp" #include "../stdlib/string.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { // 用来存储属性值的缓冲区对象定义,这主要是为了兼容属性值 @@ -219,3 +221,5 @@ protected: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/beanstalk/beanstalk.cpp b/lib_acl_cpp/src/beanstalk/beanstalk.cpp index b91bb9e8e..7b509131c 100644 --- a/lib_acl_cpp/src/beanstalk/beanstalk.cpp +++ b/lib_acl_cpp/src/beanstalk/beanstalk.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/beanstalk/beanstalk.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -857,3 +859,5 @@ void beanstalk::quit() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/beanstalk/beanstalk_pool.cpp b/lib_acl_cpp/src/beanstalk/beanstalk_pool.cpp index c93779eed..8c3de4a1a 100644 --- a/lib_acl_cpp/src/beanstalk/beanstalk_pool.cpp +++ b/lib_acl_cpp/src/beanstalk/beanstalk_pool.cpp @@ -5,6 +5,8 @@ #include "acl_cpp/beanstalk/beanstalk_pool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { beanstalk_pool::beanstalk_pool() @@ -64,3 +66,5 @@ void beanstalk_pool::put(beanstalk* client, bool clean_watch /* = true */, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/db_mysql.cpp b/lib_acl_cpp/src/db/db_mysql.cpp index 8f8aab85b..35a5780ac 100644 --- a/lib_acl_cpp/src/db/db_mysql.cpp +++ b/lib_acl_cpp/src/db/db_mysql.cpp @@ -10,6 +10,8 @@ #include "acl_cpp/db/db_mysql.hpp" #endif +#ifndef ACL_CLIENT_ONLY + ////////////////////////////////////////////////////////////////////////// #if defined(HAS_MYSQL) || defined(HAS_MYSQL_DLL) @@ -940,3 +942,5 @@ const char* db_mysql::get_error(void) const } // namespace acl #endif // !HAS_MYSQL && !HAS_MYSQL_DLL + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/db_pgsql.cpp b/lib_acl_cpp/src/db/db_pgsql.cpp index ec7189d92..1f7ad8460 100644 --- a/lib_acl_cpp/src/db/db_pgsql.cpp +++ b/lib_acl_cpp/src/db/db_pgsql.cpp @@ -9,6 +9,8 @@ #include "acl_cpp/db/db_pgsql.hpp" #endif +#ifndef ACL_CLIENT_ONLY + ////////////////////////////////////////////////////////////////////////// #if defined(HAS_PGSQL) || defined(HAS_PGSQL_DLL) @@ -676,3 +678,5 @@ const char* db_pgsql::get_error() const } // namespace acl #endif // !HAS_MYSQL && !HAS_MYSQL_DLL + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/db_service_mysql.cpp b/lib_acl_cpp/src/db/db_service_mysql.cpp index 430221ffe..e4a1988c1 100644 --- a/lib_acl_cpp/src/db/db_service_mysql.cpp +++ b/lib_acl_cpp/src/db/db_service_mysql.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/db/db_service_mysql.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -38,3 +40,5 @@ db_handle* db_service_mysql::db_create(void) } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/mysql_conf.cpp b/lib_acl_cpp/src/db/mysql_conf.cpp index 7ee3d44d5..b15e65ff6 100644 --- a/lib_acl_cpp/src/db/mysql_conf.cpp +++ b/lib_acl_cpp/src/db/mysql_conf.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/db/mysql_conf.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { mysql_conf::mysql_conf(const char* dbaddr, const char* dbname) @@ -135,3 +137,5 @@ mysql_conf& mysql_conf::set_rw_timeout(int timeout) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/mysql_manager.cpp b/lib_acl_cpp/src/db/mysql_manager.cpp index d5873c9d5..f9c67ac2f 100644 --- a/lib_acl_cpp/src/db/mysql_manager.cpp +++ b/lib_acl_cpp/src/db/mysql_manager.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/db/mysql_manager.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { mysql_manager::mysql_manager(time_t idle_ttl /* = 120 */) @@ -102,3 +104,5 @@ connect_pool* mysql_manager::create_pool(const char* key, size_t, size_t) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/mysql_pool.cpp b/lib_acl_cpp/src/db/mysql_pool.cpp index c7336bf0d..22278c943 100644 --- a/lib_acl_cpp/src/db/mysql_pool.cpp +++ b/lib_acl_cpp/src/db/mysql_pool.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/db/mysql_pool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -52,3 +54,5 @@ connect_client* mysql_pool::create_connect() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/pgsql_conf.cpp b/lib_acl_cpp/src/db/pgsql_conf.cpp index 469a12876..e3ea939eb 100644 --- a/lib_acl_cpp/src/db/pgsql_conf.cpp +++ b/lib_acl_cpp/src/db/pgsql_conf.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/db/pgsql_conf.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { pgsql_conf::pgsql_conf(const char* dbaddr, const char* dbname) @@ -123,3 +125,5 @@ pgsql_conf& pgsql_conf::set_rw_timeout(int timeout) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/pgsql_manager.cpp b/lib_acl_cpp/src/db/pgsql_manager.cpp index c64ab8d36..3629a61d3 100644 --- a/lib_acl_cpp/src/db/pgsql_manager.cpp +++ b/lib_acl_cpp/src/db/pgsql_manager.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/db/pgsql_manager.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { pgsql_manager::pgsql_manager(time_t idle_ttl /* = 120 */) @@ -57,3 +59,5 @@ connect_pool* pgsql_manager::create_pool(const char* key, size_t, size_t) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/db/pgsql_pool.cpp b/lib_acl_cpp/src/db/pgsql_pool.cpp index ac9ec09a9..37cedc5ff 100644 --- a/lib_acl_cpp/src/db/pgsql_pool.cpp +++ b/lib_acl_cpp/src/db/pgsql_pool.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/db/pgsql_pool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -27,3 +29,5 @@ connect_client* pgsql_pool::create_connect() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/disque/disque.cpp b/lib_acl_cpp/src/disque/disque.cpp index ff1bb1bda..5b12a1184 100644 --- a/lib_acl_cpp/src/disque/disque.cpp +++ b/lib_acl_cpp/src/disque/disque.cpp @@ -9,6 +9,8 @@ #include "acl_cpp/disque/disque.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -531,3 +533,5 @@ void disque::free_nodes() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/disque/disque_cond.cpp b/lib_acl_cpp/src/disque/disque_cond.cpp index 0450b03c0..14d6bc87c 100644 --- a/lib_acl_cpp/src/disque/disque_cond.cpp +++ b/lib_acl_cpp/src/disque/disque_cond.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/disque/disque_cond.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -59,3 +61,5 @@ disque_cond& disque_cond::set_async(bool on) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/disque/disque_job.cpp b/lib_acl_cpp/src/disque/disque_job.cpp index d08627934..331eb631b 100644 --- a/lib_acl_cpp/src/disque/disque_job.cpp +++ b/lib_acl_cpp/src/disque/disque_job.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/disque/disque_job.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -127,3 +129,5 @@ void disque_job::set_body(const char* job, size_t len) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hsclient.cpp b/lib_acl_cpp/src/hsocket/hsclient.cpp index 2a6142786..55fbaf453 100644 --- a/lib_acl_cpp/src/hsocket/hsclient.cpp +++ b/lib_acl_cpp/src/hsocket/hsclient.cpp @@ -12,6 +12,8 @@ #include "acl_cpp/hsocket/hsclient.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -509,3 +511,5 @@ void hsclient::debug_enable(bool on) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hserror.cpp b/lib_acl_cpp/src/hsocket/hserror.cpp index 8316b9855..742e3543b 100644 --- a/lib_acl_cpp/src/hsocket/hserror.cpp +++ b/lib_acl_cpp/src/hsocket/hserror.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/hsocket/hserror.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -45,3 +47,5 @@ const char* hserror::get_serror(int errnum) } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hspool.cpp b/lib_acl_cpp/src/hsocket/hspool.cpp index e422f1136..ec3131ddd 100644 --- a/lib_acl_cpp/src/hsocket/hspool.cpp +++ b/lib_acl_cpp/src/hsocket/hspool.cpp @@ -5,6 +5,8 @@ #include "acl_cpp/hsocket/hspool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -112,3 +114,5 @@ void hspool::put(hsclient* client) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hsproto.cpp b/lib_acl_cpp/src/hsocket/hsproto.cpp index 1b5081663..23c1b529e 100644 --- a/lib_acl_cpp/src/hsocket/hsproto.cpp +++ b/lib_acl_cpp/src/hsocket/hsproto.cpp @@ -11,6 +11,8 @@ #include "acl_cpp/hsocket/hsproto.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -378,3 +380,5 @@ void hsproto::clear_cache() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hsrow.cpp b/lib_acl_cpp/src/hsocket/hsrow.cpp index de549ab9e..5d4ebae82 100644 --- a/lib_acl_cpp/src/hsocket/hsrow.cpp +++ b/lib_acl_cpp/src/hsocket/hsrow.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/hsocket/hsrow.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -63,3 +65,5 @@ const std::vector& hsrow::get_row() const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/hsocket/hstable.cpp b/lib_acl_cpp/src/hsocket/hstable.cpp index 4ed9b457f..4f099b91d 100644 --- a/lib_acl_cpp/src/hsocket/hstable.cpp +++ b/lib_acl_cpp/src/hsocket/hstable.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/hsocket/hstable.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -31,3 +33,5 @@ hstable::~hstable() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/http/HttpCookie.cpp b/lib_acl_cpp/src/http/HttpCookie.cpp index 86760086b..24a0eec51 100644 --- a/lib_acl_cpp/src/http/HttpCookie.cpp +++ b/lib_acl_cpp/src/http/HttpCookie.cpp @@ -285,3 +285,4 @@ const std::list& HttpCookie::getParams(void) const } } // namespace acl end + diff --git a/lib_acl_cpp/src/http/HttpServlet.cpp b/lib_acl_cpp/src/http/HttpServlet.cpp index 66a312d0e..ebd65b5a8 100644 --- a/lib_acl_cpp/src/http/HttpServlet.cpp +++ b/lib_acl_cpp/src/http/HttpServlet.cpp @@ -11,6 +11,8 @@ #include "acl_cpp/http/HttpServlet.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -269,3 +271,5 @@ bool HttpServlet::doRun(const char* memcached_addr, socket_stream* stream) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/http/HttpServletRequest.cpp b/lib_acl_cpp/src/http/HttpServletRequest.cpp index 26c1f8381..d4a7f78ab 100644 --- a/lib_acl_cpp/src/http/HttpServletRequest.cpp +++ b/lib_acl_cpp/src/http/HttpServletRequest.cpp @@ -20,6 +20,8 @@ #include "acl_cpp/http/HttpServletRequest.hpp" #endif +#ifndef ACL_CLIENT_ONLY + #define SKIP_SPACE(x) { while (*x == ' ' || *x == '\t') x++; } namespace acl @@ -855,3 +857,5 @@ void HttpServletRequest::sprint_header(string& out, const char* prompt) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/http/HttpServletResponse.cpp b/lib_acl_cpp/src/http/HttpServletResponse.cpp index 3338bd395..6fc7180a6 100644 --- a/lib_acl_cpp/src/http/HttpServletResponse.cpp +++ b/lib_acl_cpp/src/http/HttpServletResponse.cpp @@ -11,6 +11,8 @@ #include "acl_cpp/http/HttpServletResponse.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -241,3 +243,5 @@ void HttpServletResponse::setHttpServletRequest(HttpServletRequest* request) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/http/HttpSession.cpp b/lib_acl_cpp/src/http/HttpSession.cpp index e348f629e..45d58ab1f 100644 --- a/lib_acl_cpp/src/http/HttpSession.cpp +++ b/lib_acl_cpp/src/http/HttpSession.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/http/HttpSession.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -79,3 +81,5 @@ bool HttpSession::invalidate() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/http/WebSocketServlet.cpp b/lib_acl_cpp/src/http/WebSocketServlet.cpp index f9c6c54a3..2368be30d 100644 --- a/lib_acl_cpp/src/http/WebSocketServlet.cpp +++ b/lib_acl_cpp/src/http/WebSocketServlet.cpp @@ -19,6 +19,8 @@ #include "acl_cpp/http/WebSocketServlet.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -170,3 +172,5 @@ bool WebSocketServlet::doWebSocket(HttpServletRequest&, HttpServletResponse&) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_aio.cpp b/lib_acl_cpp/src/master/master_aio.cpp index cb6037abb..1f15e64ce 100644 --- a/lib_acl_cpp/src/master/master_aio.cpp +++ b/lib_acl_cpp/src/master/master_aio.cpp @@ -9,6 +9,8 @@ #include "acl_cpp/master/master_aio.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -256,3 +258,5 @@ int master_aio::service_on_sighup(void* ctx, ACL_VSTRING* buf) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_base.cpp b/lib_acl_cpp/src/master/master_base.cpp index 2e3dddf7e..1afc53e02 100644 --- a/lib_acl_cpp/src/master/master_base.cpp +++ b/lib_acl_cpp/src/master/master_base.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/master/master_base.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -116,3 +118,5 @@ void master_base::proc_del_timer(event_timer* timer) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_conf.cpp b/lib_acl_cpp/src/master/master_conf.cpp index 690fb82c5..239b95f9a 100644 --- a/lib_acl_cpp/src/master/master_conf.cpp +++ b/lib_acl_cpp/src/master/master_conf.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/master/master_conf.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -235,3 +237,5 @@ ACL_CFG_BOOL_TABLE* master_conf::get_bool_cfg() const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_proc.cpp b/lib_acl_cpp/src/master/master_proc.cpp index 59aa7a625..970704c4a 100644 --- a/lib_acl_cpp/src/master/master_proc.cpp +++ b/lib_acl_cpp/src/master/master_proc.cpp @@ -8,6 +8,8 @@ #include "acl_cpp/master/master_proc.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -218,3 +220,5 @@ int master_proc::service_on_sighup(void* ctx, ACL_VSTRING* buf) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_threads.cpp b/lib_acl_cpp/src/master/master_threads.cpp index 6a1f6cd60..05f19be28 100644 --- a/lib_acl_cpp/src/master/master_threads.cpp +++ b/lib_acl_cpp/src/master/master_threads.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/master/master_threads.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -349,3 +351,5 @@ int master_threads::service_on_sighup(void* ctx, ACL_VSTRING* buf) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_trigger.cpp b/lib_acl_cpp/src/master/master_trigger.cpp index a3cf88d70..961bb1ea0 100644 --- a/lib_acl_cpp/src/master/master_trigger.cpp +++ b/lib_acl_cpp/src/master/master_trigger.cpp @@ -5,6 +5,8 @@ #include "acl_cpp/master/master_trigger.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -141,3 +143,5 @@ int master_trigger::service_on_sighup(void* ctx, ACL_VSTRING* buf) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/master/master_udp.cpp b/lib_acl_cpp/src/master/master_udp.cpp index 99b747ecd..f4ed61bbf 100644 --- a/lib_acl_cpp/src/master/master_udp.cpp +++ b/lib_acl_cpp/src/master/master_udp.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/master/master_udp.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -237,3 +239,5 @@ int master_udp::service_on_sighup(void* ctx, ACL_VSTRING* buf) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/memcache/memcache.cpp b/lib_acl_cpp/src/memcache/memcache.cpp index 432e10cf9..4bda0b11d 100644 --- a/lib_acl_cpp/src/memcache/memcache.cpp +++ b/lib_acl_cpp/src/memcache/memcache.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/stream/socket_stream.hpp" #endif +#ifndef ACL_CLIENT_ONLY + #define SPECIAL_CHAR(x) ((x) == ' ' || (x) == '\t' || (x) == '\r' || (x) == '\n') namespace acl @@ -605,3 +607,5 @@ void memcache::property_list() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/memcache/memcache_manager.cpp b/lib_acl_cpp/src/memcache/memcache_manager.cpp index baa253866..2a8c7cccb 100644 --- a/lib_acl_cpp/src/memcache/memcache_manager.cpp +++ b/lib_acl_cpp/src/memcache/memcache_manager.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/memcache/memcache_manager.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -24,3 +26,5 @@ connect_pool* memcache_manager::create_pool(const char* addr, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/memcache/memcache_pool.cpp b/lib_acl_cpp/src/memcache/memcache_pool.cpp index 1d34cb9c3..1949e4916 100644 --- a/lib_acl_cpp/src/memcache/memcache_pool.cpp +++ b/lib_acl_cpp/src/memcache/memcache_pool.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/memcache/memcache_pool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -24,3 +26,5 @@ connect_client* memcache_pool::create_connect() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis.cpp b/lib_acl_cpp/src/redis/redis.cpp index 0fd18e51f..ad6f91b8e 100644 --- a/lib_acl_cpp/src/redis/redis.cpp +++ b/lib_acl_cpp/src/redis/redis.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/redis/redis.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -43,3 +45,5 @@ redis::redis(redis_client_cluster* cluster, size_t max_conns /* = 0 */) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_client.cpp b/lib_acl_cpp/src/redis/redis_client.cpp index ba404c97a..17c1b3937 100644 --- a/lib_acl_cpp/src/redis/redis_client.cpp +++ b/lib_acl_cpp/src/redis/redis_client.cpp @@ -11,6 +11,8 @@ #endif #include "redis_request.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -514,3 +516,5 @@ const redis_result* redis_client::run(dbuf_pool* pool, const redis_request& req, } } // end namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_client_cluster.cpp b/lib_acl_cpp/src/redis/redis_client_cluster.cpp index a9efd6fad..170b60712 100644 --- a/lib_acl_cpp/src/redis/redis_client_cluster.cpp +++ b/lib_acl_cpp/src/redis/redis_client_cluster.cpp @@ -9,6 +9,8 @@ #include "acl_cpp/redis/redis_client_cluster.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -220,3 +222,5 @@ const char* redis_client_cluster::get_password(const char* addr) const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_client_pool.cpp b/lib_acl_cpp/src/redis/redis_client_pool.cpp index 096bef85e..89ff5fd43 100644 --- a/lib_acl_cpp/src/redis/redis_client_pool.cpp +++ b/lib_acl_cpp/src/redis/redis_client_pool.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/redis/redis_client_pool.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -51,3 +53,5 @@ connect_client* redis_client_pool::create_connect(void) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_cluster.cpp b/lib_acl_cpp/src/redis/redis_cluster.cpp index d1d72a13e..105849a0c 100644 --- a/lib_acl_cpp/src/redis/redis_cluster.cpp +++ b/lib_acl_cpp/src/redis/redis_cluster.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_cluster.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -827,3 +829,5 @@ void redis_cluster::free_masters() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_command.cpp b/lib_acl_cpp/src/redis/redis_command.cpp index 22acc88b8..a194f7f1e 100644 --- a/lib_acl_cpp/src/redis/redis_command.cpp +++ b/lib_acl_cpp/src/redis/redis_command.cpp @@ -11,6 +11,8 @@ #endif #include "redis_request.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -1813,3 +1815,5 @@ const redis_result* redis_command::request(const std::vector& args, ///////////////////////////////////////////////////////////////////////////// } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_connection.cpp b/lib_acl_cpp/src/redis/redis_connection.cpp index aa2f9c4b7..e510223cf 100644 --- a/lib_acl_cpp/src/redis/redis_connection.cpp +++ b/lib_acl_cpp/src/redis/redis_connection.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_connection.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -102,3 +104,5 @@ bool redis_connection::quit() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_geo.cpp b/lib_acl_cpp/src/redis/redis_geo.cpp index fb2c628f0..3e2a0f4b9 100644 --- a/lib_acl_cpp/src/redis/redis_geo.cpp +++ b/lib_acl_cpp/src/redis/redis_geo.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_geo.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -614,3 +616,5 @@ const char* redis_geo::get_unit(int unit) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_hash.cpp b/lib_acl_cpp/src/redis/redis_hash.cpp index 68816c6c8..e8c7c72c1 100644 --- a/lib_acl_cpp/src/redis/redis_hash.cpp +++ b/lib_acl_cpp/src/redis/redis_hash.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_hash.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -441,3 +443,5 @@ int redis_hash::hscan(const char* key, int cursor, std::map& out } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_hyperloglog.cpp b/lib_acl_cpp/src/redis/redis_hyperloglog.cpp index 6e7bdd8c2..a8661dacc 100644 --- a/lib_acl_cpp/src/redis/redis_hyperloglog.cpp +++ b/lib_acl_cpp/src/redis/redis_hyperloglog.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/redis/redis_hyperloglog.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -112,3 +114,5 @@ bool redis_hyperloglog::pfmerge(const char* dst, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_key.cpp b/lib_acl_cpp/src/redis/redis_key.cpp index fc1854e2c..14d79565a 100644 --- a/lib_acl_cpp/src/redis/redis_key.cpp +++ b/lib_acl_cpp/src/redis/redis_key.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_key.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -604,3 +606,5 @@ int redis_key::scan(int cursor, std::vector& out, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_list.cpp b/lib_acl_cpp/src/redis/redis_list.cpp index 82e5f7db0..81ebb47e5 100644 --- a/lib_acl_cpp/src/redis/redis_list.cpp +++ b/lib_acl_cpp/src/redis/redis_list.cpp @@ -8,6 +8,8 @@ #include "acl_cpp/redis/redis_list.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -564,3 +566,5 @@ bool redis_list::ltrim(const char* key, int start, int end) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_master.cpp b/lib_acl_cpp/src/redis/redis_master.cpp index a36434cb2..b68045446 100644 --- a/lib_acl_cpp/src/redis/redis_master.cpp +++ b/lib_acl_cpp/src/redis/redis_master.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/redis/redis_master.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -26,3 +28,5 @@ redis_master::redis_master(void) } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_node.cpp b/lib_acl_cpp/src/redis/redis_node.cpp index 3f0cbb417..1922649ca 100644 --- a/lib_acl_cpp/src/redis/redis_node.cpp +++ b/lib_acl_cpp/src/redis/redis_node.cpp @@ -4,6 +4,8 @@ #include "acl_cpp/redis/redis_node.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -150,3 +152,5 @@ const std::vector >& redis_node::get_slots() const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_pubsub.cpp b/lib_acl_cpp/src/redis/redis_pubsub.cpp index 5c5c683d6..8b216de06 100644 --- a/lib_acl_cpp/src/redis/redis_pubsub.cpp +++ b/lib_acl_cpp/src/redis/redis_pubsub.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_pubsub.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -497,3 +499,5 @@ int redis_pubsub::pubsub_numpat() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_request.cpp b/lib_acl_cpp/src/redis/redis_request.cpp index 86145d6e3..12ab7ee99 100644 --- a/lib_acl_cpp/src/redis/redis_request.cpp +++ b/lib_acl_cpp/src/redis/redis_request.cpp @@ -1,6 +1,8 @@ #include "acl_stdafx.hpp" #include "redis_request.hpp" +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -49,3 +51,5 @@ void redis_request::put(const char* data, size_t dlen) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_request.hpp b/lib_acl_cpp/src/redis/redis_request.hpp index df052a6f1..f2bba38d6 100644 --- a/lib_acl_cpp/src/redis/redis_request.hpp +++ b/lib_acl_cpp/src/redis/redis_request.hpp @@ -1,6 +1,8 @@ #pragma once #include "acl_cpp/acl_cpp_define.hpp" +#ifndef ACL_CLIENT_ONLY + struct iovec; namespace acl @@ -33,3 +35,5 @@ private: }; } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_result.cpp b/lib_acl_cpp/src/redis/redis_result.cpp index 69fc075fa..d9c47c548 100644 --- a/lib_acl_cpp/src/redis/redis_result.cpp +++ b/lib_acl_cpp/src/redis/redis_result.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_result.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -298,3 +300,5 @@ const string& redis_result::to_string(string& out) const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_role.cpp b/lib_acl_cpp/src/redis/redis_role.cpp index 5da2d36ec..105e7da57 100644 --- a/lib_acl_cpp/src/redis/redis_role.cpp +++ b/lib_acl_cpp/src/redis/redis_role.cpp @@ -8,6 +8,8 @@ #include "acl_cpp/redis/redis_role.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -168,3 +170,5 @@ bool redis_role::role_slave(const redis_result** a, size_t n) } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_script.cpp b/lib_acl_cpp/src/redis/redis_script.cpp index b4c4a0ce8..e3a65a73a 100644 --- a/lib_acl_cpp/src/redis/redis_script.cpp +++ b/lib_acl_cpp/src/redis/redis_script.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_script.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -531,3 +533,5 @@ bool redis_script::script_kill() } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_sentinel.cpp b/lib_acl_cpp/src/redis/redis_sentinel.cpp index 229f5cc92..59774c919 100644 --- a/lib_acl_cpp/src/redis/redis_sentinel.cpp +++ b/lib_acl_cpp/src/redis/redis_sentinel.cpp @@ -9,6 +9,8 @@ #include "acl_cpp/redis/redis_sentinel.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -452,3 +454,5 @@ bool redis_sentinel::sentinel_set(const char* master_name, const char* name, } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_server.cpp b/lib_acl_cpp/src/redis/redis_server.cpp index 59ff27a0c..1205caa49 100644 --- a/lib_acl_cpp/src/redis/redis_server.cpp +++ b/lib_acl_cpp/src/redis/redis_server.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_server.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -436,3 +438,5 @@ bool redis_server::get_time(time_t& stamp, int& escape) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_set.cpp b/lib_acl_cpp/src/redis/redis_set.cpp index e007856b4..06c51da68 100644 --- a/lib_acl_cpp/src/redis/redis_set.cpp +++ b/lib_acl_cpp/src/redis/redis_set.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_set.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -445,3 +447,5 @@ int redis_set::sscan(const char* key, int cursor, std::vector& out, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_slave.cpp b/lib_acl_cpp/src/redis/redis_slave.cpp index f301e7f5a..f723c1636 100644 --- a/lib_acl_cpp/src/redis/redis_slave.cpp +++ b/lib_acl_cpp/src/redis/redis_slave.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/redis/redis_slave.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -24,3 +26,5 @@ redis_slave::redis_slave(void) } } + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_slot.cpp b/lib_acl_cpp/src/redis/redis_slot.cpp index 041cdc4ca..ba113395d 100644 --- a/lib_acl_cpp/src/redis/redis_slot.cpp +++ b/lib_acl_cpp/src/redis/redis_slot.cpp @@ -3,6 +3,8 @@ #include "acl_cpp/redis/redis_slot.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -42,3 +44,5 @@ redis_slot& redis_slot::add_slave(redis_slot* node) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_stream.cpp b/lib_acl_cpp/src/redis/redis_stream.cpp index a7b5da891..e03cd3962 100644 --- a/lib_acl_cpp/src/redis/redis_stream.cpp +++ b/lib_acl_cpp/src/redis/redis_stream.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_stream.hpp" #endif +#ifndef ACL_CLIENT_ONLY + #define INT_LEN 11 #define LONG_LEN 21 @@ -1694,3 +1696,5 @@ bool redis_stream::xinfo_stream(const char* key, redis_stream_info& info) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_string.cpp b/lib_acl_cpp/src/redis/redis_string.cpp index 8c23d839a..354fe8c18 100644 --- a/lib_acl_cpp/src/redis/redis_string.cpp +++ b/lib_acl_cpp/src/redis/redis_string.cpp @@ -8,6 +8,8 @@ #include "acl_cpp/redis/redis_string.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -795,3 +797,5 @@ bool redis_string::incoper(const char* cmd, const char* key, long long int* n, } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_transaction.cpp b/lib_acl_cpp/src/redis/redis_transaction.cpp index b569d8f7d..1c2be826d 100644 --- a/lib_acl_cpp/src/redis/redis_transaction.cpp +++ b/lib_acl_cpp/src/redis/redis_transaction.cpp @@ -6,6 +6,8 @@ #include "acl_cpp/redis/redis_transaction.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -126,3 +128,5 @@ const redis_result* redis_transaction::get_child(size_t i, string* cmd) const } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/redis/redis_zset.cpp b/lib_acl_cpp/src/redis/redis_zset.cpp index 7333ef091..8f3f8b507 100644 --- a/lib_acl_cpp/src/redis/redis_zset.cpp +++ b/lib_acl_cpp/src/redis/redis_zset.cpp @@ -7,6 +7,8 @@ #include "acl_cpp/redis/redis_zset.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -1210,3 +1212,5 @@ int redis_zset::bzpop_result(string& member, double* score) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/serialize/gsoner.cpp b/lib_acl_cpp/src/serialize/gsoner.cpp index 3d218fc28..1db186e3d 100644 --- a/lib_acl_cpp/src/serialize/gsoner.cpp +++ b/lib_acl_cpp/src/serialize/gsoner.cpp @@ -21,6 +21,8 @@ #include #include +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -1702,3 +1704,4 @@ bool gsoner::check_pragma() } // namespace acl +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/session/memcache_session.cpp b/lib_acl_cpp/src/session/memcache_session.cpp index 563e9f1d8..573c9b510 100644 --- a/lib_acl_cpp/src/session/memcache_session.cpp +++ b/lib_acl_cpp/src/session/memcache_session.cpp @@ -5,6 +5,8 @@ #include "acl_cpp/session/memcache_session.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -86,3 +88,5 @@ bool memcache_session::set_timeout(time_t ttl) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/session/redis_session.cpp b/lib_acl_cpp/src/session/redis_session.cpp index a728e00d3..94c7beaa5 100644 --- a/lib_acl_cpp/src/session/redis_session.cpp +++ b/lib_acl_cpp/src/session/redis_session.cpp @@ -5,6 +5,8 @@ #include "acl_cpp/session/redis_session.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -154,3 +156,5 @@ bool redis_session::set_timeout(time_t ttl) } } // namespace acl + +#endif // ACL_CLIENT_ONLY diff --git a/lib_acl_cpp/src/session/session.cpp b/lib_acl_cpp/src/session/session.cpp index 0fc4089ef..ba3768757 100644 --- a/lib_acl_cpp/src/session/session.cpp +++ b/lib_acl_cpp/src/session/session.cpp @@ -8,6 +8,8 @@ #include "acl_cpp/session/session.hpp" #endif +#ifndef ACL_CLIENT_ONLY + namespace acl { @@ -375,3 +377,5 @@ void session::deserialize(string& buf, std::map& attrs) } } // namespace acl + +#endif // ACL_CLIENT_ONLY