mirror of
https://github.com/encounter/bdwgc.git
synced 2026-03-30 10:57:55 -07:00
Remove redundant header double-inclusion checks in the private headers
(code refactoring) * include/private/gc_pmark.h [HAVE_CONFIG_H]: Include config.h regardless of GC_PRIVATE_H. * include/private/gc_pmark.h: Include gc_mark.h regardless of GC_MARK_H; include gc_priv.h regardless of GC_PRIVATE_H. * include/private/gc_priv.h: Include gc_tiny_fl.h regardless of GC_TINY_FL_H; include gc_mark.h regardless of GC_MARK_H; include gcconfig.h regardless of GCCONFIG_H; include gc_locks.h regardless of GC_LOCKS_H.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#ifndef GC_PMARK_H
|
||||
#define GC_PMARK_H
|
||||
|
||||
#if defined(HAVE_CONFIG_H) && !defined(GC_PRIVATE_H)
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -40,13 +40,8 @@
|
||||
# include "dbg_mlc.h"
|
||||
#endif
|
||||
|
||||
#ifndef GC_MARK_H
|
||||
# include "../gc_mark.h"
|
||||
#endif
|
||||
|
||||
#ifndef GC_PRIVATE_H
|
||||
# include "gc_priv.h"
|
||||
#endif
|
||||
#include "../gc_mark.h"
|
||||
#include "gc_priv.h"
|
||||
|
||||
EXTERN_C_BEGIN
|
||||
|
||||
|
||||
@@ -80,13 +80,8 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef GC_TINY_FL_H
|
||||
# include "../gc_tiny_fl.h"
|
||||
#endif
|
||||
|
||||
#ifndef GC_MARK_H
|
||||
# include "../gc_mark.h"
|
||||
#endif
|
||||
#include "../gc_tiny_fl.h"
|
||||
#include "../gc_mark.h"
|
||||
|
||||
typedef GC_word word;
|
||||
typedef GC_signed_word signed_word;
|
||||
@@ -122,9 +117,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */
|
||||
#define SIZET_SAT_ADD(a, b) \
|
||||
(EXPECT((a) < GC_SIZE_MAX - (b), TRUE) ? (a) + (b) : GC_SIZE_MAX)
|
||||
|
||||
#ifndef GCCONFIG_H
|
||||
# include "gcconfig.h"
|
||||
#endif
|
||||
#include "gcconfig.h"
|
||||
|
||||
#if !defined(GC_ATOMIC_UNCOLLECTABLE) && defined(ATOMIC_UNCOLLECTABLE)
|
||||
/* For compatibility with old-style naming. */
|
||||
@@ -259,9 +252,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */
|
||||
# include "gc_atomic_ops.h"
|
||||
#endif
|
||||
|
||||
#ifndef GC_LOCKS_H
|
||||
# include "gc_locks.h"
|
||||
#endif
|
||||
#include "gc_locks.h"
|
||||
|
||||
#define GC_WORD_MAX (~(word)0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user