Fix 'GC_debug_header_size is deprecated' GCC warning
authorIvan Maidanski <ivmai@mail.ru>
Tue, 25 Jun 2019 20:55:22 +0000 (23:55 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 25 Jun 2019 20:55:22 +0000 (23:55 +0300)
(fix of commit 85e3083ff)

* include/private/gc_priv.h [!GC_BUILD && NOT_GCBUILD] (GC_BUILD): Do
not define.
* tests/disclaim_bench.c (NOT_GCBUILD): Define macro (before include
gc_priv.h); remove outdated comment.
* tests/test.c (NOT_GCBUILD): Likewise.

include/private/gc_priv.h
tests/disclaim_bench.c
tests/test.c

index 27fc21b..1124a80 100644 (file)
@@ -22,7 +22,7 @@
 # include "config.h"
 #endif
 
-#ifndef GC_BUILD
+#if !defined(GC_BUILD) && !defined(NOT_GCBUILD)
 # define GC_BUILD
 #endif
 
index 28feb1a..53de305 100644 (file)
@@ -22,8 +22,7 @@
 
 #include "gc_disclaim.h"
 
-/* Include gc_priv.h is done after including GC public headers, so      */
-/* that GC_BUILD has no effect on the public prototypes.                */
+#define NOT_GCBUILD
 #include "private/gc_priv.h" /* for CLOCK_TYPE, COVERT_DATAFLOW, GC_random */
 
 #ifdef LINT2
index 79c8d4d..f6b69d2 100644 (file)
@@ -61,6 +61,7 @@
 # include "gc_typed.h"
 #endif
 
+#define NOT_GCBUILD
 #include "private/gc_priv.h"    /* For output, locking,                 */
                                 /* some statistics and gcconfig.h.      */