grub-devel
[Top][All Lists]
Advanced

[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: Felix Zielcke
Subject: Re: [RFC] Is it okay to just use GNU extensions or should an alternative be provided too?
Date: Sat, 16 Aug 2008 14:43:13 +0200

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?

> It should be possible to use existing functions. I see asprintf just a
> wrapper to malloc/sprintf for which there are already versions present
> on grub.

address@hidden:~/grub/grub2.svn$ grep -r asprintf *
util/grub-probe.c:        asprintf (&grub_path, "(%s)%s", drive_name, path);

I just discovered that asprintf is indeed already used in the source :)

But yeah maybe there's even in the kernel a use for asprintf,
so maybe a good idea to make a grub_asprintf?
This could be then either always used even if the util/*.c use the
library functions normally or it could be done as with my
grub_print_error change :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]