Cleanup QtWayland module
authorAndy Nichols <andy.nichols@digia.com>
Fri, 30 Nov 2012 12:52:00 +0000 (13:52 +0100)
committerAndy Nichols <andy.nichols@digia.com>
Mon, 3 Dec 2012 08:50:54 +0000 (09:50 +0100)
Now that both xkbcommon 0.2.0 and libWayland 1.0.0 have been
released, we should no longer be building against sha1's and
should be preparing for an eventual release so these build hints
have been removed.

A test has been added for libWayland 1.0.0 which is required to
build QtWayland.

README has been updated to reflect the current situation

src/3rdparty has been removed as it has not been used in some time.

patches folder and contents have been removed as they are no longer
needed.

extensions folder has been moved to the src folder

Change-Id: Iab79b5c164758a4bd0253c90f60b2a2d044e2785
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
39 files changed:
.gitignore
README
config.tests/wayland/main.cpp [new file with mode: 0644]
config.tests/wayland/wayland.pro [new file with mode: 0644]
libxkbcommon_sha1.txt [deleted file]
patches/0001-Add-thread-affinity-to-wayland-clients.patch [deleted file]
patches/README [deleted file]
qtwayland.pro
src/3rdparty/ffi-arm/LICENSE [deleted file]
src/3rdparty/ffi-arm/ffi.c [deleted file]
src/3rdparty/ffi-arm/ffi.h [deleted file]
src/3rdparty/ffi-arm/ffi.pro [deleted file]
src/3rdparty/ffi-arm/ffi_common.h [deleted file]
src/3rdparty/ffi-arm/fficonfig.h [deleted file]
src/3rdparty/ffi-arm/ffitarget.h [deleted file]
src/3rdparty/ffi-arm/prep_cif.c [deleted file]
src/3rdparty/ffi-arm/sysv.S [deleted file]
src/3rdparty/ffi-arm/types.c [deleted file]
src/3rdparty/wayland/wayland-drm-client-protocol.h [deleted file]
src/3rdparty/wayland/wayland-drm-protocol.c [deleted file]
src/3rdparty/wayland/wayland-drm-server-protocol.h [deleted file]
src/compositor/hardware_integration/brcm_egl/brcm_egl.pri
src/compositor/hardware_integration/xcomposite_share/xcomposite_share.pri
src/compositor/wayland_wrapper/wayland_wrapper.pri
src/compositor/windowmanagerprotocol/windowmanagerprotocol.pri
src/extensions/brcm.xml [moved from extensions/brcm.xml with 100% similarity]
src/extensions/output-extension.xml [moved from extensions/output-extension.xml with 100% similarity]
src/extensions/qtkey-extension.xml [moved from extensions/qtkey-extension.xml with 100% similarity]
src/extensions/sub-surface-extension.xml [moved from extensions/sub-surface-extension.xml with 100% similarity]
src/extensions/surface-extension.xml [moved from extensions/surface-extension.xml with 100% similarity]
src/extensions/touch-extension.xml [moved from extensions/touch-extension.xml with 100% similarity]
src/extensions/windowmanager.xml [moved from extensions/windowmanager.xml with 100% similarity]
src/extensions/xcomposite.xml [moved from extensions/xcomposite.xml with 100% similarity]
src/plugins/platforms/wayland/gl_integration/brcm_egl/brcm_egl.pri
src/plugins/platforms/wayland/gl_integration/xcomposite_share/xcomposite_share.pri
src/plugins/platforms/wayland/wayland.pro
src/plugins/platforms/wayland/windowmanager_integration/windowmanager_integration.pri
src/src.pro
wayland_sha1.txt [deleted file]

index 688c494..c0ad159 100644 (file)
@@ -11,6 +11,7 @@ config.tests/glx/glx
 config.tests/wayland_egl/wayland_egl
 config.tests/xcomposite/xcomposite
 config.tests/xkbcommon/xkbcommon
+config.tests/wayland/wayland
 qrc_*.cpp
 moc_*.cpp
 .obj/
diff --git a/README b/README
index 3247a25..e324850 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,17 @@
-This is the Qt for Wayland module.
+This is the QtWayland module.
+
+The QtWayland module consists of two parts:
+
+Wayland platform plugin:
+    Enables Qt applications to be run as Wayland clients.
+
+QtCompositor API:
+    Enables the creation of Wayland compositors using Qt and QtQuick.
+
+To build the QtWayland module you need the external dependencies:
+xkbcommon 0.2.0 - http://xkbcommon.org/
+libwayland 1.0.1 - http://wayland.freedesktop.org/
 
-Sometimes we are slightly behind upstream wayland, so if your compiling Wayland from git, reset to sha1 defined in wayland_sha1.txt
 
 We hang out at #qt-labs and #qt-lighthouse on freenode if you have any questions
