tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fflagstostr(3) / strtofflags(3)
On Fri, Dec 26, 2008 at 9:21 AM, Luke Mewburn <lukem%netbsd.org@localhost>
wrote:
> On Fri, Dec 26, 2008 at 02:44:45AM -0500, Arnaud Lacombe wrote:
> | I'd like to import FreeBSD[0]'s fflagstostr(3) / strtofflags(3)
> | function into libc. The files are available there:
> |
> | ftp://ftp.netbsd.org/pub/NetBSD/misc/alc/libc/
> |
> | and the attached patch should be enough to register everything. I hope
> | I didn't forgot anything. I'm not sure however if prototypes in
> | `unistd.h' are well placed.
> |
> | Is there any objections about this ?
>
> How does this compare with flags_to_string(3) that
> is already present in libutil ?
>
they're the same, I didn't knew about these function.
By looking closer, the code in libutil is almost the same as found in
4.4Lite. It is however way bigger than the FreeBSD code:
% size libc/gen/strtofflags.o libutil/stat_flags.o
text data bss dec hex filename
706 168 0 874 36a libc/gen/strtofflags.o
3785 0 0 3785 ec9 libutil/stat_flags.o
maybe could the current code and FreeBSD/DragonFly version be merged.
Then creating an alias flags_to_string(3) <-> fflagstostr(3) to
support both API ?
- Arnaud
Home |
Main Index |
Thread Index |
Old Index