[Webkit-unassigned] [Bug 72152] New: Rename JavaScriptCore/wtf/unicode/UTF8.{cpp, h} to JavaScriptCore/wtf/unicode/WTFUTF8.{cpp, h}

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 11 10:48:34 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=72152

           Summary: Rename JavaScriptCore/wtf/unicode/UTF8.{cpp, h} to
                    JavaScriptCore/wtf/unicode/WTFUTF8.{cpp, h}
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dbates at webkit.org
                CC: ap at webkit.org, mrowe at apple.com, paroga at paroga.com,
                    gyuyoung.kim at samsung.com, leandro at profusion.mobi,
                    kubo at profusion.mobi


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'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: 'U8_MAX_LENGTH' 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 "unicode/utf8.h"
#include "unicode/utf16.h"

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

Notice the use of a relative include path. Changing "unicode/utf8.h" to "utf8.h" above resolves the build issue but it's undesirable to change these ICU headers as they are from a third-party.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list