This is because on Solaris, struct option cannot be conditionally excluded from the header. So, on such systems, the host's getopt.h should not be included.
--S Quoting Seth Goldberg, who wrote the following on Thu, 2 Dec 2010:
/usr/gcc/4.3/bin/gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I.. -Wall -W -I../../include -I../include -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=I386_EMU -DGRUB_FILE=\"gnulib/error.c\" -I. -I../../grub-core -I.. -I../.. -I../../include -I../include -I../grub-core/gnulib -I../../grub-core/gnulib -I/usr/sfw/include -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-common -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1 -ffreestanding -fno-common -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -MT gnulib/kernel_exec-error.o -MD -MP -MF gnulib/.deps-core/kernel_exec-error.Tpo -c -o gnulib/kernel_exec-error.o `test -f 'gnulib/error.c' || echo '../../grub-core/'`gnulib/error.cIn file included from ../grub-core/gnulib/unistd.h:98, from ../../grub-core/gnulib/error.c:89: ../grub-core/gnulib/getopt.h:195: error: redefinition of ‘struct option’Because the struct option in the GNULIB getopt.h is clashing with that defined in /usr/include/getopt.h.--S
_______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
