glusterfs on NetBSD

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

 



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?

-- 
Emmanuel Dreyfus
manu@xxxxxxxxxx



[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