├── LICENSE ├── README.md ├── dependencies ├── linux │ ├── libevent │ │ ├── bin │ │ │ └── event_rpcgen.py │ │ ├── include │ │ │ ├── evdns.h │ │ │ ├── event.h │ │ │ ├── event2 │ │ │ │ ├── buffer.h │ │ │ │ ├── buffer_compat.h │ │ │ │ ├── bufferevent.h │ │ │ │ ├── bufferevent_compat.h │ │ │ │ ├── bufferevent_ssl.h │ │ │ │ ├── bufferevent_struct.h │ │ │ │ ├── dns.h │ │ │ │ ├── dns_compat.h │ │ │ │ ├── dns_struct.h │ │ │ │ ├── event-config.h │ │ │ │ ├── event.h │ │ │ │ ├── event_compat.h │ │ │ │ ├── event_struct.h │ │ │ │ ├── http.h │ │ │ │ ├── http_compat.h │ │ │ │ ├── http_struct.h │ │ │ │ ├── keyvalq_struct.h │ │ │ │ ├── listener.h │ │ │ │ ├── rpc.h │ │ │ │ ├── rpc_compat.h │ │ │ │ ├── rpc_struct.h │ │ │ │ ├── tag.h │ │ │ │ ├── tag_compat.h │ │ │ │ ├── thread.h │ │ │ │ └── util.h │ │ │ ├── evhttp.h │ │ │ ├── evrpc.h │ │ │ └── evutil.h │ │ └── lib │ │ │ ├── libevent.a │ │ │ ├── libevent.la │ │ │ ├── libevent_core.a │ │ │ ├── libevent_core.la │ │ │ ├── libevent_extra.a │ │ │ ├── libevent_extra.la │ │ │ ├── libevent_openssl.a │ │ │ ├── libevent_openssl.la │ │ │ ├── libevent_pthreads.a │ │ │ ├── libevent_pthreads.la │ │ │ └── pkgconfig │ │ │ ├── libevent.pc │ │ │ ├── libevent_openssl.pc │ │ │ └── libevent_pthreads.pc │ ├── libiconv │ │ ├── bin │ │ │ └── iconv │ │ ├── include │ │ │ ├── iconv.h │ │ │ ├── libcharset.h │ │ │ └── localcharset.h │ │ ├── lib │ │ │ ├── libcharset.a │ │ │ ├── libcharset.la │ │ │ ├── libiconv.a │ │ │ └── libiconv.la │ │ └── share │ │ │ ├── doc │ │ │ ├── iconv.1.html │ │ │ ├── iconv.3.html │ │ │ ├── iconv_close.3.html │ │ │ ├── iconv_open.3.html │ │ │ └── iconvctl.3.html │ │ │ ├── locale │ │ │ ├── af │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── ca │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── da │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── de │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── el │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── eo │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── es │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── et │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── fi │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── fr │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── ga │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── gl │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── hr │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── hu │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── id │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── it │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── nl │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── pl │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── pt_BR │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── rm │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── ro │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── ru │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── sk │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── sl │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── sq │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── sr │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── sv │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── tr │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── uk │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── vi │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── wa │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ ├── zh_CN │ │ │ │ └── LC_MESSAGES │ │ │ │ │ └── libiconv.mo │ │ │ └── zh_TW │ │ │ │ └── LC_MESSAGES │ │ │ │ └── libiconv.mo │ │ │ └── man │ │ │ ├── man1 │ │ │ └── iconv.1 │ │ │ └── man3 │ │ │ ├── iconv.3 │ │ │ ├── iconv_close.3 │ │ │ ├── iconv_open.3 │ │ │ └── iconvctl.3 │ └── log4cplus │ │ ├── include │ │ └── log4cplus │ │ │ ├── appender.h │ │ │ ├── asyncappender.h │ │ │ ├── boost │ │ │ └── deviceappender.hxx │ │ │ ├── clogger.h │ │ │ ├── config.hxx │ │ │ ├── config │ │ │ ├── defines.hxx │ │ │ ├── macosx.h │ │ │ ├── win32.h │ │ │ └── windowsh-inc.h │ │ │ ├── configurator.h │ │ │ ├── consoleappender.h │ │ │ ├── fileappender.h │ │ │ ├── fstreams.h │ │ │ ├── helpers │ │ │ ├── appenderattachableimpl.h │ │ │ ├── fileinfo.h │ │ │ ├── lockfile.h │ │ │ ├── loglog.h │ │ │ ├── logloguser.h │ │ │ ├── pointer.h │ │ │ ├── property.h │ │ │ ├── queue.h │ │ │ ├── sleep.h │ │ │ ├── snprintf.h │ │ │ ├── socket.h │ │ │ ├── socketbuffer.h │ │ │ ├── stringhelper.h │ │ │ ├── thread-config.h │ │ │ └── timehelper.h │ │ │ ├── hierarchy.h │ │ │ ├── hierarchylocker.h │ │ │ ├── internal │ │ │ ├── cygwin-win32.h │ │ │ ├── env.h │ │ │ ├── internal.h │ │ │ └── socket.h │ │ │ ├── layout.h │ │ │ ├── log4judpappender.h │ │ │ ├── logger.h │ │ │ ├── loggingmacros.h │ │ │ ├── loglevel.h │ │ │ ├── mdc.h │ │ │ ├── ndc.h │ │ │ ├── nteventlogappender.h │ │ │ ├── nullappender.h │ │ │ ├── qt4debugappender.h │ │ │ ├── socketappender.h │ │ │ ├── spi │ │ │ ├── appenderattachable.h │ │ │ ├── factory.h │ │ │ ├── filter.h │ │ │ ├── loggerfactory.h │ │ │ ├── loggerimpl.h │ │ │ ├── loggingevent.h │ │ │ ├── objectregistry.h │ │ │ └── rootlogger.h │ │ │ ├── streams.h │ │ │ ├── syslogappender.h │ │ │ ├── tchar.h │ │ │ ├── thread │ │ │ ├── impl │ │ │ │ ├── syncprims-impl.h │ │ │ │ ├── syncprims-pthreads.h │ │ │ │ ├── syncprims-win32.h │ │ │ │ ├── threads-impl.h │ │ │ │ └── tls.h │ │ │ ├── syncprims-pub-impl.h │ │ │ ├── syncprims.h │ │ │ └── threads.h │ │ │ ├── tracelogger.h │ │ │ ├── tstring.h │ │ │ ├── version.h │ │ │ ├── win32consoleappender.h │ │ │ └── win32debugappender.h │ │ └── lib │ │ ├── liblog4cplus.a │ │ ├── liblog4cplus.la │ │ └── pkgconfig │ │ └── log4cplus.pc ├── source │ └── tolua │ │ ├── tolua++.h │ │ ├── tolua_event.c │ │ ├── tolua_event.h │ │ ├── tolua_is.c │ │ ├── tolua_map.c │ │ ├── tolua_push.c │ │ └── tolua_to.c └── windows │ ├── libevent │ ├── include │ │ ├── bufferevent-internal.h │ │ ├── changelist-internal.h │ │ ├── defer-internal.h │ │ ├── evbuffer-internal.h │ │ ├── evdns.h │ │ ├── event-internal.h │ │ ├── event.h │ │ ├── event2 │ │ │ ├── buffer.h │ │ │ ├── buffer_compat.h │ │ │ ├── bufferevent.h │ │ │ ├── bufferevent_compat.h │ │ │ ├── bufferevent_ssl.h │ │ │ ├── bufferevent_struct.h │ │ │ ├── dns.h │ │ │ ├── dns_compat.h │ │ │ ├── dns_struct.h │ │ │ ├── event-config.h │ │ │ ├── event.h │ │ │ ├── event_compat.h │ │ │ ├── event_struct.h │ │ │ ├── http.h │ │ │ ├── http_compat.h │ │ │ ├── http_struct.h │ │ │ ├── keyvalq_struct.h │ │ │ ├── listener.h │ │ │ ├── rpc.h │ │ │ ├── rpc_compat.h │ │ │ ├── rpc_struct.h │ │ │ ├── tag.h │ │ │ ├── tag_compat.h │ │ │ ├── thread.h │ │ │ └── util.h │ │ ├── evhttp.h │ │ ├── evmap-internal.h │ │ ├── evrpc-internal.h │ │ ├── evrpc.h │ │ ├── evsignal-internal.h │ │ ├── evthread-internal.h │ │ ├── evutil.h │ │ ├── ht-internal.h │ │ ├── http-internal.h │ │ ├── iocp-internal.h │ │ ├── ipv6-internal.h │ │ ├── log-internal.h │ │ ├── minheap-internal.h │ │ ├── mm-internal.h │ │ ├── ratelim-internal.h │ │ ├── strlcpy-internal.h │ │ ├── tree.h │ │ └── util-internal.h │ └── lib │ │ ├── libevent_core.lib │ │ └── libevent_extras.lib │ ├── libiconv │ ├── include │ │ └── iconv.h │ └── lib │ │ ├── iconv.lib │ │ └── iconvD.lib │ ├── log4cplus │ ├── include │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ └── log4cplus │ │ │ ├── appender.h │ │ │ ├── asyncappender.h │ │ │ ├── boost │ │ │ └── deviceappender.hxx │ │ │ ├── clfsappender.h │ │ │ ├── clogger.h │ │ │ ├── config.h.cmake.in │ │ │ ├── config.h.in │ │ │ ├── config.hxx │ │ │ ├── config │ │ │ ├── defines.hxx.in │ │ │ ├── macosx.h │ │ │ ├── win32.h │ │ │ └── windowsh-inc.h │ │ │ ├── configurator.h │ │ │ ├── consoleappender.h │ │ │ ├── fileappender.h │ │ │ ├── fstreams.h │ │ │ ├── helpers │ │ │ ├── appenderattachableimpl.h │ │ │ ├── fileinfo.h │ │ │ ├── lockfile.h │ │ │ ├── loglog.h │ │ │ ├── logloguser.h │ │ │ ├── pointer.h │ │ │ ├── property.h │ │ │ ├── queue.h │ │ │ ├── sleep.h │ │ │ ├── snprintf.h │ │ │ ├── socket.h │ │ │ ├── socketbuffer.h │ │ │ ├── stringhelper.h │ │ │ ├── thread-config.h │ │ │ └── timehelper.h │ │ │ ├── hierarchy.h │ │ │ ├── hierarchylocker.h │ │ │ ├── internal │ │ │ ├── cygwin-win32.h │ │ │ ├── env.h │ │ │ ├── internal.h │ │ │ └── socket.h │ │ │ ├── layout.h │ │ │ ├── log4judpappender.h │ │ │ ├── logger.h │ │ │ ├── loggingmacros.h │ │ │ ├── loglevel.h │ │ │ ├── mdc.h │ │ │ ├── ndc.h │ │ │ ├── nteventlogappender.h │ │ │ ├── nullappender.h │ │ │ ├── qt4debugappender.h │ │ │ ├── socketappender.h │ │ │ ├── spi │ │ │ ├── appenderattachable.h │ │ │ ├── factory.h │ │ │ ├── filter.h │ │ │ ├── loggerfactory.h │ │ │ ├── loggerimpl.h │ │ │ ├── loggingevent.h │ │ │ ├── objectregistry.h │ │ │ └── rootlogger.h │ │ │ ├── streams.h │ │ │ ├── syslogappender.h │ │ │ ├── tchar.h │ │ │ ├── thread │ │ │ ├── impl │ │ │ │ ├── syncprims-impl.h │ │ │ │ ├── syncprims-pmsm.h │ │ │ │ ├── syncprims-pthreads.h │ │ │ │ ├── syncprims-win32.h │ │ │ │ ├── threads-impl.h │ │ │ │ └── tls.h │ │ │ ├── syncprims-pub-impl.h │ │ │ ├── syncprims.h │ │ │ └── threads.h │ │ │ ├── tracelogger.h │ │ │ ├── tstring.h │ │ │ ├── version.h │ │ │ ├── win32consoleappender.h │ │ │ └── win32debugappender.h │ └── lib │ │ ├── log4cplus.dll │ │ ├── log4cplus.lib │ │ ├── log4cplusD.dll │ │ └── log4cplusD.lib │ └── luajit │ ├── include │ ├── lauxlib.h │ ├── lua.h │ ├── luaconf.h │ └── lualib.h │ └── lib │ └── lua51.lib ├── gcc └── Makefile ├── include ├── exception │ ├── smart_assert.h │ └── traceback.h ├── log │ ├── actionstat.h │ ├── filelog.h │ └── stacktrace.h ├── md5 │ └── md5.h ├── memory │ ├── mpage.h │ ├── mpagemgr.h │ ├── mpool.h │ └── opool.h ├── net │ ├── iobuffer.h │ ├── ioserver.h │ ├── tcpsocket.h │ ├── timer.h │ └── udpsocket.h ├── ref │ └── cppref.h ├── stdhead.h ├── thread │ └── nullmutex.h ├── utility │ └── utility.h ├── xh.h ├── xhexception.h ├── xhguard.h ├── xhhead.h ├── xhlog.h ├── xhnet.h ├── xhpool.h ├── xhref.h └── xhutility.h ├── msvc12 ├── bins │ ├── Debug │ │ ├── log4cplusD.dll │ │ └── luascript │ │ │ └── luamain.lua │ └── Release │ │ └── log4cplus.dll ├── test-exception │ ├── test-exception.vcxproj │ ├── test-exception.vcxproj.filters │ └── test-exception.vcxproj.user ├── test-mpool │ ├── test-mpool.vcxproj │ ├── test-mpool.vcxproj.filters │ └── test-mpool.vcxproj.user ├── test-net │ ├── test-net.vcxproj │ ├── test-net.vcxproj.filters │ └── test-net.vcxproj.user ├── test-netbase │ ├── test-netbase.vcxproj │ ├── test-netbase.vcxproj.filters │ └── test-netbase.vcxproj.user ├── test-opool │ ├── test-opool.vcxproj │ ├── test-opool.vcxproj.filters │ └── test-opool.vcxproj.user ├── test-qyfh │ ├── test-qyfh.vcxproj │ ├── test-qyfh.vcxproj.filters │ └── test-qyfh.vcxproj.user ├── test-utility │ ├── test-utility.vcxproj │ ├── test-utility.vcxproj.filters │ └── test-utility.vcxproj.user ├── xh-net.sln └── xh-net │ ├── xh-net.vcxproj │ ├── xh-net.vcxproj.filters │ └── xh-net.vcxproj.user ├── net-qyfh ├── msgstream.h ├── mstimer.h ├── qyfh.h ├── qyfhhead.h ├── qyfhnet.h ├── socketclient.h ├── socketlistener.h ├── socketserver.h └── threadio.h ├── source ├── exception │ ├── ensure.cpp │ ├── ensure.h │ ├── smart_assert.cpp │ ├── traceback.cpp │ └── windows │ │ ├── StackWalker.cpp │ │ └── StackWalker.h ├── log │ ├── actionstat.cpp │ ├── filelog.cpp │ └── stacktrace.cpp ├── md5 │ └── md5.cpp ├── memory │ ├── mpage.cpp │ └── mpagemgr.cpp ├── net │ ├── impl_ioserver.cpp │ ├── impl_ioserver.h │ ├── impl_nethead.h │ ├── impl_tcpsocket.cpp │ ├── impl_tcpsocket.h │ ├── impl_timer.cpp │ ├── impl_timer.h │ ├── impl_udpsocket.cpp │ └── impl_udpsocket.h └── utility │ └── utility.cpp └── test ├── luaengine.cpp ├── luaengine.h ├── main-qyfh.cpp ├── main-qyfh.h ├── test-exception.cpp ├── test-mpool.cpp ├── test-netbase.cpp ├── test-opool.cpp ├── test-qyfh.cpp ├── test-qyfh.h ├── test-utility.cpp ├── test.cpp └── tolua ├── main-qyfh.pkg ├── test-qyfh.pkg ├── tolua++.exe └── tolua.bat /README.md: -------------------------------------------------------------------------------- 1 | xhnet 2 | ===== 3 | 4 | 是由c++编写的一个服务器基础库。 5 | ==== 6 | 7 | ##一、简介## 8 | ###1、跨windows和linux平台### 9 | ###2、需要libevent、libiconv、log4cplus等第三方库### 10 | ###3、windows下vs2013编译通过### 11 | ###4、centos编译通过### 12 | ###5、使用了c++11特性### 13 | 14 | 15 | 16 | ##二、包括以下几个功能## 17 | 18 | ###1、异常处理机制,dump、异常抛出不直接崩溃程序、lua远程调试机制### 19 | ###2、文件日志### 20 | ###3、性能检查XH_ACTION_GUARD、XH_ACTION_LOGINFO### 21 | ###4、一些小工具md5、iconv、XHGUARD、XH_STACK_TRACE### 22 | ###5、集成SMART_ASSERT,例如XH_ASSERT(a>100&&b>10)(a);如果a>100&&b>10不为true,会产生ERROR日志,且打印出a、b的值### 23 | ###6、内存管理### 24 | ###7、网络io### 25 | ###8、一些时间、文件、字符串常用函数### 26 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/evdns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVDNS_H_ 28 | #define _EVDNS_H_ 29 | 30 | /** @file evdns.h 31 | 32 | A dns subsystem for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVDNS_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/event2/rpc_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVENT2_RPC_COMPAT_H_ 28 | #define _EVENT2_RPC_COMPAT_H_ 29 | 30 | /** @file event2/rpc_compat.h 31 | 32 | Deprecated versions of the functions in rpc.h: provided only for 33 | backwards compatibility. 34 | 35 | */ 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /** backwards compatible accessors that work only with gcc */ 42 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 43 | 44 | #undef EVTAG_ASSIGN 45 | #undef EVTAG_GET 46 | #undef EVTAG_ADD 47 | 48 | #define EVTAG_ASSIGN(msg, member, args...) \ 49 | (*(msg)->base->member##_assign)(msg, ## args) 50 | #define EVTAG_GET(msg, member, args...) \ 51 | (*(msg)->base->member##_get)(msg, ## args) 52 | #define EVTAG_ADD(msg, member, args...) \ 53 | (*(msg)->base->member##_add)(msg, ## args) 54 | #endif 55 | #define EVTAG_LEN(msg, member) ((msg)->member##_length) 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif /* _EVENT2_EVENT_COMPAT_H_ */ 62 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/event2/tag_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVENT2_TAG_COMPAT_H_ 28 | #define _EVENT2_TAG_COMPAT_H_ 29 | 30 | /** @file event2/tag_compat.h 31 | 32 | Obsolete/deprecated functions from tag.h; provided only for backwards 33 | compatibility. 34 | */ 35 | 36 | /** 37 | @name Misnamed functions 38 | 39 | @deprecated These macros are deprecated because their names don't follow 40 | Libevent's naming conventions. Use evtag_encode_int and 41 | evtag_encode_int64 instead. 42 | 43 | @{ 44 | */ 45 | #define encode_int(evbuf, number) evtag_encode_int((evbuf), (number)) 46 | #define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number)) 47 | /**@}*/ 48 | 49 | #endif /* _EVENT2_TAG_H_ */ 50 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/evhttp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2007 Niels Provos 3 | * Copyright 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVHTTP_H_ 28 | #define _EVHTTP_H_ 29 | 30 | /** @file evhttp.h 31 | 32 | An http implementation subsystem for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVHTTP_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/evrpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVRPC_H_ 28 | #define _EVRPC_H_ 29 | 30 | /** @file evrpc.h 31 | 32 | An RPC system for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVRPC_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/include/evutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. The name of the author may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #ifndef _EVUTIL_H_ 27 | #define _EVUTIL_H_ 28 | 29 | /** @file evutil.h 30 | 31 | Utility and compatibility functions for Libevent. 32 | 33 | The header is deprecated in Libevent 2.0 and later; please 34 | use instead. 35 | */ 36 | 37 | #include 38 | 39 | #endif /* _EVUTIL_H_ */ 40 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libevent/lib/libevent.a -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent.la: -------------------------------------------------------------------------------- 1 | # libevent.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libevent-2.0.so.5' 9 | 10 | # Names of this library. 11 | library_names='libevent-2.0.so.5.1.9 libevent-2.0.so.5 libevent.so' 12 | 13 | # The name of the static archive. 14 | old_library='libevent.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libevent. 26 | current=6 27 | age=1 28 | revision=9 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/libevent/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_core.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libevent/lib/libevent_core.a -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_core.la: -------------------------------------------------------------------------------- 1 | # libevent_core.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libevent_core-2.0.so.5' 9 | 10 | # Names of this library. 11 | library_names='libevent_core-2.0.so.5.1.9 libevent_core-2.0.so.5 libevent_core.so' 12 | 13 | # The name of the static archive. 14 | old_library='libevent_core.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libevent_core. 26 | current=6 27 | age=1 28 | revision=9 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/libevent/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_extra.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libevent/lib/libevent_extra.a -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_extra.la: -------------------------------------------------------------------------------- 1 | # libevent_extra.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libevent_extra-2.0.so.5' 9 | 10 | # Names of this library. 11 | library_names='libevent_extra-2.0.so.5.1.9 libevent_extra-2.0.so.5 libevent_extra.so' 12 | 13 | # The name of the static archive. 14 | old_library='libevent_extra.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libevent_extra. 26 | current=6 27 | age=1 28 | revision=9 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/libevent/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_openssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libevent/lib/libevent_openssl.a -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_openssl.la: -------------------------------------------------------------------------------- 1 | # libevent_openssl.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libevent_openssl-2.0.so.5' 9 | 10 | # Names of this library. 11 | library_names='libevent_openssl-2.0.so.5.1.9 libevent_openssl-2.0.so.5 libevent_openssl.so' 12 | 13 | # The name of the static archive. 14 | old_library='libevent_openssl.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lssl -lcrypto -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libevent_openssl. 26 | current=6 27 | age=1 28 | revision=9 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/libevent/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_pthreads.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libevent/lib/libevent_pthreads.a -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/libevent_pthreads.la: -------------------------------------------------------------------------------- 1 | # libevent_pthreads.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libevent_pthreads-2.0.so.5' 9 | 10 | # Names of this library. 11 | library_names='libevent_pthreads-2.0.so.5.1.9 libevent_pthreads-2.0.so.5 libevent_pthreads.so' 12 | 13 | # The name of the static archive. 14 | old_library='libevent_pthreads.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libevent_pthreads. 26 | current=6 27 | age=1 28 | revision=9 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/libevent/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/pkgconfig/libevent.pc: -------------------------------------------------------------------------------- 1 | #libevent pkg-config source file 2 | 3 | prefix=/mnt/share/xh-net/dependencies/linux/libevent 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libevent 9 | Description: libevent is an asynchronous notification event loop library 10 | Version: 2.0.21-stable 11 | Requires: 12 | Conflicts: 13 | Libs: -L${libdir} -levent 14 | Libs.private: -lrt 15 | Cflags: -I${includedir} 16 | 17 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/pkgconfig/libevent_openssl.pc: -------------------------------------------------------------------------------- 1 | #libevent pkg-config source file 2 | 3 | prefix=/mnt/share/xh-net/dependencies/linux/libevent 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libevent_openssl 9 | Description: libevent_openssl adds openssl-based TLS support to libevent 10 | Version: 2.0.21-stable 11 | Requires: libevent 12 | Conflicts: 13 | Libs: -L${libdir} -levent_openssl 14 | Libs.private: -lrt -lssl -lcrypto 15 | Cflags: -I${includedir} 16 | 17 | -------------------------------------------------------------------------------- /dependencies/linux/libevent/lib/pkgconfig/libevent_pthreads.pc: -------------------------------------------------------------------------------- 1 | #libevent pkg-config source file 2 | 3 | prefix=/mnt/share/xh-net/dependencies/linux/libevent 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libevent_pthreads 9 | Description: libevent_pthreads adds pthreads-based threading support to libevent 10 | Version: 2.0.21-stable 11 | Requires: libevent 12 | Conflicts: 13 | Libs: -L${libdir} -levent_pthreads 14 | Libs.private: -lrt 15 | Cflags: -I${includedir} 16 | 17 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/bin/iconv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/bin/iconv -------------------------------------------------------------------------------- /dependencies/linux/libiconv/include/libcharset.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2003 Free Software Foundation, Inc. 2 | This file is part of the GNU CHARSET Library. 3 | 4 | The GNU CHARSET Library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public License as 6 | published by the Free Software Foundation; either version 2 of the 7 | License, or (at your option) any later version. 8 | 9 | The GNU CHARSET Library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with the GNU CHARSET Library; see the file COPYING.LIB. If not, 16 | write to the Free Software Foundation, Inc., 51 Franklin Street, 17 | Fifth Floor, Boston, MA 02110-1301, USA. */ 18 | 19 | #ifndef _LIBCHARSET_H 20 | #define _LIBCHARSET_H 21 | 22 | #include 23 | 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | 30 | /* Support for relocatable packages. */ 31 | 32 | /* Sets the original and the current installation prefix of the package. 33 | Relocation simply replaces a pathname starting with the original prefix 34 | by the corresponding pathname with the current prefix instead. Both 35 | prefixes should be directory names without trailing slash (i.e. use "" 36 | instead of "/"). */ 37 | extern void libcharset_set_relocation_prefix (const char *orig_prefix, 38 | const char *curr_prefix); 39 | 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | 46 | #endif /* _LIBCHARSET_H */ 47 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/include/localcharset.h: -------------------------------------------------------------------------------- 1 | /* Determine a canonical name for the current locale's character encoding. 2 | Copyright (C) 2000-2003 Free Software Foundation, Inc. 3 | This file is part of the GNU CHARSET Library. 4 | 5 | This program is free software; you can redistribute it and/or modify it 6 | under the terms of the GNU Library General Public License as published 7 | by the Free Software Foundation; either version 2, or (at your option) 8 | any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | USA. */ 19 | 20 | #ifndef _LOCALCHARSET_H 21 | #define _LOCALCHARSET_H 22 | 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | 29 | /* Determine the current locale's character encoding, and canonicalize it 30 | into one of the canonical names listed in config.charset. 31 | The result must not be freed; it is statically allocated. 32 | If the canonical name cannot be determined, the result is a non-canonical 33 | name. */ 34 | extern const char * locale_charset (void); 35 | 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | 42 | #endif /* _LOCALCHARSET_H */ 43 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/lib/libcharset.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/lib/libcharset.a -------------------------------------------------------------------------------- /dependencies/linux/libiconv/lib/libcharset.la: -------------------------------------------------------------------------------- 1 | # libcharset.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libcharset.so.1' 9 | 10 | # Names of this library. 11 | library_names='libcharset.so.1.0.0 libcharset.so.1 libcharset.so' 12 | 13 | # The name of the static archive. 14 | old_library='libcharset.a' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for libcharset. 20 | current=1 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=no 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/mnt/share/xh-net/dependencies/linux/libiconv//lib' 36 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/lib/libiconv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/lib/libiconv.a -------------------------------------------------------------------------------- /dependencies/linux/libiconv/lib/libiconv.la: -------------------------------------------------------------------------------- 1 | # libiconv.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libiconv.so.2' 9 | 10 | # Names of this library. 11 | library_names='libiconv.so.2.4.0 libiconv.so.2 libiconv.so' 12 | 13 | # The name of the static archive. 14 | old_library='libiconv.a' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for libiconv. 20 | current=6 21 | age=4 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=no 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/mnt/share/xh-net/dependencies/linux/libiconv//lib' 36 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/doc/iconv_close.3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICONV_CLOSE 6 | 7 | 8 | 9 |

