grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grub2 on Mac OS X


From: Yoshinori K. Okuji
Subject: Re: Grub2 on Mac OS X
Date: Sat, 26 Mar 2005 01:22:10 +0100
User-agent: KMail/1.7.1

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




reply via email to

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