[Top][All Lists]
[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
From: |
Robert Millan |
Subject: |
Re: [RFC] Is it okay to just use GNU extensions or should an alternative be provided too? |
Date: |
Sat, 16 Aug 2008 14:58:19 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Aug 16, 2008 at 02:43:13PM +0200, Felix Zielcke wrote:
> Am Samstag, den 16.08.2008, 15:32 +0300 schrieb Vesa Jääskeläinen:
> >
> > Please use what ever we have on grub source code already. Then it work
> > fine also in standalone grub.
>
> Maybe this time my mail was a bit too short? :)
> especially, I ask for asprintf in util/misc.c so just GRUB_UTIL.
>
> But Marco and I thought it would be good to make a general discussion
> about GNU extentions.
> GCC is needed anyway because of the nested function but what about glibc
> or other stuff?
For code that is to be shared with real GRUB, we should only use GRUB's own
functions, so there's no concern there.
For util/ code, IMO we should be careful not to break other systems. GCC is
widely available, so it's not such a big concern, but not so for Glibc.
In general, I think we should avoid the complication of implementing two
versions of our code (one with GNU-isms and one without) by only implementing
the portable one.
As for asprintf, I think unless/untill someone reports that it is missing on
a system where GRUB is usable (i.e. where we have loaders for their kernel),
we shouldn't worry about it.
> But yeah maybe there's even in the kernel a use for asprintf,
> so maybe a good idea to make a grub_asprintf?
Probably not (because of space reasons), unless we find it terribly needed.
But it's also possible to have it in real GRUB without having it in kernel.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."