ICONV_CLOSE

10 | NAME
11 | SYNOPSIS
12 | DESCRIPTION
13 | RETURN VALUE
14 | CONFORMING TO
15 | SEE ALSO
16 | 17 |
18 | 19 | 20 | 21 |

NAME

22 | 24 | 25 |
26 | iconv_close - deallocate descriptor for character set conversion
27 | 28 |

SYNOPSIS

29 | 30 | 32 | 33 |
34 |
#include <iconv.h>
35 | 
36 | int iconv_close (iconv_t cd);
37 | 
38 | 39 |

DESCRIPTION

40 | 41 | 43 | 44 |
45 | The iconv_close function deallocates a conversion 46 | descriptor cd previously allocated using 47 | iconv_open.
48 | 49 |

RETURN VALUE

50 | 51 | 53 | 54 |
55 | When successful, the iconv_close function returns 0. 56 | In case of error, it sets errno and returns 57 | -1.
58 | 59 |

CONFORMING TO

60 | 61 | 63 | 64 |
65 | UNIX98
66 | 67 |

SEE ALSO

68 | 69 | 71 | 72 |
73 | iconv_open(3), iconv(3)
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/af/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/af/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/ca/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/ca/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/da/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/da/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/de/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/de/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/el/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/el/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/eo/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/eo/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/es/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/es/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/et/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/et/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/fi/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/fi/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/fr/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/fr/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/ga/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/ga/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/gl/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/gl/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/hr/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/hr/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/hu/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/hu/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/id/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/id/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/it/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/it/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/nl/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/nl/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/pl/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/pl/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/pt_BR/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/pt_BR/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/rm/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/rm/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/ro/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/ro/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/ru/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/ru/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/sk/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/sk/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/sl/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/sl/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/sq/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/sq/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/sr/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/sr/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/sv/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/sv/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/tr/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/tr/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/uk/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/uk/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/vi/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/vi/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/wa/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/wa/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/zh_CN/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/zh_CN/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/locale/zh_TW/LC_MESSAGES/libiconv.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/libiconv/share/locale/zh_TW/LC_MESSAGES/libiconv.mo -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/man/man3/iconv_close.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (c) Bruno Haible 2 | .\" 3 | .\" This is free documentation; you can redistribute it and/or 4 | .\" modify it under the terms of the GNU General Public License as 5 | .\" published by the Free Software Foundation; either version 2 of 6 | .\" the License, or (at your option) any later version. 7 | .\" 8 | .\" References consulted: 9 | .\" GNU glibc-2 source code and manual 10 | .\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html 11 | .\" 12 | .TH ICONV_CLOSE 3 "November 27, 1999" "GNU" "Linux Programmer's Manual" 13 | .SH NAME 14 | iconv_close \- deallocate descriptor for character set conversion 15 | .SH SYNOPSIS 16 | .nf 17 | .B #include 18 | .sp 19 | .BI "int iconv_close (iconv_t " cd ); 20 | .fi 21 | .SH DESCRIPTION 22 | The \fBiconv_close\fP function deallocates a conversion descriptor \fIcd\fP 23 | previously allocated using \fBiconv_open\fP. 24 | .SH "RETURN VALUE" 25 | When successful, the \fBiconv_close\fP function returns 0. In case of error, 26 | it sets \fBerrno\fP and returns -1. 27 | .SH "CONFORMING TO" 28 | UNIX98 29 | .SH "SEE ALSO" 30 | .BR iconv_open "(3), " iconv (3) 31 | -------------------------------------------------------------------------------- /dependencies/linux/libiconv/share/man/man3/iconvctl.3: -------------------------------------------------------------------------------- 1 | .\" Copyright (c) Perry Rapp 2 | .\" Copyright (c) Bruno Haible 3 | .\" 4 | .\" This is free documentation; you can redistribute it and/or 5 | .\" modify it under the terms of the GNU General Public License as 6 | .\" published by the Free Software Foundation; either version 2 of 7 | .\" the License, or (at your option) any later version. 8 | .\" 9 | .\" References consulted: 10 | .\" iconv.h 11 | .\" 12 | .TH ICONVCTL 3 "February 2, 2004" "GNU" "Linux Programmer's Manual" 13 | .SH NAME 14 | iconvctl \- control iconv behavior 15 | .SH SYNOPSIS 16 | .nf 17 | .B #include 18 | .sp 19 | .BI "int iconvctl (iconv_t " cd " , int " request ", void * " argument ); 20 | .fi 21 | .SH DESCRIPTION 22 | The argument \fIcd\fP must be a conversion descriptor created using the 23 | function \fBiconv_open\fP. 24 | .PP 25 | \fBiconvctl\fP queries or adjusts the behavior of the \fBiconv\fP function, 26 | when invoked with the specified conversion descriptor, depending on the 27 | request value. 28 | .SH "REQUEST VALUES" 29 | The following are permissible values for the \fIrequest\fP parameter. 30 | .TP 31 | .B ICONV_TRIVIALP 32 | \fIargument\fP should be an \fBint *\fP which will receive 1 if the 33 | conversion is trivial, or 0 otherwise. 34 | .TP 35 | .B ICONV_GET_TRANSLITERATE 36 | \fIargument\fP should be an \fBint *\fP which will receive 1 if 37 | transliteration is enabled in the conversion, or 0 otherwise. 38 | .TP 39 | .B ICONV_SET_TRANSLITERATE 40 | \fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value. 41 | A non-zero value is used to enable transliteration in the conversion. A zero 42 | value disables it. 43 | .TP 44 | .B ICONV_GET_DISCARD_ILSEQ 45 | \fIargument\fP should be an \fBint *\fP which will receive 1 if 46 | "illegal sequence discard and continue" is enabled in the conversion, 47 | or 0 otherwise. 48 | .TP 49 | .B ICONV_SET_DISCARD_ILSEQ 50 | \fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value. 51 | A non-zero value is used to enable "illegal sequence discard and continue" 52 | in the conversion. A zero value disables it. 53 | .SH "RETURN VALUE" 54 | The \fBiconvctl\fP function returns 0 if it succeeds. In case of error, it sets 55 | \fBerrno\fP and returns -1. 56 | .SH ERRORS 57 | The following errors can occur, among others: 58 | .TP 59 | .B EINVAL 60 | The request is invalid. 61 | .SH "CONFORMING TO" 62 | This function is implemented only in GNU libiconv and not in other \fBiconv\fP 63 | implementations. It is not backed by a standard. You can test for its presence 64 | through \fB(_LIBICONV_VERSION >= 0x0108)\fP. 65 | .SH "SEE ALSO" 66 | .BR iconv_open "(3), " iconv (3) 67 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/config/macosx.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: config-macosx.h 4 | // Created: 7/2003 5 | // Author: Christopher R. Bailey 6 | // 7 | // 8 | // Copyright 2003-2013 Christopher R. Bailey 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_CONFIG_MACOSX_HEADER_ 25 | #define LOG4CPLUS_CONFIG_MACOSX_HEADER_ 26 | 27 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 28 | #pragma once 29 | #endif 30 | 31 | #if (defined(__APPLE__) || (defined(__MWERKS__) && defined(__MACOS__))) 32 | 33 | #define LOG4CPLUS_HAVE_GETTIMEOFDAY 1 34 | #define socklen_t int 35 | 36 | #endif // MACOSX 37 | #endif // LOG4CPLUS_CONFIG_MACOSX_HEADER_ 38 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/fstreams.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: fstreams.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_FSTREAMS_HEADER_ 25 | #define LOG4CPLUS_FSTREAMS_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | 37 | namespace log4cplus 38 | { 39 | 40 | 41 | typedef std::basic_ofstream tofstream; 42 | typedef std::basic_ifstream tifstream; 43 | 44 | //! \def LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) 45 | //! \brief Expands into expression that picks the right type for 46 | //! std::fstream file name parameter. 47 | #if defined (LOG4CPLUS_FSTREAM_ACCEPTS_WCHAR_T) && defined (UNICODE) 48 | # define LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) (X) 49 | #else 50 | # define LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) (LOG4CPLUS_TSTRING_TO_STRING(X)) 51 | #endif 52 | 53 | 54 | } 55 | 56 | #endif // LOG4CPLUS_FSTREAMS_HEADER_ 57 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/fileinfo.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // 3 | // Copyright (C) 2012-2013, Vaclav Zeman. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modifica- 6 | // tion, are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 16 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 17 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 18 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 19 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 20 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 21 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | #if ! defined (LOG4CPLUS_HELPERS_FILEINFO_H) 27 | #define LOG4CPLUS_HELPERS_FILEINFO_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #include 36 | #ifdef LOG4CPLUS_HAVE_SYS_TYPES_H 37 | #include 38 | #endif 39 | 40 | 41 | namespace log4cplus { namespace helpers { 42 | 43 | //! FileInfo structure is OS independent abstraction of the 44 | //! stat() function. 45 | struct LOG4CPLUS_EXPORT FileInfo 46 | { 47 | helpers::Time mtime; 48 | bool is_link; 49 | off_t size; 50 | }; 51 | 52 | 53 | //! OS independent abstraction of stat() function. 54 | LOG4CPLUS_EXPORT int getFileInfo (FileInfo * fi, tstring const & name); 55 | 56 | 57 | } } // namespace log4cplus { namespace helpers { 58 | 59 | #endif // LOG4CPLUS_HELPERS_FILEINFO_H 60 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/lockfile.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // 3 | // Copyright (C) 2012-2013, Vaclav Zeman. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modifica- 6 | // tion, are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 16 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 17 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 18 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 19 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 20 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 21 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | #if ! defined (LOG4CPLUS_HELPERS_LOCKFILE_H) 27 | #define LOG4CPLUS_HELPERS_LOCKFILE_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | 39 | namespace log4cplus { namespace helpers { 40 | 41 | 42 | class LOG4CPLUS_EXPORT LockFile 43 | { 44 | public: 45 | LockFile (tstring const & lock_file); 46 | ~LockFile (); 47 | 48 | void lock () const; 49 | void unlock () const; 50 | 51 | private: 52 | void open (int) const; 53 | void close () const; 54 | 55 | struct Impl; 56 | 57 | tstring lock_file_name; 58 | Impl * data; 59 | }; 60 | 61 | 62 | typedef log4cplus::thread::SyncGuard LockFileGuard; 63 | 64 | 65 | } } // namespace log4cplus { namespace helpers { 66 | 67 | 68 | #endif // LOG4CPLUS_HELPERS_LOCKFILE_H 69 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/logloguser.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: logloguser.h 4 | // Created: 6/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_LOGLOG_USER 25 | #define LOG4CPLUS_HELPERS_LOGLOG_USER 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | 34 | namespace log4cplus { 35 | namespace helpers { 36 | // forward declarations 37 | class LogLog; 38 | 39 | /** 40 | * This class used to simplify the use of the LogLog class. Any class 41 | * that uses the LogLog class should extend this class and retrieve 42 | * their reference to LogLog using the method provided. 43 | */ 44 | class LOG4CPLUS_EXPORT LogLogUser 45 | { 46 | public: 47 | // ctor and dtor 48 | LogLogUser(); 49 | LogLogUser(const LogLogUser&); 50 | virtual ~LogLogUser(); 51 | 52 | // public methods 53 | LogLog& getLogLog() const; 54 | 55 | // operators 56 | LogLogUser& operator=(const LogLogUser& rhs); 57 | }; 58 | 59 | } // end namespace helpers 60 | } // end namespace log4cplus 61 | 62 | 63 | #endif // LOG4CPLUS_HELPERS_LOGLOG_USER 64 | 65 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/sleep.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: sleep.h 4 | // Created: 5/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_SLEEP_HEADER_ 25 | #define LOG4CPLUS_HELPERS_SLEEP_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | 34 | namespace log4cplus { 35 | namespace helpers { 36 | LOG4CPLUS_EXPORT void sleep(unsigned long secs, 37 | unsigned long nanosecs = 0); 38 | LOG4CPLUS_EXPORT void sleepmillis(unsigned long millis); 39 | } // end namespace helpers 40 | } // end namespace log4cplus 41 | 42 | #endif // LOG4CPLUS_HELPERS_SLEEP_HEADER_ 43 | 44 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/snprintf.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Zeman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef LOG4CPLUS_HELPERS_SNPRINTF_H 26 | #define LOG4CPLUS_HELPERS_SNPRINTF_H 27 | 28 | #include 29 | 30 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 31 | #pragma once 32 | #endif 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | namespace log4cplus { namespace helpers { 40 | 41 | 42 | class LOG4CPLUS_EXPORT snprintf_buf 43 | { 44 | public: 45 | snprintf_buf (); 46 | 47 | tchar const * print (tchar const * fmt, ...) 48 | LOG4CPLUS_FORMAT_ATTRIBUTE (__printf__, 2, 3); 49 | 50 | int print_va_list (tchar const * & str, tchar const * fmt, std::va_list) 51 | LOG4CPLUS_FORMAT_ATTRIBUTE (__printf__, 3, 0); 52 | 53 | private: 54 | std::vector buf; 55 | }; 56 | 57 | 58 | } } // namespace log4cplus { namespace helpers 59 | 60 | 61 | 62 | #endif // LOG4CPLUS_HELPERS_SNPRINTF_H 63 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/socketbuffer.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: socketbuffer.h 4 | // Created: 5/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_SOCKET_BUFFER_HEADER_ 25 | #define LOG4CPLUS_HELPERS_SOCKET_BUFFER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | namespace helpers { 38 | 39 | /** 40 | * 41 | */ 42 | class LOG4CPLUS_EXPORT SocketBuffer 43 | { 44 | public: 45 | explicit SocketBuffer(std::size_t max); 46 | virtual ~SocketBuffer(); 47 | 48 | char *getBuffer() const { return buffer; } 49 | std::size_t getMaxSize() const { return maxsize; } 50 | std::size_t getSize() const { return size; } 51 | void setSize(std::size_t s) { size = s; } 52 | std::size_t getPos() const { return pos; } 53 | 54 | unsigned char readByte(); 55 | unsigned short readShort(); 56 | unsigned int readInt(); 57 | tstring readString(unsigned char sizeOfChar); 58 | 59 | void appendByte(unsigned char val); 60 | void appendShort(unsigned short val); 61 | void appendInt(unsigned int val); 62 | void appendString(const tstring& str); 63 | void appendBuffer(const SocketBuffer& buffer); 64 | 65 | private: 66 | // Data 67 | std::size_t maxsize; 68 | std::size_t size; 69 | std::size_t pos; 70 | char *buffer; 71 | 72 | SocketBuffer(SocketBuffer const & rhs); 73 | SocketBuffer& operator= (SocketBuffer const& rhs); 74 | }; 75 | 76 | } // end namespace helpers 77 | } // end namespace log4cplus 78 | 79 | #endif // LOG4CPLUS_HELPERS_SOCKET_HEADER_ 80 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/helpers/thread-config.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: thread-config.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | /** @file */ 22 | 23 | #ifndef LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 24 | #define LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 25 | 26 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 27 | #pragma once 28 | #endif 29 | 30 | #if defined (LOG4CPLUS_USE_PTHREADS) 31 | # if defined (__APPLE__) 32 | # define LOG4CPLUS_USE_NAMED_POSIX_SEMAPHORE 33 | # endif 34 | 35 | #elif defined(LOG4CPLUS_USE_WIN32_THREADS) 36 | # if defined (_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 37 | # define LOG4CPLUS_USE_SRW_LOCK 38 | # else 39 | # define LOG4CPLUS_POOR_MANS_SHAREDMUTEX 40 | # endif 41 | # undef LOG4CPLUS_HAVE_TLS_SUPPORT 42 | # undef LOG4CPLUS_THREAD_LOCAL_VAR 43 | # if defined (_MSC_VER) && _WIN32_WINNT >= 0x0600 44 | // The __declspec(thread) functionality is not compatible with LoadLibrary(). 45 | // For more information why see and "Windows and TLS" note in README. 46 | // . 47 | # define LOG4CPLUS_HAVE_TLS_SUPPORT 1 48 | # define LOG4CPLUS_THREAD_LOCAL_VAR __declspec(thread) 49 | # endif 50 | 51 | #elif defined(LOG4CPLUS_SINGLE_THREADED) 52 | # undef LOG4CPLUS_HAVE_TLS_SUPPORT 53 | # undef LOG4CPLUS_THREAD_LOCAL_VAR 54 | 55 | #else 56 | # error "You Must define a Threading model" 57 | 58 | #endif 59 | 60 | 61 | #endif // LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 62 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/hierarchylocker.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: hierarchylocker.h 4 | // Created: 8/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 25 | #define LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | namespace log4cplus 39 | { 40 | 41 | class Hierarchy; 42 | 43 | 44 | /** 45 | * This is used to lock a Hierarchy. The dtor unlocks the Hierarchy. 46 | */ 47 | class LOG4CPLUS_EXPORT HierarchyLocker { 48 | public: 49 | // ctor & dtor 50 | HierarchyLocker(Hierarchy& h); 51 | ~HierarchyLocker(); 52 | 53 | /** 54 | * Calls the resetConfiguration() method on the locked Hierarchy. 55 | */ 56 | void resetConfiguration(); 57 | 58 | /** 59 | * Calls the getInstance() method on the locked Hierarchy. 60 | */ 61 | Logger getInstance(const log4cplus::tstring& name); 62 | 63 | /** 64 | * Calls the getInstance() method on the locked Hierarchy. 65 | */ 66 | Logger getInstance(const log4cplus::tstring& name, spi::LoggerFactory& factory); 67 | 68 | void addAppender(Logger &logger, log4cplus::SharedAppenderPtr& appender); 69 | 70 | private: 71 | // Data 72 | Hierarchy& h; 73 | log4cplus::thread::MutexGuard hierarchyLocker; 74 | LoggerList loggerList; 75 | }; 76 | 77 | } // end namespace log4cplus 78 | 79 | #endif // LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 80 | 81 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/internal/cygwin-win32.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: cygwin-win32.h 4 | // Created: 7/2011 5 | // Author: Vaclav Zeman 6 | // 7 | // Copyright (C) 2011-2013, Vaclav Zeman. All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modifica- 10 | // tion, are permitted provided that the following conditions are met: 11 | // 12 | // 1. Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // 15 | // 2. Redistributions in binary form must reproduce the above copyright notice, 16 | // this list of conditions and the following disclaimer in the documentation 17 | // and/or other materials provided with the distribution. 18 | // 19 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 20 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 23 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 24 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 25 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #if ! defined (LOG4CPLUS_CONFIG_CYGWIN_WIN32_H) 31 | #define LOG4CPLUS_CONFIG_CYGWIN_WIN32_H 32 | 33 | #include 34 | 35 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 36 | #pragma once 37 | #endif 38 | 39 | #if defined (__CYGWIN__) 40 | 41 | #if ! defined (INSIDE_LOG4CPLUS) 42 | # error "This header must not be be used outside log4cplus' implementation files." 43 | #endif 44 | 45 | 46 | namespace log4cplus { namespace cygwin { 47 | 48 | unsigned long get_current_win32_thread_id (); 49 | 50 | } } // namespace log4cplus { namespace cygwin { 51 | 52 | 53 | #endif // defined (__CYGWIN__) 54 | #endif // LOG4CPLUS_CONFIG_CYGWIN_WIN32_H 55 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/internal/env.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: env.h 4 | // Created: 7/2010 5 | // Author: Vaclav Haisman 6 | // 7 | // 8 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 9 | // 10 | // Redistribution and use in source and binary forms, with or without modifica- 11 | // tion, are permitted provided that the following conditions are met: 12 | // 13 | // 1. Redistributions of source code must retain the above copyright notice, 14 | // this list of conditions and the following disclaimer. 15 | // 16 | // 2. Redistributions in binary form must reproduce the above copyright notice, 17 | // this list of conditions and the following disclaimer in the documentation 18 | // and/or other materials provided with the distribution. 19 | // 20 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 21 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 22 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 24 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 25 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 26 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef LOG4CPLUS_INTERNAL_ENV_H 32 | #define LOG4CPLUS_INTERNAL_ENV_H 33 | 34 | #include 35 | 36 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 37 | #pragma once 38 | #endif 39 | 40 | #include 41 | 42 | #if defined (_WIN32) 43 | #include 44 | #endif 45 | #ifdef LOG4CPLUS_HAVE_SYS_TYPES_H 46 | #include 47 | #endif 48 | #ifdef LOG4CPLUS_HAVE_UNISTD_H 49 | #include 50 | #endif 51 | 52 | 53 | namespace log4cplus { namespace internal { 54 | 55 | 56 | bool get_env_var (tstring & value, tstring const & name); 57 | bool parse_bool (bool & val, tstring const & str); 58 | 59 | inline 60 | #if defined (_WIN32) 61 | DWORD 62 | get_process_id () 63 | { 64 | return GetCurrentProcessId (); 65 | } 66 | 67 | #elif defined (LOG4CPLUS_HAVE_GETPID) 68 | pid_t 69 | get_process_id () 70 | { 71 | return getpid (); 72 | } 73 | 74 | #else 75 | int 76 | get_process_id () 77 | { 78 | return 0; 79 | } 80 | 81 | #endif 82 | 83 | 84 | } } // namespace log4cplus { namespace internal { 85 | 86 | 87 | #endif // LOG4CPLUS_INTERNAL_ENV_H 88 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/nullappender.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: nullappender.h 4 | // Created: 6/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_NULL_APPENDER_HEADER_ 25 | #define LOG4CPLUS_NULL_APPENDER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | 38 | /** 39 | * Appends log events to a file. 40 | */ 41 | class LOG4CPLUS_EXPORT NullAppender : public Appender { 42 | public: 43 | // Ctors 44 | NullAppender(); 45 | NullAppender(const log4cplus::helpers::Properties&); 46 | 47 | // Dtor 48 | virtual ~NullAppender(); 49 | 50 | // Methods 51 | virtual void close(); 52 | 53 | protected: 54 | virtual void append(const log4cplus::spi::InternalLoggingEvent& event); 55 | 56 | private: 57 | // Disallow copying of instances of this class 58 | NullAppender(const NullAppender&); 59 | NullAppender& operator=(const NullAppender&); 60 | }; 61 | 62 | } // end namespace log4cplus 63 | 64 | #endif // LOG4CPLUS_NULL_APPENDER_HEADER_ 65 | 66 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/spi/loggerfactory.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: loggerfactory.h 4 | // Created: 6/2001 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2001-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 25 | #define LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | // Forward Declarations 38 | class Logger; 39 | class Hierarchy; 40 | 41 | namespace spi { 42 | /** 43 | * Implement this interface to create new instances of Logger or 44 | * a sub-class of Logger. 45 | */ 46 | class LOG4CPLUS_EXPORT LoggerFactory { 47 | public: 48 | /** 49 | * Creates a new Logger object. 50 | */ 51 | virtual Logger makeNewLoggerInstance(const log4cplus::tstring& name, 52 | Hierarchy& h) = 0; 53 | virtual ~LoggerFactory() = 0; 54 | }; 55 | 56 | } // end namespace spi 57 | } // end namespace log4cplus 58 | 59 | #endif // LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 60 | 61 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/spi/rootlogger.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: rootlogger.h 4 | // Created: 6/2001 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2001-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 25 | #define LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | namespace log4cplus { 36 | namespace spi { 37 | 38 | /** 39 | * RootLogger sits at the top of the logger hierachy. It is a 40 | * regular logger except that it provides several guarantees. 41 | * 42 | * First, it cannot be assigned a NOT_SET_LOG_LEVEL 43 | * LogLevel. Second, since root logger cannot have a parent, the 44 | * getChainedLogLevel method always returns the value of the 45 | * ll field without walking the hierarchy. 46 | */ 47 | class LOG4CPLUS_EXPORT RootLogger : public LoggerImpl { 48 | public: 49 | // Ctors 50 | /** 51 | * The root logger names itself as "root". However, the root 52 | * logger cannot be retrieved by name. 53 | */ 54 | RootLogger(Hierarchy& h, LogLevel ll); 55 | 56 | // Methods 57 | /** 58 | * Return the assigned LogLevel value without walking the logger 59 | * hierarchy. 60 | */ 61 | virtual LogLevel getChainedLogLevel() const; 62 | 63 | /** 64 | * Setting a NOT_SET_LOG_LEVEL value to the LogLevel of the root logger 65 | * may have catastrophic results. We prevent this here. 66 | */ 67 | void setLogLevel(LogLevel ll); 68 | 69 | }; 70 | 71 | } // end namespace spi 72 | } // end namespace log4cplus 73 | 74 | #endif // LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 75 | 76 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/streams.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: streams.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_STREAMS_HEADER_ 25 | #define LOG4CPLUS_STREAMS_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | #include 36 | 37 | 38 | namespace log4cplus 39 | { 40 | typedef std::basic_ostream tostream; 41 | typedef std::basic_istream tistream; 42 | typedef std::basic_ostringstream tostringstream; 43 | typedef std::basic_istringstream tistringstream; 44 | extern LOG4CPLUS_EXPORT tostream & tcout; 45 | extern LOG4CPLUS_EXPORT tostream & tcerr; 46 | } 47 | 48 | #if defined (UNICODE) && defined (LOG4CPLUS_ENABLE_GLOBAL_C_STRING_STREAM_INSERTER) 49 | 50 | LOG4CPLUS_EXPORT log4cplus::tostream& operator <<(log4cplus::tostream&, const char* psz ); 51 | 52 | #endif 53 | 54 | #endif // LOG4CPLUS_STREAMS_HEADER_ 55 | 56 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/tchar.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | /** @file */ 26 | 27 | #ifndef LOG4CPLUS_TCHAR_HEADER_ 28 | #define LOG4CPLUS_TCHAR_HEADER_ 29 | 30 | #include 31 | 32 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 33 | #pragma once 34 | #endif 35 | 36 | #if defined (_WIN32) 37 | #include 38 | #endif 39 | 40 | 41 | #ifdef UNICODE 42 | # define LOG4CPLUS_TEXT2(STRING) L##STRING 43 | #else 44 | # define LOG4CPLUS_TEXT2(STRING) STRING 45 | #endif // UNICODE 46 | #define LOG4CPLUS_TEXT(STRING) LOG4CPLUS_TEXT2(STRING) 47 | 48 | 49 | namespace log4cplus 50 | { 51 | 52 | #if defined (UNICODE) 53 | typedef wchar_t tchar; 54 | 55 | #else 56 | typedef char tchar; 57 | 58 | #endif 59 | 60 | } // namespace log4cplus 61 | 62 | 63 | #endif // LOG4CPLUS_TCHAR_HEADER_ 64 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/thread/threads.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: threads.h 4 | // Created: 6/2001 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2001-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_THREADS_HEADER_ 25 | #define LOG4CPLUS_THREADS_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | 37 | namespace log4cplus { namespace thread { 38 | 39 | 40 | LOG4CPLUS_EXPORT log4cplus::tstring const & getCurrentThreadName(); 41 | LOG4CPLUS_EXPORT log4cplus::tstring const & getCurrentThreadName2(); 42 | LOG4CPLUS_EXPORT void yield(); 43 | LOG4CPLUS_EXPORT void blockAllSignals(); 44 | 45 | 46 | #ifndef LOG4CPLUS_SINGLE_THREADED 47 | 48 | class ThreadImplBase 49 | : public virtual log4cplus::helpers::SharedObject 50 | { 51 | protected: 52 | virtual ~ThreadImplBase (); 53 | }; 54 | 55 | 56 | /** 57 | * There are many cross-platform C++ Threading libraries. The goal of 58 | * this class is not to replace (or match in functionality) those 59 | * libraries. The goal of this class is to provide a simple Threading 60 | * class with basic functionality. 61 | */ 62 | class LOG4CPLUS_EXPORT AbstractThread 63 | : public virtual log4cplus::helpers::SharedObject 64 | { 65 | public: 66 | AbstractThread(); 67 | bool isRunning() const; 68 | virtual void start(); 69 | void join () const; 70 | virtual void run() = 0; 71 | 72 | protected: 73 | // Force objects to be constructed on the heap 74 | virtual ~AbstractThread(); 75 | 76 | private: 77 | helpers::SharedObjectPtr thread; 78 | 79 | // Disallow copying of instances of this class. 80 | AbstractThread(const AbstractThread&); 81 | AbstractThread& operator=(const AbstractThread&); 82 | }; 83 | 84 | typedef helpers::SharedObjectPtr AbstractThreadPtr; 85 | 86 | 87 | #endif // LOG4CPLUS_SINGLE_THREADED 88 | 89 | 90 | } } // namespace log4cplus { namespace thread { 91 | 92 | 93 | #endif // LOG4CPLUS_THREADS_HEADER_ 94 | 95 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/tracelogger.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: tracelogger.h 4 | // Created: 1/2009 5 | // Author: Vaclav Haisman 6 | // 7 | // 8 | // Copyright 2009-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_TRACELOGGER_H 25 | #define LOG4CPLUS_TRACELOGGER_H 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus 37 | { 38 | 39 | 40 | /** 41 | * This class is used to produce "Trace" logging. When an instance of 42 | * this class is created, it will log a "ENTER: " + msg 43 | * log message if TRACE_LOG_LEVEL is enabled for logger. 44 | * When an instance of this class is destroyed, it will log a 45 | * "ENTER: " + msg log message if TRACE_LOG_LEVEL is enabled 46 | * for logger. 47 | *

48 | * @see LOG4CPLUS_TRACE 49 | */ 50 | class TraceLogger 51 | { 52 | public: 53 | TraceLogger(const Logger& l, const log4cplus::tstring& _msg, 54 | const char* _file=NULL, int _line=-1) 55 | : logger(l), msg(_msg), file(_file), line(_line) 56 | { if(logger.isEnabledFor(TRACE_LOG_LEVEL)) 57 | logger.forcedLog(TRACE_LOG_LEVEL, LOG4CPLUS_TEXT("ENTER: ") + msg, file, line); 58 | } 59 | 60 | ~TraceLogger() 61 | { if(logger.isEnabledFor(TRACE_LOG_LEVEL)) 62 | logger.forcedLog(TRACE_LOG_LEVEL, LOG4CPLUS_TEXT("EXIT: ") + msg, file, line); 63 | } 64 | 65 | private: 66 | TraceLogger (TraceLogger const &); 67 | TraceLogger & operator = (TraceLogger const &); 68 | 69 | Logger logger; 70 | log4cplus::tstring msg; 71 | const char* file; 72 | int line; 73 | }; 74 | 75 | 76 | } // log4cplus 77 | 78 | 79 | #endif // LOG4CPLUS_TRACELOGGER_H 80 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/version.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | 26 | #if ! defined (LOG4CPLUS_VERSION_H) 27 | #define LOG4CPLUS_VERSION_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #define LOG4CPLUS_MAKE_VERSION(major, minor, point) \ 36 | (major * 1000 * 1000u + minor * 1000u + point) 37 | 38 | #define LOG4CPLUS_MAKE_VERSION_STR(major, minor, point) \ 39 | #major "." #minor "." #point 40 | 41 | #define LOG4CPLUS_VERSION LOG4CPLUS_MAKE_VERSION(1, 1, 1) 42 | #define LOG4CPLUS_VERSION_STR LOG4CPLUS_MAKE_VERSION_STR(1, 1, 1) 43 | 44 | 45 | namespace log4cplus 46 | { 47 | 48 | extern LOG4CPLUS_EXPORT unsigned const version; 49 | extern LOG4CPLUS_EXPORT char const versionStr[]; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/include/log4cplus/win32debugappender.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: win32debugappender.h 4 | // Created: 12/2003 5 | // Author: Eduardo Francos, Odalio SARL 6 | // 7 | // 8 | // Copyright 2003-2013 Odalio SARL 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 25 | #define LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #if defined (LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING) 34 | 35 | #include 36 | 37 | 38 | namespace log4cplus { 39 | 40 | /** 41 | * Prints log events using OutputDebugString(). 42 | */ 43 | class LOG4CPLUS_EXPORT Win32DebugAppender 44 | : public Appender 45 | { 46 | public: 47 | // Ctors 48 | Win32DebugAppender(); 49 | Win32DebugAppender(const log4cplus::helpers::Properties& properties); 50 | 51 | // Dtor 52 | virtual ~Win32DebugAppender(); 53 | 54 | // Methods 55 | virtual void close(); 56 | 57 | protected: 58 | virtual void append(const log4cplus::spi::InternalLoggingEvent& event); 59 | 60 | private: 61 | // Disallow copying of instances of this class 62 | Win32DebugAppender(const Win32DebugAppender&); 63 | Win32DebugAppender& operator=(const Win32DebugAppender&); 64 | }; 65 | 66 | } // end namespace log4cplus 67 | 68 | #endif // LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING 69 | #endif // LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 70 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/lib/liblog4cplus.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/linux/log4cplus/lib/liblog4cplus.a -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/lib/liblog4cplus.la: -------------------------------------------------------------------------------- 1 | # liblog4cplus.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='liblog4cplus-1.1.so.7' 9 | 10 | # Names of this library. 11 | library_names='liblog4cplus-1.1.so.7.0.0 liblog4cplus-1.1.so.7 liblog4cplus.so' 12 | 13 | # The name of the static archive. 14 | old_library='liblog4cplus.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lrt /usr/local/lib/../lib64/libstdc++.la' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for liblog4cplus. 26 | current=7 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/mnt/share/xh-net/dependencies/linux/log4cplus/lib' 42 | -------------------------------------------------------------------------------- /dependencies/linux/log4cplus/lib/pkgconfig/log4cplus.pc: -------------------------------------------------------------------------------- 1 | prefix=/mnt/share/xh-net/dependencies/linux/log4cplus 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | modules= 6 | 7 | Name: log4cplus 8 | Version: 1.1.1 9 | Description: Simple to use, thread-safe C++ logging API 10 | Requires: 11 | Libs: -L${libdir} -llog4cplus 12 | Libs.private: -lrt 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /dependencies/source/tolua/tolua_event.h: -------------------------------------------------------------------------------- 1 | /* tolua: event functions 2 | ** Support code for Lua bindings. 3 | ** Written by Waldemar Celes 4 | ** TeCGraf/PUC-Rio 5 | ** Apr 2003 6 | ** $Id: $ 7 | */ 8 | 9 | /* This code is free software; you can redistribute it and/or modify it. 10 | ** The software provided hereunder is on an "as is" basis, and 11 | ** the author has no obligation to provide maintenance, support, updates, 12 | ** enhancements, or modifications. 13 | */ 14 | 15 | #ifndef TOLUA_EVENT_H 16 | #define TOLUA_EVENT_H 17 | 18 | #include "tolua++.h" 19 | 20 | TOLUA_API void tolua_moduleevents (lua_State* L); 21 | TOLUA_API int tolua_ismodulemetatable (lua_State* L); 22 | TOLUA_API void tolua_classevents (lua_State* L); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/evdns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVDNS_H_ 28 | #define _EVDNS_H_ 29 | 30 | /** @file evdns.h 31 | 32 | A dns subsystem for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVDNS_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/event2/rpc_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVENT2_RPC_COMPAT_H_ 28 | #define _EVENT2_RPC_COMPAT_H_ 29 | 30 | /** @file event2/rpc_compat.h 31 | 32 | Deprecated versions of the functions in rpc.h: provided only for 33 | backwards compatibility. 34 | 35 | */ 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /** backwards compatible accessors that work only with gcc */ 42 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 43 | 44 | #undef EVTAG_ASSIGN 45 | #undef EVTAG_GET 46 | #undef EVTAG_ADD 47 | 48 | #define EVTAG_ASSIGN(msg, member, args...) \ 49 | (*(msg)->base->member##_assign)(msg, ## args) 50 | #define EVTAG_GET(msg, member, args...) \ 51 | (*(msg)->base->member##_get)(msg, ## args) 52 | #define EVTAG_ADD(msg, member, args...) \ 53 | (*(msg)->base->member##_add)(msg, ## args) 54 | #endif 55 | #define EVTAG_LEN(msg, member) ((msg)->member##_length) 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif /* _EVENT2_EVENT_COMPAT_H_ */ 62 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/event2/tag_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVENT2_TAG_COMPAT_H_ 28 | #define _EVENT2_TAG_COMPAT_H_ 29 | 30 | /** @file event2/tag_compat.h 31 | 32 | Obsolete/deprecated functions from tag.h; provided only for backwards 33 | compatibility. 34 | */ 35 | 36 | /** 37 | @name Misnamed functions 38 | 39 | @deprecated These macros are deprecated because their names don't follow 40 | Libevent's naming conventions. Use evtag_encode_int and 41 | evtag_encode_int64 instead. 42 | 43 | @{ 44 | */ 45 | #define encode_int(evbuf, number) evtag_encode_int((evbuf), (number)) 46 | #define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number)) 47 | /**@}*/ 48 | 49 | #endif /* _EVENT2_TAG_H_ */ 50 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/evhttp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2000-2007 Niels Provos 3 | * Copyright 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVHTTP_H_ 28 | #define _EVHTTP_H_ 29 | 30 | /** @file evhttp.h 31 | 32 | An http implementation subsystem for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVHTTP_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/evrpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _EVRPC_H_ 28 | #define _EVRPC_H_ 29 | 30 | /** @file evrpc.h 31 | 32 | An RPC system for Libevent. 33 | 34 | The header is deprecated in Libevent 2.0 and later; please 35 | use instead. Depending on what functionality you 36 | need, you may also want to include more of the other 37 | headers. 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #endif /* _EVRPC_H_ */ 46 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/evutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. The name of the author may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #ifndef _EVUTIL_H_ 27 | #define _EVUTIL_H_ 28 | 29 | /** @file evutil.h 30 | 31 | Utility and compatibility functions for Libevent. 32 | 33 | The header is deprecated in Libevent 2.0 and later; please 34 | use instead. 35 | */ 36 | 37 | #include 38 | 39 | #endif /* _EVUTIL_H_ */ 40 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/log-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2007 Niels Provos 3 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _LOG_H_ 28 | #define _LOG_H_ 29 | 30 | #include "event2/util.h" 31 | 32 | #ifdef __GNUC__ 33 | #define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b))) 34 | #define EV_NORETURN __attribute__((noreturn)) 35 | #else 36 | #define EV_CHECK_FMT(a,b) 37 | #define EV_NORETURN 38 | #endif 39 | 40 | #define _EVENT_ERR_ABORT ((int)0xdeaddead) 41 | 42 | void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN; 43 | void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2); 44 | void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4) EV_NORETURN; 45 | void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3); 46 | void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN; 47 | void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2); 48 | void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2); 49 | void _event_debugx(const char *fmt, ...) EV_CHECK_FMT(1,2); 50 | 51 | #ifdef USE_DEBUG 52 | #define event_debug(x) _event_debugx x 53 | #else 54 | #define event_debug(x) do {;} while (0) 55 | #endif 56 | 57 | #undef EV_CHECK_FMT 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/mm-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 3. The name of the author may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #ifndef _EVENT_MM_INTERNAL_H 27 | #define _EVENT_MM_INTERNAL_H 28 | 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #ifndef _EVENT_DISABLE_MM_REPLACEMENT 36 | /* Internal use only: Memory allocation functions. We give them nice short 37 | * mm_names for our own use, but make sure that the symbols have longer names 38 | * so they don't conflict with other libraries (like, say, libmm). */ 39 | void *event_mm_malloc_(size_t sz); 40 | void *event_mm_calloc_(size_t count, size_t size); 41 | char *event_mm_strdup_(const char *s); 42 | void *event_mm_realloc_(void *p, size_t sz); 43 | void event_mm_free_(void *p); 44 | #define mm_malloc(sz) event_mm_malloc_(sz) 45 | #define mm_calloc(count, size) event_mm_calloc_((count), (size)) 46 | #define mm_strdup(s) event_mm_strdup_(s) 47 | #define mm_realloc(p, sz) event_mm_realloc_((p), (sz)) 48 | #define mm_free(p) event_mm_free_(p) 49 | #else 50 | #define mm_malloc(sz) malloc(sz) 51 | #define mm_calloc(n, sz) calloc((n), (sz)) 52 | #define mm_strdup(s) strdup(s) 53 | #define mm_realloc(p, sz) realloc((p), (sz)) 54 | #define mm_free(p) free(p) 55 | #endif 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/include/strlcpy-internal.h: -------------------------------------------------------------------------------- 1 | #ifndef _STRLCPY_INTERNAL_H_ 2 | #define _STRLCPY_INTERNAL_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "event2/event-config.h" 9 | 10 | #ifndef _EVENT_HAVE_STRLCPY 11 | #include 12 | size_t _event_strlcpy(char *dst, const char *src, size_t siz); 13 | #define strlcpy _event_strlcpy 14 | #endif 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /dependencies/windows/libevent/lib/libevent_core.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/libevent/lib/libevent_core.lib -------------------------------------------------------------------------------- /dependencies/windows/libevent/lib/libevent_extras.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/libevent/lib/libevent_extras.lib -------------------------------------------------------------------------------- /dependencies/windows/libiconv/lib/iconv.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/libiconv/lib/iconv.lib -------------------------------------------------------------------------------- /dependencies/windows/libiconv/lib/iconvD.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/libiconv/lib/iconvD.lib -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/Makefile.am: -------------------------------------------------------------------------------- 1 | log4cplusincdir = $(includedir) 2 | 3 | nobase_log4cplusinc_HEADERS = \ 4 | log4cplus/appender.h \ 5 | log4cplus/asyncappender.h \ 6 | log4cplus/boost/deviceappender.hxx \ 7 | log4cplus/clogger.h \ 8 | log4cplus/config.hxx \ 9 | log4cplus/config/defines.hxx \ 10 | log4cplus/config/macosx.h \ 11 | log4cplus/config/win32.h \ 12 | log4cplus/config/windowsh-inc.h \ 13 | log4cplus/configurator.h \ 14 | log4cplus/consoleappender.h \ 15 | log4cplus/fileappender.h \ 16 | log4cplus/fstreams.h \ 17 | log4cplus/helpers/appenderattachableimpl.h \ 18 | log4cplus/helpers/fileinfo.h \ 19 | log4cplus/helpers/lockfile.h \ 20 | log4cplus/helpers/loglog.h \ 21 | log4cplus/helpers/logloguser.h \ 22 | log4cplus/helpers/pointer.h \ 23 | log4cplus/helpers/property.h \ 24 | log4cplus/helpers/queue.h \ 25 | log4cplus/helpers/sleep.h \ 26 | log4cplus/helpers/snprintf.h \ 27 | log4cplus/helpers/socketbuffer.h \ 28 | log4cplus/helpers/socket.h \ 29 | log4cplus/helpers/stringhelper.h \ 30 | log4cplus/helpers/thread-config.h \ 31 | log4cplus/helpers/timehelper.h \ 32 | log4cplus/hierarchy.h \ 33 | log4cplus/hierarchylocker.h \ 34 | log4cplus/internal/cygwin-win32.h \ 35 | log4cplus/internal/env.h \ 36 | log4cplus/internal/internal.h \ 37 | log4cplus/internal/socket.h \ 38 | log4cplus/layout.h \ 39 | log4cplus/log4judpappender.h \ 40 | log4cplus/logger.h \ 41 | log4cplus/loggingmacros.h \ 42 | log4cplus/loglevel.h \ 43 | log4cplus/mdc.h \ 44 | log4cplus/ndc.h \ 45 | log4cplus/nteventlogappender.h \ 46 | log4cplus/nullappender.h \ 47 | log4cplus/qt4debugappender.h \ 48 | log4cplus/spi/appenderattachable.h \ 49 | log4cplus/spi/factory.h \ 50 | log4cplus/spi/filter.h \ 51 | log4cplus/spi/loggerfactory.h \ 52 | log4cplus/spi/loggerimpl.h \ 53 | log4cplus/spi/loggingevent.h \ 54 | log4cplus/spi/objectregistry.h \ 55 | log4cplus/spi/rootlogger.h \ 56 | log4cplus/socketappender.h \ 57 | log4cplus/streams.h \ 58 | log4cplus/syslogappender.h \ 59 | log4cplus/tchar.h \ 60 | log4cplus/thread/impl/syncprims-impl.h \ 61 | log4cplus/thread/impl/syncprims-pthreads.h \ 62 | log4cplus/thread/impl/syncprims-win32.h \ 63 | log4cplus/thread/impl/threads-impl.h \ 64 | log4cplus/thread/impl/tls.h \ 65 | log4cplus/thread/syncprims.h \ 66 | log4cplus/thread/syncprims-pub-impl.h \ 67 | log4cplus/thread/threads.h \ 68 | log4cplus/tracelogger.h \ 69 | log4cplus/tstring.h \ 70 | log4cplus/version.h \ 71 | log4cplus/win32consoleappender.h \ 72 | log4cplus/win32debugappender.h 73 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/config/macosx.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: config-macosx.h 4 | // Created: 7/2003 5 | // Author: Christopher R. Bailey 6 | // 7 | // 8 | // Copyright 2003-2013 Christopher R. Bailey 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_CONFIG_MACOSX_HEADER_ 25 | #define LOG4CPLUS_CONFIG_MACOSX_HEADER_ 26 | 27 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 28 | #pragma once 29 | #endif 30 | 31 | #if (defined(__APPLE__) || (defined(__MWERKS__) && defined(__MACOS__))) 32 | 33 | #define LOG4CPLUS_HAVE_GETTIMEOFDAY 1 34 | #define socklen_t int 35 | 36 | #endif // MACOSX 37 | #endif // LOG4CPLUS_CONFIG_MACOSX_HEADER_ 38 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/fstreams.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: fstreams.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_FSTREAMS_HEADER_ 25 | #define LOG4CPLUS_FSTREAMS_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | 37 | namespace log4cplus 38 | { 39 | 40 | 41 | typedef std::basic_ofstream tofstream; 42 | typedef std::basic_ifstream tifstream; 43 | 44 | //! \def LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) 45 | //! \brief Expands into expression that picks the right type for 46 | //! std::fstream file name parameter. 47 | #if defined (LOG4CPLUS_FSTREAM_ACCEPTS_WCHAR_T) && defined (UNICODE) 48 | # define LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) (X) 49 | #else 50 | # define LOG4CPLUS_FSTREAM_PREFERED_FILE_NAME(X) (LOG4CPLUS_TSTRING_TO_STRING(X)) 51 | #endif 52 | 53 | 54 | } 55 | 56 | #endif // LOG4CPLUS_FSTREAMS_HEADER_ 57 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/fileinfo.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // 3 | // Copyright (C) 2012-2013, Vaclav Zeman. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modifica- 6 | // tion, are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 16 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 17 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 18 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 19 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 20 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 21 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | #if ! defined (LOG4CPLUS_HELPERS_FILEINFO_H) 27 | #define LOG4CPLUS_HELPERS_FILEINFO_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #include 36 | #ifdef LOG4CPLUS_HAVE_SYS_TYPES_H 37 | #include 38 | #endif 39 | 40 | 41 | namespace log4cplus { namespace helpers { 42 | 43 | //! FileInfo structure is OS independent abstraction of the 44 | //! stat() function. 45 | struct LOG4CPLUS_EXPORT FileInfo 46 | { 47 | helpers::Time mtime; 48 | bool is_link; 49 | off_t size; 50 | }; 51 | 52 | 53 | //! OS independent abstraction of stat() function. 54 | LOG4CPLUS_EXPORT int getFileInfo (FileInfo * fi, tstring const & name); 55 | 56 | 57 | } } // namespace log4cplus { namespace helpers { 58 | 59 | #endif // LOG4CPLUS_HELPERS_FILEINFO_H 60 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/lockfile.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // 3 | // Copyright (C) 2012-2013, Vaclav Zeman. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modifica- 6 | // tion, are permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, 12 | // this list of conditions and the following disclaimer in the documentation 13 | // and/or other materials provided with the distribution. 14 | // 15 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 16 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 17 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 18 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 19 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 20 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 21 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | #if ! defined (LOG4CPLUS_HELPERS_LOCKFILE_H) 27 | #define LOG4CPLUS_HELPERS_LOCKFILE_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | 39 | namespace log4cplus { namespace helpers { 40 | 41 | 42 | class LOG4CPLUS_EXPORT LockFile 43 | { 44 | public: 45 | LockFile (tstring const & lock_file); 46 | ~LockFile (); 47 | 48 | void lock () const; 49 | void unlock () const; 50 | 51 | private: 52 | void open (int) const; 53 | void close () const; 54 | 55 | struct Impl; 56 | 57 | tstring lock_file_name; 58 | Impl * data; 59 | }; 60 | 61 | 62 | typedef log4cplus::thread::SyncGuard LockFileGuard; 63 | 64 | 65 | } } // namespace log4cplus { namespace helpers { 66 | 67 | 68 | #endif // LOG4CPLUS_HELPERS_LOCKFILE_H 69 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/logloguser.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: logloguser.h 4 | // Created: 6/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_LOGLOG_USER 25 | #define LOG4CPLUS_HELPERS_LOGLOG_USER 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | 34 | namespace log4cplus { 35 | namespace helpers { 36 | // forward declarations 37 | class LogLog; 38 | 39 | /** 40 | * This class used to simplify the use of the LogLog class. Any class 41 | * that uses the LogLog class should extend this class and retrieve 42 | * their reference to LogLog using the method provided. 43 | */ 44 | class LOG4CPLUS_EXPORT LogLogUser 45 | { 46 | public: 47 | // ctor and dtor 48 | LogLogUser(); 49 | LogLogUser(const LogLogUser&); 50 | virtual ~LogLogUser(); 51 | 52 | // public methods 53 | LogLog& getLogLog() const; 54 | 55 | // operators 56 | LogLogUser& operator=(const LogLogUser& rhs); 57 | }; 58 | 59 | } // end namespace helpers 60 | } // end namespace log4cplus 61 | 62 | 63 | #endif // LOG4CPLUS_HELPERS_LOGLOG_USER 64 | 65 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/sleep.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: sleep.h 4 | // Created: 5/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_SLEEP_HEADER_ 25 | #define LOG4CPLUS_HELPERS_SLEEP_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | 34 | namespace log4cplus { 35 | namespace helpers { 36 | LOG4CPLUS_EXPORT void sleep(unsigned long secs, 37 | unsigned long nanosecs = 0); 38 | LOG4CPLUS_EXPORT void sleepmillis(unsigned long millis); 39 | } // end namespace helpers 40 | } // end namespace log4cplus 41 | 42 | #endif // LOG4CPLUS_HELPERS_SLEEP_HEADER_ 43 | 44 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/snprintf.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Zeman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef LOG4CPLUS_HELPERS_SNPRINTF_H 26 | #define LOG4CPLUS_HELPERS_SNPRINTF_H 27 | 28 | #include 29 | 30 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 31 | #pragma once 32 | #endif 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | namespace log4cplus { namespace helpers { 40 | 41 | 42 | class LOG4CPLUS_EXPORT snprintf_buf 43 | { 44 | public: 45 | snprintf_buf (); 46 | 47 | tchar const * print (tchar const * fmt, ...) 48 | LOG4CPLUS_FORMAT_ATTRIBUTE (__printf__, 2, 3); 49 | 50 | int print_va_list (tchar const * & str, tchar const * fmt, std::va_list) 51 | LOG4CPLUS_FORMAT_ATTRIBUTE (__printf__, 3, 0); 52 | 53 | private: 54 | std::vector buf; 55 | }; 56 | 57 | 58 | } } // namespace log4cplus { namespace helpers 59 | 60 | 61 | 62 | #endif // LOG4CPLUS_HELPERS_SNPRINTF_H 63 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/socketbuffer.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: socketbuffer.h 4 | // Created: 5/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HELPERS_SOCKET_BUFFER_HEADER_ 25 | #define LOG4CPLUS_HELPERS_SOCKET_BUFFER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | namespace helpers { 38 | 39 | /** 40 | * 41 | */ 42 | class LOG4CPLUS_EXPORT SocketBuffer 43 | { 44 | public: 45 | explicit SocketBuffer(std::size_t max); 46 | virtual ~SocketBuffer(); 47 | 48 | char *getBuffer() const { return buffer; } 49 | std::size_t getMaxSize() const { return maxsize; } 50 | std::size_t getSize() const { return size; } 51 | void setSize(std::size_t s) { size = s; } 52 | std::size_t getPos() const { return pos; } 53 | 54 | unsigned char readByte(); 55 | unsigned short readShort(); 56 | unsigned int readInt(); 57 | tstring readString(unsigned char sizeOfChar); 58 | 59 | void appendByte(unsigned char val); 60 | void appendShort(unsigned short val); 61 | void appendInt(unsigned int val); 62 | void appendString(const tstring& str); 63 | void appendBuffer(const SocketBuffer& buffer); 64 | 65 | private: 66 | // Data 67 | std::size_t maxsize; 68 | std::size_t size; 69 | std::size_t pos; 70 | char *buffer; 71 | 72 | SocketBuffer(SocketBuffer const & rhs); 73 | SocketBuffer& operator= (SocketBuffer const& rhs); 74 | }; 75 | 76 | } // end namespace helpers 77 | } // end namespace log4cplus 78 | 79 | #endif // LOG4CPLUS_HELPERS_SOCKET_HEADER_ 80 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/helpers/thread-config.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: thread-config.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | /** @file */ 22 | 23 | #ifndef LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 24 | #define LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 25 | 26 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 27 | #pragma once 28 | #endif 29 | 30 | #if defined (LOG4CPLUS_USE_PTHREADS) 31 | # if defined (__APPLE__) 32 | # define LOG4CPLUS_USE_NAMED_POSIX_SEMAPHORE 33 | # endif 34 | 35 | #elif defined(LOG4CPLUS_USE_WIN32_THREADS) 36 | # if defined (_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 37 | # define LOG4CPLUS_USE_SRW_LOCK 38 | # else 39 | # define LOG4CPLUS_POOR_MANS_SHAREDMUTEX 40 | # endif 41 | # undef LOG4CPLUS_HAVE_TLS_SUPPORT 42 | # undef LOG4CPLUS_THREAD_LOCAL_VAR 43 | # if defined (_MSC_VER) && _WIN32_WINNT >= 0x0600 44 | // The __declspec(thread) functionality is not compatible with LoadLibrary(). 45 | // For more information why see and "Windows and TLS" note in README. 46 | // . 47 | # define LOG4CPLUS_HAVE_TLS_SUPPORT 1 48 | # define LOG4CPLUS_THREAD_LOCAL_VAR __declspec(thread) 49 | # endif 50 | 51 | #elif defined(LOG4CPLUS_SINGLE_THREADED) 52 | # undef LOG4CPLUS_HAVE_TLS_SUPPORT 53 | # undef LOG4CPLUS_THREAD_LOCAL_VAR 54 | 55 | #else 56 | # error "You Must define a Threading model" 57 | 58 | #endif 59 | 60 | 61 | #endif // LOG4CPLUS_HELPERS_THREAD_CONFIG_HEADER_ 62 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/hierarchylocker.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: hierarchylocker.h 4 | // Created: 8/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 25 | #define LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | namespace log4cplus 39 | { 40 | 41 | class Hierarchy; 42 | 43 | 44 | /** 45 | * This is used to lock a Hierarchy. The dtor unlocks the Hierarchy. 46 | */ 47 | class LOG4CPLUS_EXPORT HierarchyLocker { 48 | public: 49 | // ctor & dtor 50 | HierarchyLocker(Hierarchy& h); 51 | ~HierarchyLocker(); 52 | 53 | /** 54 | * Calls the resetConfiguration() method on the locked Hierarchy. 55 | */ 56 | void resetConfiguration(); 57 | 58 | /** 59 | * Calls the getInstance() method on the locked Hierarchy. 60 | */ 61 | Logger getInstance(const log4cplus::tstring& name); 62 | 63 | /** 64 | * Calls the getInstance() method on the locked Hierarchy. 65 | */ 66 | Logger getInstance(const log4cplus::tstring& name, spi::LoggerFactory& factory); 67 | 68 | void addAppender(Logger &logger, log4cplus::SharedAppenderPtr& appender); 69 | 70 | private: 71 | // Data 72 | Hierarchy& h; 73 | log4cplus::thread::MutexGuard hierarchyLocker; 74 | LoggerList loggerList; 75 | }; 76 | 77 | } // end namespace log4cplus 78 | 79 | #endif // LOG4CPLUS_HIERARCHY_LOCKER_HEADER_ 80 | 81 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/internal/cygwin-win32.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: cygwin-win32.h 4 | // Created: 7/2011 5 | // Author: Vaclav Zeman 6 | // 7 | // Copyright (C) 2011-2013, Vaclav Zeman. All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modifica- 10 | // tion, are permitted provided that the following conditions are met: 11 | // 12 | // 1. Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // 15 | // 2. Redistributions in binary form must reproduce the above copyright notice, 16 | // this list of conditions and the following disclaimer in the documentation 17 | // and/or other materials provided with the distribution. 18 | // 19 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 20 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 23 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 24 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 25 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #if ! defined (LOG4CPLUS_CONFIG_CYGWIN_WIN32_H) 31 | #define LOG4CPLUS_CONFIG_CYGWIN_WIN32_H 32 | 33 | #include 34 | 35 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 36 | #pragma once 37 | #endif 38 | 39 | #if defined (__CYGWIN__) 40 | 41 | #if ! defined (INSIDE_LOG4CPLUS) 42 | # error "This header must not be be used outside log4cplus' implementation files." 43 | #endif 44 | 45 | 46 | namespace log4cplus { namespace cygwin { 47 | 48 | unsigned long get_current_win32_thread_id (); 49 | 50 | } } // namespace log4cplus { namespace cygwin { 51 | 52 | 53 | #endif // defined (__CYGWIN__) 54 | #endif // LOG4CPLUS_CONFIG_CYGWIN_WIN32_H 55 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/internal/env.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: env.h 4 | // Created: 7/2010 5 | // Author: Vaclav Haisman 6 | // 7 | // 8 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 9 | // 10 | // Redistribution and use in source and binary forms, with or without modifica- 11 | // tion, are permitted provided that the following conditions are met: 12 | // 13 | // 1. Redistributions of source code must retain the above copyright notice, 14 | // this list of conditions and the following disclaimer. 15 | // 16 | // 2. Redistributions in binary form must reproduce the above copyright notice, 17 | // this list of conditions and the following disclaimer in the documentation 18 | // and/or other materials provided with the distribution. 19 | // 20 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 21 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 22 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 24 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 25 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 26 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef LOG4CPLUS_INTERNAL_ENV_H 32 | #define LOG4CPLUS_INTERNAL_ENV_H 33 | 34 | #include 35 | 36 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 37 | #pragma once 38 | #endif 39 | 40 | #include 41 | 42 | #if defined (_WIN32) 43 | #include 44 | #endif 45 | #ifdef LOG4CPLUS_HAVE_SYS_TYPES_H 46 | #include 47 | #endif 48 | #ifdef LOG4CPLUS_HAVE_UNISTD_H 49 | #include 50 | #endif 51 | 52 | 53 | namespace log4cplus { namespace internal { 54 | 55 | 56 | bool get_env_var (tstring & value, tstring const & name); 57 | bool parse_bool (bool & val, tstring const & str); 58 | 59 | inline 60 | #if defined (_WIN32) 61 | DWORD 62 | get_process_id () 63 | { 64 | return GetCurrentProcessId (); 65 | } 66 | 67 | #elif defined (LOG4CPLUS_HAVE_GETPID) 68 | pid_t 69 | get_process_id () 70 | { 71 | return getpid (); 72 | } 73 | 74 | #else 75 | int 76 | get_process_id () 77 | { 78 | return 0; 79 | } 80 | 81 | #endif 82 | 83 | 84 | } } // namespace log4cplus { namespace internal { 85 | 86 | 87 | #endif // LOG4CPLUS_INTERNAL_ENV_H 88 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/nullappender.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: nullappender.h 4 | // Created: 6/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_NULL_APPENDER_HEADER_ 25 | #define LOG4CPLUS_NULL_APPENDER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | 38 | /** 39 | * Appends log events to a file. 40 | */ 41 | class LOG4CPLUS_EXPORT NullAppender : public Appender { 42 | public: 43 | // Ctors 44 | NullAppender(); 45 | NullAppender(const log4cplus::helpers::Properties&); 46 | 47 | // Dtor 48 | virtual ~NullAppender(); 49 | 50 | // Methods 51 | virtual void close(); 52 | 53 | protected: 54 | virtual void append(const log4cplus::spi::InternalLoggingEvent& event); 55 | 56 | private: 57 | // Disallow copying of instances of this class 58 | NullAppender(const NullAppender&); 59 | NullAppender& operator=(const NullAppender&); 60 | }; 61 | 62 | } // end namespace log4cplus 63 | 64 | #endif // LOG4CPLUS_NULL_APPENDER_HEADER_ 65 | 66 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/spi/loggerfactory.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: loggerfactory.h 4 | // Created: 6/2001 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2001-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 25 | #define LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus { 37 | // Forward Declarations 38 | class Logger; 39 | class Hierarchy; 40 | 41 | namespace spi { 42 | /** 43 | * Implement this interface to create new instances of Logger or 44 | * a sub-class of Logger. 45 | */ 46 | class LOG4CPLUS_EXPORT LoggerFactory { 47 | public: 48 | /** 49 | * Creates a new Logger object. 50 | */ 51 | virtual Logger makeNewLoggerInstance(const log4cplus::tstring& name, 52 | Hierarchy& h) = 0; 53 | virtual ~LoggerFactory() = 0; 54 | }; 55 | 56 | } // end namespace spi 57 | } // end namespace log4cplus 58 | 59 | #endif // LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER 60 | 61 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/spi/rootlogger.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: rootlogger.h 4 | // Created: 6/2001 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2001-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 25 | #define LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | namespace log4cplus { 36 | namespace spi { 37 | 38 | /** 39 | * RootLogger sits at the top of the logger hierachy. It is a 40 | * regular logger except that it provides several guarantees. 41 | * 42 | * First, it cannot be assigned a NOT_SET_LOG_LEVEL 43 | * LogLevel. Second, since root logger cannot have a parent, the 44 | * getChainedLogLevel method always returns the value of the 45 | * ll field without walking the hierarchy. 46 | */ 47 | class LOG4CPLUS_EXPORT RootLogger : public LoggerImpl { 48 | public: 49 | // Ctors 50 | /** 51 | * The root logger names itself as "root". However, the root 52 | * logger cannot be retrieved by name. 53 | */ 54 | RootLogger(Hierarchy& h, LogLevel ll); 55 | 56 | // Methods 57 | /** 58 | * Return the assigned LogLevel value without walking the logger 59 | * hierarchy. 60 | */ 61 | virtual LogLevel getChainedLogLevel() const; 62 | 63 | /** 64 | * Setting a NOT_SET_LOG_LEVEL value to the LogLevel of the root logger 65 | * may have catastrophic results. We prevent this here. 66 | */ 67 | void setLogLevel(LogLevel ll); 68 | 69 | }; 70 | 71 | } // end namespace spi 72 | } // end namespace log4cplus 73 | 74 | #endif // LOG4CPLUS_SPI_ROOT_LOGGER_HEADER_ 75 | 76 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/streams.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: streams.h 4 | // Created: 4/2003 5 | // Author: Tad E. Smith 6 | // 7 | // 8 | // Copyright 2003-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_STREAMS_HEADER_ 25 | #define LOG4CPLUS_STREAMS_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | #include 36 | 37 | 38 | namespace log4cplus 39 | { 40 | typedef std::basic_ostream tostream; 41 | typedef std::basic_istream tistream; 42 | typedef std::basic_ostringstream tostringstream; 43 | typedef std::basic_istringstream tistringstream; 44 | extern LOG4CPLUS_EXPORT tostream & tcout; 45 | extern LOG4CPLUS_EXPORT tostream & tcerr; 46 | } 47 | 48 | #if defined (UNICODE) && defined (LOG4CPLUS_ENABLE_GLOBAL_C_STRING_STREAM_INSERTER) 49 | 50 | LOG4CPLUS_EXPORT log4cplus::tostream& operator <<(log4cplus::tostream&, const char* psz ); 51 | 52 | #endif 53 | 54 | #endif // LOG4CPLUS_STREAMS_HEADER_ 55 | 56 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/tchar.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | /** @file */ 26 | 27 | #ifndef LOG4CPLUS_TCHAR_HEADER_ 28 | #define LOG4CPLUS_TCHAR_HEADER_ 29 | 30 | #include 31 | 32 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 33 | #pragma once 34 | #endif 35 | 36 | #if defined (_WIN32) 37 | #include 38 | #endif 39 | 40 | 41 | #ifdef UNICODE 42 | # define LOG4CPLUS_TEXT2(STRING) L##STRING 43 | #else 44 | # define LOG4CPLUS_TEXT2(STRING) STRING 45 | #endif // UNICODE 46 | #define LOG4CPLUS_TEXT(STRING) LOG4CPLUS_TEXT2(STRING) 47 | 48 | 49 | namespace log4cplus 50 | { 51 | 52 | #if defined (UNICODE) 53 | typedef wchar_t tchar; 54 | 55 | #else 56 | typedef char tchar; 57 | 58 | #endif 59 | 60 | } // namespace log4cplus 61 | 62 | 63 | #endif // LOG4CPLUS_TCHAR_HEADER_ 64 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/tracelogger.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: tracelogger.h 4 | // Created: 1/2009 5 | // Author: Vaclav Haisman 6 | // 7 | // 8 | // Copyright 2009-2013 Tad E. Smith 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_TRACELOGGER_H 25 | #define LOG4CPLUS_TRACELOGGER_H 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #include 34 | 35 | 36 | namespace log4cplus 37 | { 38 | 39 | 40 | /** 41 | * This class is used to produce "Trace" logging. When an instance of 42 | * this class is created, it will log a "ENTER: " + msg 43 | * log message if TRACE_LOG_LEVEL is enabled for logger. 44 | * When an instance of this class is destroyed, it will log a 45 | * "ENTER: " + msg log message if TRACE_LOG_LEVEL is enabled 46 | * for logger. 47 | *

48 | * @see LOG4CPLUS_TRACE 49 | */ 50 | class TraceLogger 51 | { 52 | public: 53 | TraceLogger(const Logger& l, const log4cplus::tstring& _msg, 54 | const char* _file=NULL, int _line=-1) 55 | : logger(l), msg(_msg), file(_file), line(_line) 56 | { if(logger.isEnabledFor(TRACE_LOG_LEVEL)) 57 | logger.forcedLog(TRACE_LOG_LEVEL, LOG4CPLUS_TEXT("ENTER: ") + msg, file, line); 58 | } 59 | 60 | ~TraceLogger() 61 | { if(logger.isEnabledFor(TRACE_LOG_LEVEL)) 62 | logger.forcedLog(TRACE_LOG_LEVEL, LOG4CPLUS_TEXT("EXIT: ") + msg, file, line); 63 | } 64 | 65 | private: 66 | TraceLogger (TraceLogger const &); 67 | TraceLogger & operator = (TraceLogger const &); 68 | 69 | Logger logger; 70 | log4cplus::tstring msg; 71 | const char* file; 72 | int line; 73 | }; 74 | 75 | 76 | } // log4cplus 77 | 78 | 79 | #endif // LOG4CPLUS_TRACELOGGER_H 80 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/version.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Copyright (C) 2010-2013, Vaclav Haisman. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without modifica- 5 | // tion, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // 14 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 15 | // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 16 | // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17 | // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- 19 | // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 20 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | 26 | #if ! defined (LOG4CPLUS_VERSION_H) 27 | #define LOG4CPLUS_VERSION_H 28 | 29 | #include 30 | 31 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 32 | #pragma once 33 | #endif 34 | 35 | #define LOG4CPLUS_MAKE_VERSION(major, minor, point) \ 36 | (major * 1000 * 1000u + minor * 1000u + point) 37 | 38 | #define LOG4CPLUS_MAKE_VERSION_STR(major, minor, point) \ 39 | #major "." #minor "." #point 40 | 41 | #define LOG4CPLUS_VERSION LOG4CPLUS_MAKE_VERSION(1, 1, 1) 42 | #define LOG4CPLUS_VERSION_STR LOG4CPLUS_MAKE_VERSION_STR(1, 1, 1) 43 | 44 | 45 | namespace log4cplus 46 | { 47 | 48 | extern LOG4CPLUS_EXPORT unsigned const version; 49 | extern LOG4CPLUS_EXPORT char const versionStr[]; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/include/log4cplus/win32debugappender.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | // Module: Log4CPLUS 3 | // File: win32debugappender.h 4 | // Created: 12/2003 5 | // Author: Eduardo Francos, Odalio SARL 6 | // 7 | // 8 | // Copyright 2003-2013 Odalio SARL 9 | // 10 | // Licensed under the Apache License, Version 2.0 (the "License"); 11 | // you may not use this file except in compliance with the License. 12 | // You may obtain a copy of the License at 13 | // 14 | // http://www.apache.org/licenses/LICENSE-2.0 15 | // 16 | // Unless required by applicable law or agreed to in writing, software 17 | // distributed under the License is distributed on an "AS IS" BASIS, 18 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | // See the License for the specific language governing permissions and 20 | // limitations under the License. 21 | 22 | /** @file */ 23 | 24 | #ifndef LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 25 | #define LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 26 | 27 | #include 28 | 29 | #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 30 | #pragma once 31 | #endif 32 | 33 | #if defined (LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING) 34 | 35 | #include 36 | 37 | 38 | namespace log4cplus { 39 | 40 | /** 41 | * Prints log events using OutputDebugString(). 42 | */ 43 | class LOG4CPLUS_EXPORT Win32DebugAppender 44 | : public Appender 45 | { 46 | public: 47 | // Ctors 48 | Win32DebugAppender(); 49 | Win32DebugAppender(const log4cplus::helpers::Properties& properties); 50 | 51 | // Dtor 52 | virtual ~Win32DebugAppender(); 53 | 54 | // Methods 55 | virtual void close(); 56 | 57 | protected: 58 | virtual void append(const log4cplus::spi::InternalLoggingEvent& event); 59 | 60 | private: 61 | // Disallow copying of instances of this class 62 | Win32DebugAppender(const Win32DebugAppender&); 63 | Win32DebugAppender& operator=(const Win32DebugAppender&); 64 | }; 65 | 66 | } // end namespace log4cplus 67 | 68 | #endif // LOG4CPLUS_HAVE_OUTPUTDEBUGSTRING 69 | #endif // LOG4CPLUS_WIN32DEBUG_APPENDER_HEADER_ 70 | -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/lib/log4cplus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/log4cplus/lib/log4cplus.dll -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/lib/log4cplus.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/log4cplus/lib/log4cplus.lib -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/lib/log4cplusD.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/log4cplus/lib/log4cplusD.dll -------------------------------------------------------------------------------- /dependencies/windows/log4cplus/lib/log4cplusD.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/log4cplus/lib/log4cplusD.lib -------------------------------------------------------------------------------- /dependencies/windows/luajit/include/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Standard library header. 3 | ** Copyright (C) 2005-2013 Mike Pall. See Copyright Notice in luajit.h 4 | */ 5 | 6 | #ifndef _LUALIB_H 7 | #define _LUALIB_H 8 | 9 | #include "lua.h" 10 | 11 | #define LUA_FILEHANDLE "FILE*" 12 | 13 | #define LUA_COLIBNAME "coroutine" 14 | #define LUA_MATHLIBNAME "math" 15 | #define LUA_STRLIBNAME "string" 16 | #define LUA_TABLIBNAME "table" 17 | #define LUA_IOLIBNAME "io" 18 | #define LUA_OSLIBNAME "os" 19 | #define LUA_LOADLIBNAME "package" 20 | #define LUA_DBLIBNAME "debug" 21 | #define LUA_BITLIBNAME "bit" 22 | #define LUA_JITLIBNAME "jit" 23 | #define LUA_FFILIBNAME "ffi" 24 | 25 | LUALIB_API int luaopen_base(lua_State *L); 26 | LUALIB_API int luaopen_math(lua_State *L); 27 | LUALIB_API int luaopen_string(lua_State *L); 28 | LUALIB_API int luaopen_table(lua_State *L); 29 | LUALIB_API int luaopen_io(lua_State *L); 30 | LUALIB_API int luaopen_os(lua_State *L); 31 | LUALIB_API int luaopen_package(lua_State *L); 32 | LUALIB_API int luaopen_debug(lua_State *L); 33 | LUALIB_API int luaopen_bit(lua_State *L); 34 | LUALIB_API int luaopen_jit(lua_State *L); 35 | LUALIB_API int luaopen_ffi(lua_State *L); 36 | 37 | LUALIB_API void luaL_openlibs(lua_State *L); 38 | 39 | #ifndef lua_assert 40 | #define lua_assert(x) ((void)0) 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /dependencies/windows/luajit/lib/lua51.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/dependencies/windows/luajit/lib/lua51.lib -------------------------------------------------------------------------------- /include/exception/traceback.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/exception/traceback.h -------------------------------------------------------------------------------- /include/log/actionstat.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "xhhead.h" 9 | 10 | namespace xhnet 11 | { 12 | class COneAction 13 | { 14 | public: 15 | COneAction(const char* ac); 16 | ~COneAction(); 17 | 18 | const std::string m_action; 19 | time_t m_entertime; 20 | }; 21 | 22 | class CActionRecord 23 | { 24 | public: 25 | time_t m_totaltime; 26 | unsigned int m_totalcnt; 27 | 28 | CActionRecord(time_t totaltime) 29 | : m_totaltime(totaltime) 30 | , m_totalcnt(1) 31 | {} 32 | 33 | ~CActionRecord(){} 34 | }; 35 | 36 | class CActionStat 37 | { 38 | std::map m_actions; 39 | public: 40 | ~CActionStat(); 41 | 42 | static CActionStat& GetInstance(void) 43 | { 44 | static CActionStat as; 45 | return as; 46 | } 47 | 48 | void AddAction(const COneAction& action); 49 | void TraverseActions(std::function callf); 50 | void LogInfoActions(); 51 | 52 | private: 53 | CActionStat(); 54 | 55 | CActionStat(const CActionStat&) = delete; 56 | CActionStat& operator=(const CActionStat&) = delete; 57 | }; 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /include/log/filelog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/log/filelog.h -------------------------------------------------------------------------------- /include/log/stacktrace.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include "xhhead.h" 6 | 7 | 8 | namespace xhnet 9 | { 10 | class CStackTrace 11 | { 12 | const std::string m_file; 13 | size_t m_line; 14 | const std::string m_func; 15 | public: 16 | CStackTrace(const char* file, unsigned int line, const char* func); 17 | ~CStackTrace(void); 18 | 19 | private: 20 | void printstack(int indent, const char* action, const char* file, size_t line, const char* func); 21 | 22 | CStackTrace(const CStackTrace&) = delete; 23 | CStackTrace& operator=(const CStackTrace&) = delete; 24 | }; 25 | }; 26 | 27 | #if defined _PLATFORM_WINDOWS_ 28 | #define __STACK_TRACE_IN__() xhnet::CStackTrace XH_ANONYMOUS_VARIABLE(trace)(__FILE__, __LINE__, __FUNCTION__) 29 | #elif defined _PLATFORM_LINUX_ 30 | #define __STACK_TRACE_IN__() xhnet::CStackTrace XH_ANONYMOUS_VARIABLE(trace)(__FILE__, __LINE__, __PRETTY_FUNCTION__) 31 | #endif 32 | -------------------------------------------------------------------------------- /include/md5/md5.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MD5_H 3 | #define MD5_H 4 | 5 | typedef struct 6 | { 7 | unsigned int count[2]; 8 | unsigned int state[4]; 9 | unsigned char buffer[64]; 10 | }MD5_CTX; 11 | 12 | 13 | #define F(x,y,z) ((x & y) | (~x & z)) 14 | #define G(x,y,z) ((x & z) | (y & ~z)) 15 | #define H(x,y,z) (x^y^z) 16 | #define I(x,y,z) (y ^ (x | ~z)) 17 | #define ROTATE_LEFT(x,n) ((x << n) | (x >> (32-n))) 18 | #define FF(a,b,c,d,x,s,ac) \ 19 | { \ 20 | a += F(b,c,d) + x + ac; \ 21 | a = ROTATE_LEFT(a,s); \ 22 | a += b; \ 23 | } 24 | #define GG(a,b,c,d,x,s,ac) \ 25 | { \ 26 | a += G(b,c,d) + x + ac; \ 27 | a = ROTATE_LEFT(a,s); \ 28 | a += b; \ 29 | } 30 | #define HH(a,b,c,d,x,s,ac) \ 31 | { \ 32 | a += H(b,c,d) + x + ac; \ 33 | a = ROTATE_LEFT(a,s); \ 34 | a += b; \ 35 | } 36 | #define II(a,b,c,d,x,s,ac) \ 37 | { \ 38 | a += I(b,c,d) + x + ac; \ 39 | a = ROTATE_LEFT(a,s); \ 40 | a += b; \ 41 | } 42 | void MD5Init(MD5_CTX *context); 43 | void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputlen); 44 | void MD5Final(MD5_CTX *context, unsigned char digest[16]); 45 | void MD5Transform(unsigned int state[4], unsigned char block[64]); 46 | void MD5Encode(unsigned char *output, unsigned int *input, unsigned int len); 47 | void MD5Decode(unsigned int *output, unsigned char *input, unsigned int len); 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /include/memory/mpage.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/memory/mpage.h -------------------------------------------------------------------------------- /include/memory/mpagemgr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/memory/mpagemgr.h -------------------------------------------------------------------------------- /include/memory/mpool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/memory/mpool.h -------------------------------------------------------------------------------- /include/net/iobuffer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/net/iobuffer.h -------------------------------------------------------------------------------- /include/net/ioserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/net/ioserver.h -------------------------------------------------------------------------------- /include/net/tcpsocket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/net/tcpsocket.h -------------------------------------------------------------------------------- /include/net/timer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/net/timer.h -------------------------------------------------------------------------------- /include/net/udpsocket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/net/udpsocket.h -------------------------------------------------------------------------------- /include/ref/cppref.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/ref/cppref.h -------------------------------------------------------------------------------- /include/stdhead.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // io 5 | #include 6 | 7 | // thread 8 | #include 9 | #include 10 | #include 11 | #include 12 | //#include 13 | #include 14 | #include 15 | 16 | // bind 17 | #include 18 | 19 | // algorithm 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | using namespace std; 28 | -------------------------------------------------------------------------------- /include/thread/nullmutex.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | namespace xhnet 5 | { 6 | class CNullMutex 7 | { 8 | public: 9 | CNullMutex(void) { } 10 | ~CNullMutex(void) { } 11 | 12 | void lock(void) { } 13 | void unlock(void) { } 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /include/utility/utility.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/utility/utility.h -------------------------------------------------------------------------------- /include/xh.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "xhhead.h" 5 | #include "xhguard.h" 6 | #include "xhexception.h" 7 | #include "xhref.h" 8 | #include "xhlog.h" 9 | #include "xhutility.h" 10 | #include "xhpool.h" 11 | #include "xhnet.h" 12 | 13 | -------------------------------------------------------------------------------- /include/xhexception.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | 5 | #include "exception/smart_assert.h" 6 | #include "exception/traceback.h" 7 | 8 | 9 | // 10 | #define XH_ASSERT(expr) SMART_ASSERT(expr) 11 | #define XH_VERIFY(expr) SMART_VERIFY(expr) 12 | 13 | 14 | #define XH_OPEN_CETRANS() xhnet::open_exception_translator() 15 | #define XH_OPEN_DUMP() xhnet::open_dump() 16 | 17 | -------------------------------------------------------------------------------- /include/xhguard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/xhguard.h -------------------------------------------------------------------------------- /include/xhhead.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/xhhead.h -------------------------------------------------------------------------------- /include/xhlog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/include/xhlog.h -------------------------------------------------------------------------------- /include/xhnet.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "ref/cppref.h" 5 | #include "net/iobuffer.h" 6 | #include "net/ioserver.h" 7 | #include "net/tcpsocket.h" 8 | #include "net/udpsocket.h" 9 | #include "net/timer.h" 10 | -------------------------------------------------------------------------------- /include/xhpool.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "thread/nullmutex.h" 5 | #include "memory/mpool.h" 6 | #include "memory/opool.h" 7 | 8 | -------------------------------------------------------------------------------- /include/xhref.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "ref/cppref.h" 5 | 6 | -------------------------------------------------------------------------------- /include/xhutility.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "utility/utility.h" 5 | 6 | -------------------------------------------------------------------------------- /msvc12/bins/Debug/log4cplusD.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/msvc12/bins/Debug/log4cplusD.dll -------------------------------------------------------------------------------- /msvc12/bins/Debug/luascript/luamain.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | function __G__TRACKBACK__(msg) 4 | print("----------------------------------------") 5 | print("LUA ERROR: " .. tostring(errorMessage) .. "\n") 6 | print(debug.traceback("", 2)) 7 | print("----------------------------------------") 8 | end 9 | 10 | 11 | local function main() 12 | print("----------------------------------------") 13 | print("call lua script") 14 | print("----------------------------------------") 15 | end 16 | 17 | 18 | xpcall(main, __G__TRACKBACK__) 19 | 20 | 21 | local netio=CTestNetIO:GetNetIO() 22 | print(netio:GetConnectIP()) 23 | -------------------------------------------------------------------------------- /msvc12/bins/Release/log4cplus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/msvc12/bins/Release/log4cplus.dll -------------------------------------------------------------------------------- /msvc12/test-exception/test-exception.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 资源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-exception/test-exception.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-mpool/test-mpool.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 资源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-mpool/test-mpool.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-net/test-net.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-net/test-net.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-netbase/test-netbase.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 资源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-netbase/test-netbase.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-opool/test-opool.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 资源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-opool/test-opool.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-qyfh/test-qyfh.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/test-utility/test-utility.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 资源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /msvc12/test-utility/test-utility.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /msvc12/xh-net/xh-net.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bins\$(Configuration)\ 5 | WindowsLocalDebugger 6 | 7 | 8 | $(SolutionDir)bins\$(Configuration)\ 9 | WindowsLocalDebugger 10 | 11 | -------------------------------------------------------------------------------- /net-qyfh/msgstream.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "qyfhhead.h" 5 | 6 | namespace xhnet_qyfh 7 | { 8 | class CMessageHead_24 9 | { 10 | public: 11 | enum 12 | { 13 | HEAD_SIZE = 6, 14 | }; 15 | CMessageHead_24() { } 16 | ~CMessageHead_24() { } 17 | 18 | unsigned short size() { return HEAD_SIZE; } 19 | 20 | unsigned short msglen() { return m_msglen; } 21 | unsigned short msgid() { return m_msgid; } 22 | 23 | bool decode_header(CIOBuffer& iobuf) 24 | { 25 | try 26 | { 27 | iobuf >> m_msglen >> m_msgid; 28 | } 29 | catch (...) 30 | { 31 | return false; 32 | } 33 | 34 | return true; 35 | } 36 | 37 | bool encode_header(CIOBuffer& iobuf) 38 | { 39 | try 40 | { 41 | iobuf << m_msglen << m_msgid; 42 | } 43 | catch (...) 44 | { 45 | return false; 46 | } 47 | 48 | return true; 49 | } 50 | 51 | void Reset() 52 | { 53 | m_msglen = 0; 54 | m_msgid = 0; 55 | } 56 | 57 | public: 58 | unsigned short m_msglen; 59 | unsigned int m_msgid; 60 | }; 61 | }; 62 | -------------------------------------------------------------------------------- /net-qyfh/mstimer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/net-qyfh/mstimer.h -------------------------------------------------------------------------------- /net-qyfh/qyfh.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "qyfhhead.h" 5 | #include "mstimer.h" 6 | #include "threadio.h" 7 | #include "socketclient.h" 8 | #include "socketlistener.h" 9 | #include "socketserver.h" 10 | #include "qyfhnet.h" 11 | 12 | 13 | -------------------------------------------------------------------------------- /net-qyfh/qyfhhead.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "stdhead.h" 5 | #include "xh.h" 6 | 7 | namespace xhnet_qyfh 8 | { 9 | using namespace xhnet; 10 | using namespace std; 11 | }; 12 | 13 | 14 | -------------------------------------------------------------------------------- /net-qyfh/qyfhnet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/net-qyfh/qyfhnet.h -------------------------------------------------------------------------------- /net-qyfh/socketclient.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/net-qyfh/socketclient.h -------------------------------------------------------------------------------- /net-qyfh/socketlistener.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/net-qyfh/socketlistener.h -------------------------------------------------------------------------------- /net-qyfh/socketserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/net-qyfh/socketserver.h -------------------------------------------------------------------------------- /net-qyfh/threadio.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "qyfhhead.h" 5 | 6 | namespace xhnet_qyfh 7 | { 8 | class CThreadIO : virtual public CPPRef 9 | { 10 | public: 11 | CThreadIO() 12 | { 13 | m_io = IIOServer::Create(); 14 | 15 | XH_ASSERT(m_io)(m_io); 16 | } 17 | 18 | virtual ~CThreadIO() 19 | { 20 | if ( m_io ) 21 | { 22 | m_io->Release(); 23 | m_io = 0; 24 | } 25 | } 26 | 27 | IIOServer* GetIOServer() 28 | { 29 | return m_io; 30 | } 31 | 32 | bool Run() 33 | { 34 | if (m_thread) 35 | { 36 | return false; 37 | } 38 | 39 | if (!m_io->Init()) 40 | { 41 | return false; 42 | } 43 | 44 | m_thread = shared_ptr(new thread([&]{m_io->Run(); })); 45 | 46 | return true; 47 | } 48 | 49 | void Stop() 50 | { 51 | if ( m_io ) 52 | { 53 | m_io->Fini(); 54 | } 55 | } 56 | 57 | void WaitForFinish() 58 | { 59 | if (m_thread) 60 | { 61 | m_thread->join(); 62 | } 63 | } 64 | 65 | private: 66 | shared_ptr m_thread; 67 | IIOServer* m_io; 68 | }; 69 | }; 70 | -------------------------------------------------------------------------------- /source/exception/ensure.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/exception/ensure.cpp -------------------------------------------------------------------------------- /source/exception/ensure.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | namespace xhnet 5 | { 6 | class CInsureInit 7 | { 8 | public: 9 | CInsureInit(); 10 | ~CInsureInit(); 11 | 12 | private: 13 | 14 | CInsureInit(const CInsureInit&) = delete; 15 | CInsureInit& operator=(const CInsureInit&) = delete; 16 | }; 17 | }; 18 | 19 | 20 | -------------------------------------------------------------------------------- /source/exception/traceback.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/exception/traceback.cpp -------------------------------------------------------------------------------- /source/exception/windows/StackWalker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/exception/windows/StackWalker.cpp -------------------------------------------------------------------------------- /source/log/actionstat.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "log/actionstat.h" 3 | #include "xhutility.h" 4 | #include "xhlog.h" 5 | 6 | namespace xhnet 7 | { 8 | COneAction::COneAction(const char* ac) 9 | : m_action(ac), m_entertime( GetNowTime() ) 10 | { 11 | 12 | } 13 | 14 | COneAction::~COneAction() 15 | { 16 | CActionStat::GetInstance().AddAction(*this); 17 | } 18 | 19 | 20 | 21 | CActionStat::CActionStat() 22 | { 23 | } 24 | 25 | CActionStat::~CActionStat() 26 | { 27 | 28 | } 29 | 30 | void CActionStat::AddAction(const COneAction& action) 31 | { 32 | auto it = m_actions.find(action.m_action); 33 | if (it == m_actions.end()) 34 | { 35 | m_actions.insert(std::make_pair(action.m_action, CActionRecord(GetNowTime() - action.m_entertime))); 36 | } 37 | else 38 | { 39 | CActionRecord& record = it->second; 40 | record.m_totaltime += (GetNowTime() - action.m_entertime); 41 | record.m_totalcnt ++; 42 | } 43 | } 44 | 45 | void CActionStat::TraverseActions(std::function callf) 46 | { 47 | for (auto it = m_actions.begin(); it != m_actions.end(); ++it) 48 | { 49 | callf(it->first, it->second); 50 | } 51 | } 52 | 53 | void CActionStat::LogInfoActions() 54 | { 55 | for (auto it = m_actions.begin(); it != m_actions.end(); ++it) 56 | { 57 | XH_LOG_INFO(xhnet::logname_base, "[Actions] fun:"<first<<"\tcalled times:"<second.m_totalcnt<<"\t used time(ms):"<second.m_totaltime ); 58 | } 59 | } 60 | }; 61 | -------------------------------------------------------------------------------- /source/log/stacktrace.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include "xhhead.h" 5 | #include "log/stacktrace.h" 6 | #include "xhlog.h" 7 | 8 | namespace xhnet 9 | { 10 | #if defined _PLATFORM_WINDOWS_ 11 | #define LOCAL_THREAD_VAR __declspec(thread) 12 | #elif defined _PLATFORM_LINUX_ 13 | #define LOCAL_THREAD_VAR __thread 14 | #endif 15 | static LOCAL_THREAD_VAR int _ltv_indent = 0; 16 | 17 | CStackTrace::CStackTrace(const char* file, unsigned int line, const char* func) 18 | : m_file(file), m_line(line), m_func(func) 19 | { 20 | printstack(_ltv_indent, "->", m_file.c_str(), m_line, m_func.c_str()); 21 | _ltv_indent++; 22 | } 23 | 24 | CStackTrace::~CStackTrace(void) 25 | { 26 | _ltv_indent--; 27 | printstack(_ltv_indent, "<-", m_file.c_str(), m_line, m_func.c_str()); 28 | } 29 | 30 | void CStackTrace::printstack(int indent, const char* action, const char* file, size_t line, const char* func) 31 | { 32 | char buffer[1024]; 33 | char* p = buffer; 34 | size_t remain = sizeof(buffer); 35 | 36 | while (indent-- > 0) 37 | { 38 | #if defined _PLATFORM_WINDOWS_ 39 | int n = _snprintf_s(p, remain, remain - 1, " "); 40 | #elif defined _PLATFORM_LINUX_ 41 | int n = snprintf(p, remain-1, " "); 42 | #endif 43 | p += n; 44 | remain -= n; 45 | } 46 | 47 | #if defined _PLATFORM_WINDOWS_ 48 | _snprintf_s(p, remain, remain-1, "%s %s", action, func); 49 | #elif defined _PLATFORM_LINUX_ 50 | snprintf(p, remain-1, "%s %s", action, func); 51 | #endif 52 | 53 | XH_LOG_TRACE(logname_trace, buffer); 54 | } 55 | }; 56 | -------------------------------------------------------------------------------- /source/memory/mpage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/memory/mpage.cpp -------------------------------------------------------------------------------- /source/memory/mpagemgr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/memory/mpagemgr.cpp -------------------------------------------------------------------------------- /source/net/impl_ioserver.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/net/impl_ioserver.cpp -------------------------------------------------------------------------------- /source/net/impl_ioserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/net/impl_ioserver.h -------------------------------------------------------------------------------- /source/net/impl_tcpsocket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/net/impl_tcpsocket.cpp -------------------------------------------------------------------------------- /source/net/impl_tcpsocket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/net/impl_tcpsocket.h -------------------------------------------------------------------------------- /source/net/impl_timer.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "impl_nethead.h" 5 | 6 | namespace xhnet 7 | { 8 | class CIOServer; 9 | 10 | class CTimer : public ITimer 11 | { 12 | public: 13 | enum status 14 | { 15 | status_null = 0, 16 | status_init, 17 | status_begin, 18 | status_common, 19 | status_end, 20 | }; 21 | 22 | public: 23 | CTimer(void); 24 | virtual ~CTimer(void); 25 | 26 | virtual bool Init(IIOServer* io, ICBTimer* cb); 27 | virtual void Fini(void); 28 | 29 | virtual bool Async_Wait(unsigned int ms); 30 | 31 | virtual unsigned int GetTimerID(void); 32 | 33 | public: 34 | static void on_timer_callback(evutil_socket_t sock, short flag, void* p); 35 | 36 | protected: 37 | void real_fini(); 38 | void real_wait(unsigned int ms); 39 | 40 | void timer_clock(); 41 | 42 | protected: 43 | unsigned char m_status; 44 | unsigned int m_id; 45 | 46 | CIOServer* m_io; 47 | ICBTimer* m_cb; 48 | 49 | unsigned int m_ms; 50 | ::event m_ev_timer; 51 | private: 52 | CTimer(const CTimer&) = delete; 53 | CTimer& operator=(const CTimer&) = delete; 54 | 55 | public: 56 | static COPool m_pool; 57 | }; 58 | 59 | }; 60 | -------------------------------------------------------------------------------- /source/net/impl_udpsocket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/net/impl_udpsocket.cpp -------------------------------------------------------------------------------- /source/net/impl_udpsocket.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "impl_nethead.h" 5 | 6 | namespace xhnet 7 | { 8 | class CIOServer; 9 | 10 | class CUdpSocket : public IUdpSocket 11 | { 12 | public: 13 | enum status 14 | { 15 | status_null = 0, 16 | status_init, 17 | status_connect, 18 | status_common, 19 | }; 20 | 21 | struct UdpBuff 22 | { 23 | CIOBuffer* buff; 24 | unsigned int port; 25 | std::string ip; 26 | 27 | UdpBuff() 28 | : buff(0) 29 | , port(0) 30 | , ip("0.0.0.0") 31 | { 32 | } 33 | 34 | UdpBuff(CIOBuffer* b) 35 | : buff(b) 36 | , port(0) 37 | , ip("0.0.0.0") 38 | { 39 | 40 | } 41 | 42 | UdpBuff(const std::string& i, unsigned int p, CIOBuffer* b) 43 | : buff(b) 44 | , port(p) 45 | , ip(i) 46 | { 47 | } 48 | }; 49 | 50 | public: 51 | CUdpSocket(); 52 | virtual ~CUdpSocket(); 53 | 54 | virtual bool Init(IIOServer* io, ICBUdpSocket* cb); 55 | virtual void Fini(void); 56 | 57 | virtual bool Listen(const std::string& ip, unsigned int port); 58 | 59 | virtual bool Async_SendTo(const std::string& ip, unsigned int port, CIOBuffer* buffer); 60 | virtual bool Async_RecvSomeFrom(CIOBuffer* buffer); 61 | 62 | virtual std::string GetLocalIP(void); 63 | virtual unsigned int GetLocalPort(void); 64 | 65 | virtual unsigned int GetSocketID(void); 66 | 67 | public: 68 | static void on_recv_callback(evutil_socket_t sock, short flag, void* p); 69 | static void on_send_callback(evutil_socket_t sock, short flag, void* p); 70 | 71 | protected: 72 | void real_listen(std::string ip, unsigned int port); 73 | void real_close(int errid); 74 | 75 | void on_inter_recv(); 76 | void on_inter_send(); 77 | 78 | protected: 79 | unsigned char m_status; 80 | unsigned int m_id; 81 | evutil_socket_t m_socket; 82 | 83 | CIOServer* m_io; 84 | 85 | std::string m_localip; 86 | unsigned int m_localport; 87 | 88 | ICBUdpSocket* m_cb; 89 | 90 | ::event m_ev_read; 91 | ::event m_ev_write; 92 | 93 | std::queue m_wait_send; 94 | std::queue m_wait_recv; 95 | 96 | private: 97 | CUdpSocket(const CUdpSocket&) = delete; 98 | CUdpSocket& operator=(const CUdpSocket&) = delete; 99 | 100 | public: 101 | static COPool m_pool; 102 | }; 103 | }; 104 | -------------------------------------------------------------------------------- /source/utility/utility.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/source/utility/utility.cpp -------------------------------------------------------------------------------- /test/luaengine.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/test/luaengine.cpp -------------------------------------------------------------------------------- /test/luaengine.h: -------------------------------------------------------------------------------- 1 | #ifndef LuaEngine_h__ 2 | #define LuaEngine_h__ 3 | 4 | extern "C" { 5 | #include "lua.h" 6 | #include "lauxlib.h" 7 | #include "lualib.h" 8 | } 9 | 10 | class CLuaEngine 11 | { 12 | public: 13 | CLuaEngine(); 14 | ~CLuaEngine(void); 15 | 16 | lua_State* getLuaState(void) { return m_state; } 17 | 18 | bool init(unsigned int level); 19 | void clean(); 20 | void addSearchPath(const char* path); 21 | 22 | int executeScriptFile(const char* filename); 23 | int executeScriptString(const char* luastring); 24 | int executeFunction(int numArgs); 25 | 26 | void pushInt(int intValue); 27 | void pushFloat(float floatValue); 28 | void pushBoolean(bool boolValue); 29 | void pushString(const char* stringValue); 30 | void pushString(const char* stringValue, int length); 31 | // void pushResolveObj(ResolveAction* pValue); 32 | void pushNil(void); 33 | bool pushFunctionByName(const char* functionname); 34 | 35 | lua_State* m_state; 36 | unsigned int m_level; 37 | int m_callFromLua; 38 | bool m_bInit; 39 | }; 40 | 41 | 42 | #endif // LuaEngine_h__ -------------------------------------------------------------------------------- /test/main-qyfh.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | /* 4 | ** Lua binding: mainqyfh 5 | ** Generated automatically by tolua++-1.0.92 on 12/30/14 15:58:22. 6 | */ 7 | /* Exported function */ 8 | TOLUA_API int tolua_mainqyfh_open (lua_State* tolua_S); 9 | 10 | -------------------------------------------------------------------------------- /test/test-exception.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "stdhead.h" 3 | #include "xh.h" 4 | 5 | #ifdef _PLATFORM_WINDOWS_ 6 | #ifdef _DEBUG 7 | #pragma comment( lib, "../bins/Debug/xh-net.lib" ) 8 | #else 9 | #pragma comment( lib, "../bins/Release/xh-net.lib" ) 10 | #endif 11 | #endif 12 | 13 | 14 | void testtraceback() 15 | { 16 | xhnet::print_traceback(); 17 | } 18 | 19 | void test_exception_0() 20 | { 21 | testtraceback(); 22 | } 23 | 24 | void test_exception_1() 25 | { 26 | std::cout << "begin test_exception_1" << std::endl; 27 | try 28 | { 29 | int div = 0; 30 | std::cout << "mid1 test_exception_1" << std::endl; 31 | int c = 100 / div; 32 | std::cout << "mid2 test_exception_1" << std::endl; 33 | } 34 | catch (...) 35 | { 36 | std::cout << "catch test_exception_1" << std::endl; 37 | } 38 | 39 | std::cout << "end test_exception_1" << std::endl; 40 | } 41 | 42 | void test_exception_2() 43 | { 44 | std::cout << "begin test_exception_2" << std::endl; 45 | try 46 | { 47 | int *div = 0; 48 | std::cout << "mid1 test_exception_2" << std::endl; 49 | *div = 10; 50 | std::cout << "mid2 test_exception_2" << std::endl; 51 | } 52 | catch (...) 53 | { 54 | std::cout << "catch test_exception_2" << std::endl; 55 | } 56 | 57 | std::cout << "end test_exception_2" << std::endl; 58 | } 59 | 60 | int main( int argc, char** argv ) 61 | { 62 | XH_OPEN_CONSOLELOGGER(); 63 | XH_ADD_LOGGER(xhnet::logname_trace, "ccc", xhnet::LOGLEVEL_ALL); 64 | 65 | 66 | XH_OPEN_CETRANS(); 67 | XH_OPEN_DUMP(); 68 | 69 | test_exception_0(); 70 | test_exception_1(); 71 | test_exception_2(); 72 | 73 | getchar(); 74 | 75 | return 0; 76 | } 77 | -------------------------------------------------------------------------------- /test/test-mpool.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "stdhead.h" 3 | #include "xh.h" 4 | 5 | #ifdef _PLATFORM_WINDOWS_ 6 | #ifdef _DEBUG 7 | #pragma comment( lib, "../bins/Debug/xh-net.lib" ) 8 | #else 9 | #pragma comment( lib, "../bins/Release/xh-net.lib" ) 10 | #endif 11 | #endif 12 | 13 | 14 | struct Test0 15 | { 16 | int a; 17 | char data[64 * 1024]; 18 | }; 19 | 20 | struct Test1 21 | { 22 | int a; 23 | unsigned short c; 24 | char b; 25 | }; 26 | 27 | struct Test2 28 | { 29 | int b; 30 | unsigned long long c; 31 | }; 32 | 33 | int main( int argc, char** argv ) 34 | { 35 | xhnet::CMPool mpool; 36 | //xhnet::CMPool mpool; 37 | 38 | time_t begin_tm = 0; 39 | time_t end_tm = 0; 40 | 41 | begin_tm = xhnet::GetNowTime(); 42 | for (int i = 0; i < 1000; ++i) 43 | { 44 | mpool.Free( mpool.Allocate() ); 45 | mpool.Free( mpool.Allocate() ); 46 | mpool.Free( mpool.Allocate() ); 47 | } 48 | 49 | vector v0; 50 | vector v1; 51 | vector v2; 52 | end_tm = xhnet::GetNowTime(); 53 | 54 | cout << "cost time:" << end_tm - begin_tm << endl; 55 | 56 | begin_tm = xhnet::GetNowTime(); 57 | for (int i = 0; i < 1000; ++i) 58 | { 59 | Test0* t0 = mpool.Allocate(); 60 | Test1* t1 = mpool.Allocate(); 61 | Test2* t2 = mpool.Allocate(); 62 | 63 | v0.push_back(t0); 64 | v1.push_back(t1); 65 | v2.push_back(t2); 66 | } 67 | 68 | for (auto i : v0) 69 | { 70 | mpool.Free(i); 71 | } 72 | 73 | for (auto i : v1) 74 | { 75 | mpool.Free(i); 76 | } 77 | 78 | for (auto i : v2) 79 | { 80 | mpool.Free(i); 81 | } 82 | end_tm = xhnet::GetNowTime(); 83 | 84 | cout << "cost time:" << end_tm - begin_tm << endl; 85 | 86 | begin_tm = xhnet::GetNowTime(); 87 | for (int i = 0; i < 1000; ++i) 88 | { 89 | Test0* t0 = mpool.Allocate(); 90 | Test1* t1 = mpool.Allocate(); 91 | Test2* t2 = mpool.Allocate(); 92 | 93 | v0.push_back(t0); 94 | v1.push_back(t1); 95 | v2.push_back(t2); 96 | } 97 | 98 | for (auto i : v0) 99 | { 100 | mpool.Free(i); 101 | } 102 | 103 | for (auto i : v1) 104 | { 105 | mpool.Free(i); 106 | } 107 | 108 | for (auto i : v2) 109 | { 110 | mpool.Free(i); 111 | } 112 | end_tm = xhnet::GetNowTime(); 113 | 114 | cout << "cost time:" << end_tm - begin_tm << endl; 115 | 116 | getchar(); 117 | 118 | return 0; 119 | } 120 | -------------------------------------------------------------------------------- /test/test-netbase.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | //#include "../source/net/impl_nethead.h" 6 | 7 | using namespace std; 8 | 9 | #ifdef _PLATFORM_WINDOWS_ 10 | #ifdef _DEBUG 11 | #pragma comment( lib, "../bins/Debug/xh-net.lib" ) 12 | #else 13 | #pragma comment( lib, "../bins/Release/xh-net.lib" ) 14 | #endif 15 | #endif 16 | 17 | 18 | class CTest : public xhnet::CPPRef 19 | { 20 | public: 21 | CTest() { } 22 | ~CTest() {} 23 | }; 24 | 25 | CTest* test = new CTest(); 26 | 27 | void threadaddfun() 28 | { 29 | test->Retain(); 30 | } 31 | 32 | void threadsubfun() 33 | { 34 | test->Release(); 35 | } 36 | 37 | int main( int argc, char** argv ) 38 | { 39 | //// ip v4 test 40 | //{ 41 | // xhnet::socketaddr addr; 42 | // ev_socklen_t addrlen = 0; 43 | // bool bret = xhnet::ipport2sockaddr("127.0.0.1", 5555, &addr, addrlen); 44 | 45 | // std::string ip; 46 | // unsigned int port = 0; 47 | // bret = xhnet::sockaddr2ipport(&addr, addrlen, ip, port); 48 | //} 49 | 50 | //// ip v6 test 51 | //{ 52 | // xhnet::socketaddr addr; 53 | // ev_socklen_t addrlen = 0; 54 | // bool bret = xhnet::ipport2sockaddr("[fe80::4c00:bbad:a546:fbf6]", 5555, &addr, addrlen); 55 | 56 | // std::string ip; 57 | // unsigned int port = 0; 58 | // bret = xhnet::sockaddr2ipport(&addr, addrlen, ip, port); 59 | //} 60 | 61 | 62 | // io buffer test 63 | { 64 | std::map testmap; 65 | std::vector testvt; 66 | std::set testset; 67 | 68 | for (int i = 0; i < 10; ++i) 69 | { 70 | testmap.insert(std::make_pair(i, i)); 71 | testvt.push_back(i); 72 | testset.insert(i); 73 | } 74 | 75 | char buffer[1024]; 76 | xhnet::CIOBuffer iob(buffer, sizeof(buffer)); 77 | 78 | iob << testmap << testvt << testset; 79 | 80 | std::map testmap2; 81 | std::vector testvt2; 82 | std::set testset2; 83 | 84 | iob >> testmap2 >> testvt2 >> testset2; 85 | } 86 | 87 | // cppref test 88 | vector > addthreads; 89 | vector > subthreads; 90 | 91 | int cnt = 100; 92 | for (int i = 0; i < cnt; ++i) 93 | { 94 | addthreads.push_back(shared_ptr(new thread(threadaddfun))); 95 | } 96 | 97 | for (int i = 0; i < cnt; ++i) 98 | { 99 | subthreads.push_back(shared_ptr(new thread(threadsubfun))); 100 | } 101 | 102 | for (int i = 0; i < cnt; ++i) 103 | { 104 | addthreads[i]->join(); 105 | subthreads[i]->join(); 106 | } 107 | 108 | addthreads.clear(); 109 | subthreads.clear(); 110 | 111 | test->Release(); 112 | 113 | getchar(); 114 | 115 | return 0; 116 | } 117 | -------------------------------------------------------------------------------- /test/test-opool.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "stdhead.h" 3 | #include "xh.h" 4 | 5 | #ifdef _PLATFORM_WINDOWS_ 6 | #ifdef _DEBUG 7 | #pragma comment( lib, "../bins/Debug/xh-net.lib" ) 8 | #else 9 | #pragma comment( lib, "../bins/Release/xh-net.lib" ) 10 | #endif 11 | #endif 12 | 13 | 14 | struct Test0 15 | { 16 | int a; 17 | char data[64 * 1024]; 18 | }; 19 | 20 | struct Test1 21 | { 22 | int a; 23 | unsigned short c; 24 | char b; 25 | }; 26 | 27 | struct Test2 : public xhnet::CInheritOPool 28 | { 29 | int b; 30 | unsigned long long c; 31 | }; 32 | 33 | int main( int argc, char** argv ) 34 | { 35 | xhnet::COPool mpool0; 36 | xhnet::COPool mpool1; 37 | 38 | vector v0; 39 | vector v1; 40 | vector v2; 41 | for (int i = 0; i < 1000; ++i) 42 | { 43 | if ( i==17000 ) 44 | { 45 | int c= 100; 46 | } 47 | 48 | Test0* t0 = mpool0.Allocate(); 49 | Test1* t1 = mpool1.Allocate(); 50 | Test2* t2 = new Test2(); 51 | 52 | v0.push_back(t0); 53 | v1.push_back(t1); 54 | v2.push_back(t2); 55 | } 56 | 57 | for ( auto i:v0 ) 58 | { 59 | mpool0.Free(i); 60 | } 61 | 62 | for (auto i : v1) 63 | { 64 | mpool1.Free(i); 65 | } 66 | 67 | for (auto i : v2) 68 | { 69 | delete i; 70 | } 71 | 72 | v0.clear(); 73 | v1.clear(); 74 | v2.clear(); 75 | 76 | for (int i = 0; i < 1000; ++i) 77 | { 78 | Test0* t0 = mpool0.Allocate(); 79 | Test1* t1 = mpool1.Allocate(); 80 | Test2* t2 = new Test2(); 81 | 82 | v0.push_back(t0); 83 | v1.push_back(t1); 84 | v2.push_back(t2); 85 | } 86 | 87 | for (auto i : v0) 88 | { 89 | mpool0.Free(i); 90 | } 91 | 92 | for (auto i : v1) 93 | { 94 | mpool1.Free(i); 95 | } 96 | 97 | for (auto i : v2) 98 | { 99 | delete (i); 100 | } 101 | 102 | 103 | return 0; 104 | } 105 | -------------------------------------------------------------------------------- /test/test-qyfh.h: -------------------------------------------------------------------------------- 1 | 2 | #include "qyfh.h" 3 | #include "luaengine.h" 4 | 5 | using namespace xhnet_qyfh; 6 | 7 | static bool bserver_open = false; 8 | 9 | class CTestNetIO 10 | { 11 | public: 12 | CTestNetIO(); 13 | ~CTestNetIO(); 14 | 15 | static CTestNetIO* GetNetIO(); 16 | 17 | std::string GetConnectIP(); 18 | 19 | unsigned int GetConnectPort(); 20 | 21 | void Start(const std::string& listenip, unsigned int listenport, const std::string& connectip, unsigned int connectport); 22 | 23 | void Close(); 24 | 25 | void Stop(); 26 | 27 | 28 | public: 29 | bool listener_can_accept(int userid, unsigned int socketid); 30 | 31 | void server_on_status(int userid, unsigned int socketid, unsigned int listener, bool bconnect); 32 | 33 | void server_on_message(int userid, unsigned int socketid, unsigned int listener, const CMessageHead_24& head, CIOBuffer* recvmsg); 34 | 35 | void server_on_heart(int userid, unsigned int socketid, unsigned int listener); 36 | 37 | 38 | void client_on_status(int userid, unsigned int socketid, bool bconnect); 39 | 40 | void client_on_message(int userid, unsigned int socketid, const CMessageHead_24& head, CIOBuffer* recvmsg); 41 | 42 | void client_on_heart(int userid, unsigned int socketid); 43 | 44 | private: 45 | 46 | std::string m_ip; 47 | unsigned int m_port; 48 | 49 | unsigned int m_listener; 50 | 51 | unsigned int m_connecter; 52 | 53 | CThreadIO m_mainio; 54 | CNetIO m_netio; 55 | 56 | public: 57 | CLuaEngine m_luaengine; 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /test/test.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/test/test.cpp -------------------------------------------------------------------------------- /test/tolua/main-qyfh.pkg: -------------------------------------------------------------------------------- 1 | 2 | $#include "main-qyfh.h" 3 | 4 | $#include "test-qyfh.h" 5 | 6 | $pfile "test-qyfh.pkg" 7 | -------------------------------------------------------------------------------- /test/tolua/test-qyfh.pkg: -------------------------------------------------------------------------------- 1 | 2 | $#include "qyfh.h" 3 | 4 | $using namespace xhnet_qyfh; 5 | 6 | class CTestNetIO 7 | { 8 | CTestNetIO(); 9 | ~CTestNetIO(); 10 | 11 | static CTestNetIO* GetNetIO(); 12 | 13 | std::string GetConnectIP(); 14 | 15 | unsigned int GetConnectPort(); 16 | 17 | void Start(const std::string& listenip, unsigned int listenport, const std::string& connectip, unsigned int connectport); 18 | 19 | void Close(); 20 | 21 | void Stop(); 22 | }; 23 | -------------------------------------------------------------------------------- /test/tolua/tolua++.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybestcool/xhnet/178f3ce2c34464dcc9aa342cea171da255df124b/test/tolua/tolua++.exe -------------------------------------------------------------------------------- /test/tolua/tolua.bat: -------------------------------------------------------------------------------- 1 | tolua++.exe -n mainqyfh -o "../main-qyfh.cpp" main-qyfh.pkg 2 | #-H "../main-qyfh.h" 3 | --------------------------------------------------------------------------------