Compile with clang's libc++

An overload for std::swap() what works with std::pair<A,B> is included
in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by
omitting the version there and using the std::swap() version.

Collector.cpp needs to include pthread.h directly, as it is not
automatically included by libc++'s headers (libstdc++ does pull in
pthread.h though).

Cherry-picked from qtscript/48baeef0766ba145d26d374561e152b40245f3b8.

Change-Id: I4dc88638ce8553bb97037b841fc6cc5e8c9911e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Enable building with clang / libc++ on OS X 10.9 Mavericks

A minimalistic change to enable building with clang / libc++ on OS X
10.9 Mavericks. The configure script now avoids overriding build
settings when using clang/libc++. Added a new build configuration with
settings specific to clang/libc++ on OS X.

Task-number: QTBUG-34652

Change-Id: Iaedaff7c06e9818a5f2ee0d6db93fbe3b2e65e28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Remove OS X unsupported warning.

No other platform has such a warning and it really is not important.

Change-Id: I70185dff6b0fad11c7a767f787679dc53d04ecc7
(backported from qtbase/cd17b500a85b34c16ff8f4212cf2ff35715040ba)
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
WebKit: Remove video support on OS X

WebKit video support on OS X currently relies on QTKit to function
properly. This is problematic because QTKit video support in WebKit
requires linking against the WebKitSystemInterface specific to each OS X
release, thus preventing the same set of Qt binaries from interoprating
with several Mac Releases. As a workaround video support is disabled.

Back ported from: http://trac.webkit.org/changeset/151546

Task-number: QTBUG-32237

Change-Id: I780062ce5971960dcad7b51e6226dcf7cd7c907f
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix static builds for Mac OS X
Fix WebKit TimerHeap implementaiton to work with more standard libraries

This is necessary to get WebKit to build with more with more STL
variants, including libc++. It is based on the upstream WebKit change:
http://trac.webkit.org/changeset/92556

Task-number: QTBUG-34652

Change-Id: I31ad9a7af8b1fb21d4186857f63a9fdf58429042
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Backported fix for WebKit libc++ support on OS X Mavricks

As of OS X 10.9 Mavericks libc++ is the default standard library
implementation. This fix is necessary for building WebKit on OS X
Mavericks when using libc++. Upstream Change:
http://trac.webkit.org/changeset/107489

Task-number: QTBUG-34652

Change-Id: Ieb30c115b85045adc3e82ee039c541c973b72a3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
WebKit Nullptr type fixes when using libc++

These changes correct the Nullptr type handling for libc++ based system.

Task-number: QTBUG-34652

Change-Id: Ied51c8683cce86beb24ed2fef70e99bb4dfc15e5
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Use the correct system font on OS X Mavericks.

Task-number: QTBUG-32789

Change-Id: I7b1988d5f74e5becd2e02274fae4d2bcc8140901
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Bring in WebKit revisions 139553 and 139921.

They are primarily useful for getting rid of some libstdc++-specific
includes which break the build with libc++, and also for simplifying the
code and removing a Darwin-specific code path.

r139553 by ossy@webkit.org:
  Use sync_add_and_fetch instead of gnu_cxx::exchange_and_add
  https://bugs.webkit.org/show_bug.cgi?id=106729

  After r139514 we need atomicIncrement(int64_t volatile*) for all
  platform. Now the GCC implementation of atomicIncrement() is based on
  gnu_cxx::exchange_and_add, which doesn't support int64_t type, but
  sync_add_and_fetch does.

  Reviewed by Benjamin Poulain.

r139921 by benjamin@webkit.org:
  Use GCC's implementation of atomicIncrement/Decrement on Mac
  https://bugs.webkit.org/show_bug.cgi?id=106976

  Reviewed by Filip Pizlo.

  wtf/Atomics.h: GCC and LLVM have builtin for atomic ADD and SUB:
                 sync_add_and_fetch, sync_sub_and_fetch.

  Using them let the compiler just generate the atomic operations inline
  instead of generating a function call to LibC. It also simplify the
  code a bit.

Cherry-picked from qtwebkit/0baf197 and qtwebkit/801fc96. I'm cherry-picking
both revisions together to match what was done in 0de22e80.

Change-Id: Ie5c1067980662ff04e8e36d8cf6e9459b7c46aab
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Make QCoreWlan plugin compile on 10.9

Backport of 79ccb4fc from Qt 5:

We take the path of least resistence and keep the old API code for 10.6 while
updating the code for 10.7 and newer. This means we have some code duplication.
It also means that we only compile the 10.6 code for QCoreWlanEngine when the
deploymen target is 10.6.

The 10.6 version file should be removed once we drop support for Snow Leopard.

Change-Id: I07284a2579ba127abdca660ad4b8573576756399
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>