[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: 0.4.0 Testing



On 31.01.2004 22:29, Chang wrote:
> then make clean, ./configure, make, then this message poped up: 
> -----------------------------------------------------------------------
> mklocale.cpp: In function `int main(int, char**)':
> mklocale.cpp:230: error: use of `locale' is ambiguous
> mklocale.cpp:41: error:   first declared as `const char*locale' here
> /usr/include/c++/3.3.2/bits/locale_classes.h:57: error:   also declared
> as `
>    class std::locale' here

Rah! Ok, we're getting closer at least. Those problems seem to be
specific to gcc 3.x.

Please try this patch.

Jens
--- mklocale.cpp	Thu Jan 15 22:24:00 2004
+++ mklocale.new	Sun Feb  1 20:06:26 2004
@@ -38,7 +38,7 @@
 static char parse_args(int argc, char *argv[]);
 
 static const char *templatefile;
-static const char *locale;
+static const char *localefile;
 
 /* an exemplary language template file might look like this:
  *
@@ -227,14 +227,14 @@
 
     if (rc == 0) {
 
-      rc = lang.WriteCatalog(locale);
+      rc = lang.WriteCatalog(localefile);
       if (rc == -1)
         cerr << "Error writing catalog file" << endl;
       else rc = 0;
     }
 
   } else {
-    rc = lang.ReadCatalog(locale);
+    rc = lang.ReadCatalog(localefile);
 
     if (rc != -1) {
 
@@ -257,12 +257,12 @@
     if (op == "-l") {
       rc = 'l';
       templatefile = argv[2];
-      locale = argv[3];
+      localefile = argv[3];
       usage = false;
     } else if (op == "-t") {
       rc = 't';
       templatefile = argv[3];
-      locale = argv[2];
+      localefile = argv[2];
       usage = false;
     }
   }