tech-userlevel archive

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

Re: Import basename_r and dirname_r from FreeBSD?

In article <20120501082311.GA11672@marx.bitnet>,
Jukka Ruohonen  <> wrote:
>On Tue, May 01, 2012 at 09:37:45AM +0200, Emmanuel Dreyfus wrote:
>> FreeBSD has thread-safe basename_r()and dirname_r(). Is it okay to import
>> them?
>What are these? I'd say: sure, but not to libc.

There are three flavors of basename_r that I can find:

char *basename_r(const char *, char *); FreeBSD, implicit MAXPATHLEN
char *basename_r(const char *, char *, size_t); Android, size_t len, what if
                                                does not fit?
char *basename_r(const char *); allocates

I am not sure that adding one of the three is beneficial at this point, since
the world has not decided which way to go yet, and this is going to create
more autoconf mess.


Home | Main Index | Thread Index | Old Index