Make it easier to enable or disable tracing in the Sequoia build. sync
authorNeal H. Walfield <neal@pep.foundation>
Wed, 26 Dec 2018 20:48:02 +0100
branchsync
changeset 32118ca54e726b3c
parent 3210 206d68617cf8
child 3212 fb4124923112
Make it easier to enable or disable tracing in the Sequoia build.

- If TRACE is not explicitly set, make the default still depend on
NDEBUG.
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Wed Dec 26 20:44:07 2018 +0100
     1.2 +++ b/src/pgp_sequoia.c	Wed Dec 26 20:48:02 2018 +0100
     1.3 @@ -16,8 +16,17 @@
     1.4  
     1.5  #include "wrappers.h"
     1.6  
     1.7 +#define TRACE 0
     1.8 +#ifndef TRACING
     1.9 +#  ifndef NDEBUG
    1.10 +#    define TRACING 0
    1.11 +#  else
    1.12 +#    define TRACING 1
    1.13 +#  endif
    1.14 +#endif
    1.15 +
    1.16  // enable tracing if in debugging mode
    1.17 -#ifndef NDEBUG
    1.18 +#if TRACING
    1.19  #  define _T(...) do {                          \
    1.20          fprintf(stderr, ##__VA_ARGS__);         \
    1.21      } while (0)