Summary: | Compile-failure: undefined token in WebCore/platform/network/curl/FormDataStreamCurl.cpp | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Macks <dmacks> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
Attachments: |
|
Description
Daniel Macks
2008-08-16 10:57:23 PDT
FormDataStreamCurl.cpp tries to get stdint.h: #include "config.h" // We need to define __STDC_LIMIT_MACROS to define SIZE_MAX. #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #include <stdint.h> #undef __STDC_LIMIT_MACROS #else #include <stdint.h> #endif but tracing the #include jungle, it looks like that's too late, as stdint.h has already been loaded... In file included from /usr/include/sys/_endian.h:88, from /usr/include/ppc/endian.h:107, from /usr/include/machine/endian.h:30, from /usr/include/sys/wait.h:182, from /usr/include/stdlib.h:64, from ./JavaScriptCore/wtf/FastMalloc.h:25, from ./WebCore/config.h:77, from WebCore/platform/network/curl/FormDataStreamCurl.cpp:30 Moving the config.h *after* stdint.h solves it for me (and makes some sense...load all the system headers before webkit's own stuff. Not sure if that affects win32, which may do headers differently and/or need local overrides of standard-on-unix stuff. It's probably a lot more portable, and definitely cleaner, to use std::numeric_limits<size_t>::max() instead. Using that instead of SIZE_MAX (and scrapping the whole stdint.h block entirely) allows building with no warnings or undefined symbols. Thanks! Would you be willing to submit a patch <http://webkit.org/coding/contributing.html>? Created attachment 22863 [details] patch per Comment #3 Comment on attachment 22863 [details] patch per Comment #3 r=me |