cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: Dominik Brodowski <linux@brodo.de>
Cc: cpufreq@vger.kernel.org,
	Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com>,
	Matt Turner <mattst88@gmail.com>
Subject: [PATCH] cpufrequtils: make NLS optional
Date: Sat, 13 Aug 2011 23:02:20 -0400	[thread overview]
Message-ID: <1313290940-23943-1-git-send-email-mattst88@gmail.com> (raw)

From: Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com>

https://bugs.gentoo.org/205576

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
 Makefile     |    1 +
 utils/info.c |   10 +++++++++-
 utils/set.c  |   10 +++++++++-
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index ed6bdde..84f265d 100644
--- a/Makefile
+++ b/Makefile
@@ -121,6 +121,7 @@ CFLAGS +=	-pipe
 ifeq ($(strip $(NLS)),true)
 	INSTALL_NLS += install-gmo
 	COMPILE_NLS += update-gmo
+	CPPFLAGS += -DNLS
 endif
 
 ifeq ($(strip $(CPUFRQ_BENCH)),true)
diff --git a/utils/info.c b/utils/info.c
index 38d906a..155e604 100644
--- a/utils/info.c
+++ b/utils/info.c
@@ -10,7 +10,6 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <libintl.h>
 #include <locale.h>
 
 #include <getopt.h>
@@ -18,9 +17,18 @@
 #include "cpufreq.h"
 
 
+#ifdef NLS
+#include <libintl.h>
 #define _(String) gettext (String)
 #define gettext_noop(String) String
 #define N_(String) gettext_noop (String)
+#else
+#define gettext_noop(String) String
+#define _(String) gettext_noop (String)
+#define gettext(String) gettext_noop (String)
+#define N_(String) gettext_noop (String)
+#define textdomain(String)
+#endif
 
 #define LINE_LEN 10
 
diff --git a/utils/set.c b/utils/set.c
index 2ece47e..bfca465 100644
--- a/utils/set.c
+++ b/utils/set.c
@@ -12,16 +12,24 @@
 #include <limits.h>
 #include <string.h>
 #include <ctype.h>
-#include <libintl.h>
 #include <locale.h>
 
 #include <getopt.h>
 
 #include "cpufreq.h"
 
+#ifdef NLS
+#include <libintl.h>
 #define _(String) gettext(String)
 #define gettext_noop(String) String
 #define N_(String) gettext_noop(String)
+#else
+#define gettext_noop(String) String
+#define _(String) gettext_noop (String)
+#define gettext(String) gettext_noop (String)
+#define N_(String) gettext_noop (String)
+#define textdomain(String)
+#endif
 
 #define NORM_FREQ_LEN 32
 
-- 
1.7.3.4


             reply	other threads:[~2011-08-14  3:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14  3:02 Matt Turner [this message]
2011-08-15 18:02 ` [PATCH] cpufrequtils: make NLS optional Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313290940-23943-1-git-send-email-mattst88@gmail.com \
    --to=mattst88@gmail.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux@brodo.de \
    --cc=sergey.dryabzhinsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox