diff options
author | dmp@rice.edu <unknown> | 2010-06-24 16:35:14 +0000 |
---|---|---|
committer | dmp@rice.edu <unknown> | 2010-06-24 16:35:14 +0000 |
commit | a8f29216ea1f681b89fa4f55e00e404c6b0b2417 (patch) | |
tree | e8e48d40ca3c7b8389a6dd5bed81fbdb23a6ae0e /rts | |
parent | 920f106b8472089fb96eca537d1965256302301c (diff) | |
download | haskell-a8f29216ea1f681b89fa4f55e00e404c6b0b2417.tar.gz |
Add #undefs for posix source symbols when including papi.h
Validation fails when validating with PAPI support (i.e. GhcRtsWithPapi = YES
in validate.mk). The problem is that the posix symbols are defined by a header
included from papi.h. Compilation then fails because these symbols are
redefined in PosixSource.h.
This patch adds an undefine for the posix symbols after including papi.h and
before including PosixSource.h. The #undefines are localized to Papi.c since
that is the only case where they are getting defined twice.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Papi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Papi.c b/rts/Papi.c index f72660428b..62f5d0d396 100644 --- a/rts/Papi.c +++ b/rts/Papi.c @@ -15,6 +15,11 @@ #ifdef USE_PAPI /* ugly */ #include <papi.h> +/* The posix symbols get defined in a header included from papi.h. + * undefind them here to allow redefinition in PosixSource.h */ +#undef _POSIX_SOURCE +#undef _POSIX_C_SOURCE +#undef _XOPEN_SOURCE #include "PosixSource.h" #include "Rts.h" |