Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] sched.h and _GNU_SOURCE vs hwloc/glibc-sched.h mess
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-02-17 11:42:46


Brice Goglin, le Thu 17 Feb 2011 17:30:24 +0100, a écrit :
> I guess we can't #define _GNU_SOURCE in hwloc.h.

Yes. Actually glibc-sched.h shouldn't really. Only .c files are supposed
to define _GNU_SOURCE, because it exposes new function names which could
conflict with the .c source.

> Any comments or better idea ?

I was thus more thinking about just being even more precise:

#if !defined _GNU_SOURCE || !defined _SCHED_H || !defined CPU_SETSIZE
#error Please make sure to include sched.h before including glibc-sched.h, and define _GNU_SOURCE before any inclusion of sched.h
#endif

Samuel