<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>108007</bug_id>
          
          <creation_ts>2013-01-26 10:49:09 -0800</creation_ts>
          <short_desc>Stop defining PLATFORM(MAC) when building for PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR)</short_desc>
          <delta_ts>2014-03-15 10:35:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>128952</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>benjamin</cc>
    
    <cc>darin</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>mitz</cc>
    
    <cc>mjs</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>817215</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-01-26 10:49:09 -0800</bug_when>
    <thetext>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 &quot;PLATFORM(IOS)&quot; is meaningful).
- Make Mac-only code use &quot;PLATFORM(MAC)&quot; instead of &quot;PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)&quot;.
- Make it obvious when an ENABLE() or USE() macro should replace &quot;PLATFORM(MAC) || PLATFORM(IOS)&quot;.
- Make the case in the future for a PLATFORM(_FOO_) macro that represents &quot;PLATFORM(MAC) || PLATFORM(IOS)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817220</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-01-26 11:16:44 -0800</bug_when>
    <thetext>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 &quot;PLATFORM(MAC) || PLATFORM(IOS)&quot; 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&apos;s defined when __APPLE__ is defined.

I was originally going to add a PLATFORM(APPLE) macro along side OS(DARWIN), but it didn&apos;t seem to make sense to use &quot;OS(DARWIN)&quot; when &quot;OS(APPLE)&quot; is more generally useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817222</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-01-26 11:17:52 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; I was originally going to add a PLATFORM(APPLE) macro along side OS(DARWIN), but it didn&apos;t seem to make sense to use &quot;OS(DARWIN)&quot; when &quot;OS(APPLE)&quot; is more generally useful.

And both Mac OS X and iOS are Apple operating systems!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817233</commentid>
    <comment_count>3</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-26 11:38:28 -0800</bug_when>
    <thetext>David, FYI - I changed Platform.h to follow the direction you set (without introducing the new defines) as part of bug 105735.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817321</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2013-01-26 22:41:38 -0800</bug_when>
    <thetext>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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817322</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2013-01-26 22:42:20 -0800</bug_when>
    <thetext>BTW, I forgot to mention, but I agree with this basic idea of splitting MAC and IOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817944</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2013-01-28 12:00:46 -0800</bug_when>
    <thetext>Another reason to stop defining PLATFORM(MAC) when building iOS:
&lt;http://trac.webkit.org/changeset/140988&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>990863</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2014-03-15 07:47:01 -0700</bug_when>
    <thetext>I think Dan Bernstein fixed this already.  Is there anything left to do here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>990870</commentid>
    <comment_count>8</comment_count>
    <who name="">mitz</who>
    <bug_when>2014-03-15 09:13:56 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>990873</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2014-03-15 10:35:20 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 128952 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>