On 04/30/2012 01:57 PM, Emmanuel Dreyfus wrote:
As a result, obviously, it means that every use
in gluster has to be changed to dirname_r() or basename_r(), e.g. with
something like #define dirname dirname_r,
This is what I do in the unintegrated NetBSD patches.
Sure; I'm just perpetually annoyed that nobody uses weak symbols in
system libs. If they did, it would make stuff like this a whole lot easier.
I would suggest that any files associated with this change be added to
.../contrib/<something-or-other>.
Right. May I add xdr_sizeof() from FreeBSD there?
Off hand, sure.
Although I don't know if that funky Sun license will be any more or less
acceptable than whatever your previous proposal was.
I would also suggest that the feature test be #ifndef GF_LINUX_HOST_OS.
But note that Solaris' basename() and dirname() are MT-SAFE too, so
maybe #if !defined(GF_LINUX_HOST_OS)&& !defined(GF_SOLARIS_HOST_OS)
instead?
Is the Solaris port of glusterfs really working?
Dunno. My inclination is to try and make a thing correct for as many
things as I know about without regard to anything else. Or turn it
around and make if #if defined(GF_BSD_HOST_OS) ||
defined(GF_DARWIN_HOST_OS), Either way, please use the appropriate
GLUSTER GF_*_HOST_OS feature test. You'll get what you need and if/when
someone else tries to make it work on something else it'll be one less
thing they need to do.
--
Kaleb