[Gluster-devel] glusterfs on NetBSD

sac sac at gluster.com
Wed Aug 25 11:00:27 UTC 2010


Hi Emmanuel,

On Wed, Aug 25, 2010 at 3:24 PM, Emmanuel Dreyfus <manu at netbsd.org> wrote:
> On Tue, Aug 24, 2010 at 11:35:46PM +0530, Vijay Bellur wrote:
>> basename_r() and dirname_r() can be added to compat.c in libglusterfs/src.
>> The above defines can be added to compat.h in the same directory.
>> Most conditionally compilable code in glusterfs is present in the
>> compat.[ch] files.
>
> I borrowed glibc basename and dirname and added them in compat.c,
> renamed with _r and guarded by an ifdef __NetBSD__. GF_BSD_HOST_OS
> should not be used, as FreeBSD's implemntation is thread-safe.
>
> It works fine. I also fixed  a few additionnal bugs in the code where
> a pointer returned by dirname is free'ed. Even on Linux this may break,
> as calling dirname("") will return "." (as mandated by SUSv2) from
> static storage. I am not sure such a situation arise with glusterfs,
> though.
>
> Who wants my patches?

Please post your patches. Or the url to your repository if you have setup any.

Regards,
Sachidananda.




More information about the Gluster-devel mailing list