Bug 17803

Summary: Can't build ThreadingPthreads.cpp in non-pch build; can't build pcre_exec.cpp with -DDEBUG
Product: WebKit Reporter: Mark Mentovai <mark>
Component: JavaScriptCoreAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 17493    
Attachments:
Description Flags
Fix #include in ThreadingPthreads.cpp, fix variable name in pcre_exec.cpp eric: review+

Description Mark Mentovai 2008-03-12 13:24:10 PDT
During a non-precompiled header build, wtf/ThreadingPthreads.cpp compilation fails for want of a declaration of gettimeofday.  ThreadingPthreads.cpp includes time.h, but should include sys/time.h.  sys/time.h will bring in time.h under normal circumstances.

During a build with -DDEBUG set (the checked-in project file does not set -DDEBUG, but it's not abnormal for -DDEBUG to be set in debug builds), pcre/pcre_exec.cpp compilation fails because rc is not defined.  rc is used in two DPRINTF statements, which are only used when DEBUG is defined.  rc is a typo, these DPRINTFs should use returnCode.
Comment 1 Mark Mentovai 2008-03-12 13:25:26 PDT
Created attachment 19708 [details]
Fix #include in ThreadingPthreads.cpp, fix variable name in pcre_exec.cpp
Comment 2 Eric Seidel (no email) 2008-03-12 14:27:08 PDT
Comment on attachment 19708 [details]
Fix #include in ThreadingPthreads.cpp, fix variable name in pcre_exec.cpp

oops.  rc vs. returnCode was my fault I bet.  sys/time.h includes time.h, so that should be fine.
r=me.
Comment 3 Eric Seidel (no email) 2008-03-13 20:45:44 PDT
Thank you mark for making such easy-to-land patches.  These took only a few minutes to land on my train ride home. :)

These are revisions r31048 through r31053