* and then SCM_API marks them for export. */
#define SCM_INTERNAL extern
-#if (defined __GNUC__)
+/* The SCM_DEPRECATED macro is used in declarations of deprecated functions
+ * or variables. Defining `SCM_BUILDING_DEPRECATED_CODE' allows deprecated
+ * functions to be implemented in terms of deprecated functions, and allows
+ * deprecated functions to be referred to by `scm_c_define_gsubr ()'. */
+#if !defined (SCM_BUILDING_DEPRECATED_CODE) \
+ && defined (__GNUC__) && (__GNUC__ >= 3)
+# define SCM_DEPRECATED SCM_API __attribute__ ((__deprecated__))
+#else
+# define SCM_DEPRECATED SCM_API
+#endif
+
+ /* The SCM_ALIGNED macro, when defined, can be used to instruct the compiler
+ * to honor the given alignment constraint. */
-#elif (defined __INTEL_COMPILER)
++#if defined __GNUC__
+ # define SCM_ALIGNED(x) __attribute__ ((aligned (x)))
++#elif defined __INTEL_COMPILER
+ # define SCM_ALIGNED(x) __declspec (align (x))
+ #else
+ /* Don't know how to align things. */
+ # undef SCM_ALIGNED
+ #endif
\f
/* {Supported Options}
typedef void *GC_PTR;
#endif
-#endif /* SCM_BOEHM_GC_H */
+
+ /* Return true if PTR points to the heap. */
+ #define SCM_I_IS_POINTER_TO_THE_HEAP(ptr) \
+ (GC_base (ptr) != NULL)
+
+ /* Register a disappearing link for the object pointed to by OBJ such that
+ the pointer pointed to be LINK is cleared when OBJ is reclaimed. Do so
+ only if OBJ actually points to the heap. See
+ http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2563
+ for details. */
+ #define SCM_I_REGISTER_DISAPPEARING_LINK(link, obj) \
+ ((SCM_I_IS_POINTER_TO_THE_HEAP (obj)) \
+ ? GC_GENERAL_REGISTER_DISAPPEARING_LINK ((link), (obj)) \
+ : 0)
+
+
+#endif /* SCM_BDW_GC_H */