From fe3740bd931ca30c22d956816f71be9026eeef54 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sun, 19 Jan 2014 14:37:05 +0100 Subject: [PATCH] Make `#include "Rts.h"` C++-compatible again (re #8676) Signed-off-by: Herbert Valerio Riedel --- includes/rts/Threads.h | 2 +- includes/rts/storage/Block.h | 12 ++++++------ includes/rts/storage/ClosureMacros.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h index e6844a3227..da6f7a4add 100644 --- a/includes/rts/Threads.h +++ b/includes/rts/Threads.h @@ -68,6 +68,6 @@ extern Capability MainCapability; // Change the number of capabilities (only supports increasing the // current value at the moment). // -extern void setNumCapabilities (nat new); +extern void setNumCapabilities (nat new_); #endif /* RTS_THREADS_H */ diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h index 7b3bc991d3..5567bf455a 100644 --- a/includes/rts/storage/Block.h +++ b/includes/rts/storage/Block.h @@ -248,17 +248,17 @@ dbl_link_insert_after(bdescr *bd, bdescr *after) } INLINE_HEADER void -dbl_link_replace(bdescr *new, bdescr *old, bdescr **list) +dbl_link_replace(bdescr *new_, bdescr *old, bdescr **list) { - new->link = old->link; - new->u.back = old->u.back; + new_->link = old->link; + new_->u.back = old->u.back; if (old->link) { - old->link->u.back = new; + old->link->u.back = new_; } if (old->u.back) { - old->u.back->link = new; + old->u.back->link = new_; } else { - *list = new; + *list = new_; } } diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index 8933e85eb7..88434d4e79 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -245,12 +245,12 @@ TAG_CLOSURE(StgWord tag,StgClosure * p) INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR_NOT_NULL (StgWord p) { StgInfoTable *info = INFO_PTR_TO_STRUCT((StgInfoTable *)p); - return info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES; + return (info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES) ? rtsTrue : rtsFalse; } INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR (StgWord p) { - return p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p)); + return (p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p))) ? rtsTrue : rtsFalse; } INLINE_HEADER rtsBool LOOKS_LIKE_CLOSURE_PTR (void *p) -- GitLab