]> granicus.if.org Git - gc/commitdiff
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 27fc21b2b70496fb85f34acf258b98e372c4399e..1124a80f4aadeb0c059c1e5c12eaa27cd8317154 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 28feb1a5cff8e1e30ddb2d5421f4b2eecb843a4e..53de3059a5948476bab3c5381400c56ce4b3ec78 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 79c8d4da3b94c5bce8f8377c1a8c607ac4cac7f4..f6b69d2cd728719c5b641f53eb8d6397a89f4c75 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.      */