gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] glusterfs on NetBSD


From: Anand Babu Periasamy
Subject: Re: [Gluster-devel] glusterfs on NetBSD
Date: Tue, 24 Aug 2010 21:35:45 +0530
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Icedove/3.0.6

Hi Emmanuel, This is great news. Sorry, we have been busy with 3.1 development. I will talk to Anand Avati or Vijay Bellur to coordinate with you.
--
Anand Babu Periasamy
Blog [http://www.unlocksmith.org]

Imagination is more important than knowledge --Albert Einstein

On 08/24/2010 09:18 PM, Emmanuel Dreyfus wrote:
Hello

I am porting glusterfs to NetBSD. I reached the stage where I can mount,
cd, ls, cat, mkdir, rmdir, mknod, ln ... Obviously there are many bugs
remaining, but I am confident this is going to work.

I have 15 patches for now. I posted some of them previously, but had no
reply. I would appreciate if a committer could review them.

The most troublesome issue is basename(3) and dirname(3) usage. While
Linux modify the given string and return it, the NetBSD flavor of those
return static buffers, which is not thread safe. Both behavior are SUSv2
compliant: the functions are not supposed to be thread safe. Since they
are used, there is a portability problem here.

In order to fix that, I can add basename_r() and dirname_r(), and
do this:
#ifdef __NetBSD__
#define basename(x) basename_r(x)
#define dirname(x) dirname_r(x)
#endif /* __NetBSD__ */

The question is: where in the code is the prefered way for adding
basename_r() and dirname_r()? And in what header should I add the
defines above?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]