Skip to content

Commit

Permalink
cpupower: make NLS truly optional
Browse files Browse the repository at this point in the history
Loosely based on a patch for cpufrequtils, submittted by
Sergey Dryabzhinsky <sergey.dryabzhinsky@gmail.com> and

signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Aug 19, 2011
1 parent 63b37de commit 47c3363
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/power/cpupower/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ CFLAGS += -pipe
ifeq ($(strip $(NLS)),true)
INSTALL_NLS += install-gmo
COMPILE_NLS += create-gmo
CFLAGS += -DNLS
endif

ifeq ($(strip $(CPUFREQ_BENCH)),true)
Expand Down
9 changes: 9 additions & 0 deletions tools/power/cpupower/utils/helpers/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,20 @@
#include "helpers/bitmask.h"

/* Internationalization ****************************/
#ifdef NLS

#define _(String) gettext(String)
#ifndef gettext_noop
#define gettext_noop(String) String
#endif
#define N_(String) gettext_noop(String)

#else /* !NLS */

#define _(String) String
#define N_(String) String

#endif
/* Internationalization ****************************/

extern int run_as_root;
Expand Down

0 comments on commit 47c3363

Please sign in to comment.