[Toybox] _GNU_SOURCE definition problem

Rob Landley rob at landley.net
Fri Mar 9 07:24:49 PST 2012


> I'll submit patches to musl. In their README they recommend defining
> _GNU_SOURCE
> to get "the kitchen sink" since they probably know that their handling
> of different
> defines is not optimal. Oh, well time to patch musl (for the record
> make CC="musl-gcc -D_GNU_SOURCE" compiles (minus the support index and
> strndupa)).

If musl modifies its wrapper to say -D_GNU_SOURCE, fine.  I only ever
put it in the toybox code as a temporary hack (in portability.h) for a
file descriptor based getline, and it was not the right fix: I should
just bite the bullet and go to FILE * with getdelim() which is in posix.

I agree with removing reliance on nonstandard functions. (Posix by
itself isn't a rich enough standard to provide chroot(), vfork(), or
mount(), but if it was in 6th edition unix in 1976 I think we can call
it fairly standard.)

This code has nothing to do with the FSF, and after the GPLv3 silliness
(and getting attacked by the zealots for daring to undermine the lawsuit
factory) I feel fairly strongly about that.  I won't define _GNU_SOURCE
because toybox _isn't_.

Rob

 1331306689.0


More information about the Toybox mailing list