Closed Bug 230934 Opened 21 years ago Closed 21 years ago

The second sed script for extracting MSVC version is incorrect.

Categories

(SeaMonkey :: Build Config, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: wtc, Assigned: wtc)

Details

Attachments

(2 files, 1 obsolete file)

In mozilla/configure.in, we have: # Determine compiler version CC_VERSION=`"${CC}" -v 2>&1 | grep Version | sed -e 's|.* Version ||' | sed -e 's|[ ]*$||'` The second sed script, s|[ ]*$||', is incorrect. I will attach a shell script that demonstrates the bug.
Save this script as "foo.sh". If you run it, you get the wrong result: 12.00.8804 for 80x86 The expected result is: 12.00.8804 This shows that the second sed script fails to chop off the text ("for 80x86") after the version number.
Attached patch Proposed patch (obsolete) — Splinter Review
1. A performance optimization: pass both -e <script> options to the same invocation of sed. 2. The real bug fix: changed the second sed script to 's| .*||', which deletes everything from the first space character to the end of the line.
Assignee: nobody → wchang0222
Severity: normal → trivial
Status: NEW → ASSIGNED
Attachment #139065 - Flags: superreview?(bryner)
Attachment #139065 - Flags: review?(cls)
Added a cosmetic change that's unrelated to this bug: remove the unnecessary space in awk's variable names "$ 1", "$ 2", and "$ 3".
Attachment #139065 - Attachment is obsolete: true
Attachment #139065 - Flags: superreview?(bryner)
Attachment #139065 - Flags: review?(cls)
Attachment #139072 - Flags: superreview?(bryner)
Attachment #139072 - Flags: review?(cls)
Attachment #139072 - Flags: superreview?(bryner) → superreview+
Attachment #139072 - Flags: review?(cls) → review+
Patch checked in. Checking in configure.in; /cvsroot/mozilla/configure.in,v <-- configure.in new revision: 1.1293; previous revision: 1.1292 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7alpha
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: