projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define _BSD_SOURCE in Stg.h
[ghc-hetmet.git]
/
includes
/
Stg.h
diff --git
a/includes/Stg.h
b/includes/Stg.h
index
32e8380
..
06a8662
100644
(file)
--- a/
includes/Stg.h
+++ b/
includes/Stg.h
@@
-36,7
+36,8
@@
// constants from math.h, which we occasionally need to use in .hc (#1861)
# define _ISOC99_SOURCE
// constants from math.h, which we occasionally need to use in .hc (#1861)
# define _ISOC99_SOURCE
-// Turning on _ISOC99_SOURCE means S_ISSOCK gets defined on Linux
+// We need _BSD_SOURCE so that math.h defines things like gamma
+// on Linux
# define _BSD_SOURCE
#endif
# define _BSD_SOURCE
#endif
@@
-77,6
+78,10
@@
#define BITS_PER_BYTE 8
#define BITS_IN(x) (BITS_PER_BYTE * sizeof(x))
#define BITS_PER_BYTE 8
#define BITS_IN(x) (BITS_PER_BYTE * sizeof(x))
+/* Compute offsets of struct fields
+ */
+#define STG_FIELD_OFFSET(s_type, field) ((StgWord)&(((s_type*)0)->field))
+
/*
* 'Portable' inlining:
* INLINE_HEADER is for inline functions in header files (macros)
/*
* 'Portable' inlining:
* INLINE_HEADER is for inline functions in header files (macros)
@@
-205,9
+210,7
@@
typedef StgWord StgWordArray[];
#include "MachRegs.h"
#include "Regs.h"
#include "MachRegs.h"
#include "Regs.h"
-#ifdef TICKY_TICKY
#include "TickyCounters.h"
#include "TickyCounters.h"
-#endif
#if IN_STG_CODE
/*
#if IN_STG_CODE
/*