Re: glusterfs on NetBSD

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

 



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?




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux