Skip to content
Snippets Groups Projects
Commit a8f29216 authored by dmp's avatar dmp
Browse files

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.
parent 920f106b
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment