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 _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
