* [Powertop] [PATCH] Optionally disable NLS
@ 2014-04-16 15:21 Rick Zero_Chaos Farina
0 siblings, 0 replies; 4+ messages in thread
From: Rick Zero_Chaos Farina @ 2014-04-16 15:21 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2532 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A report on Gentoo's bug tracker
(https://bugs.gentoo.org/show_bug.cgi?id=505366) notes that while the
configure script support --disable-nls, the nls code is not
conditionally disabled which causes build failures on uclibc. This
patch from René Rhéaume fixes the affected code:
- --- powertop-2.5/src/lib.h
+++ powertop-2.5-nls/src/lib.h
@@ -33,7 +33,11 @@
#include "config.h"
#endif
+#ifdef ENABLE_NLS
#define _(STRING) gettext(STRING)
+#else
+#define _(STRING) (STRING)
+#endif
#define POWERTOP_VERSION "v"PACKAGE_VERSION
#define POWERTOP_SHORT_VERSION PACKAGE_VERSION
- --- powertop-2.5/src/main.cpp
+++ powertop-2.5-nls/src/main.cpp
@@ -369,8 +369,10 @@ int main(int argc, char **argv)
set_new_handler(out_of_memory);
setlocale (LC_ALL, "");
+#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
while (1) { /* parse commandline options */
c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options,
&option_index);
- --- powertop-2.5/src/report/report-maker.h
+++ powertop-2.5-nls/src/report/report-maker.h
@@ -75,8 +75,13 @@
#include <string>
/* Conditional gettext. We need original strings for CSV. */
+#ifdef ENABLE_NLS
#define __(STRING) \
((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING))
+#else
+#define __(STRING) (STRING)
+#endif
+
#ifndef UNUSED
#define UNUSED __attribute__((unused))
original patch: https://505366.bugs.gentoo.org/attachment.cgi?id=373272
Please accept this patch.
Thanks,
Zero
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTTp/tAAoJEKXdFCfdEflKqIMP/14P/29kiuSFkm7R3A1AdiHq
R9t7uS6b34dFQ+NX2loegFqwsyxcRvn3+19iG/u6Oa3uYIKRs1XnIuilZ6AQKQEW
79yDNm9bH/B/K+68hCXOWBnfO625GxTeaOt/vJDYJiUSJR7/VI4eu1+eeC87BS/p
+d9XxbsDyn+SKdCuPAk7/Vju9XISQdjGla7DwEZYDF331iKZCFEdPkX09RW5/Zss
iQGbHzsRZWyOpnHVeYwMKIdGUBfOB3dlnVMyecaXoBv/ybyxxw2cgLjZpav4m6D4
wLIgL6Fc7tRDmCO7aNuUVUznjx1XvxsZuh64wXc36E8XBO10xtMHlk03di0tn7RC
0eT6qwOkUpBsqFZKVRvfC25FrpgjI3b/XNnWctJvlJPvQRzTRe+OCERhnJlR+NND
T/PzGSlqGyCIpLhuXlJ0MUgwDW9BaUFjY84Fi0sruuFOleqN/UKPcJJO3IPwNvXH
98Yia9cve8rzaJJgvtwkAEnjiph4SlDlU3w/K8XBmrOTl7c2CZUGoesv5A7YH57y
rcWzRLS7H5XUqpdn+l3dqBdsWTOsP9n/76VXNaUh6BSvK56b1Ud10VvY5ayxtDs1
xCFYRbgTc34oAtk3P8xNwX08wqIyZu8UfT9HhYkUNrDxExnC5XRmgpfaHCXT101k
d5ix6cGYZiikCtzUlB1M
=H1V6
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Powertop] [PATCH] Optionally disable NLS
@ 2014-04-16 19:58 Sergey Senozhatsky
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2014-04-16 19:58 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2869 bytes --]
On (04/16/14 11:21), Rick "Zero_Chaos" Farina wrote:
> A report on Gentoo's bug tracker
> (https://bugs.gentoo.org/show_bug.cgi?id=505366) notes that while the
> configure script support --disable-nls, the nls code is not
> conditionally disabled which causes build failures on uclibc. This
> patch from René Rhéaume fixes the affected code:
>
looks good.
-ss
> - --- powertop-2.5/src/lib.h
> +++ powertop-2.5-nls/src/lib.h
> @@ -33,7 +33,11 @@
> #include "config.h"
> #endif
>
> +#ifdef ENABLE_NLS
> #define _(STRING) gettext(STRING)
> +#else
> +#define _(STRING) (STRING)
> +#endif
>
> #define POWERTOP_VERSION "v"PACKAGE_VERSION
> #define POWERTOP_SHORT_VERSION PACKAGE_VERSION
> - --- powertop-2.5/src/main.cpp
> +++ powertop-2.5-nls/src/main.cpp
> @@ -369,8 +369,10 @@ int main(int argc, char **argv)
> set_new_handler(out_of_memory);
>
> setlocale (LC_ALL, "");
> +#ifdef ENABLE_NLS
> bindtextdomain (PACKAGE, LOCALEDIR);
> textdomain (PACKAGE);
> +#endif
>
> while (1) { /* parse commandline options */
> c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options,
> &option_index);
> - --- powertop-2.5/src/report/report-maker.h
> +++ powertop-2.5-nls/src/report/report-maker.h
> @@ -75,8 +75,13 @@
> #include <string>
>
> /* Conditional gettext. We need original strings for CSV. */
> +#ifdef ENABLE_NLS
> #define __(STRING) \
> ((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING))
> +#else
> +#define __(STRING) (STRING)
> +#endif
> +
>
> #ifndef UNUSED
> #define UNUSED __attribute__((unused))
>
>
> original patch: https://505366.bugs.gentoo.org/attachment.cgi?id=373272
>
> Please accept this patch.
>
> Thanks,
> Zero
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.22 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJTTp/tAAoJEKXdFCfdEflKqIMP/14P/29kiuSFkm7R3A1AdiHq
> R9t7uS6b34dFQ+NX2loegFqwsyxcRvn3+19iG/u6Oa3uYIKRs1XnIuilZ6AQKQEW
> 79yDNm9bH/B/K+68hCXOWBnfO625GxTeaOt/vJDYJiUSJR7/VI4eu1+eeC87BS/p
> +d9XxbsDyn+SKdCuPAk7/Vju9XISQdjGla7DwEZYDF331iKZCFEdPkX09RW5/Zss
> iQGbHzsRZWyOpnHVeYwMKIdGUBfOB3dlnVMyecaXoBv/ybyxxw2cgLjZpav4m6D4
> wLIgL6Fc7tRDmCO7aNuUVUznjx1XvxsZuh64wXc36E8XBO10xtMHlk03di0tn7RC
> 0eT6qwOkUpBsqFZKVRvfC25FrpgjI3b/XNnWctJvlJPvQRzTRe+OCERhnJlR+NND
> T/PzGSlqGyCIpLhuXlJ0MUgwDW9BaUFjY84Fi0sruuFOleqN/UKPcJJO3IPwNvXH
> 98Yia9cve8rzaJJgvtwkAEnjiph4SlDlU3w/K8XBmrOTl7c2CZUGoesv5A7YH57y
> rcWzRLS7H5XUqpdn+l3dqBdsWTOsP9n/76VXNaUh6BSvK56b1Ud10VvY5ayxtDs1
> xCFYRbgTc34oAtk3P8xNwX08wqIyZu8UfT9HhYkUNrDxExnC5XRmgpfaHCXT101k
> d5ix6cGYZiikCtzUlB1M
> =H1V6
> -----END PGP SIGNATURE-----
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Powertop] [PATCH] Optionally disable NLS
@ 2014-05-08 16:34 Alexandra Yates
0 siblings, 0 replies; 4+ messages in thread
From: Alexandra Yates @ 2014-05-08 16:34 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3356 bytes --]
> On (04/16/14 11:21), Rick "Zero_Chaos" Farina wrote:
>> A report on Gentoo's bug tracker
>> (https://bugs.gentoo.org/show_bug.cgi?id=505366) notes that while the
>> configure script support --disable-nls, the nls code is not
>> conditionally disabled which causes build failures on uclibc. This
>> patch from René Rhéaume fixes the affected code:
>>
>
> looks good.
>
> -ss
>
>> - --- powertop-2.5/src/lib.h
>> +++ powertop-2.5-nls/src/lib.h
>> @@ -33,7 +33,11 @@
>> #include "config.h"
>> #endif
>>
>> +#ifdef ENABLE_NLS
>> #define _(STRING) gettext(STRING)
>> +#else
>> +#define _(STRING) (STRING)
>> +#endif
>>
>> #define POWERTOP_VERSION "v"PACKAGE_VERSION
>> #define POWERTOP_SHORT_VERSION PACKAGE_VERSION
>> - --- powertop-2.5/src/main.cpp
>> +++ powertop-2.5-nls/src/main.cpp
>> @@ -369,8 +369,10 @@ int main(int argc, char **argv)
>> set_new_handler(out_of_memory);
>>
>> setlocale (LC_ALL, "");
>> +#ifdef ENABLE_NLS
>> bindtextdomain (PACKAGE, LOCALEDIR);
>> textdomain (PACKAGE);
>> +#endif
>>
>> while (1) { /* parse commandline options */
>> c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options,
>> &option_index);
>> - --- powertop-2.5/src/report/report-maker.h
>> +++ powertop-2.5-nls/src/report/report-maker.h
>> @@ -75,8 +75,13 @@
>> #include <string>
>>
>> /* Conditional gettext. We need original strings for CSV. */
>> +#ifdef ENABLE_NLS
>> #define __(STRING) \
>> ((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING))
>> +#else
>> +#define __(STRING) (STRING)
>> +#endif
>> +
>>
>> #ifndef UNUSED
>> #define UNUSED __attribute__((unused))
>>
>>
>> original patch: https://505366.bugs.gentoo.org/attachment.cgi?id=373272
>>
>> Please accept this patch.
>>
>> Thanks,
>> Zero
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.22 (GNU/Linux)
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBAgAGBQJTTp/tAAoJEKXdFCfdEflKqIMP/14P/29kiuSFkm7R3A1AdiHq
>> R9t7uS6b34dFQ+NX2loegFqwsyxcRvn3+19iG/u6Oa3uYIKRs1XnIuilZ6AQKQEW
>> 79yDNm9bH/B/K+68hCXOWBnfO625GxTeaOt/vJDYJiUSJR7/VI4eu1+eeC87BS/p
>> +d9XxbsDyn+SKdCuPAk7/Vju9XISQdjGla7DwEZYDF331iKZCFEdPkX09RW5/Zss
>> iQGbHzsRZWyOpnHVeYwMKIdGUBfOB3dlnVMyecaXoBv/ybyxxw2cgLjZpav4m6D4
>> wLIgL6Fc7tRDmCO7aNuUVUznjx1XvxsZuh64wXc36E8XBO10xtMHlk03di0tn7RC
>> 0eT6qwOkUpBsqFZKVRvfC25FrpgjI3b/XNnWctJvlJPvQRzTRe+OCERhnJlR+NND
>> T/PzGSlqGyCIpLhuXlJ0MUgwDW9BaUFjY84Fi0sruuFOleqN/UKPcJJO3IPwNvXH
>> 98Yia9cve8rzaJJgvtwkAEnjiph4SlDlU3w/K8XBmrOTl7c2CZUGoesv5A7YH57y
>> rcWzRLS7H5XUqpdn+l3dqBdsWTOsP9n/76VXNaUh6BSvK56b1Ud10VvY5ayxtDs1
>> xCFYRbgTc34oAtk3P8xNwX08wqIyZu8UfT9HhYkUNrDxExnC5XRmgpfaHCXT101k
>> d5ix6cGYZiikCtzUlB1M
>> =H1V6
>> -----END PGP SIGNATURE-----
>> _______________________________________________
>> PowerTop mailing list
>> PowerTop(a)lists.01.org
>> https://lists.01.org/mailman/listinfo/powertop
>>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
I'm having issues adding this patch to the repo. I get error:
Patch is empty. Was it split wrong?
Sergey, did you have any problems applying this patch to your branch?
Rick, please check your patch and send it?
Thank you,
Alexandra.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Powertop] [PATCH] Optionally disable NLS
@ 2014-05-09 7:29 Sergey Senozhatsky
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2014-05-09 7:29 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3867 bytes --]
On (05/08/14 09:34), Alexandra Yates wrote:
> > On (04/16/14 11:21), Rick "Zero_Chaos" Farina wrote:
> >> A report on Gentoo's bug tracker
> >> (https://bugs.gentoo.org/show_bug.cgi?id=505366) notes that while the
> >> configure script support --disable-nls, the nls code is not
> >> conditionally disabled which causes build failures on uclibc. This
> >> patch from René Rhéaume fixes the affected code:
> >>
> >
> > looks good.
> >
> > -ss
> >
> >> - --- powertop-2.5/src/lib.h
> >> +++ powertop-2.5-nls/src/lib.h
> >> @@ -33,7 +33,11 @@
> >> #include "config.h"
> >> #endif
> >>
> >> +#ifdef ENABLE_NLS
> >> #define _(STRING) gettext(STRING)
> >> +#else
> >> +#define _(STRING) (STRING)
> >> +#endif
> >>
> >> #define POWERTOP_VERSION "v"PACKAGE_VERSION
> >> #define POWERTOP_SHORT_VERSION PACKAGE_VERSION
> >> - --- powertop-2.5/src/main.cpp
> >> +++ powertop-2.5-nls/src/main.cpp
> >> @@ -369,8 +369,10 @@ int main(int argc, char **argv)
> >> set_new_handler(out_of_memory);
> >>
> >> setlocale (LC_ALL, "");
> >> +#ifdef ENABLE_NLS
> >> bindtextdomain (PACKAGE, LOCALEDIR);
> >> textdomain (PACKAGE);
> >> +#endif
> >>
> >> while (1) { /* parse commandline options */
> >> c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options,
> >> &option_index);
> >> - --- powertop-2.5/src/report/report-maker.h
> >> +++ powertop-2.5-nls/src/report/report-maker.h
> >> @@ -75,8 +75,13 @@
> >> #include <string>
> >>
> >> /* Conditional gettext. We need original strings for CSV. */
> >> +#ifdef ENABLE_NLS
> >> #define __(STRING) \
> >> ((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING))
> >> +#else
> >> +#define __(STRING) (STRING)
> >> +#endif
> >> +
> >>
> >> #ifndef UNUSED
> >> #define UNUSED __attribute__((unused))
> >>
> >>
> >> original patch: https://505366.bugs.gentoo.org/attachment.cgi?id=373272
> >>
> >> Please accept this patch.
> >>
> >> Thanks,
> >> Zero
> I'm having issues adding this patch to the repo. I get error:
>
> Patch is empty. Was it split wrong?
>
> Sergey, did you have any problems applying this patch to your branch?
>
> Rick, please check your patch and send it?
>
I guess this is because of
--- powertop-2.5
+++ powertop-2.5-nls
^^^^^^^^^^^^
the following one seems to work.
Rick, can you resend using `git send-email'?
---
src/lib.h | 4 ++++
src/main.cpp | 2 ++
src/report/report-maker.h | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/src/lib.h b/src/lib.h
index adcc4a2..78391a4 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -33,7 +33,11 @@
#include "config.h"
#endif
+#ifdef ENABLE_NLS
#define _(STRING) gettext(STRING)
+#else
+#define _(STRING) (STRING)
+#endif
#define POWERTOP_VERSION "v"PACKAGE_VERSION
#define POWERTOP_SHORT_VERSION PACKAGE_VERSION
diff --git a/src/main.cpp b/src/main.cpp
index 4e34ee6..8bbc1ff 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -369,8 +369,10 @@ int main(int argc, char **argv)
set_new_handler(out_of_memory);
setlocale (LC_ALL, "");
+#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
while (1) { /* parse commandline options */
c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options, &option_index);
diff --git a/src/report/report-maker.h b/src/report/report-maker.h
index 75e0d06..a72aa47 100644
--- a/src/report/report-maker.h
+++ b/src/report/report-maker.h
@@ -75,8 +75,13 @@
#include <string>
/* Conditional gettext. We need original strings for CSV. */
+#ifdef ENABLE_NLS
#define __(STRING) \
((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING))
+#else
+#define __(STRING) (STRING)
+#endif
+
#ifndef UNUSED
#define UNUSED __attribute__((unused))
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-09 7:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-16 15:21 [Powertop] [PATCH] Optionally disable NLS Rick Zero_Chaos Farina
-- strict thread matches above, loose matches on Subject: below --
2014-04-16 19:58 Sergey Senozhatsky
2014-05-08 16:34 Alexandra Yates
2014-05-09 7:29 Sergey Senozhatsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.