+
diff --git a/config.tests/wayland/main.cpp b/config.tests/wayland/main.cpp
new file mode 100644 (file)
index 0000000..c03d803
--- /dev/null
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+**     of its contributors may be used to endorse or promote products derived
+**     from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <wayland-version.h>
+
+int main()
+{
+#if WAYLAND_VERSION_MAJOR < 1
+# error Wayland 1.0.0 or higher required
+#endif
+    return 0;
+}
\ No newline at end of file
diff --git a/config.tests/wayland/wayland.pro b/config.tests/wayland/wayland.pro
new file mode 100644 (file)
index 0000000..5873d92
--- /dev/null
@@ -0,0 +1,12 @@
+TARGET = wayland
+QT = core
+
+!contains(QT_CONFIG, no-pkg-config) {
+    CONFIG += link_pkgconfig
+    PKGCONFIG += wayland-client
+} else {
+    LIBS += -lwayland-client
+}
+
+# Input
+SOURCES += main.cpp
\ No newline at end of file
diff --git a/libxkbcommon_sha1.txt b/libxkbcommon_sha1.txt
deleted file mode 100644 (file)
index 95a1524..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-This version of Qt-Compositor is checked against the following sha1
-from the libxkbcommon repository:
-5be22ad641e96f76ce08a9fd928553b67d627de4
-
-During the qmake step a configuration test will be compiled to check
-if libxkbcommon is available. If not, or it is an incompatible
-version, the platform plug-in will be built without keymap support.
diff --git a/patches/0001-Add-thread-affinity-to-wayland-clients.patch b/patches/0001-Add-thread-affinity-to-wayland-clients.patch
deleted file mode 100644 (file)
index 9448c4d..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-From bb2bb0a9f3751156d9537d2daa4507c8b1eff459 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B8rgen=20Lind?= <jorgen.lind@nokia.com>
-Date: Mon, 5 Mar 2012 12:44:37 +0100
-Subject: [PATCH] Add thread affinity to wayland clients
-
-This makes it possible to marshal requests from more than 1 thread in
-wayland clients. However, its not possible to run wl_display_iterate
-from other threads than the thread that made the wl_display.
----
- src/Makefile.am      |    2 +
- src/wayland-client.c |  111 +++++++++++++++++++++++++++++++++++++++++++++++---
- src/wayland-client.h |    7 ++++
- 3 files changed, 115 insertions(+), 5 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index f93954e..836cb31 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -27,6 +27,8 @@ libwayland_server_la_SOURCES =                       \
-       event-loop.c
- libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt -lm
-+libwayland_client_la_LDFLAGS = -pthread
-+libwayland_client_la_CFLAGS = -pthread
- libwayland_client_la_SOURCES =                        \
-       wayland-protocol.c                      \
-       wayland-client.c
-diff --git a/src/wayland-client.c b/src/wayland-client.c
-index ecedd99..c385bfe 100644
---- a/src/wayland-client.c
-+++ b/src/wayland-client.c
-@@ -34,6 +34,7 @@
- #include <assert.h>
- #include <fcntl.h>
- #include <sys/poll.h>
-+#include <sys/eventfd.h>
- #include "wayland-util.h"
- #include "wayland-os.h"
-@@ -63,6 +64,9 @@ struct wl_display {
-       struct wl_proxy proxy;
-       struct wl_connection *connection;
-       int fd;
-+      int write_notification_event_fd;
-+      pthread_t thread_id;
-+      pthread_mutex_t marshalling_mutex;
-       uint32_t mask;
-       struct wl_map objects;
-       struct wl_list global_listener_list;
-@@ -193,6 +197,11 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...)
-       struct wl_closure closure;
-       va_list ap;
-       int ret;
-+      int write_notification_event_fd;
-+      uint64_t write_notification_value;
-+      ssize_t success;
-+
-+      pthread_mutex_lock(&proxy->display->marshalling_mutex);
-       va_start(ap, opcode);
-       ret = wl_closure_vmarshal(&closure, &proxy->object, opcode, ap,
-@@ -213,6 +222,18 @@ wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...)
-               wl_closure_print(&closure, &proxy->object, true);
-       wl_closure_destroy(&closure);
-+
-+      write_notification_event_fd = proxy->display->write_notification_event_fd;
-+      write_notification_value = 1;
-+      success = write(write_notification_event_fd,&write_notification_value,8);
-+      if (success < 0) {
-+              fprintf(stderr,
-+                      "Error writing to eventfd %d: %s\n",
-+                      write_notification_event_fd,
-+                      strerror(errno));
-+      }
-+
-+      pthread_mutex_unlock(&proxy->display->marshalling_mutex);
- }
- /* Can't do this, there may be more than one instance of an
-@@ -348,6 +369,7 @@ wl_display_connect(const char *name)
-       const char *debug;
-       char *connection, *end;
-       int flags;
-+      int success;
-       debug = getenv("WAYLAND_DEBUG");
-       if (debug)
-@@ -397,6 +419,21 @@ wl_display_connect(const char *name)
-               return NULL;
-       }
-+      display->write_notification_event_fd = eventfd(0, EFD_CLOEXEC);
-+        if (display->write_notification_event_fd < 0) {
-+            fprintf(stderr, "Failed to create eventfd\n");
-+        }
-+
-+      display->thread_id = pthread_self();
-+      pthread_mutexattr_t mutex_attr;
-+      success = pthread_mutexattr_init(&mutex_attr);
-+      success += pthread_mutexattr_settype(&mutex_attr,PTHREAD_MUTEX_RECURSIVE);
-+      success += pthread_mutex_init(&display->marshalling_mutex, &mutex_attr);
-+      success += pthread_mutexattr_destroy(&mutex_attr);
-+
-+      if (success)
-+              fprintf(stderr, "Threading setup was unsuccessfull\n");
-+
-       return display;
- }
-@@ -433,6 +470,18 @@ wl_display_get_fd(struct wl_display *display,
-       return display->fd;
- }
-+WL_EXPORT int
-+wl_display_get_write_notification_fd(struct wl_display *display)
-+{
-+      return display->write_notification_event_fd;
-+}
-+
-+WL_EXPORT pthread_t
-+wl_display_thread(struct wl_display *display)
-+{
-+      return display->thread_id;
-+}
-+
- static void
- sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
- {
-@@ -446,18 +495,47 @@ static const struct wl_callback_listener sync_listener = {
-       sync_callback
- };
-+static void
-+threaded_sync_callback(void *data, struct wl_callback *callback, uint32_t time)
-+{
-+      fprintf(stderr, "threaded_sync_callback\n");
-+      pthread_cond_t *wait_condition = data;
-+
-+      pthread_cond_broadcast(wait_condition);
-+      wl_callback_destroy(callback);
-+}
-+
-+static const struct wl_callback_listener threaded_sync_listener = {
-+      threaded_sync_callback
-+};
-+
-+
- WL_EXPORT void
- wl_display_roundtrip(struct wl_display *display)
- {
-       struct wl_callback *callback;
-       int done;
-+      pthread_cond_t wait_cond;
-+      pthread_mutex_t wait_mutex;
--      done = 0;
-       callback = wl_display_sync(display);
--      wl_callback_add_listener(callback, &sync_listener, &done);
--      wl_display_flush(display);
--      while (!done)
--              wl_display_iterate(display, WL_DISPLAY_READABLE);
-+
-+      if (wl_display_thread(display) == pthread_self()) {
-+              done = 0;
-+              wl_callback_add_listener(callback, &sync_listener, &done);
-+              wl_display_flush(display);
-+              while (!done)
-+                      wl_display_iterate(display, WL_DISPLAY_READABLE);
-+      } else {
-+              pthread_mutex_init(&wait_mutex,NULL);
-+              pthread_cond_init(&wait_cond, NULL);
-+              pthread_mutex_lock(&wait_mutex);
-+
-+              wl_callback_add_listener(callback, &threaded_sync_listener, &wait_cond);
-+              pthread_cond_wait(&wait_cond,&wait_mutex);
-+              pthread_cond_destroy(&wait_cond);
-+              pthread_mutex_destroy(&wait_mutex);
-+      }
- }
- static void
-@@ -503,6 +581,10 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
- {
-       uint32_t p[2], object;
-       int len, opcode, size;
-+      uint64_t write_fd;
-+      ssize_t success;
-+
-+      pthread_mutex_lock(&display->marshalling_mutex);
-       mask &= display->mask;
-       if (mask == 0) {
-@@ -511,6 +593,23 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
-               return;
-       }
-+      if (mask & WL_DISPLAY_WRITABLE) {
-+              if (pthread_self() != display->thread_id) {
-+                      fprintf(stderr,
-+                              "wl_display_iterate called with WL_DISPLAY_WRITABLE"
-+                              "from another thread than the thead that created "
-+                              "wl_display. This will result in events being dispatched"
-+                              "in other threads\n");
-+              }
-+              success = read(display->write_notification_event_fd, &write_fd, 8);
-+              if (success < 0) {
-+                      fprintf(stderr,
-+                              "wl_display_iterate eventfd  %d error at read: %s\n",
-+                              display->write_notification_event_fd,
-+                              strerror(errno));
-+              }
-+      }
-+
-       len = wl_connection_data(display->connection, mask);
-       while (len > 0) {
-@@ -528,6 +627,8 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
-               len -= size;
-       }
-+      pthread_mutex_unlock(&display->marshalling_mutex);
-+
-       if (len < 0) {
-               fprintf(stderr, "read error: %m\n");
-               exit(EXIT_FAILURE);
-diff --git a/src/wayland-client.h b/src/wayland-client.h
-index 06dc6fe..4053474 100644
---- a/src/wayland-client.h
-+++ b/src/wayland-client.h
-@@ -26,6 +26,9 @@
- #include "wayland-util.h"
- #include "wayland-version.h"
-+#include <pthread.h>
-+#define WAYLAND_CLIENT_THREAD_AFFINITY
-+
- #ifdef  __cplusplus
- extern "C" {
- #endif
-@@ -98,6 +101,10 @@ wl_display_get_global(struct wl_display *display,
- void wl_log_set_handler_client(wl_log_func_t handler);
-+int wl_display_get_write_notification_fd(struct wl_display *display);
-+
-+pthread_t wl_display_thread(struct wl_display *display);
-+
- #ifdef  __cplusplus
- }
- #endif
--- 
-1.7.9.5
-
diff --git a/patches/README b/patches/README
deleted file mode 100644 (file)
index 8bb8662..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Here are our patches to the Wayland repository that have not been upstreamed
-yet. They are available here as a convenience.
-
-Ground rules:
-
-1. We aim to get these patches into Wayland proper.
-
-2. QtWayland should compile and work without these patches.
index 651045e..40c6295 100644 (file)
@@ -1,4 +1,5 @@
 load(configure)
+qtCompileTest(wayland)
 qtCompileTest(xkbcommon)
 qtCompileTest(brcm_egl)
 qtCompileTest(egl)
@@ -7,3 +8,7 @@ qtCompileTest(wayland_egl)
 qtCompileTest(xcomposite)
 
 load(qt_parts)
+
+!config_wayland {
+    error(QtWayland requires Wayland 1.0.0 or higher)
+}
diff --git a/src/3rdparty/ffi-arm/LICENSE b/src/3rdparty/ffi-arm/LICENSE
deleted file mode 100644 (file)
index ec2fd69..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-libffi - Copyright (c) 1996-2009  Anthony Green, Red Hat, Inc and others.  
-See source files for details.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-``Software''), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/3rdparty/ffi-arm/ffi.c b/src/3rdparty/ffi-arm/ffi.c
deleted file mode 100644 (file)
index f6a6475..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1998, 2008  Red Hat, Inc.
-   
-   ARM Foreign Function Interface 
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-   ----------------------------------------------------------------------- */
-
-#include <ffi.h>
-#include <ffi_common.h>
-
-#include <stdlib.h>
-
-/* ffi_prep_args is called by the assembly routine once stack space
-   has been allocated for the function's arguments */
-
-void ffi_prep_args(char *stack, extended_cif *ecif)
-{
-  register unsigned int i;
-  register void **p_argv;
-  register char *argp;
-  register ffi_type **p_arg;
-
-  argp = stack;
-
-  if ( ecif->cif->flags == FFI_TYPE_STRUCT ) {
-    *(void **) argp = ecif->rvalue;
-    argp += 4;
-  }
-
-  p_argv = ecif->avalue;
-
-  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
-       (i != 0);
-       i--, p_arg++)
-    {
-      size_t z;
-
-      /* Align if necessary */
-      if (((*p_arg)->alignment - 1) & (unsigned) argp) {
-       argp = (char *) ALIGN(argp, (*p_arg)->alignment);
-      }
-
-      if ((*p_arg)->type == FFI_TYPE_STRUCT)
-       argp = (char *) ALIGN(argp, 4);
-
-         z = (*p_arg)->size;
-         if (z < sizeof(int))
-           {
-             z = sizeof(int);
-             switch ((*p_arg)->type)
-               {
-               case FFI_TYPE_SINT8:
-                 *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
-                 break;
-                 
-               case FFI_TYPE_UINT8:
-                 *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
-                 break;
-                 
-               case FFI_TYPE_SINT16:
-                 *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
-                 break;
-                 
-               case FFI_TYPE_UINT16:
-                 *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
-                 break;
-                 
-               case FFI_TYPE_STRUCT:
-                 memcpy(argp, *p_argv, (*p_arg)->size);
-                 break;
-
-               default:
-                 FFI_ASSERT(0);
-               }
-           }
-         else if (z == sizeof(int))
-           {
-             *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
-           }
-         else
-           {
-             memcpy(argp, *p_argv, z);
-           }
-         p_argv++;
-         argp += z;
-    }
-  
-  return;
-}
-
-/* Perform machine dependent cif processing */
-ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
-{
-  /* Round the stack up to a multiple of 8 bytes.  This isn't needed 
-     everywhere, but it is on some platforms, and it doesn't harm anything
-     when it isn't needed.  */
-  cif->bytes = (cif->bytes + 7) & ~7;
-
-  /* Set the return type flag */
-  switch (cif->rtype->type)
-    {
-    case FFI_TYPE_VOID:
-    case FFI_TYPE_FLOAT:
-    case FFI_TYPE_DOUBLE:
-      cif->flags = (unsigned) cif->rtype->type;
-      break;
-
-    case FFI_TYPE_SINT64:
-    case FFI_TYPE_UINT64:
-      cif->flags = (unsigned) FFI_TYPE_SINT64;
-      break;
-
-    case FFI_TYPE_STRUCT:
-      if (cif->rtype->size <= 4)
-       /* A Composite Type not larger than 4 bytes is returned in r0.  */
-       cif->flags = (unsigned)FFI_TYPE_INT;
-      else
-       /* A Composite Type larger than 4 bytes, or whose size cannot
-          be determined statically ... is stored in memory at an
-          address passed [in r0].  */
-       cif->flags = (unsigned)FFI_TYPE_STRUCT;
-      break;
-
-    default:
-      cif->flags = FFI_TYPE_INT;
-      break;
-    }
-
-  return FFI_OK;
-}
-
-extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
-                         unsigned, unsigned, unsigned *, void (*fn)(void));
-
-void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
-{
-  extended_cif ecif;
-
-  int small_struct = (cif->flags == FFI_TYPE_INT 
-                     && cif->rtype->type == FFI_TYPE_STRUCT);
-
-  ecif.cif = cif;
-  ecif.avalue = avalue;
-
-  unsigned int temp;
-  
-  /* If the return value is a struct and we don't have a return        */
-  /* value address then we need to make one                    */
-
-  if ((rvalue == NULL) && 
-      (cif->flags == FFI_TYPE_STRUCT))
-    {
-      ecif.rvalue = alloca(cif->rtype->size);
-    }
-  else if (small_struct)
-    ecif.rvalue = &temp;
-  else
-    ecif.rvalue = rvalue;
-
-  switch (cif->abi) 
-    {
-    case FFI_SYSV:
-      ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
-                   fn);
-
-      break;
-    default:
-      FFI_ASSERT(0);
-      break;
-    }
-  if (small_struct)
-    memcpy (rvalue, &temp, cif->rtype->size);
-}
-
-/** private members **/
-
-static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
-                                        void** args, ffi_cif* cif);
-
-void ffi_closure_SYSV (ffi_closure *);
-
-/* This function is jumped to by the trampoline */
-
-unsigned int
-ffi_closure_SYSV_inner (closure, respp, args)
-     ffi_closure *closure;
-     void **respp;
-     void *args;
-{
-  // our various things...
-  ffi_cif       *cif;
-  void         **arg_area;
-
-  cif         = closure->cif;
-  arg_area    = (void**) alloca (cif->nargs * sizeof (void*));  
-
-  /* this call will initialize ARG_AREA, such that each
-   * element in that array points to the corresponding 
-   * value on the stack; and if the function returns
-   * a structure, it will re-set RESP to point to the
-   * structure return address.  */
-
-  ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
-
-  (closure->fun) (cif, *respp, arg_area, closure->user_data);
-
-  return cif->flags;
-}
-
-/*@-exportheader@*/
-static void 
-ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
-                           void **avalue, ffi_cif *cif)
-/*@=exportheader@*/
-{
-  register unsigned int i;
-  register void **p_argv;
-  register char *argp;
-  register ffi_type **p_arg;
-
-  argp = stack;
-
-  if ( cif->flags == FFI_TYPE_STRUCT ) {
-    *rvalue = *(void **) argp;
-    argp += 4;
-  }
-
-  p_argv = avalue;
-
-  for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
-    {
-      size_t z;
-
-      size_t alignment = (*p_arg)->alignment;
-      if (alignment < 4)
-       alignment = 4;
-      /* Align if necessary */
-      if ((alignment - 1) & (unsigned) argp) {
-       argp = (char *) ALIGN(argp, alignment);
-      }
-
-      z = (*p_arg)->size;
-
-      /* because we're little endian, this is what it turns into.   */
-
-      *p_argv = (void*) argp;
-
-      p_argv++;
-      argp += z;
-    }
-  
-  return;
-}
-
-/* How to make a trampoline.  */
-
-#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX)                             \
-({ unsigned char *__tramp = (unsigned char*)(TRAMP);                   \
-   unsigned int  __fun = (unsigned int)(FUN);                          \
-   unsigned int  __ctx = (unsigned int)(CTX);                          \
-   *(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
-   *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */       \
-   *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */       \
-   *(unsigned int*) &__tramp[12] = __ctx;                              \
-   *(unsigned int*) &__tramp[16] = __fun;                              \
-   __clear_cache((&__tramp[0]), (&__tramp[19]));                       \
- })
-
-
-/* the cif must already be prep'ed */
-
-ffi_status
-ffi_prep_closure_loc (ffi_closure* closure,
-                     ffi_cif* cif,
-                     void (*fun)(ffi_cif*,void*,void**,void*),
-                     void *user_data,
-                     void *codeloc)
-{
-  FFI_ASSERT (cif->abi == FFI_SYSV);
-
-  FFI_INIT_TRAMPOLINE (&closure->tramp[0], \
-                      &ffi_closure_SYSV,  \
-                      codeloc);
-    
-  closure->cif  = cif;
-  closure->user_data = user_data;
-  closure->fun  = fun;
-
-  return FFI_OK;
-}
diff --git a/src/3rdparty/ffi-arm/ffi.h b/src/3rdparty/ffi-arm/ffi.h
deleted file mode 100644 (file)
index 1f578d9..0000000
+++ /dev/null
@@ -1,399 +0,0 @@
-/* -----------------------------------------------------------------*-C-*-
-   libffi 3.0.9 - Copyright (c) 1996-2003, 2007, 2008  Red Hat, Inc.
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-
-   ----------------------------------------------------------------------- */
-
-/* -------------------------------------------------------------------
-   The basic API is described in the README file.
-
-   The raw API is designed to bypass some of the argument packing
-   and unpacking on architectures for which it can be avoided.
-
-   The closure API allows interpreted functions to be packaged up
-   inside a C function pointer, so that they can be called as C functions,
-   with no understanding on the client side that they are interpreted.
-   It can also be used in other cases in which it is necessary to package
-   up a user specified parameter and a function pointer as a single
-   function pointer.
-
-   The closure API must be implemented in order to get its functionality,
-   e.g. for use by gij.  Routines are provided to emulate the raw API
-   if the underlying platform doesn't allow faster implementation.
-
-   More details on the raw and cloure API can be found in:
-
-   http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
-
-   and
-
-   http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
-   -------------------------------------------------------------------- */
-
-#ifndef LIBFFI_H
-#define LIBFFI_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Specify which architecture libffi is configured for. */
-#define ARM
-
-/* ---- System configuration information --------------------------------- */
-
-#include <ffitarget.h>
-
-#ifndef LIBFFI_ASM
-
-#ifdef _MSC_VER
-#define __attribute__(X)
-#endif
-
-#include <stddef.h>
-#include <limits.h>
-
-/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
-   But we can find it either under the correct ANSI name, or under GNU
-   C's internal name.  */
-#ifdef LONG_LONG_MAX
-# define FFI_LONG_LONG_MAX LONG_LONG_MAX
-#else
-# ifdef LLONG_MAX
-#  define FFI_LONG_LONG_MAX LLONG_MAX
-# else
-#  ifdef __GNUC__
-#   define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
-#  endif
-# endif
-#endif
-
-/* The closure code assumes that this works on pointers, i.e. a size_t */
-/* can hold a pointer.                                                 */
-
-typedef struct _ffi_type
-{
-  size_t size;
-  unsigned short alignment;
-  unsigned short type;
-  struct _ffi_type **elements;
-} ffi_type;
-
-#ifndef LIBFFI_HIDE_BASIC_TYPES
-#if SCHAR_MAX == 127
-# define ffi_type_uchar                ffi_type_uint8
-# define ffi_type_schar                ffi_type_sint8
-#else
- #error "char size not supported"
-#endif
-
-#if SHRT_MAX == 32767
-# define ffi_type_ushort       ffi_type_uint16
-# define ffi_type_sshort       ffi_type_sint16
-#elif SHRT_MAX == 2147483647
-# define ffi_type_ushort       ffi_type_uint32
-# define ffi_type_sshort       ffi_type_sint32
-#else
- #error "short size not supported"
-#endif
-
-#if INT_MAX == 32767
-# define ffi_type_uint         ffi_type_uint16
-# define ffi_type_sint         ffi_type_sint16
-#elif INT_MAX == 2147483647
-# define ffi_type_uint         ffi_type_uint32
-# define ffi_type_sint         ffi_type_sint32
-#elif INT_MAX == 9223372036854775807
-# define ffi_type_uint         ffi_type_uint64
-# define ffi_type_sint         ffi_type_sint64
-#else
- #error "int size not supported"
-#endif
-
-#if LONG_MAX == 2147483647
-# if FFI_LONG_LONG_MAX != 9223372036854775807
- #error "no 64-bit data type supported"
-# endif
-#elif LONG_MAX != 9223372036854775807
- #error "long size not supported"
-#endif
-
-#if LONG_MAX == 2147483647
-# define ffi_type_ulong        ffi_type_uint32
-# define ffi_type_slong        ffi_type_sint32
-#elif LONG_MAX == 9223372036854775807
-# define ffi_type_ulong        ffi_type_uint64
-# define ffi_type_slong        ffi_type_sint64
-#else
- #error "long size not supported"
-#endif
-
-/* These are defined in types.c */
-extern ffi_type ffi_type_void;
-extern ffi_type ffi_type_uint8;
-extern ffi_type ffi_type_sint8;
-extern ffi_type ffi_type_uint16;
-extern ffi_type ffi_type_sint16;
-extern ffi_type ffi_type_uint32;
-extern ffi_type ffi_type_sint32;
-extern ffi_type ffi_type_uint64;
-extern ffi_type ffi_type_sint64;
-extern ffi_type ffi_type_float;
-extern ffi_type ffi_type_double;
-extern ffi_type ffi_type_pointer;
-
-#if 1
-extern ffi_type ffi_type_longdouble;
-#else
-#define ffi_type_longdouble ffi_type_double
-#endif
-#endif /* LIBFFI_HIDE_BASIC_TYPES */
-
-typedef enum {
-  FFI_OK = 0,
-  FFI_BAD_TYPEDEF,
-  FFI_BAD_ABI
-} ffi_status;
-
-typedef unsigned FFI_TYPE;
-
-typedef struct {
-  ffi_abi abi;
-  unsigned nargs;
-  ffi_type **arg_types;
-  ffi_type *rtype;
-  unsigned bytes;
-  unsigned flags;
-#ifdef FFI_EXTRA_CIF_FIELDS
-  FFI_EXTRA_CIF_FIELDS;
-#endif
-} ffi_cif;
-
-/* ---- Definitions for the raw API -------------------------------------- */
-
-#ifndef FFI_SIZEOF_ARG
-# if LONG_MAX == 2147483647
-#  define FFI_SIZEOF_ARG        4
-# elif LONG_MAX == 9223372036854775807
-#  define FFI_SIZEOF_ARG        8
-# endif
-#endif
-
-#ifndef FFI_SIZEOF_JAVA_RAW
-#  define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
-#endif
-
-typedef union {
-  ffi_sarg  sint;
-  ffi_arg   uint;
-  float            flt;
-  char      data[FFI_SIZEOF_ARG];
-  void*     ptr;
-} ffi_raw;
-
-#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
-/* This is a special case for mips64/n32 ABI (and perhaps others) where
-   sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8.  */
-typedef union {
-  signed int   sint;
-  unsigned int uint;
-  float                flt;
-  char         data[FFI_SIZEOF_JAVA_RAW];
-  void*                ptr;
-} ffi_java_raw;
-#else
-typedef ffi_raw ffi_java_raw;
-#endif
-
-
-void ffi_raw_call (ffi_cif *cif,
-                  void (*fn)(void),
-                  void *rvalue,
-                  ffi_raw *avalue);
-
-void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
-void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
-size_t ffi_raw_size (ffi_cif *cif);
-
-/* This is analogous to the raw API, except it uses Java parameter     */
-/* packing, even on 64-bit machines.  I.e. on 64-bit machines          */
-/* longs and doubles are followed by an empty 64-bit word.             */
-
-void ffi_java_raw_call (ffi_cif *cif,
-                       void (*fn)(void),
-                       void *rvalue,
-                       ffi_java_raw *avalue);
-
-void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
-void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
-size_t ffi_java_raw_size (ffi_cif *cif);
-
-/* ---- Definitions for closures ----------------------------------------- */
-
-#if FFI_CLOSURES
-
-typedef struct {
-  char tramp[FFI_TRAMPOLINE_SIZE];
-  ffi_cif   *cif;
-  void     (*fun)(ffi_cif*,void*,void**,void*);
-  void      *user_data;
-#ifdef __GNUC__
-} ffi_closure __attribute__((aligned (8)));
-#else
-} ffi_closure;
-#endif
-
-void *ffi_closure_alloc (size_t size, void **code);
-void ffi_closure_free (void *);
-
-ffi_status
-ffi_prep_closure (ffi_closure*,
-                 ffi_cif *,
-                 void (*fun)(ffi_cif*,void*,void**,void*),
-                 void *user_data);
-
-ffi_status
-ffi_prep_closure_loc (ffi_closure*,
-                     ffi_cif *,
-                     void (*fun)(ffi_cif*,void*,void**,void*),
-                     void *user_data,
-                     void*codeloc);
-
-typedef struct {
-  char tramp[FFI_TRAMPOLINE_SIZE];
-
-  ffi_cif   *cif;
-
-#if !FFI_NATIVE_RAW_API
-
-  /* if this is enabled, then a raw closure has the same layout 
-     as a regular closure.  We use this to install an intermediate 
-     handler to do the transaltion, void** -> ffi_raw*. */
-
-  void     (*translate_args)(ffi_cif*,void*,void**,void*);
-  void      *this_closure;
-
-#endif
-
-  void     (*fun)(ffi_cif*,void*,ffi_raw*,void*);
-  void      *user_data;
-
-} ffi_raw_closure;
-
-typedef struct {
-  char tramp[FFI_TRAMPOLINE_SIZE];
-
-  ffi_cif   *cif;
-
-#if !FFI_NATIVE_RAW_API
-
-  /* if this is enabled, then a raw closure has the same layout 
-     as a regular closure.  We use this to install an intermediate 
-     handler to do the transaltion, void** -> ffi_raw*. */
-
-  void     (*translate_args)(ffi_cif*,void*,void**,void*);
-  void      *this_closure;
-
-#endif
-
-  void     (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
-  void      *user_data;
-
-} ffi_java_raw_closure;
-
-ffi_status
-ffi_prep_raw_closure (ffi_raw_closure*,
-                     ffi_cif *cif,
-                     void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
-                     void *user_data);
-
-ffi_status
-ffi_prep_raw_closure_loc (ffi_raw_closure*,
-                         ffi_cif *cif,
-                         void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
-                         void *user_data,
-                         void *codeloc);
-
-ffi_status
-ffi_prep_java_raw_closure (ffi_java_raw_closure*,
-                          ffi_cif *cif,
-                          void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
-                          void *user_data);
-
-ffi_status
-ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
-                              ffi_cif *cif,
-                              void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
-                              void *user_data,
-                              void *codeloc);
-
-#endif /* FFI_CLOSURES */
-
-/* ---- Public interface definition -------------------------------------- */
-
-ffi_status ffi_prep_cif(ffi_cif *cif,
-                       ffi_abi abi,
-                       unsigned int nargs,
-                       ffi_type *rtype,
-                       ffi_type **atypes);
-
-void ffi_call(ffi_cif *cif,
-             void (*fn)(void),
-             void *rvalue,
-             void **avalue);
-
-/* Useful for eliminating compiler warnings */
-#define FFI_FN(f) ((void (*)(void))f)
-
-/* ---- Definitions shared with assembly code ---------------------------- */
-
-#endif
-
-/* If these change, update src/mips/ffitarget.h. */
-#define FFI_TYPE_VOID       0    
-#define FFI_TYPE_INT        1
-#define FFI_TYPE_FLOAT      2    
-#define FFI_TYPE_DOUBLE     3
-#if 1
-#define FFI_TYPE_LONGDOUBLE 4
-#else
-#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
-#endif
-#define FFI_TYPE_UINT8      5   
-#define FFI_TYPE_SINT8      6
-#define FFI_TYPE_UINT16     7 
-#define FFI_TYPE_SINT16     8
-#define FFI_TYPE_UINT32     9
-#define FFI_TYPE_SINT32     10
-#define FFI_TYPE_UINT64     11
-#define FFI_TYPE_SINT64     12
-#define FFI_TYPE_STRUCT     13
-#define FFI_TYPE_POINTER    14
-
-/* This should always refer to the last type code (for sanity checks) */
-#define FFI_TYPE_LAST       FFI_TYPE_POINTER
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/3rdparty/ffi-arm/ffi.pro b/src/3rdparty/ffi-arm/ffi.pro
deleted file mode 100644 (file)
index 1e91062..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = lib
-TARGET = ffi
-DESTDIR=$$PWD/../../../lib/
-
-CONFIG -= qt
-CONFIG += shared
-
-SOURCES =  ffi.c \
-          prep_cif.c \
-          types.c \
-          sysv.S
-
-OBJECTS_DIR = .obj
diff --git a/src/3rdparty/ffi-arm/ffi_common.h b/src/3rdparty/ffi-arm/ffi_common.h
deleted file mode 100644 (file)
index 42cace9..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -----------------------------------------------------------------------
-   ffi_common.h - Copyright (c) 1996  Red Hat, Inc.
-   Copyright (C) 2007 Free Software Foundation, Inc
-
-   Common internal definitions and macros. Only necessary for building
-   libffi.
-   ----------------------------------------------------------------------- */
-
-#ifndef FFI_COMMON_H
-#define FFI_COMMON_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <fficonfig.h>
-
-/* Do not move this. Some versions of AIX are very picky about where
-   this is positioned. */
-#ifdef __GNUC__
-/* mingw64 defines this already in malloc.h. */
-#ifndef alloca
-# define alloca __builtin_alloca
-#endif
-# define MAYBE_UNUSED __attribute__((__unused__))
-#else
-# define MAYBE_UNUSED
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
-# else
-#  ifdef _AIX
- #pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-#    ifdef _MSC_VER
-#     define alloca _alloca
-#    else
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-/* Check for the existence of memcpy. */
-#if STDC_HEADERS
-# include <string.h>
-#else
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#if defined(FFI_DEBUG)
-#include <stdio.h>
-#endif
-
-#ifdef FFI_DEBUG
-void ffi_assert(char *expr, char *file, int line);
-void ffi_stop_here(void);
-void ffi_type_test(ffi_type *a, char *file, int line);
-
-#define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__))
-#define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l)))
-#define FFI_ASSERT_VALID_TYPE(x) ffi_type_test (x, __FILE__, __LINE__)
-#else
-#define FFI_ASSERT(x)
-#define FFI_ASSERT_AT(x, f, l)
-#define FFI_ASSERT_VALID_TYPE(x)
-#endif
-
-#define ALIGN(v, a)  (((((size_t) (v))-1) | ((a)-1))+1)
-#define ALIGN_DOWN(v, a) (((size_t) (v)) & -a)
-
-/* Perform machine dependent cif processing */
-ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
-
-/* Extended cif, used in callback from assembly routine */
-typedef struct
-{
-  ffi_cif *cif;
-  void *rvalue;
-  void **avalue;
-} extended_cif;
-
-/* Terse sized type definitions.  */
-#if defined(_MSC_VER) || defined(__sgi)
-typedef unsigned char UINT8;
-typedef signed char   SINT8;
-typedef unsigned short UINT16;
-typedef signed short   SINT16;
-typedef unsigned int UINT32;
-typedef signed int   SINT32;
-# ifdef _MSC_VER
-typedef unsigned __int64 UINT64;
-typedef signed __int64   SINT64;
-# else
-# include <inttypes.h>
-typedef uint64_t UINT64;
-typedef int64_t  SINT64;
-# endif
-#else
-typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
-typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
-typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
-typedef signed int   SINT16 __attribute__((__mode__(__HI__)));
-typedef unsigned int UINT32 __attribute__((__mode__(__SI__)));
-typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
-typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
-typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
-#endif
-
-typedef float FLOAT32;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
diff --git a/src/3rdparty/ffi-arm/fficonfig.h b/src/3rdparty/ffi-arm/fficonfig.h
deleted file mode 100644 (file)
index 61b3a1d..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/* fficonfig.h.  Generated from fficonfig.h.in by configure.  */
-/* fficonfig.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
-/* #undef C_ALLOCA */
-
-/* Define to the flags needed for the .section .eh_frame directive. */
-#define EH_FRAME_FLAGS "a"
-
-/* Define this if you want extra debugging. */
-/* #undef FFI_DEBUG */
-
-/* Cannot use malloc on this target, so, we revert to alternative means */
-/* #undef FFI_MMAP_EXEC_WRIT */
-
-/* Define this is you do not want support for the raw API. */
-/* #undef FFI_NO_RAW_API */
-
-/* Define this is you do not want support for aggregate types. */
-/* #undef FFI_NO_STRUCTS */
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
-#define HAVE_ALLOCA_H 1
-
-/* Define if your assembler supports .cfi_* directives. */
-#define HAVE_AS_CFI_PSEUDO_OP 1
-
-/* Define if your assembler supports .register. */
-/* #undef HAVE_AS_REGISTER_PSEUDO_OP */
-
-/* Define if your assembler and linker support unaligned PC relative relocs.
-   */
-/* #undef HAVE_AS_SPARC_UA_PCREL */
-
-/* Define if your assembler supports PC relative relocs. */
-/* #undef HAVE_AS_X86_PCREL */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define if __attribute__((visibility("hidden"))) is supported. */
-#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if you have the long double type and it is bigger than a double */
-#define HAVE_LONG_DOUBLE 1
-
-/* Define to 1 if you have the `memcpy' function. */
-#define HAVE_MEMCPY 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mmap' function. */
-#define HAVE_MMAP 1
-
-/* Define if mmap with MAP_ANON(YMOUS) works. */
-#define HAVE_MMAP_ANON 1
-
-/* Define if mmap of /dev/zero works. */
-#define HAVE_MMAP_DEV_ZERO 1
-
-/* Define if read-only mmap of a plain file works. */
-#define HAVE_MMAP_FILE 1
-
-/* Define if .eh_frame sections should be read-only. */
-#define HAVE_RO_EH_FRAME 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-/* #undef NO_MINUS_C_MINUS_O */
-
-/* Name of package */
-#define PACKAGE "libffi"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "http://gcc.gnu.org/bugs.html"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libffi"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libffi 3.0.9"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libffi"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "3.0.9"
-
-/* The size of `double', as computed by sizeof. */
-#define SIZEOF_DOUBLE 8
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 12
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at runtime.
-       STACK_DIRECTION > 0 => grows toward higher addresses
-       STACK_DIRECTION < 0 => grows toward lower addresses
-       STACK_DIRECTION = 0 => direction of growth unknown */
-/* #undef STACK_DIRECTION */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define this if you are using Purify and want to suppress spurious messages.
-   */
-/* #undef USING_PURIFY */
-
-/* Version number of package */
-#define VERSION "3.0.9"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-
-#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
-#ifdef LIBFFI_ASM
-#define FFI_HIDDEN(name) .hidden name
-#else
-#define FFI_HIDDEN __attribute__ ((visibility ("hidden")))
-#endif
-#else
-#ifdef LIBFFI_ASM
-#define FFI_HIDDEN(name)
-#else
-#define FFI_HIDDEN
-#endif
-#endif
-
diff --git a/src/3rdparty/ffi-arm/ffitarget.h b/src/3rdparty/ffi-arm/ffitarget.h
deleted file mode 100644 (file)
index a957426..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -----------------------------------------------------------------*-C-*-
-   ffitarget.h - Copyright (c) 1996-2003  Red Hat, Inc.
-   Target configuration macros for ARM.
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-
-   ----------------------------------------------------------------------- */
-
-#ifndef LIBFFI_TARGET_H
-#define LIBFFI_TARGET_H
-
-#ifndef LIBFFI_ASM
-typedef unsigned long          ffi_arg;
-typedef signed long            ffi_sarg;
-
-typedef enum ffi_abi {
-  FFI_FIRST_ABI = 0,
-  FFI_SYSV,
-  FFI_DEFAULT_ABI = FFI_SYSV,
-  FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
-} ffi_abi;
-#endif
-
-/* ---- Definitions for closures ----------------------------------------- */
-
-#define FFI_CLOSURES 1
-#define FFI_TRAMPOLINE_SIZE 20
-#define FFI_NATIVE_RAW_API 0
-
-#endif
-
diff --git a/src/3rdparty/ffi-arm/prep_cif.c b/src/3rdparty/ffi-arm/prep_cif.c
deleted file mode 100644 (file)
index eb78f9a..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -----------------------------------------------------------------------
-   prep_cif.c - Copyright (c) 1996, 1998, 2007  Red Hat, Inc.
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-   ----------------------------------------------------------------------- */
-
-#include <ffi.h>
-#include <ffi_common.h>
-#include <stdlib.h>
-
-/* Round up to FFI_SIZEOF_ARG. */
-
-#define STACK_ARG_SIZE(x) ALIGN(x, FFI_SIZEOF_ARG)
-
-/* Perform machine independent initialization of aggregate type
-   specifications. */
-
-static ffi_status initialize_aggregate(ffi_type *arg)
-{
-  ffi_type **ptr;
-
-  FFI_ASSERT(arg != NULL);
-
-  FFI_ASSERT(arg->elements != NULL);
-  FFI_ASSERT(arg->size == 0);
-  FFI_ASSERT(arg->alignment == 0);
-
-  ptr = &(arg->elements[0]);
-
-  while ((*ptr) != NULL)
-    {
-      if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
-       return FFI_BAD_TYPEDEF;
-
-      /* Perform a sanity check on the argument type */
-      FFI_ASSERT_VALID_TYPE(*ptr);
-
-      arg->size = ALIGN(arg->size, (*ptr)->alignment);
-      arg->size += (*ptr)->size;
-
-      arg->alignment = (arg->alignment > (*ptr)->alignment) ?
-       arg->alignment : (*ptr)->alignment;
-
-      ptr++;
-    }
-
-  /* Structure size includes tail padding.  This is important for
-     structures that fit in one register on ABIs like the PowerPC64
-     Linux ABI that right justify small structs in a register.
-     It's also needed for nested structure layout, for example
-     struct A { long a; char b; }; struct B { struct A x; char y; };
-     should find y at an offset of 2*sizeof(long) and result in a
-     total size of 3*sizeof(long).  */
-  arg->size = ALIGN (arg->size, arg->alignment);
-
-  if (arg->size == 0)
-    return FFI_BAD_TYPEDEF;
-  else
-    return FFI_OK;
-}
-
-#ifndef __CRIS__
-/* The CRIS ABI specifies structure elements to have byte
-   alignment only, so it completely overrides this functions,
-   which assumes "natural" alignment and padding.  */
-
-/* Perform machine independent ffi_cif preparation, then call
-   machine dependent routine. */
-
-ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
-                       ffi_type *rtype, ffi_type **atypes)
-{
-  unsigned bytes = 0;
-  unsigned int i;
-  ffi_type **ptr;
-
-  FFI_ASSERT(cif != NULL);
-  FFI_ASSERT((abi > FFI_FIRST_ABI) && (abi <= FFI_DEFAULT_ABI));
-
-  cif->abi = abi;
-  cif->arg_types = atypes;
-  cif->nargs = nargs;
-  cif->rtype = rtype;
-
-  cif->flags = 0;
-
-  /* Initialize the return type if necessary */
-  if ((cif->rtype->size == 0) && (initialize_aggregate(cif->rtype) != FFI_OK))
-    return FFI_BAD_TYPEDEF;
-
-  /* Perform a sanity check on the return type */
-  FFI_ASSERT_VALID_TYPE(cif->rtype);
-
-  /* x86-64 and s390 stack space allocation is handled in prep_machdep.  */
-#if !defined M68K && !defined __x86_64__ && !defined S390 && !defined PA
-  /* Make space for the return structure pointer */
-  if (cif->rtype->type == FFI_TYPE_STRUCT
-#ifdef SPARC
-      && (cif->abi != FFI_V9 || cif->rtype->size > 32)
-#endif
-#ifdef X86_DARWIN
-      && (cif->rtype->size > 8)
-#endif
-     )
-    bytes = STACK_ARG_SIZE(sizeof(void*));
-#endif
-
-  for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
-    {
-
-      /* Initialize any uninitialized aggregate type definitions */
-      if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
-       return FFI_BAD_TYPEDEF;
-
-      /* Perform a sanity check on the argument type, do this
-        check after the initialization.  */
-      FFI_ASSERT_VALID_TYPE(*ptr);
-
-#if !defined __x86_64__ && !defined S390 && !defined PA
-#ifdef SPARC
-      if (((*ptr)->type == FFI_TYPE_STRUCT
-          && ((*ptr)->size > 16 || cif->abi != FFI_V9))
-         || ((*ptr)->type == FFI_TYPE_LONGDOUBLE
-             && cif->abi != FFI_V9))
-       bytes += sizeof(void*);
-      else
-#endif
-       {
-         /* Add any padding if necessary */
-         if (((*ptr)->alignment - 1) & bytes)
-           bytes = ALIGN(bytes, (*ptr)->alignment);
-
-         bytes += STACK_ARG_SIZE((*ptr)->size);
-       }
-#endif
-    }
-
-  cif->bytes = bytes;
-
-  /* Perform machine dependent cif processing */
-  return ffi_prep_cif_machdep(cif);
-}
-#endif /* not __CRIS__ */
-
-#if FFI_CLOSURES
-
-ffi_status
-ffi_prep_closure (ffi_closure* closure,
-                 ffi_cif* cif,
-                 void (*fun)(ffi_cif*,void*,void**,void*),
-                 void *user_data)
-{
-  return ffi_prep_closure_loc (closure, cif, fun, user_data, closure);
-}
-
-#endif
diff --git a/src/3rdparty/ffi-arm/sysv.S b/src/3rdparty/ffi-arm/sysv.S
deleted file mode 100644 (file)
index 4c289c6..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -----------------------------------------------------------------------
-   sysv.S - Copyright (c) 1998, 2008 Red Hat, Inc.
-   
-   ARM Foreign Function Interface 
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-   ----------------------------------------------------------------------- */
-
-#define LIBFFI_ASM     
-#include <fficonfig.h>
-#include <ffi.h>
-#ifdef HAVE_MACHINE_ASM_H
-#include <machine/asm.h>
-#else
-#ifdef __USER_LABEL_PREFIX__
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels.  */
-#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-#else
-#define CNAME(x) x
-#endif
-#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
-#endif
-
-#ifdef __ELF__
-#define LSYM(x) .x
-#else
-#define LSYM(x) x
-#endif
-
-/* We need a better way of testing for this, but for now, this is all 
-   we can do.  */
-@ This selects the minimum architecture level required.
-#define __ARM_ARCH__ 3
-
-#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
-# undef __ARM_ARCH__
-# define __ARM_ARCH__ 4
-#endif
-        
-#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
-       || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
-       || defined(__ARM_ARCH_5TEJ__)
-# undef __ARM_ARCH__
-# define __ARM_ARCH__ 5
-#endif
-
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
-        || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
-        || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
-       || defined(__ARM_ARCH_6M__)
-# undef __ARM_ARCH__
-# define __ARM_ARCH__ 6
-#endif
-
-#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
-        || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
-# undef __ARM_ARCH__
-# define __ARM_ARCH__ 7
-#endif
-
-#if __ARM_ARCH__ >= 5
-# define call_reg(x)   blx     x
-#elif defined (__ARM_ARCH_4T__)
-# define call_reg(x)   mov     lr, pc ; bx     x
-# if defined(__thumb__) || defined(__THUMB_INTERWORK__)
-#  define __INTERWORKING__
-# endif
-#else
-# define call_reg(x)   mov     lr, pc ; mov    pc, x
-#endif
-
-/* Conditionally compile unwinder directives.  */
-#ifdef __ARM_EABI__
-#define UNWIND
-#else
-#define UNWIND @
-#endif 
-
-       
-#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
-.macro ARM_FUNC_START name
-       .text
-       .align 0
-       .thumb
-       .thumb_func
-       ENTRY(\name)
-       bx      pc
-       nop
-       .arm
-       UNWIND .fnstart
-/* A hook to tell gdb that we've switched to ARM mode.  Also used to call
-   directly from other local arm routines.  */
-_L__\name:             
-.endm
-#else
-.macro ARM_FUNC_START name
-       .text
-       .align 0
-       .arm
-       ENTRY(\name)
-       UNWIND .fnstart
-.endm
-#endif
-
-.macro RETLDM  regs=, cond=, dirn=ia
-#if defined (__INTERWORKING__)
-       .ifc "\regs",""
-       ldr\cond        lr, [sp], #4
-       .else
-       ldm\cond\dirn   sp!, {\regs, lr}
-       .endif
-       bx\cond lr
-#else
-       .ifc "\regs",""
-       ldr\cond        pc, [sp], #4
-       .else
-       ldm\cond\dirn   sp!, {\regs, pc}
-       .endif
-#endif
-.endm
-
-
-       @ r0:   ffi_prep_args
-       @ r1:   &ecif
-       @ r2:   cif->bytes
-       @ r3:   fig->flags
-       @ sp+0: ecif.rvalue
-       @ sp+4: fn
-
-       @ This assumes we are using gas.
-ARM_FUNC_START ffi_call_SYSV
-       @ Save registers
-        stmfd  sp!, {r0-r3, fp, lr}
-       UNWIND .save    {r0-r3, fp, lr}
-       mov     fp, sp
-
-       UNWIND .setfp   fp, sp
-
-       @ Make room for all of the new args.
-       sub     sp, fp, r2
-
-       @ Place all of the ffi_prep_args in position
-       mov     ip, r0
-       mov     r0, sp
-       @     r1 already set
-
-       @ Call ffi_prep_args(stack, &ecif)
-       call_reg(ip)
-
-       @ move first 4 parameters in registers
-       ldmia   sp, {r0-r3}
-
-       @ and adjust stack
-       ldr     ip, [fp, #8]
-        cmp    ip, #16
-       movhs   ip, #16
-        add    sp, sp, ip
-
-       @ call (fn) (...)
-       ldr     ip, [fp, #28]
-       call_reg(ip)
-       
-       @ Remove the space we pushed for the args
-       mov     sp, fp
-
-       @ Load r2 with the pointer to storage for the return value
-       ldr     r2, [sp, #24]
-
-       @ Load r3 with the return type code 
-       ldr     r3, [sp, #12]
-
-       @ If the return value pointer is NULL, assume no return value.
-       cmp     r2, #0
-       beq     LSYM(Lepilogue)
-
-@ return INT
-       cmp     r3, #FFI_TYPE_INT
-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
-       cmpne   r3, #FFI_TYPE_FLOAT
-#endif
-       streq   r0, [r2]
-       beq     LSYM(Lepilogue)
-
-       @ return INT64
-       cmp     r3, #FFI_TYPE_SINT64
-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
-       cmpne   r3, #FFI_TYPE_DOUBLE
-#endif
-       stmeqia r2, {r0, r1}
-
-#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
-       beq     LSYM(Lepilogue)
-
-@ return FLOAT
-       cmp     r3, #FFI_TYPE_FLOAT
-       stfeqs  f0, [r2]
-       beq     LSYM(Lepilogue)
-
-@ return DOUBLE or LONGDOUBLE
-       cmp     r3, #FFI_TYPE_DOUBLE
-       stfeqd  f0, [r2]
-#endif
-
-LSYM(Lepilogue):
-       RETLDM  "r0-r3,fp"
-
-.ffi_call_SYSV_end:
-       UNWIND .fnend
-        .size    CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
-
-/*
-       unsigned int FFI_HIDDEN
-       ffi_closure_SYSV_inner (closure, respp, args)
-            ffi_closure *closure;
-            void **respp;
-            void *args;
-*/
-
-ARM_FUNC_START ffi_closure_SYSV
-       UNWIND .pad #16
-       add     ip, sp, #16
-       stmfd   sp!, {ip, lr}
-       UNWIND .save    {r0, lr}
-       add     r2, sp, #8
-       .pad #16
-       sub     sp, sp, #16
-       str     sp, [sp, #8]
-       add     r1, sp, #8
-       bl      ffi_closure_SYSV_inner
-       cmp     r0, #FFI_TYPE_INT
-       beq     .Lretint
-
-       cmp     r0, #FFI_TYPE_FLOAT
-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
-       beq     .Lretint
-#else
-       beq     .Lretfloat
-#endif
-
-       cmp     r0, #FFI_TYPE_DOUBLE
-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
-       beq     .Lretlonglong
-#else
-       beq     .Lretdouble
-#endif
-
-       cmp     r0, #FFI_TYPE_LONGDOUBLE
-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
-       beq     .Lretlonglong
-#else
-       beq     .Lretlongdouble
-#endif
-
-       cmp     r0, #FFI_TYPE_SINT64
-       beq     .Lretlonglong
-.Lclosure_epilogue:
-       add     sp, sp, #16
-       ldmfd   sp, {sp, pc}
-.Lretint:
-       ldr     r0, [sp]
-       b       .Lclosure_epilogue
-.Lretlonglong:
-       ldr     r0, [sp]
-       ldr     r1, [sp, #4]
-       b       .Lclosure_epilogue
-
-#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
-.Lretfloat:
-       ldfs    f0, [sp]
-       b       .Lclosure_epilogue
-.Lretdouble:
-       ldfd    f0, [sp]
-       b       .Lclosure_epilogue
-.Lretlongdouble:
-       ldfd    f0, [sp]
-       b       .Lclosure_epilogue
-#endif
-
-.ffi_closure_SYSV_end:
-       UNWIND .fnend
-        .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
-
-#if defined __ELF__ && defined __linux__
-       .section        .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/3rdparty/ffi-arm/types.c b/src/3rdparty/ffi-arm/types.c
deleted file mode 100644 (file)
index 0a11eb0..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -----------------------------------------------------------------------
-   types.c - Copyright (c) 1996, 1998  Red Hat, Inc.
-   
-   Predefined ffi_types needed by libffi.
-
-   Permission is hereby granted, free of charge, to any person obtaining
-   a copy of this software and associated documentation files (the
-   ``Software''), to deal in the Software without restriction, including
-   without limitation the rights to use, copy, modify, merge, publish,
-   distribute, sublicense, and/or sell copies of the Software, and to
-   permit persons to whom the Software is furnished to do so, subject to
-   the following conditions:
-
-   The above copyright notice and this permission notice shall be included
-   in all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
-   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-   NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-   DEALINGS IN THE SOFTWARE.
-   ----------------------------------------------------------------------- */
-
-/* Hide the basic type definitions from the header file, so that we
-   can redefine them here as "const".  */
-#define LIBFFI_HIDE_BASIC_TYPES
-
-#include <ffi.h>
-#include <ffi_common.h>
-
-/* Type definitions */
-
-#define FFI_TYPEDEF(name, type, id)            \
-struct struct_align_##name {                   \
-  char c;                                      \
-  type x;                                      \
-};                                             \
-const ffi_type ffi_type_##name = {             \
-  sizeof(type),                                        \
-  offsetof(struct struct_align_##name, x),     \
-  id, NULL                                     \
-}
-
-/* Size and alignment are fake here. They must not be 0. */
-const ffi_type ffi_type_void = {
-  1, 1, FFI_TYPE_VOID, NULL
-};
-
-FFI_TYPEDEF(uint8, UINT8, FFI_TYPE_UINT8);
-FFI_TYPEDEF(sint8, SINT8, FFI_TYPE_SINT8);
-FFI_TYPEDEF(uint16, UINT16, FFI_TYPE_UINT16);
-FFI_TYPEDEF(sint16, SINT16, FFI_TYPE_SINT16);
-FFI_TYPEDEF(uint32, UINT32, FFI_TYPE_UINT32);
-FFI_TYPEDEF(sint32, SINT32, FFI_TYPE_SINT32);
-FFI_TYPEDEF(uint64, UINT64, FFI_TYPE_UINT64);
-FFI_TYPEDEF(sint64, SINT64, FFI_TYPE_SINT64);
-
-FFI_TYPEDEF(pointer, void*, FFI_TYPE_POINTER);
-
-FFI_TYPEDEF(float, float, FFI_TYPE_FLOAT);
-FFI_TYPEDEF(double, double, FFI_TYPE_DOUBLE);
-
-#ifdef __alpha__
-/* Even if we're not configured to default to 128-bit long double, 
-   maintain binary compatibility, as -mlong-double-128 can be used
-   at any time.  */
-/* Validate the hard-coded number below.  */
-# if defined(__LONG_DOUBLE_128__) && FFI_TYPE_LONGDOUBLE != 4
-#  error FFI_TYPE_LONGDOUBLE out of date
-# endif
-const ffi_type ffi_type_longdouble = { 16, 16, 4, NULL };
-#elif FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE);
-#endif
diff --git a/src/3rdparty/wayland/wayland-drm-client-protocol.h b/src/3rdparty/wayland/wayland-drm-client-protocol.h
deleted file mode 100644 (file)
index 66ab7ba..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright © 2010 Kristian Høgsberg
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no representations
- * about the suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-
-#ifndef DRM_CLIENT_PROTOCOL_H
-#define DRM_CLIENT_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-util.h"
-
-struct wl_client;
-
-struct wl_drm;
-
-struct wl_proxy;
-
-extern void
-wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...);
-extern struct wl_proxy *
-wl_proxy_create(struct wl_proxy *factory,
-               const struct wl_interface *interface);
-extern struct wl_proxy *
-wl_proxy_create_for_id(struct wl_display *display,
-                      const struct wl_interface *interface, uint32_t id);
-extern void
-wl_proxy_destroy(struct wl_proxy *proxy);
-
-extern int
-wl_proxy_add_listener(struct wl_proxy *proxy,
-                     void (**implementation)(void), void *data);
-
-extern void
-wl_proxy_set_user_data(struct wl_proxy *proxy, void *user_data);
-
-extern void *
-wl_proxy_get_user_data(struct wl_proxy *proxy);
-
-extern const struct wl_interface wl_drm_interface;
-
-struct wl_drm_listener {
-       void (*device)(void *data,
-                      struct wl_drm *drm,
-                      const char *name);
-       void (*authenticated)(void *data,
-                             struct wl_drm *drm);
-};
-
-static inline int
-wl_drm_add_listener(struct wl_drm *drm,
-                   const struct wl_drm_listener *listener, void *data)
-{
-       return wl_proxy_add_listener((struct wl_proxy *) drm,
-                                    (void (**)(void)) listener, data);
-}
-
-#define WL_DRM_AUTHENTICATE    0
-#define WL_DRM_CREATE_BUFFER   1
-
-static inline struct wl_drm *
-wl_drm_create(struct wl_display *display, uint32_t id)
-{
-       return (struct wl_drm *)
-               wl_proxy_create_for_id(display, &wl_drm_interface, id);
-}
-
-static inline void
-wl_drm_set_user_data(struct wl_drm *drm, void *user_data)
-{
-       wl_proxy_set_user_data((struct wl_proxy *) drm, user_data);
-}
-
-static inline void *
-wl_drm_get_user_data(struct wl_drm *drm)
-{
-       return wl_proxy_get_user_data((struct wl_proxy *) drm);
-}
-
-static inline void
-wl_drm_destroy(struct wl_drm *drm)
-{
-       wl_proxy_destroy((struct wl_proxy *) drm);
-}
-
-static inline void
-wl_drm_authenticate(struct wl_drm *drm, uint32_t id)
-{
-       wl_proxy_marshal((struct wl_proxy *) drm,
-                        WL_DRM_AUTHENTICATE, id);
-}
-
-static inline struct wl_buffer *
-wl_drm_create_buffer(struct wl_drm *drm, uint32_t name, int width, int height, uint32_t stride, struct wl_visual *visual)
-{
-       struct wl_proxy *id;
-
-       id = wl_proxy_create((struct wl_proxy *) drm,
-                            &wl_buffer_interface);
-       if (!id)
-               return NULL;
-
-       wl_proxy_marshal((struct wl_proxy *) drm,
-                        WL_DRM_CREATE_BUFFER, id, name, width, height, stride, visual);
-
-       return (struct wl_buffer *) id;
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/3rdparty/wayland/wayland-drm-protocol.c b/src/3rdparty/wayland/wayland-drm-protocol.c
deleted file mode 100644 (file)
index f69318e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright © 2010 Kristian Høgsberg
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no representations
- * about the suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-static const struct wl_message drm_requests[] = {
-       { "authenticate", "u" },
-       { "create_buffer", "nuiiuo" },
-};
-
-static const struct wl_message drm_events[] = {
-       { "device", "s" },
-       { "authenticated", "" },
-};
-
-WL_EXPORT const struct wl_interface wl_drm_interface = {
-       "drm", 1,
-       ARRAY_LENGTH(drm_requests), drm_requests,
-       ARRAY_LENGTH(drm_events), drm_events,
-};
-
diff --git a/src/3rdparty/wayland/wayland-drm-server-protocol.h b/src/3rdparty/wayland/wayland-drm-server-protocol.h
deleted file mode 100644 (file)
index 1b9f117..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright © 2010 Kristian Høgsberg
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no representations
- * about the suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-
-#ifndef DRM_SERVER_PROTOCOL_H
-#define DRM_SERVER_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-util.h"
-
-struct wl_client;
-
-struct wl_drm;
-
-extern const struct wl_interface wl_drm_interface;
-
-struct wl_drm_interface {
-       void (*authenticate)(struct wl_client *client,
-                            struct wl_drm *drm,
-                            uint32_t id);
-       void (*create_buffer)(struct wl_client *client,
-                             struct wl_drm *drm,
-                             uint32_t id,
-                             uint32_t name,
-                             int width,
-                             int height,
-                             uint32_t stride,
-                             struct wl_visual *visual);
-};
-
-#define WL_DRM_DEVICE  0
-#define WL_DRM_AUTHENTICATED   1
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
index fdb65b3..1b75364 100644 (file)
@@ -8,4 +8,4 @@ HEADERS += \
     $$PWD/brcmeglintegration.h \
     $$PWD/brcmbuffer.h
 
-WAYLANDSOURCES += $$PWD/../../../../extensions/brcm.xml
+WAYLANDSOURCES += $$PWD/../../../extensions/brcm.xml
index 6fe78c5..631ddaf 100644 (file)
@@ -1,6 +1,6 @@
 INCLUDEPATH += $$PWD
 
-WAYLANDSOURCES += $$PWD/../../../../extensions/xcomposite.xml
+WAYLANDSOURCES += $$PWD/../../../extensions/xcomposite.xml
 
 HEADERS += \
     $$PWD/xcompositebuffer.h \
index d64a235..84008c6 100644 (file)
@@ -1,9 +1,9 @@
 WAYLANDSOURCES += \
-                $$PWD/../../../extensions/surface-extension.xml \
-                $$PWD/../../../extensions/sub-surface-extension.xml \
-                $$PWD/../../../extensions/output-extension.xml \
-                $$PWD/../../../extensions/touch-extension.xml \
-                $$PWD/../../../extensions/qtkey-extension.xml
+                $$PWD/../../extensions/surface-extension.xml \
+                $$PWD/../../extensions/sub-surface-extension.xml \
+                $$PWD/../../extensions/output-extension.xml \
+                $$PWD/../../extensions/touch-extension.xml \
+                $$PWD/../../extensions/qtkey-extension.xml
 
 
 HEADERS += \
index 5489dce..457080f 100644 (file)
@@ -1,6 +1,6 @@
 INCLUDEPATH += $$PWD
 
-WAYLANDSOURCES += $$PWD/../../../extensions/windowmanager.xml
+WAYLANDSOURCES += $$PWD/../../extensions/windowmanager.xml
 
 HEADERS += \
     $$PWD/waylandwindowmanagerintegration.h \
similarity index 100%
rename from extensions/brcm.xml
rename to src/extensions/brcm.xml
index 12b10d2..81b9be0 100644 (file)
@@ -8,4 +8,4 @@ HEADERS += $$PWD/qwaylandbrcmeglintegration.h \
            $$PWD/qwaylandbrcmglcontext.h \
            $$PWD/qwaylandbrcmeglwindow.h
 
-WAYLANDSOURCES += $$PWD/../../../../../../extensions/brcm.xml
+WAYLANDSOURCES += $$PWD/../../../../../extensions/brcm.xml
index b40dcf9..e5f74c4 100644 (file)
@@ -1,6 +1,6 @@
 INCLUDEPATH += $$PWD
 
-WAYLANDSOURCES += $$PWD/../../../../../../extensions/xcomposite.xml
+WAYLANDSOURCES += $$PWD/../../../../../extensions/xcomposite.xml
 
 HEADERS += \
     $$PWD/qwaylandxcompositebuffer.h
index f47f78c..4b52875 100644 (file)
@@ -71,11 +71,11 @@ config_xkbcommon {
 }
 
 WAYLANDSOURCES += \
-            $$PWD/../../../../extensions/surface-extension.xml \
-            $$PWD/../../../../extensions/sub-surface-extension.xml \
-            $$PWD/../../../../extensions/output-extension.xml \
-            $$PWD/../../../../extensions/touch-extension.xml \
-            $$PWD/../../../../extensions/qtkey-extension.xml
+            $$PWD/../../../extensions/surface-extension.xml \
+            $$PWD/../../../extensions/sub-surface-extension.xml \
+            $$PWD/../../../extensions/output-extension.xml \
+            $$PWD/../../../extensions/touch-extension.xml \
+            $$PWD/../../../extensions/qtkey-extension.xml
 
 
 OTHER_FILES += wayland.json
index ec1db1f..57905ad 100644 (file)
@@ -2,7 +2,7 @@ DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
 
 contains(DEFINES, QT_WAYLAND_WINDOWMANAGER_SUPPORT) {
 
-    WAYLANDSOURCES += $$PWD/../../../../../extensions/windowmanager.xml
+    WAYLANDSOURCES += $$PWD/../../../../extensions/windowmanager.xml
 
     HEADERS += \
         $$PWD/qwaylandwindowmanagerintegration.h
index 6e3ee38..f2e6d61 100644 (file)
@@ -1,2 +1,4 @@
 TEMPLATE=subdirs
+
 SUBDIRS += compositor plugins
+
diff --git a/wayland_sha1.txt b/wayland_sha1.txt
deleted file mode 100644 (file)
index dad1dd3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-This version of Qt-Compositor is checked against the following sha1 from the
-Wayland repository:
-1f521a4f7760df73e1d1d8a6791d1c7bf536584e