<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24884</bug_id>
          
          <creation_ts>2009-03-27 06:56:33 -0700</creation_ts>
          <short_desc>Include strings.h for strcasecmp()</short_desc>
          <delta_ts>2009-07-07 20:57:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>27065</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Laszlo Gombos">laszlo.gombos</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>carol</cc>
    
    <cc>hausmann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115537</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-03-27 06:56:33 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115538</commentid>
    <comment_count>1</comment_count>
      <attachid>29009</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-03-27 07:04:39 -0700</bug_when>
    <thetext>Created attachment 29009
Include strings.h in StringExtras.h if available</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115542</commentid>
    <comment_count>2</comment_count>
      <attachid>29009</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-03-27 07:19:22 -0700</bug_when>
    <thetext>Comment on attachment 29009
Include strings.h in StringExtras.h if available

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115555</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2009-03-27 09:23:15 -0700</bug_when>
    <thetext>Landed in r42037</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29009</attachid>
            <date>2009-03-27 07:04:39 -0700</date>
            <delta_ts>2009-03-27 07:19:22 -0700</delta_ts>
            <desc>Include strings.h in StringExtras.h if available</desc>
            <filename>patch_24884.txt</filename>
            <type>text/plain</type>
            <size>1467</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDQyMDMyKQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDktMDMtMj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SW5kZXg6IEphdmFTY3JpcHRDb3JlL3d0Zi9TdHJpbmdFeHRyYXMuaAo9PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09Ci0tLSBKYXZhU2NyaXB0Q29yZS93dGYvU3RyaW5nRXh0cmFzLmgJKHJldmlzaW9uIDQyMDMy
KQorKysgSmF2YVNjcmlwdENvcmUvd3RmL1N0cmluZ0V4dHJhcy5oCSh3b3JraW5nIGNvcHkpCkBA
IC0yOSw2ICsyOSwxMCBAQAogI2luY2x1ZGUgPHN0ZGFyZy5oPgogI2luY2x1ZGUgPHN0ZGlvLmg+
CiAKKyNpZiBIQVZFKFNUUklOR1NfSCkgCisjaW5jbHVkZSA8c3RyaW5ncy5oPiAKKyNlbmRpZiAK
KwogI2lmIENPTVBJTEVSKE1TVkMpCiAKIGlubGluZSBpbnQgc25wcmludGYoY2hhciogYnVmZmVy
LCBzaXplX3QgY291bnQsIGNvbnN0IGNoYXIqIGZvcm1hdCwgLi4uKSAK
</data>
<flag name="review"
          id="14362"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>