[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Is it okay to just use GNU extensions or should an alternative
Re: [RFC] Is it okay to just use GNU extensions or should an alternative be provided too?
Sat, 16 Aug 2008 14:48:08 +0200
Am Samstag, den 16.08.2008, 14:39 +0200 schrieb Robert Millan:
> On Sat, Aug 16, 2008 at 02:05:25PM +0200, Felix Zielcke wrote:
> > I just talked with Marco on IRC.
> > I have just used asprintf in one of my patches, but now I discovered:
> > http://grub.enbug.org/BuildingOnNonGnu
> > So I became a bit unsure now if it's okay to just use asprintf.
> IIRC, asprintf is widely available. At least it's present on *BSD.
> > I doubt it would be good to use many `#ifdef _GNU_SOURCE' in the code.
> _GNU_SOURCE is used to tell Glibc to enable GNU extensions. When you want
> to check from Glibc whether you're on Glibc, __GLIBC__ indicates that.
> But using autoconf checks is better anyway.
configure.ac has already AC_GNU_SOURCE
/* Enable GNU extensions on systems that have them. */
For me it just seems that it's not a requirement so ./configure suceeds.
Or am I wrong and I can just assume that asprintf is avaible?