This commit is contained in:
郑树新 2019-09-24 09:40:51 +08:00
commit dd97d48a75
11 changed files with 26 additions and 9 deletions

View File

@ -108,7 +108,6 @@ if (${UNIX_OS})
"-D_POSIX_PTHREAD_SEMANTICS" "-D_POSIX_PTHREAD_SEMANTICS"
"-DACL_PREPARE_COMPILE" "-DACL_PREPARE_COMPILE"
"-Wstrict-prototypes" "-Wstrict-prototypes"
"-fvisibility=hidden"
) )
if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_COMPILER_IS_GNUCC)
@ -158,7 +157,6 @@ else()
set(CMAKE_SHARED_LINKER_FLAGS "/DYNAMICBASE ws2_32.lib IPHlpApi.lib") set(CMAKE_SHARED_LINKER_FLAGS "/DYNAMICBASE ws2_32.lib IPHlpApi.lib")
endif() endif()
# set(CMAKE_SHARED_LINKER_FLAGS "-fvisibility=hidden")
set(lib_output_path ${PROJECT_BINARY_DIR}/lib) set(lib_output_path ${PROJECT_BINARY_DIR}/lib)
set(LIBRARY_OUTPUT_PATH ${lib_output_path}) set(LIBRARY_OUTPUT_PATH ${lib_output_path})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${lib_output_path}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${lib_output_path})

View File

@ -244,6 +244,7 @@
0779D5F01DBE073000449438 /* acl_xml_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B21DBE070E00449438 /* acl_xml_parse.c */; }; 0779D5F01DBE073000449438 /* acl_xml_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B21DBE070E00449438 /* acl_xml_parse.c */; };
0779D5F11DBE073000449438 /* acl_xml_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B31DBE070E00449438 /* acl_xml_util.c */; }; 0779D5F11DBE073000449438 /* acl_xml_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B31DBE070E00449438 /* acl_xml_util.c */; };
70BD6B8B232B931700E4C798 /* acl_sane_bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D3F91DBE070E00449438 /* acl_sane_bind.c */; }; 70BD6B8B232B931700E4C798 /* acl_sane_bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D3F91DBE070E00449438 /* acl_sane_bind.c */; };
70BD6CA8233520C600E4C798 /* acl_sane_accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 70BD6CA7233520C600E4C798 /* acl_sane_accept.c */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -650,6 +651,7 @@
07A469F61E6FD4FA002C9B3C /* acl_xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml.h; sourceTree = "<group>"; }; 07A469F61E6FD4FA002C9B3C /* acl_xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml.h; sourceTree = "<group>"; };
07A469F71E6FD4FA002C9B3C /* acl_xml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml2.h; sourceTree = "<group>"; }; 07A469F71E6FD4FA002C9B3C /* acl_xml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml2.h; sourceTree = "<group>"; };
07A469F81E6FD4FA002C9B3C /* acl_xml3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml3.h; sourceTree = "<group>"; }; 07A469F81E6FD4FA002C9B3C /* acl_xml3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml3.h; sourceTree = "<group>"; };
70BD6CA7233520C600E4C798 /* acl_sane_accept.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acl_sane_accept.c; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -932,6 +934,7 @@
0779D3F61DBE070E00449438 /* listen */ = { 0779D3F61DBE070E00449438 /* listen */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
70BD6CA7233520C600E4C798 /* acl_sane_accept.c */,
0779D3F71DBE070E00449438 /* acl_fifo_listen.c */, 0779D3F71DBE070E00449438 /* acl_fifo_listen.c */,
0779D3F81DBE070E00449438 /* acl_inet_listen.c */, 0779D3F81DBE070E00449438 /* acl_inet_listen.c */,
0779D3F91DBE070E00449438 /* acl_sane_bind.c */, 0779D3F91DBE070E00449438 /* acl_sane_bind.c */,
@ -1716,6 +1719,7 @@
0779D5A31DBE073000449438 /* acl_write_wait.c in Sources */, 0779D5A31DBE073000449438 /* acl_write_wait.c in Sources */,
0779D5A41DBE073000449438 /* acl_allocator.c in Sources */, 0779D5A41DBE073000449438 /* acl_allocator.c in Sources */,
0779D5A51DBE073000449438 /* acl_dbuf_pool.c in Sources */, 0779D5A51DBE073000449438 /* acl_dbuf_pool.c in Sources */,
70BD6CA8233520C600E4C798 /* acl_sane_accept.c in Sources */,
0779D5A61DBE073000449438 /* acl_default_malloc.c in Sources */, 0779D5A61DBE073000449438 /* acl_default_malloc.c in Sources */,
0779D5A71DBE073000449438 /* acl_malloc_glue.c in Sources */, 0779D5A71DBE073000449438 /* acl_malloc_glue.c in Sources */,
0779D5A81DBE073000449438 /* acl_mem_hook.c in Sources */, 0779D5A81DBE073000449438 /* acl_mem_hook.c in Sources */,

View File

@ -1,5 +1,9 @@
修改历史列表: 修改历史列表:
591) 2019.9.24
591.1) compile: 使用 cmake 编译的 .so 库不能正常使用,原因是使用了 -fvisibility=hidden
编译选项
590) 2019.9.17 590) 2019.9.17
590.1) bugfix: 在客户端模式下,需要在 http_aclient::ws_handshake() 中需要调用 590.1) bugfix: 在客户端模式下,需要在 http_aclient::ws_handshake() 中需要调用
set_frame_masking_key() 设置客户端发送数据的掩码 set_frame_masking_key() 设置客户端发送数据的掩码

