mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-16 23:18:59 +00:00
Add SERVAL_ENABLE_DEBUG macro
This commit is contained in:
parent
e769af0067
commit
2690a5795b
@ -28,6 +28,7 @@ SERVALD_LOCAL_CFLAGS = \
|
||||
-Wno-unknown-attributes \
|
||||
-DSERVALD_VERSION="\"Android\"" -DSERVALD_COPYRIGHT="\"Android\"" \
|
||||
-DINSTANCE_PATH="\"/data/data/org.servalproject/var/serval-node\"" \
|
||||
-DSERVAL_ENABLE_DEBUG=1 \
|
||||
-DSHELL -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" \
|
||||
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" \
|
||||
-DHAVE_FUNC_ATTRIBUTE_ERROR=1 \
|
||||
|
@ -79,6 +79,7 @@ CFLAGS+=-DSQLITE_THREADSAFE=0 \
|
||||
-DSQLITE_OMIT_AUTHORIZATION
|
||||
CFLAGS+=-fPIC
|
||||
CFLAGS+=-Wall -Werror
|
||||
CFLAGS+=-DSERVAL_ENABLE_DEBUG=1
|
||||
# Solaris magic
|
||||
CFLAGS+=-DSHA2_USE_INTTYPES_H -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1
|
||||
# OSX magic to compensate for the Solaris magic
|
||||
|
8
conf.h
8
conf.h
@ -704,7 +704,15 @@ extern __thread int cf_initialised;
|
||||
extern __thread int cf_limbo;
|
||||
extern __thread struct config_main config;
|
||||
|
||||
// This macro is used in an if (IF_DEBUG(flagname)) { } statement around all
|
||||
// debugging log statements. If macro SERVAL_ENABLE_DEBUG can be pre-defined as 0
|
||||
// (eg, using the -D command-line option) to build without any debug
|
||||
// statements.
|
||||
#if SERVAL_ENABLE_DEBUG+0
|
||||
#define IF_DEBUG(flagname) (config.debug.flagname)
|
||||
#else
|
||||
#define IF_DEBUG(flagname) (0)
|
||||
#endif
|
||||
|
||||
int cf_init(void);
|
||||
int cf_load(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user