From 40eecd7dee4626f829c3e5e05a1681090d561dbe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Jun 2020 08:33:26 +0300 Subject: Disable error in atomic.h --- src/common/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/atomic.h b/src/common/atomic.h index 518d2e6ab..0d15d50d7 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -104,7 +104,7 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v // The __sync functions are available on x86 or ARMv6+ #if !defined(__x86_64__) && !defined(__i386__) \ && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) -#error Your Target Platfrom is not supported +//#error Your Target Platfrom is not supported #endif static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){ -- cgit v1.2.3-60-g2f50 From f73dd1e9a43eb3914ba040944b5a21c663cb8ca7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Jun 2020 03:42:08 +0300 Subject: Fix HPM data check violations between server and plugins --- src/common/hercules.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common/hercules.h b/src/common/hercules.h index 89ea761b4..e62656494 100644 --- a/src/common/hercules.h +++ b/src/common/hercules.h @@ -23,11 +23,15 @@ #include "config/core.h" #include "common/cbasetypes.h" +#ifdef HERCULES_CORE +#define HPExport static +#else // HERCULES_CORE #ifdef WIN32 - #define HPExport __declspec(dllexport) -#else - #define HPExport __attribute__((visibility("default"))) -#endif +#define HPExport __declspec(dllexport) +#else // WIN32 +#define HPExport __attribute__((visibility("default"))) +#endif // WIN32 +#endif // HERCULES_CORE #define HPShared extern -- cgit v1.2.3-60-g2f50 From 3f90a0ffa8728d5cda375d9e1f5a6d53c112db30 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:22:19 +0300 Subject: Read battle config in minimal run This allow fix warnings in different service plugins. --- src/map/map.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/map/map.c b/src/map/map.c index 24d571498..644994c09 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6691,6 +6691,8 @@ int do_init(int argc, char *argv[]) atcommand->msg_read(map->MSG_CONF_NAME, false); map->inter_config_read(map->INTER_CONF_NAME, false); logs->config_read(map->LOG_CONF_NAME, false); + } else { + battle->config_read(map->BATTLE_CONF_FILENAME, false); } script->config_read(map->SCRIPT_CONF_NAME, false); -- cgit v1.2.3-60-g2f50 From 8b5fc0b67b78a6f4336705e22806c837257cdead Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:30:57 +0300 Subject: Fix double fclose in map cache plugin --- src/plugins/mapcache.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/plugins/mapcache.c b/src/plugins/mapcache.c index 3dc6e3b34..2b8e4c6f8 100644 --- a/src/plugins/mapcache.c +++ b/src/plugins/mapcache.c @@ -402,7 +402,6 @@ bool fix_md5_truncation_sub(FILE *fp, const char *map_name) fseek(fp, 0, SEEK_SET); fwrite(&mheader, sizeof(mheader), 1, fp); - fclose(fp); return true; } -- cgit v1.2.3-60-g2f50 From 9e3f2e60952846bee1f58ed81e777c75cbd17f28 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 11:14:39 +0300 Subject: Add missing plugins into make file --- src/plugins/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index e44412bfa..073cd8d41 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -43,7 +43,7 @@ HPMHOOKING = $(addprefix HPMHooking_, login char map) ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) # Plugins that will be built through 'make plugins' or 'make all' -PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) +PLUGINS = sample db2sql constdb2doc generate-translations mapcache script_mapquit HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) COMMON_D = ../common # Includes private headers (plugins might need them) -- cgit v1.2.3-60-g2f50 From a496359909959ae1dca2c95e830c63aa37f714d5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 13:46:52 +0300 Subject: Call all plugin events even if map server running in minimal mode --- src/map/battle.c | 2 ++ src/map/map.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 611154953..d8c1be83e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7681,6 +7681,8 @@ static void do_init_battle(bool minimal) static void do_final_battle(void) { + if (map->minimal) + return; ers_destroy(battle->delay_damage_ers); } diff --git a/src/map/map.c b/src/map/map.c index 644994c09..3312680da 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6743,8 +6743,8 @@ int do_init(int argc, char *argv[]) timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - HPM->event(HPET_INIT); } + HPM->event(HPET_INIT); atcommand->init(minimal); battle->init(minimal); @@ -6791,8 +6791,12 @@ int do_init(int argc, char *argv[]) exit(EXIT_SUCCESS); } - if( minimal ) { + if (minimal) { HPM->event(HPET_READY); + HPM->event(HPET_FINAL); + battle->final(); + HPM_map_do_final(); + HPM->event(HPET_POST_FINAL); exit(EXIT_SUCCESS); } -- cgit v1.2.3-60-g2f50 From e3e1acb092a5ba8ddc4dcb116ec4bcf7686e140d Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 28 Jun 2020 01:26:45 +0200 Subject: Add detection of ARMv8 and improve detection of ARMv7 Signed-off-by: Haru --- src/common/atomic.h | 3 ++- src/common/cbasetypes.h | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/atomic.h b/src/common/atomic.h index 0d15d50d7..b9157373f 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -103,8 +103,9 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v // The __sync functions are available on x86 or ARMv6+ #if !defined(__x86_64__) && !defined(__i386__) \ + && !defined(__ppc64__) && ! defined(__powerpc64__) \ && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) -//#error Your Target Platfrom is not supported +#error Target platform currently not supported #endif static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){ diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 31d89d66b..06333a7b2 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -62,16 +62,24 @@ #endif // Standardize the ARM platform version, if available (the only values we're interested in right now are >= ARMv6) +#ifdef __ARM_ARCH +#define __ARM_ARCH_VERSION__ __ARM_ARCH +#else #if defined(__ARMV6__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \ || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) // gcc ARMv6 #define __ARM_ARCH_VERSION__ 6 -#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 +#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 #define __ARM_ARCH_VERSION__ 7 +#elif defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__) +#define __ARM_ARCH_VERSION__ 8 #elif defined(_M_ARM) // MSVC #define __ARM_ARCH_VERSION__ _M_ARM +#elif defined(__TARGET_ARCH_ARM) // RVCT +#define __ARM_ARCH_VERSION__ __TARGET_ARCH_ARM #else #define __ARM_ARCH_VERSION__ 0 #endif +#endif // Necessary for __NetBSD_Version__ (defined as VVRR00PP00) on NetBSD #ifdef __NETBSD__ -- cgit v1.2.3-60-g2f50