From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1DEzL8-0008Im-B2 for mharc-grub-devel@gnu.org; Fri, 25 Mar 2005 19:39:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DEzL5-0008HN-0b for grub-devel@gnu.org; Fri, 25 Mar 2005 19:39:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DEzL0-0008Es-O3 for grub-devel@gnu.org; Fri, 25 Mar 2005 19:39:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DEzL0-0008EF-Bj for grub-devel@gnu.org; Fri, 25 Mar 2005 19:39:38 -0500 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DEz49-0005MM-2i for grub-devel@gnu.org; Fri, 25 Mar 2005 19:22:13 -0500 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 11F44FF1F111 for ; Sat, 26 Mar 2005 01:22:11 +0100 (CET) Received: from 127.0.0.1 ([127.0.0.1] helo=localhost) by ASSP-nospam ; 26 Mar 05 00:22:10 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sat, 26 Mar 2005 01:22:10 +0100 User-Agent: KMail/1.7.1 References: <74cfc9a471d7669b38b24a5a89f35538@free.fr> <200503232145.04398.okuji@enbug.org> <1111616923.4241ed9b706fe@imp5-q.free.fr> In-Reply-To: <1111616923.4241ed9b706fe@imp5-q.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503260122.10488.okuji@enbug.org> Subject: Re: Grub2 on Mac OS X 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, 26 Mar 2005 00:39:44 -0000 On Wednesday 23 March 2005 11:28 pm, Antoine Terrienne wrote: > Should be possible I'll take a look. But in most cases i found on the web > malloc is a good subtitute to memalign. But you must still check if a pointer returned by malloc is aligned correctly. > I agree argp is techically superior but adding a library in Grub2 mean > keeping it up-to-date with the mainstream distribution. This add a little > anoyng work just to add some functionalities that aren't used. If you > really want to add it I can do it but I'm not sure it is necessary. Necessary. It is not a big burden anyway. > I found another glibc specific function : alloca. Used in cmain in > boot/powerpc/ieee1275/cmain.c. I repace it by declaring argv as an array of > 64 elements : char *arg[64] (should be enouth ?). As the variables are > allocated in the stack just like alloca do it should work just the same. This kind of functions should be complemented by a library. Look at Gnulib: http://www.gnu.org/software/gnulib/ I think Gnulib contains argp as well. > I have another question about -DGRUB_UTIL. Can it be used to distinguish > the host compiled part and the build compiled part of grub ? > I have to handle types differenty in host and build as the build part > doesn't have stdlib.h. But this method fails on > boot/powerpc/ieee1275/cmain.c that is compiled with powerpc-elf-gcc (build) > and the -DGRUB_UTIL flag. I don't understand. Why is stdlib.h related to types? Okuji