<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JavaScriptCore fails to build on older versions of OS X due to CF_AVAILABLE usage"
   href="https://bugs.webkit.org/show_bug.cgi?id=152720">152720</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JavaScriptCore fails to build on older versions of OS X due to CF_AVAILABLE usage
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jeremyhu&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Building webkit-gtk 2.11.2 on the MacPorts Mavericks buildbot failed due CF_AVAILABLE macro usage.  These macros should only be used by the OS X system frameworks and not local builds.  

/opt/local/var/macports/build/_opt_mports_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.2/Source/JavaScriptCore/API/JSContextRef.h:144:71: error: expected '=' after '__NSi_10_10'
JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx) CF_AVAILABLE(10_10, 8_0);
                                                                      ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:95:81: note: expanded from macro 'CF_AVAILABLE'
#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(macosx,__NSi_##_mac)))
                                                                                ^
---

Elsewhere, I see these warnings, which seem to attempt to do that:

/opt/local/var/macports/build/_opt_mports_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.2/Source/JavaScriptCore/API/WebKitAvailability.h:68:9: warning: 'CF_AVAILABLE' macro redefined
#define CF_AVAILABLE(_mac, _ios)
        ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:95:9: note: previous definition is here
#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(macosx,__NSi_##_mac)))
        ^

---

Thus, it looks like WebKitAvailability.h needs to be included in JSContextRef.h before that CF_AVAILABLE usage.

Also, please add an #undef before the #define in WebKitAvailability.h to silence that warning.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>