WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24884
Include strings.h for strcasecmp()
https://bugs.webkit.org/show_bug.cgi?id=24884
Summary
Include strings.h for strcasecmp()
Laszlo Gombos
Reported
2009-03-27 06:56:33 PDT
IEEE Std 1003.1-2001 placed strcasecmp() in strings.h. Most (but not all) platforms also declare strcasecmp in string.h, so the lack of the strings.h include usually does not get noticed. The compile time problem I run into is
http://trac.webkit.org/browser/trunk/WebCore/loader/TextResourceDecoder.cpp
calls strcasecmp() but strings.h is not included. A similar case has been reported an solved in
http://trac.webkit.org/changeset/38176/trunk/JavaScriptCore/runtime/DateMath.cpp
. There are at least two options to consider - (a) continue including strings.h in each cpp where strcasecmp() is called or (b) include strings.h in StringExtras.h where strcasecmp() is implemented for Win. I feel that (b) might be a more future-proof (since Win ports are well maintained). Patch follows.
Attachments
Include strings.h in StringExtras.h if available
(1.43 KB, patch)
2009-03-27 07:04 PDT
,
Laszlo Gombos
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Gombos
Comment 1
2009-03-27 07:04:39 PDT
Created
attachment 29009
[details]
Include strings.h in StringExtras.h if available
Darin Adler
Comment 2
2009-03-27 07:19:22 PDT
Comment on
attachment 29009
[details]
Include strings.h in StringExtras.h if available r=me
Simon Hausmann
Comment 3
2009-03-27 09:23:15 PDT
Landed in
r42037
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug