summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)AuthorFilesLines
2018-05-312012-2018 !Maytichai Saowa2-2/+2
2016-11-20Removed support for apostrophes in libconfig key namesHaru1-9/+17
The apostrophe (`'`) is no longer an allowed symbol in libconfig key names. It is no longer necessary since it is no longer allowed in constant names. Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Fix various uninitialized objects in the test_libconfig suiteHaru1-0/+31
The config_t objects need to be initialized through libconfig->init() before use (except when loaded through libconfig->load_file(), which initializes the object). Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Fix a 'make test' failure caused by a wrong linker library orderHaru1-2/+2
The library common.a depends on common_sql.a. Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Add fixed-size versions of the _int64 libconfig getters/settersHaru1-3/+3
As we use int64 (instead of long long int) through the code, it's preferable if our libconfig interface does the same, avoiding us to create temporary interchange variables for that purpose. Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Fix a compilation warning in test_spinlockHaru1-5/+7
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-07-12Various changes to the thread interfaceHaru1-1/+1
Mostly stylistic changes. Cleaned up documentation. Signed-off-by: Haru <haru@dotalux.com>
2016-07-12Removed unnecessary typedefs from thread and spinlockHaru1-4/+5
- SPIN_LOCK -> struct spin_lock - rAthread -> struct thread_handle - rAthreadProc -> threadFunc - RATHREAD_PRIO -> enum thread_priority - RAT_PRIO_LOW -> THREADPRIO_LOW - RAT_PRIO_NORMAL -> THREADPRIO_NORMAL - RAT_PRIO_HIGH -> THREADPRIO_HIGH - RA_THREADS_MAX -> THREADS_MAX Signed-off-by: Haru <haru@dotalux.com> fixupthread
2016-07-12Corrected some compiler warnings in test_spinlockHaru1-1/+1
2016-07-12Interface thread.chemagx1-2/+2
2016-05-08Fixed various issues pointed out by cppcheckHaru2-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Updated GNU Make build system to support private headersHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru1-43/+43
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-3/+3
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Updated libconfig to version 1.5Haru1-2/+2
- Based on https://github.com/hyperrealm/libconfig/releases/tag/v1.5 f9f23d7a95608936ea7d839731dbd56f1667b7ed - Improvements that come with this libconfig version: * Don't fclose() a null pointer. * check if file being opened is a directory * added config_set_options(), config_get_options(), setOptions(), getOptions(). * renamed config_setting_lookup_from() to config_setting_lookup() and documented it * floating point precision loss patch * scanner code cleanup * parser code cleanup * bugfix; capture root filename - Parser generated with Bison 2.7 - Scanner generated with flex 2.6 - This includes the windows-compatibility commit 909b06c07e30e456cc63f58d31b0e2f3aad4cc43 from upstream (although not part of version 1.5) Signed-off-by: Haru <haru@dotalux.com>
2016-01-21Enable pcre by default in configure and show error if pcre missing.Andrei Karas1-2/+2
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru3-5/+61
Signed-off-by: Haru <haru@dotalux.com>
2015-12-02Fixed an issue with the HPMDataCheck when PCRE is enabledHaru1-1/+1
- Follow-up to 300668d, thanks to AnnieRuru Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Added test_libconfig test suite.Haru4-14/+865
- To be used for regression tests when updating or editing libconfig. Signed-off-by: Haru <haru@dotalux.com>
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-10/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru2-12/+13
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-5/+5
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-15/+11
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Explicitly specify 'void' when a function expects no argumentsHaru1-3/+3
- See CERT DCL20-C. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Removed unsafe pointer typedefsHaru1-1/+1
- If a variable doesn't look like a pointer... Maybe it might be a pointer after all. Please, give me back my '*' sign. - See CERT DCL05-C. Signed-off-by: Haru <haru@dotalux.com>
2014-05-25Improved CFLAGS/CPPFLAGS handlingHaru1-1/+3
- Language extensions, such as _GNU_SOURCE are now enabled through CPPFLAGS by the configure script, rather than within the source code. - Moved some configure-time CFLAGS to CPPFLAGS, where appropriate. - Fixes bugreport:8211, thanks to Neoth http://hercules.ws/board/tracker/issue-8211-compiling-warning-in-linux Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-7/+8
Signed-off-by: Haru <haru@dotalux.com>
2014-04-17Added sysinfo (System Information) functionalitiesHaru1-9/+16
- More informative messages are displayed during startup, to make it easier to identify what system and environment Hercules is running. - Git/SVN revision detection is improved, separating the source version (cached at compile time) from the runtime version, in case the user updated their working copy without recompiling the server. Git version detection is also more reliable, in case a non-default branch is used. - The get_revision script command has been removed (as it was useless to begin with, after the switch to git). An alternative will be provided later, for feature-probing purposes. - The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64, Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 / gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7 on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64, Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9 / gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc 4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012 on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual Studio 2013 on WOW64. Signed-off-by: Haru <haru@dotalux.com>
2013-11-20Added support for 'make plugin.pluginname' to compile only 'pluginname'Haru1-15/+19
- Various Makefile optimizations Signed-off-by: Haru <haru@dotalux.com>
2013-10-05Added 'buildclean' target to all makefilesHaru1-3/+7
- By invoking 'make buildclean', you can clean up all the build intermediate (object) files, without deleting any of the built executables and plugins. - To delete everything, use 'make clean', as you've always done. Signed-off-by: Haru <haru@dotalux.com>
2013-09-21Added Makefile.in change detection (and auto-rebuild) capabilitiesHaru1-2/+5
- If a Makefile.in is changed, ./config.status (or ./configure in case it's not available) will be automatically run to update the Makefiles. - Special thanks to Yommy for the idea. Signed-off-by: Haru <haru@dotalux.com>
2013-09-18Makefiles improvements and cleanupHaru1-14/+20
This should resolve #138 (please reopen or comment on it if it's not the case). Special thanks to Takkun for helping to reproduce the issue. Signed-off-by: Haru <haru@dotalux.com>
2013-07-21Changed CC to a Makefile variableHaru1-2/+5
- This allows the user to override the compiler at each make invocation (i.e. to run scripts to generate .clang_complete for https://github.com/Rip-Rip/clang_complete ) - Updated .gitignore with a few platform-dependent entries Signed-off-by: Haru <haru@dotalux.com>
2013-07-14Makefile error corrections and minor tweaksHaru1-2/+2
- Fixed some variable names incorrectly entered as literals in target names - This fixes a build failure when trying to build any specific sub-project directly from src/*/ - Removed an old svn-related command from the 'import' recipe - This fixes the build failures when trying to run 'make tools' right after 'make clean' - Removed duplicate entries in the 'clean' recipe for map and login servers Signed-off-by: Haru <haru@dotalux.com>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-83/+77
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-77/+83
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-03feature merge bs-coreoptimize->trunk: Atomic Operations, Threading, Spinlock ↵blacksirius2-0/+178
implemnetation. [commit 1/2, windows will followup] - Added Abstractions for Atomic Operations (lock instructions.. windows guy's may now this as Interlocked* stuff ..) - Added Threading api abstraction for Pthread based OS's and Windows - Added Spinlock Implementation (uses CAS / if you need more informations - just read the source - its simple.) - Due to Interlocked(Compare)Exchange64 .. we now require at least i686 (Pentium Pro) for 32Bit Builds :) youll also may feel some performance improvements when using 32bit builsd due to "newer" minimal arch the compiler is now able to use CMOV's .... ================================================================ = Important Warning: ================================================================ Dont use threading at the moment athena is not threadsafe! you'll mess up everthing when accessing data from other threads .., no synchronization is provided. A way to process tasks asynchronously will come up after / with the new socket system. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16221 54d463be-8e91-2dee-dedb-b68131a5f0ec