Skip to content

Commit 47c3363

Browse files
author
Dominik Brodowski
committed
cpupower: make NLS truly optional
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>
1 parent 63b37de commit 47c3363

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎tools/power/cpupower/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ CFLAGS += -pipe
137137
ifeq ($(strip $(NLS)),true)
138138
INSTALL_NLS += install-gmo
139139
COMPILE_NLS += create-gmo
140+
CFLAGS += -DNLS
140141
endif
141142

142143
ifeq ($(strip $(CPUFREQ_BENCH)),true)

‎tools/power/cpupower/utils/helpers/helpers.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,20 @@
1616
#include "helpers/bitmask.h"
1717

1818
/* Internationalization ****************************/
19+
#ifdef NLS
20+
1921
#define _(String) gettext(String)
2022
#ifndef gettext_noop
2123
#define gettext_noop(String) String
2224
#endif
2325
#define N_(String) gettext_noop(String)
26+
27+
#else /* !NLS */
28+
29+
#define _(String) String
30+
#define N_(String) String
31+
32+
#endif
2433
/* Internationalization ****************************/
2534

2635
extern int run_as_root;

0 commit comments

Comments
 (0)