<?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>72152</bug_id>
          
          <creation_ts>2011-11-11 10:48:34 -0800</creation_ts>
          <short_desc>Rename JavaScriptCore/wtf/unicode/UTF8.{cpp, h} to JavaScriptCore/wtf/unicode/WTFUTF8.{cpp, h}</short_desc>
          <delta_ts>2011-11-11 11:13:40 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>70913</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>leandro</cc>
    
    <cc>mrowe</cc>
    
    <cc>paroga</cc>
    
    <cc>rakuco</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>500915</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2011-11-11 10:48:34 -0800</bug_when>
    <thetext>When building using CMake with ICU enabled on a default installation of Mac OS 10.6.8, with a case-insensitive HFS+ formatted hard drive, JavaScriptCore/wtf/unicode/UTF8.h gets included from the ICU header utf.h. But the ICU header utf8.h should be included instead of JavaScriptCore/wtf/unicode/UTF8.h. One idea to avoid this naming collision is to rename JavaScriptCore/wtf/unicode/UTF8.h to, say, JavaScriptCore/wtf/unicode/WTFUTF8.h. I&apos;m not very happy with this idea and would greatly appreciate any insight/suggestions into how to resolve this issue.

I tried changing the CMake build system so that it uses the ICU headers in JavaScriptCore/icu and WebCore/icu when building JavaScriptCore and WebCore, respectively, but the same issue persists. That is, when JavaScriptCore/icu/unicode/utf.h includes utf8.h it includes JavaScriptCore/wtf/unicode/UTF8.h instead of JavaScriptCore/icu/unicode/utf8.h.

From briefly looking at the xcodebuild output of the Apple Mac build I noticed that it includes -I. and -Iicu among the include directories. I also tried a similar approach to no avail.

Additional remarks:

Inserting a #pragma message directive to more easily see this issue and compiling Source/WebCore/platform/text/TextCodecUTF8.cpp, I get the following output:

...
[ 29%] In file included from /Users/dbates/Desktop/RIM/staging/usr/include/unicode/utf.h:230,
                 from /Users/dbates/Desktop/RIM/staging/usr/include/unicode/utypes.h:37,
                 from /Users/dbates/Desktop/RIM/staging/usr/include/unicode/uchar.h:26,
                 from /Users/dbates/Desktop/RIM/webkit/Source/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h:27,
                 from /Users/dbates/Desktop/RIM/webkit/Source/JavaScriptCore/wtf/unicode/Unicode.h:31,
                 from /Users/dbates/Desktop/RIM/webkit/Source/WebCore/platform/text/TextCodec.h:35,
                 from /Users/dbates/Desktop/RIM/webkit/Source/WebCore/platform/text/TextCodecUserDefined.h:29,
                 from /Users/dbates/Desktop/RIM/webkit/Source/WebCore/platform/text/TextCodecUserDefined.cpp:27:
/Users/dbates/Desktop/RIM/webkit/Source/JavaScriptCore/wtf/unicode/utf8.h:30: note: #pragma message: JavaScriptCore/wtf/unicode/UTF8.h
Building CXX object WebCore/CMakeFiles/webcore.dir/platform/text/transcoder/FontTranscoder.cpp.o
In file included from /Users/dbates/Desktop/RIM/webkit/Source/WebCore/platform/text/TextCodecUTF8.cpp:27:
/Users/dbates/Desktop/RIM/webkit/Source/WebCore/platform/text/TextCodecUTF8.h:50: error: &apos;U8_MAX_LENGTH&apos; was not declared in this scope
...

The directory /Users/dbates/Desktop/RIM/staging/usr/include is specified to g++ using -isystem so that it is included in the system header search path.

Both RIM/staging/usr/include/unicode/utf.h and JavaScriptCore/icu/unicode/utf.h include utf8.h as follows:

/* include the utfXX.h ------------------------------------------------------ */

#include &quot;unicode/utf8.h&quot;
#include &quot;unicode/utf16.h&quot;

(http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/icu/unicode/utf.h?rev=74855#L215)

Notice the use of a relative include path. Changing &quot;unicode/utf8.h&quot; to &quot;utf8.h&quot; above resolves the build issue but it&apos;s undesirable to change these ICU headers as they are from a third-party.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500943</commentid>
    <comment_count>1</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2011-11-11 11:11:04 -0800</bug_when>
    <thetext>This looks like bug 70913.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500947</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2011-11-11 11:13:40 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 70913 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>