Hi,
> On gentoo the man page actually lists _XOPEN_SOURCE 500 as the magic
> #define to add when using pread/pwrite, so that was the route that I
> tried first.  This breaks the pvfs2 build, though- apparently that flag
> also turns off some features that we already use in addition to adding
> new ones.  It may work when limited to specific source files, though.

I agree it should be defined only where it is needed, I ran into the same 
problem when I put the initial version of the threaded implementation 
together. 
I did the same thing and defined _XOPEN_SOURCE 500 in dbpf-bstream-threaded.c 
only, where it is needed to get the prototypes. It also seems to get the 
pwrite depending on the largefile support right. 

If this define is only needed in linux maybe we should set it only on these 
architectures which need it ?
Maybe we could put a wrapper to pwrite / pread into another C file which then 
is the only file in which the _XOPEN_SOURCE or which ever define you might 
choose to be set ? 

Have a nice weekend guys,
Julian
_______________________________________________
Pvfs2-developers mailing list
Pvfs2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to