Project

General

Profile

Bug #12

libc breaks lex

Added by Garrett D'Amore over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Category:
-
Start date:
2010-08-02
Due date:
% Done:

100%

Estimated time:
3.00 h
Difficulty:
Tags:
Gerrit CR:

Description

Apparently something in the new locale code in libc is breaking lex. This prevents a full nightly from completing. Indeed, its most easily seen when trying to build the cscope_fast program under usr/src/tools.

Its amazing that other programs don't seem to be broken. This needs to be fixed urgently.

#1

Updated by Garrett D'Amore over 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90
  • Estimated time set to 2.00 h

So the problem here appears to be _scrwidth(). For non-printable characters, the current implementation returns -1, which confuses fprintf() when %ws is used. In such cases 0 should be returned.

While here, I noticed that a bunch of cstyle test macros used !! to return 1 for true instead of a real bit value, and testing shows that the legacy code returns the actual bit value. We need to fix that here.

#2

Updated by Garrett D'Amore over 10 years ago

  • % Done changed from 90 to 100
  • Estimated time changed from 2.00 h to 3.00 h

Changes have been integrated.

#3

Updated by Garrett D'Amore over 10 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF