diff --git a/ChangeLog b/ChangeLog index 683b708cc..46c71e6f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2009-11-24 Carles Pina i Estany + + * conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h. + * conf/i386-efi.rmk: Likewise. + * conf/i386-ieee1275.rmk: Likewise. + * conf/i386-pc.rmk: Likewise. + * conf/powerpc-ieee1275.rmk: Likewise. + * conf/sparc64-ieee1275.rmk: Likewise. + * conf/x86_64-efi.rmk: Likewise. + * gettext/gettex.c: Include . + * include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from + here ... + * include/grub/i18n.h: ... to here + * include/grub/i18n.h: ... to here. + * kern/misc.c: Include + (grub_gettext_dummy): Move above user. + 2009-11-24 Felix Zielcke * util/Makefile.in (install-local): Convert a `for' into a normal diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index 33a477573..2a9073ef5 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -34,7 +34,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/boot.h machine/console.h machine/init.h \ - machine/memory.h machine/loader.h list.h handler.h command.h + machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic @@ -77,7 +77,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/boot.h machine/console.h machine/init.h \ - machine/memory.h machine/loader.h list.h handler.h command.h + machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index ac88ebd42..80c2978da 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -56,7 +56,7 @@ kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \ kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ - efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h + efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h kernel_mod_CFLAGS = $(COMMON_CFLAGS) kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index 2df3421f7..564893666 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -33,7 +33,7 @@ kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \ - list.h handler.h command.h + list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index b100d94e2..2b0894eae 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -64,7 +64,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \ - machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h + machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS) diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index 0a87a6a5d..6427f6bbd 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -17,7 +17,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \ symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \ msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \ - command.h + command.h i18n.h symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index 3abddf511..900b70e3c 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -29,7 +29,7 @@ DEFSYMFILES += kernel_syms.lst kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ - list.h handler.h command.h \ + list.h handler.h command.h i18n.h \ sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \ sparc64/ieee1275/ieee1275.h kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \ diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 3d519e955..3b7ac34fa 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -56,7 +56,7 @@ kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \ - handler.h command.h + handler.h command.h i18n.h kernel_mod_CFLAGS = $(COMMON_CFLAGS) kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) diff --git a/gettext/gettext.c b/gettext/gettext.c index 5c1279dc3..856265e6f 100644 --- a/gettext/gettext.c +++ b/gettext/gettext.c @@ -26,6 +26,7 @@ #include #include #include +#include /* .mo file information from: diff --git a/include/grub/i18n.h b/include/grub/i18n.h index e4e06e9cd..f6f468744 100644 --- a/include/grub/i18n.h +++ b/include/grub/i18n.h @@ -25,6 +25,10 @@ # define _(str) gettext(str) #else # define _(str) grub_gettext(str) + +const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s); +extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s); + #endif #define N_(str) str diff --git a/include/grub/misc.h b/include/grub/misc.h index 8ec8ad822..31d4ddf85 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -191,9 +191,6 @@ grub_ssize_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest, grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n, grub_uint32_t d, grub_uint32_t *r); -const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s); -extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s); - #ifdef NEED_ENABLE_EXECUTE_STACK void EXPORT_FUNC(__enable_execute_stack) (void *addr); #endif diff --git a/kern/misc.c b/kern/misc.c index 827f864c4..9f9a3ae65 100644 --- a/kern/misc.c +++ b/kern/misc.c @@ -23,6 +23,7 @@ #include #include #include +#include static int grub_iswordseparator (int c) @@ -30,6 +31,13 @@ grub_iswordseparator (int c) return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&'); } +/* grub_gettext_dummy is not translating anything. */ +const char * +grub_gettext_dummy (const char *s) +{ + return s; +} + const char* (*grub_gettext) (const char *s) = grub_gettext_dummy; void * @@ -986,13 +994,6 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize, return p - dest; } -/* grub_gettext_dummy is not translating anything. */ -const char * -grub_gettext_dummy (const char *s) -{ - return s; -} - /* Abort GRUB. This function does not return. */ void grub_abort (void)