Bug 32857 - RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
Summary: RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 01:02 PST by Kwang Yul Seo
Modified: 2009-12-24 06:30 PST (History)
3 users (show)

See Also:


Attachments
Add strcasecmp and strncasecmp for RVCT < 4.0 (3.59 KB, patch)
2009-12-22 01:12 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Fix the style error. (3.58 KB, patch)
2009-12-22 01:58 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2009-12-22 01:02:46 PST
RVCT 4.0 provides strcasecmp and strncasemp as C library extensions, but earlier versions of RVCT do not provide these functions.

We can check this from RVCT manual pages:

RealView® Compilation Tools Libraries and Floating Point Support Guide
Version 4.0

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0349b/index.html

RealView ® CompilationTools Libraries and Floating Point Support Guide
Version 3.1

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0349a/index.html


Theses functions needs to be implemented in StringExtras.h and StringExtras.cpp for RVCT < 4.0
Comment 1 Kwang Yul Seo 2009-12-22 01:12:46 PST
Created attachment 45372 [details]
Add strcasecmp and strncasecmp for RVCT < 4.0
Comment 2 WebKit Review Bot 2009-12-22 01:17:27 PST
Attachment 45372 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/wtf/StringExtras.cpp:56:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1
Comment 3 Kwang Yul Seo 2009-12-22 01:58:18 PST
Created attachment 45376 [details]
Fix the style error.
Comment 4 WebKit Review Bot 2009-12-22 01:58:42 PST
style-queue ran check-webkit-style on attachment 45376 [details] without any errors.
Comment 5 Darin Adler 2009-12-22 10:50:09 PST
Comment on attachment 45376 [details]
Fix the style error.

This patch is OK, but I'd prefer to see us eliminate strcasecmp and strncasecmp from the code instead.

These compare non-ASCII characters without any processing, which is better for our purposes, whereas strcasecmp and strncasecmp may handle non-ASCII characters as letters based on the current POSIX locale setting.

It'd be good to provide an ASCII version of strcasecmp and strncasecmp and get rid of the current uses of them.
Comment 6 WebKit Commit Bot 2009-12-22 10:58:41 PST
Comment on attachment 45376 [details]
Fix the style error.

Clearing flags on attachment: 45376

Committed r52493: <http://trac.webkit.org/changeset/52493>
Comment 7 WebKit Commit Bot 2009-12-22 10:58:45 PST
All reviewed patches have been landed.  Closing bug.