From 772931496f1fd50807af74f0a2f08cb1e03cdf05 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 21 Feb 2019 00:07:46 +0100 Subject: [PATCH] buildsys: add GAP prefix to several #defines --- configure.ac | 8 ++++---- src/debug.c | 2 +- src/gasman.c | 2 +- src/gasman.h | 18 +++++++++--------- src/system.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 30ee08f151..24889b8cb5 100644 --- a/configure.ac +++ b/configure.ac @@ -208,7 +208,7 @@ dnl AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable debug mode])], [AC_DEFINE([GAP_KERNEL_DEBUG], [1], [define if building in debug mode]), - AC_DEFINE([PRINT_BACKTRACE], [1], [to enable backtraces upon crashes])], + AC_DEFINE([GAP_PRINT_BACKTRACE], [1], [to enable backtraces upon crashes])], [enable_debug=no] ) AC_MSG_CHECKING([whether to enable debug mode]) @@ -224,7 +224,7 @@ AC_MSG_RESULT([$enable_memory_checking]) AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], [enable valgrind extensions to GASMAN])], - [AC_DEFINE([MEMORY_CANARY], [1], [define if building with valgrind extensions])], + [AC_DEFINE([GAP_MEMORY_CANARY], [1], [define if building with valgrind extensions])], [enable_valgrind=no] ) AC_MSG_CHECKING([whether to enable valgrind extensions to GASMAN]) @@ -576,7 +576,7 @@ AS_IF([test "x$ARCHEXT" != "x"], AS_IF([test "x$ARCH" != "x"], [GAPARCH="$ARCH"]) -AC_DEFINE_UNQUOTED([SYS_ARCH], ["$GAPARCH"], [for backwards compatibility]) +AC_DEFINE_UNQUOTED([GAPARCH], ["$GAPARCH"], [for backwards compatibility]) AC_SUBST([GAPARCH]) AC_ARG_ENABLE([compat-mode], @@ -756,7 +756,7 @@ AX_EXECINFO AS_IF([test "x$enable_hpcgap" = xyes],[ AS_BOX([WARNING: Experimental HPC-GAP mode enabled]) dnl also enable backtrace, to help debug spurious crashes - AC_DEFINE([PRINT_BACKTRACE], [1], [to enable backtraces upon crashes]) + AC_DEFINE([GAP_PRINT_BACKTRACE], [1], [to enable backtraces upon crashes]) ]) dnl diff --git a/src/debug.c b/src/debug.c index 9c4fee2045..9ace18f239 100644 --- a/src/debug.c +++ b/src/debug.c @@ -27,7 +27,7 @@ #include "hpc/region.h" #endif -#if defined(HAVE_BACKTRACE) && defined(PRINT_BACKTRACE) +#if defined(HAVE_BACKTRACE) && defined(GAP_PRINT_BACKTRACE) #include #include diff --git a/src/gasman.c b/src/gasman.c index 6966aacb65..7c9cfa09e0 100644 --- a/src/gasman.c +++ b/src/gasman.c @@ -456,7 +456,7 @@ static inline UInt IS_BAG_BODY(void * ptr) ((UInt)ptr & (sizeof(Bag) - 1)) == 0); } -#if defined(MEMORY_CANARY) +#if defined(GAP_MEMORY_CANARY) #include #include diff --git a/src/gasman.h b/src/gasman.h index e707d56c8c..05317c8168 100644 --- a/src/gasman.h +++ b/src/gasman.h @@ -90,7 +90,7 @@ typedef struct { #ifdef USE_GASMAN Bag link; #endif -#if defined(MEMORY_CANARY) +#if defined(GAP_MEMORY_CANARY) // The following variable is marked as not readable or writable // in valgrind, to check for code reading before the start of a Bag. uint64_t memory_canary_padding[8]; @@ -370,18 +370,18 @@ void CHANGED_BAG(Bag bag); int IsGapObj(void *); -#elif defined(MEMORY_CANARY) +#elif defined(GAP_MEMORY_CANARY) /**************************************************************************** ** -** MEMORY_CANARY provides (basic) support for catching out-of-bounds memory -** problems in GAP. This is done through the excellent 'valgrind' program. -** valgrind is of limited use in GAP normally, because it doesn't understand -** GAP's memory manager. Enabling MEMORY_CANARY will make an executable where -** valgrind will detect memory issues. +** GAP_MEMORY_CANARY provides (basic) support for catching out-of-bounds +** memory problems in GAP. This is done through the excellent 'valgrind' +** program. Valgrind is of limited use in GAP normally, because it doesn't +** understand GAP's memory manager. Enabling GAP_MEMORY_CANARY will make an +** executable where valgrind will detect memory issues. ** -** At the moment the detection is limited to only writing off the last allocated -** block. +** At the moment the detection is limited to only writing off the last +** allocated block. */ void CHANGED_BAG(Bag b); diff --git a/src/system.c b/src/system.c index 2cefe89827..1cf4312a2b 100644 --- a/src/system.c +++ b/src/system.c @@ -73,7 +73,7 @@ const Char * SyKernelVersion = "4.dev"; ** *V SyArchitecture . . . . . . . . . . . . . . . . name of the architecture */ -const Char * SyArchitecture = SYS_ARCH; +const Char * SyArchitecture = GAPARCH; /****************************************************************************