bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Missing locale.h


From: David Michael
Subject: [BUG] Missing locale.h
Date: Thu, 29 Aug 2013 11:14:09 -0400

Hi,

I've tried compiling the latest versions that appeared on
alpha.gnu.org with Fedora and a Hurd system using a basic "./configure
--prefix=/usr".  The following "make all" fails with:

g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I.  -I../lib
-I../lib  -pthread -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o
main.o main.cc
main.cc: In function ‘int main(int, char**)’:
main.cc:222:14: error: ‘LC_ALL’ was not declared in this scope
   setlocale (LC_ALL, "");
              ^
main.cc:222:24: error: ‘setlocale’ was not declared in this scope
   setlocale (LC_ALL, "");
                        ^
make[3]: *** [main.o] Error 1

It builds when locale.h is included, as with the appended diff.  (I
can also undef __cplusplus before "gettext.h" is included so locale.h
gets picked up from libintl.h, but that seems ugly.)  Can something
like this be applied, or have I likely misconfigured something?

Thanks.

David


--- src/main.cc    2013-08-22 19:32:43.000000000 -0400
+++ src/main.cc    2013-08-22 19:32:43.000000000 -0400
@@ -33,6 +33,7 @@ extern "C" {
 #include <getopt.h>
 #include <errno.h>
 #include <unistd.h>
+#include <locale.h>

 extern "C" {
 #include "frontend/common.h"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]