WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 128952
108007
Stop defining PLATFORM(MAC) when building for PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR)
https://bugs.webkit.org/show_bug.cgi?id=108007
Summary
Stop defining PLATFORM(MAC) when building for PLATFORM(IOS) and PLATFORM(IOS_...
David Kilzer (:ddkilzer)
Reported
2013-01-26 10:49:09 PST
We should stop defining PLATFORM(MAC) when building for PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR) for the following reasons: - Require contributors to be explicit about whether code supports both Mac and iOS. - Make it explicit about which code supports iOS (so searching for "PLATFORM(IOS)" is meaningful). - Make Mac-only code use "PLATFORM(MAC)" instead of "PLATFORM(MAC) && !PLATFORM(IOS)". - Make it obvious when an ENABLE() or USE() macro should replace "PLATFORM(MAC) || PLATFORM(IOS)". - Make the case in the future for a PLATFORM(_FOO_) macro that represents "PLATFORM(MAC) || PLATFORM(IOS)".
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2013-01-26 11:16:44 PST
Looking at making a patch for this, I wonder if this would be a better change: - Stop defining PLATFORM(MAC) when building for PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR). - Rename OS(DARWIN) to OS(APPLE). - Replace "PLATFORM(MAC) || PLATFORM(IOS)" with OS(APPLE) (unless a better ENABLE() or USE() macro applies). I know OS(DARWIN) is supped to represent the kernel or low-level parts of the operating system, but I think it works both to represent the kernel as well as the UI-level parts of the operating system. And it's defined when __APPLE__ is defined. I was originally going to add a PLATFORM(APPLE) macro along side OS(DARWIN), but it didn't seem to make sense to use "OS(DARWIN)" when "OS(APPLE)" is more generally useful.
David Kilzer (:ddkilzer)
Comment 2
2013-01-26 11:17:52 PST
(In reply to
comment #1
)
> I was originally going to add a PLATFORM(APPLE) macro along side OS(DARWIN), but it didn't seem to make sense to use "OS(DARWIN)" when "OS(APPLE)" is more generally useful.
And both Mac OS X and iOS are Apple operating systems!
Laszlo Gombos
Comment 3
2013-01-26 11:38:28 PST
David, FYI - I changed Platform.h to follow the direction you set (without introducing the new defines) as part of
bug 105735
.
Maciej Stachowiak
Comment 4
2013-01-26 22:41:38 PST
I think it makes sense to have a single macro that means PLATFORM(MAC) || PLATFORM(IOS) (effectively). But it should not be an OS() macro - those are supposed to be for low-level system things - cases where different top-level ports might build on the same underlying OS. So if we make a shared one, it should probably be a PLATFORM() macro, not OS(). Another idea besides PLATFORM(APPLE) might be PLATFORM(COCOA) (to the extent that Cocoa Touch is a form of Cocoa).
Maciej Stachowiak
Comment 5
2013-01-26 22:42:20 PST
BTW, I forgot to mention, but I agree with this basic idea of splitting MAC and IOS.
David Kilzer (:ddkilzer)
Comment 6
2013-01-28 12:00:46 PST
Another reason to stop defining PLATFORM(MAC) when building iOS: <
http://trac.webkit.org/changeset/140988
>
David Kilzer (:ddkilzer)
Comment 7
2014-03-15 07:47:01 PDT
I think Dan Bernstein fixed this already. Is there anything left to do here?
mitz
Comment 8
2014-03-15 09:13:56 PDT
(In reply to
comment #7
)
> I think Dan Bernstein fixed this already. Is there anything left to do here?
Yes, this was fixed as
bug 128952
. I didn’t know that this earlier bug existed when I filed that one.
David Kilzer (:ddkilzer)
Comment 9
2014-03-15 10:35:20 PDT
*** This bug has been marked as a duplicate of
bug 128952
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug