Bug 7387

Summary: Set up new prototype macros and avoid using #if without defined() in JSC
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: JavaScriptCoreAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 7383    
Attachments:
Description Flags
patch to add platform test macros darin: review+

Description Maciej Stachowiak 2006-02-20 07:19:18 PST
we should set up new platform test macros so you can do this:

// operating system
#if PLATFORM(DARWIN)
#if PLATFORM(WIN_OS)
#if PLATFORM(POSIX)

// graphics library
#if PLATFORM(CG)
#if PLATFORM(CAIRO)

// desktop environment / toolkit
#if PLATFORM(MAC)  // (or should that be AQUA or QUARTZ?)
#if PLATFORM(KDE)
#if PLATFORM(WIN)

These would expand to defined(PLATFORM_FOO) and the PLATFORM_FOO macros would be predefined as appropriate.

could also set it up so you can do things like #if FEATURE(HAVE_STRCASECMP) or even #if HAVE(STRCASECMP)
Comment 1 Maciej Stachowiak 2006-03-01 18:23:24 PST
Created attachment 6797 [details]
patch to add platform test macros
Comment 2 Darin Adler 2006-03-01 19:48:55 PST
Comment on attachment 6797 [details]
patch to add platform test macros

+#ifndef PLATFORM(WIN_OS)

That should be #if !

Otherwise looks fine. r=me

Please don't land the partial checkout.html change here.
Comment 3 Darin Adler 2006-03-02 07:10:02 PST
Maciej landed this last night.