Bug 128454

Summary: ImageDiff compile fails when compiled with libc++
Product: WebKit Reporter: Rajaram Gaunker <zimbabao>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch none

Description Rajaram Gaunker 2014-02-08 07:32:26 PST
repro steps: Compile webkit using libc++.

Observation: Following compile errors.

Resolution: include cstdlib in ImageDiff.cpp.

WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:103:61: error: use of undeclared identifier 'malloc'; did you mean 'g_malloc'?
    unsigned char* diffBuffer = static_cast<unsigned char*>(malloc(width * height));
                                                            ^~~~~~
                                                            g_malloc
webkit_deps/include/glib-2.0/glib/gmem.h:78:10: note: 'g_malloc' declared here
gpointer g_malloc         (gsize         n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
         ^
WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:147:5: error: use of undeclared identifier 'free'
    free(diffBuffer);
    ^
WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:207:30: error: use of undeclared identifier 'strtol'
            long imageSize = strtol(tokens[1], 0, 10);
                             ^
3 errors generated.
Comment 1 Rajaram Gaunker 2014-02-08 07:38:09 PST
Created attachment 223567 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-08 08:09:57 PST
Comment on attachment 223567 [details]
Patch

Clearing flags on attachment: 223567

Committed r163711: <http://trac.webkit.org/changeset/163711>
Comment 3 WebKit Commit Bot 2014-02-08 08:10:00 PST
All reviewed patches have been landed.  Closing bug.