summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@dodonov.net>2011-08-26 12:26:44 -0300
committerEugeni Dodonov <eugeni@dodonov.net>2011-08-26 12:26:44 -0300
commit16e29df885bc186b50818d8de8e6083a89586152 (patch)
treeadeeeebd83b491304f12f81e94936188eab69add
parent1bec2dbc30d220d07dbffde53a44539ab3289fc2 (diff)
fixed for libintl on android
-rw-r--r--powertop.c1
-rw-r--r--powertop.h11
2 files changed, 8 insertions, 4 deletions
diff --git a/powertop.c b/powertop.c
index 74eb328..ce9498f 100644
--- a/powertop.c
+++ b/powertop.c
@@ -30,7 +30,6 @@
#include <stdint.h>
#include <sys/types.h>
#include <dirent.h>
-#include <libintl.h>
#include <ctype.h>
#include <assert.h>
#include <locale.h>
diff --git a/powertop.h b/powertop.h
index d8f8182..c931edd 100644
--- a/powertop.h
+++ b/powertop.h
@@ -26,8 +26,6 @@
#ifndef __INCLUDE_GUARD_POWERTOP_H_
#define __INCLUDE_GUARD_POWERTOP_H_
-#include <libintl.h>
-
struct line {
char *string;
int count;
@@ -92,7 +90,14 @@ extern suggestion_func *suggestion_activate;
_x < _y ? _x : _y; })
-#define _(STRING) gettext(STRING)
+#define gettext_noop(S) (S)
+#ifndef LOCALEDIR
+# define _(S) (S)
+#else
+# include <libintl.h>
+# include <locale.h>
+# define _(S) gettext(S)
+#endif
#define PT_COLOR_DEFAULT 1