wayland: Changes to 'upstream-experimental'
README | 6 +++---
configure.ac | 4 ++--
doc/man/Makefile.am | 7 +++----
src/connection.c | 22 ++++++++++++++++++----
tests/queue-test.c | 5 +++--
tests/test-runner.c | 23 ++++++++++++++++++++++-
6 files changed, 51 insertions(+), 16 deletions(-)
New commits:
commit cf17fdf8b8cf7bb30eed31c9fedaee2a1b704501
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Thu Jan 24 20:33:31 2013 -0500
configure.ac: Bump version to 1.0.5
Also update the bug URL to point to the right component and version.
diff --git a/configure.ac b/configure.ac
index c281125..436d912 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,13 +2,13 @@ AC_PREREQ([2.64])
m4_define([wayland_major_version], [1])
m4_define([wayland_minor_version], [0])
-m4_define([wayland_micro_version], [4])
+m4_define([wayland_micro_version], [5])
m4_define([wayland_version],
[wayland_major_version.wayland_minor_version.wayland_micro_version])
AC_INIT([wayland],
[wayland_version],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=wayland],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.0.5],
[wayland],
[http://wayland.freedesktop.org/])
commit 0fb588ed15d255ac1a453269b56f427264084307
Author: Armin K <krejzi@email.com>
Date: Thu Feb 14 14:44:08 2013 -0500
Make sure that man page xml files are always disted
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 1407953..41665eb 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -12,15 +12,14 @@ MANPAGES_ALIASES = \
XML_FILES = \
${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}}
CLEANFILES =
-EXTRA_DIST =
-man_MANS =
+EXTRA_DIST = $(XML_FILES)
if HAVE_XSLTPROC
if HAVE_MANPAGES_STYLESHEET
CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
-EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
-man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
+EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES)
+dist_man_MANS = $(MANPAGES) $(MANPAGES_ALIASES)
XSLTPROC_FLAGS = \
--stringparam man.authors.section.enabled 0 \
commit 1c156209ce571268947b0c9be914beefddbeebda
Author: Siddharth Heroor <heroor@gmail.com>
Date: Thu Feb 14 10:59:15 2013 +0530
README: Fix typos
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
diff --git a/README b/README
index 5f85888..ca26cc0 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ What is Wayland
Wayland is a project to define a protocol for a compositor to talk to
its clients as well as a library implementation of the protocol. The
compositor can be a standalone display server running on Linux kernel
-modesetting and evdev input devices, an X applications, or a wayland
+modesetting and evdev input devices, an X application, or a wayland
client itself. The clients can be traditional applications, X servers
(rootless or fullscreen) or other display servers.
@@ -19,7 +19,7 @@ themselves, typically through cairo or OpenGL.
The weston compositor is a reference implementation of a wayland
compositor and the weston repository also includes a few example
-clients clients.
+clients.
Building the wayland libraries is fairly simple, aside from libffi,
they don't have many dependencies:
@@ -32,4 +32,4 @@ they don't have many dependencies:
where PREFIX is where you want to install the libraries. See
http://wayland.freedesktop.org for more complete build instructions
-for wayland, weston, xwayland and various toolkits.
\ No newline at end of file
+for wayland, weston, xwayland and various toolkits.
commit acf1efe1f4c03aead1bd74ca1d8a8c39363fd255
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Feb 11 13:58:39 2013 -0500
tests: Add a help message for the test runner
In case we forget the name of the test case or typo it, the test runner
will now list the test cases in the test binary.
diff --git a/tests/test-runner.c b/tests/test-runner.c
index 8c79dff..9c6865a 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -90,6 +90,24 @@ find_test(const char *name)
}
static void
+usage(const char *name, int status)
+{
+ const struct test *t;
+
+ fprintf(stderr, "Usage: %s [TEST]\n\n"
+ "With no arguments, run all test. Specify test case to run\n"
+ "only that test without forking. Available tests:\n\n",
+ name);
+
+ for (t = &__start_test_section; t < &__stop_test_section; t++)
+ fprintf(stderr, " %s\n", t->name);
+
+ fprintf(stderr, "\n");
+
+ exit(status);
+}
+
+static void
run_test(const struct test *t)
{
int cur_alloc = num_alloc;
@@ -119,11 +137,14 @@ int main(int argc, char *argv[])
leak_check_enabled = !getenv("NO_ASSERT_LEAK_CHECK");
+ if (argc == 2 && strcmp(argv[1], "--help") == 0)
+ usage(argv[0], EXIT_SUCCESS);
+
if (argc == 2) {
t = find_test(argv[1]);
if (t == NULL) {
fprintf(stderr, "unknown test: \"%s\"\n", argv[1]);
- exit(EXIT_FAILURE);
+ usage(argv[0], EXIT_FAILURE);
}
run_test(t);
commit a02fdef0d9a34d13927cff5707024366805a78c1
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Fri Feb 8 11:38:59 2013 -0500
queue-test: WEXITSTATUS() is undefined if WIFEXITED() is false
If a child process dies from a signal, WIFEXITED() returns false and
WEXITSTATUS() isn't well-defined. In this case, if the client segfaults,
the status is 134 and WEXITSTATUS(134) is EXIT_SUCCESS, so we mask the error.
diff --git a/tests/queue-test.c b/tests/queue-test.c
index 681ac24..3abb71f 100644
--- a/tests/queue-test.c
+++ b/tests/queue-test.c
@@ -212,7 +212,7 @@ sigchld_handler(int signal_number, void *data)
int status;
waitpid(-1, &status, 0);
- display->child_exit_status = WEXITSTATUS(status);
+ display->child_exit_status = status;
wl_display_terminate(display->display);
@@ -282,5 +282,6 @@ TEST(queue)
wl_event_source_remove(signal_source);
wl_display_destroy(display.display);
- assert(display.child_exit_status == EXIT_SUCCESS);
+ assert(WIFEXITED(display.child_exit_status) &&
+ WEXITSTATUS(display.child_exit_status) == EXIT_SUCCESS);
}
commit a98cfc029bd4ce9ce0b60c73ee192ec75273a8d5
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Mon Feb 4 07:07:17 2013 -0500
connection.c: Align pointer extra storage correctly
Most extra data are just pointers, but in case of fds we store an int in
the extra space. That can cause un-aligned access to pointers on 64 bit
architectures. Make sure we always align pointer storage correctly.
diff --git a/src/connection.c b/src/connection.c
index 141875e..8707d40 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -378,23 +378,28 @@ wl_connection_queue(struct wl_connection *connection,
return 0;
}
+#define ALIGN(p, s) (void *) ( ((intptr_t) (p) + ((s) - 1)) & ~((s) - 1) )
+
static int
wl_message_size_extra(const struct wl_message *message)
{
- int i, extra;
-
- for (i = 0, extra = 0; message->signature[i]; i++) {
+ char *extra;
+ int i;
+ for (i = 0, extra = NULL; message->signature[i]; i++) {
switch (message->signature[i]) {
case 's':
case 'o':
case 'n':
+ extra = ALIGN(extra, sizeof (void *));
extra += sizeof (void *);
break;
case 'a':
+ extra = ALIGN(extra, sizeof (void *));
extra += sizeof (void *) + sizeof (struct wl_array);
break;
case 'h':
+ extra = ALIGN(extra, sizeof (int));
extra += sizeof (int);
break;
default:
@@ -402,7 +407,7 @@ wl_message_size_extra(const struct wl_message *message)
}
}
- return extra;
+ return (intptr_t) extra;
}
static int
@@ -501,6 +506,7 @@ wl_closure_vmarshal(struct wl_object *sender,
*p++ = va_arg(ap, int32_t);
break;
case 's':
+ extra = ALIGN(extra, sizeof (void *));
closure->types[i] = &ffi_type_pointer;
closure->args[i] = extra;
sp = (const char **) extra;
@@ -527,6 +533,7 @@ wl_closure_vmarshal(struct wl_object *sender,
p += aligned / sizeof *p;
break;
case 'o':
+ extra = ALIGN(extra, sizeof (void *));
closure->types[i] = &ffi_type_pointer;
closure->args[i] = extra;
objectp = (struct wl_object **) extra;
@@ -557,6 +564,7 @@ wl_closure_vmarshal(struct wl_object *sender,
break;
case 'a':
+ extra = ALIGN(extra, sizeof (void *));
closure->types[i] = &ffi_type_pointer;
closure->args[i] = extra;
arrayp = (struct wl_array **) extra;
@@ -589,6 +597,7 @@ wl_closure_vmarshal(struct wl_object *sender,
break;
case 'h':
+ extra = ALIGN(extra, sizeof (int));
closure->types[i] = &ffi_type_sint;
closure->args[i] = extra;
fd_ptr = (int *) extra;
@@ -715,6 +724,7 @@ wl_connection_demarshal(struct wl_connection *connection,
goto err;
}
+ extra = ALIGN(extra, sizeof (void *));
s = (char **) extra;
extra += sizeof *s;
closure->args[i] = s;
@@ -736,6 +746,7 @@ wl_connection_demarshal(struct wl_connection *connection,
break;
case 'o':
closure->types[i] = &ffi_type_pointer;
+ extra = ALIGN(extra, sizeof (void *));
id = (uint32_t **) extra;
extra += sizeof *id;
closure->args[i] = id;
@@ -753,6 +764,7 @@ wl_connection_demarshal(struct wl_connection *connection,
break;
case 'n':
closure->types[i] = &ffi_type_pointer;
+ extra = ALIGN(extra, sizeof (void *));
id = (uint32_t **) extra;
extra += sizeof *id;
closure->args[i] = id;
@@ -789,6 +801,7 @@ wl_connection_demarshal(struct wl_connection *connection,
goto err;
}
+ extra = ALIGN(extra, sizeof (void *));
array = (struct wl_array **) extra;
extra += sizeof *array;
closure->args[i] = array;
@@ -804,6 +817,7 @@ wl_connection_demarshal(struct wl_connection *connection,
case 'h':
closure->types[i] = &ffi_type_sint;
+ extra = ALIGN(extra, sizeof (int));
fd = (int *) extra;
extra += sizeof *fd;
closure->args[i] = fd;
Reply to: