grub-devel
[Top][All Lists]
Advanced

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

should i18n.h include misc.h if internal ?


From: Carles Pina i Estany
Subject: should i18n.h include misc.h if internal ?
Date: Mon, 23 Nov 2009 23:50:20 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hello,

Imagine that I'm going to gettexttize commands/true.c . I need to add
#include <grub/i18n.h> , but this include defines:

# define _(str) grub_gettext(str)

so I need #include <grub/misc.h>

Any problem with this patch:

=== modified file 'include/grub/i18n.h'
--- include/grub/i18n.h 2009-11-23 20:34:42 +0000
+++ include/grub/i18n.h 2009-11-23 23:46:19 +0000
@@ -24,6 +24,7 @@
 # include <libintl.h>
 # define _(str) gettext(str)
 #else
+# include <grub/misc.h>
 # define _(str) grub_gettext(str)
 #endif

Other option would be to move these:
----
const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
----

from misc.h to i18n.h (internal). I haven't tested but if it works it
includes less things of course and could be better if it's not needed.

Thanks,

-- 
Carles Pina i Estany
        http://pinux.info




reply via email to

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