Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44403 - Coreutils 5.0.91/5.2.0 doesn't compile if system doesn't have MBRTOWC defined (PATCH available)
Summary: Coreutils 5.0.91/5.2.0 doesn't compile if system doesn't have MBRTOWC defined...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Sparc All
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-11 17:02 UTC by devsk
Modified: 2004-05-16 17:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description devsk 2004-03-11 17:02:30 UTC
Hi,

coreutils compile fails because
MBRTOWC is not defined. Its just about parenthesis in
wrong place and because on most GNU systems MBRTOWC is
defined, the code compiles.

############### PATCH BEGIN ################

--- src/cut.c.ORG       2004-02-08 16:25:32.888099000
-0800
+++ src/cut.c   2004-02-08 16:19:54.673963000 -0800
@@ -1207,8 +1207,8 @@
       mbdelim[0] = '\t';
       mbdelim[1] = '\0';
       delimlen = 1;
-    }
 #endif
+    }

   if (output_delimiter_string == NULL)
     {
--- src/join.c.ORG      2004-02-08 16:25:54.958277000
-0800
+++ src/join.c  2004-02-08 16:22:04.945347000 -0800
@@ -1069,8 +1069,8 @@
                tablen = 1;
            }
          else
-           {
 #endif
+           {
              tablen = 1;
            }
          break;

############### PATCH ENDS ################

Reproducible: Always
Steps to Reproduce:
1.Just compile coreutils on a system w/o MBRTOWC defined.
2. Compile fails for cut.c and join.c
3.

Actual Results:  
Compile fails with mismatching '{' , '}'.

Expected Results:  
It should compile if MBRTOWC is not defined. That's what the macro definition is
there for.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-05-16 17:00:56 UTC
added this patch to coreutils-5.2.1 that I just added into portage