Bug 7387 - Set up new prototype macros and avoid using #if without defined() in JSC
Summary: Set up new prototype macros and avoid using #if without defined() in JSC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks: 7383
  Show dependency treegraph
 
Reported: 2006-02-20 07:19 PST by Maciej Stachowiak
Modified: 2006-03-02 07:10 PST (History)
0 users

See Also:


Attachments
patch to add platform test macros (58.20 KB, patch)
2006-03-01 18:23 PST, Maciej Stachowiak
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.