From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KUL7j-0006EC-7t for mharc-grub-devel@gnu.org; Sat, 16 Aug 2008 08:43:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KUL7g-0006BX-RP for grub-devel@gnu.org; Sat, 16 Aug 2008 08:43:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KUL7e-0006BJ-Kx for grub-devel@gnu.org; Sat, 16 Aug 2008 08:43:11 -0400 Received: from [199.232.76.173] (port=57996 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUL7e-0006BG-EZ for grub-devel@gnu.org; Sat, 16 Aug 2008 08:43:10 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]:53065) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KUL7d-0008OK-QW for grub-devel@gnu.org; Sat, 16 Aug 2008 08:43:10 -0400 Received: from [85.180.35.62] (e180035062.adsl.alicedsl.de [85.180.35.62]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1KUL7c3N5s-0000Wu; Sat, 16 Aug 2008 14:43:09 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <48A6C8DC.3050303@nic.fi> References: <1218888325.4051.17.camel@fz.local> <48A6C8DC.3050303@nic.fi> Content-Type: text/plain; charset=UTF-8 Date: Sat, 16 Aug 2008 14:43:13 +0200 Message-Id: <1218890593.5316.6.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V01U2FsdGVkX1+BUoaM9o4o4OeqSFgXJ9TBHsLy2tcBPTGPzDi Tr3u2rdawv6Ycnsw+bWXxXjyD+VD1bHIJnqb2q42D4yM2VVtRx 1OX2IHk63zx1Wa4ZIwT6WSufNkED4se X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: Re: [RFC] Is it okay to just use GNU extensions or should an alternative be provided too? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 12:43:13 -0000 Am Samstag, den 16.08.2008, 15:32 +0300 schrieb Vesa J=C3=A4=C3=A4skel=C3= =A4inen: >=20 > 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. fz@fz:~/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 :)