View File

@ -308,7 +308,7 @@ public:
* @return {bool} key false * @return {bool} key false
* true on success, or false be returned * true on success, or false be returned
*/ */
bool randmkey(string& buf); bool randomkey(string& buf);
/** /**
* key newkey * key newkey

View File

@ -958,6 +958,11 @@ bool db_mysql::commit(void)
return false; return false;
} }
bool db_mysql::rollback(void)
{
return false;
}
int db_mysql::affect_count(void) const int db_mysql::affect_count(void) const
{ {
return 0; return 0;

View File

@ -691,6 +691,11 @@ bool db_pgsql::commit()
return false; return false;
} }
bool db_pgsql::rollback(void)
{
return false;
}
int db_pgsql::affect_count() const int db_pgsql::affect_count() const
{ {
return 0; return 0;

View File

@ -785,6 +785,8 @@ bool db_sqlite::set_conf(const char*) { return false; }
const char* db_sqlite::get_conf(const char*, string&) { return NULL; } const char* db_sqlite::get_conf(const char*, string&) { return NULL; }
void db_sqlite::show_conf(const char*) {} void db_sqlite::show_conf(const char*) {}
int db_sqlite::affect_total_count() const { return 0; } int db_sqlite::affect_total_count() const { return 0; }
bool db_sqlite::begin_transaction(void) { return false; }
bool db_sqlite::commit(void) { return false; }
const char* db_sqlite::dbtype() const { return NULL; } const char* db_sqlite::dbtype() const { return NULL; }
bool db_sqlite::dbopen(const char*) { return false; } bool db_sqlite::dbopen(const char*) { return false; }
bool db_sqlite::is_opened() const { return false; } bool db_sqlite::is_opened() const { return false; }

View File

@ -299,7 +299,7 @@ long long int redis_key::pttl(const char* key)
return ret; return ret;
} }
bool redis_key::randmkey(string& buf) bool redis_key::randomkey(string& buf)
{ {
const char* argv[1]; const char* argv[1];
size_t lens[1]; size_t lens[1];

View File

@ -74,7 +74,6 @@ if (${UNIX_OS})
"-D_POSIX_PTHREAD_SEMANTICS" "-D_POSIX_PTHREAD_SEMANTICS"
"-DACL_PREPARE_COMPILE" "-DACL_PREPARE_COMPILE"
"-Wstrict-prototypes" "-Wstrict-prototypes"
"-fvisibility=hidden"
) )
# if (CMAKE_BUILD_TYPE STREQUAL "") # if (CMAKE_BUILD_TYPE STREQUAL "")

View File

@ -150,7 +150,7 @@ HTTP_API int http_util_req_open(HTTP_UTIL *http_util);
* @param http_util {HTTP_UTIL*} * @param http_util {HTTP_UTIL*}
* @param data {const char*} * @param data {const char*}
* @param dlen {size_t} data , 0 * @param dlen {size_t} data , 0
* @param {int} > 0 ; -1: , * @return {int} > 0 ; -1: ,
* http_util_free * http_util_free
*/ */
HTTP_API int http_util_put_req_data(HTTP_UTIL *http_util, const char *data, size_t dlen); HTTP_API int http_util_put_req_data(HTTP_UTIL *http_util, const char *data, size_t dlen);
@ -215,7 +215,7 @@ HTTP_API int http_util_get_res_body(HTTP_UTIL *http_util, char *buf, size_t size
* url * url
* @param url {const char*} url, : http://www.g.cn * @param url {const char*} url, : http://www.g.cn
* @param dump {const char*} * @param dump {const char*}
* @param {int} , >=0: , -1: * @return {int} , >=0: , -1:
*/ */
HTTP_API int http_util_dump_url(const char *url, const char *dump); HTTP_API int http_util_dump_url(const char *url, const char *dump);
@ -223,7 +223,7 @@ HTTP_API int http_util_dump_url(const char *url, const char *dump);
* url * url
* @param url {const char*} url, : http://www.g.cn * @param url {const char*} url, : http://www.g.cn
* @param stream {ACL_VSTREAM *} * @param stream {ACL_VSTREAM *}
* @param {int} , >=0: , -1: * @return {int} , >=0: , -1:
*/ */
HTTP_API int http_util_dump_url_to_stream(const char *url, ACL_VSTREAM *stream); HTTP_API int http_util_dump_url_to_stream(const char *url, ACL_VSTREAM *stream);

View File

@ -169,7 +169,7 @@ SMTP_API int smtp_send_file(SMTP_CLIENT *client, const char *filepath);
/** /**
* SMTP * SMTP
* @param client {SMTP_CLIENT*} SMTP * @param client {SMTP_CLIENT*} SMTP
* @param int {ACL_VSTREAM*} * @param in {ACL_VSTREAM*}
* @return {int} 0 (SMTP_CLIENT::smtp_code * @return {int} 0 (SMTP_CLIENT::smtp_code
* SMTP_CLIENT::buf ) * SMTP_CLIENT::buf )
*/ */