mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-14 20:41:20 +02:00
upgrade
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
||||
--- src/corelib/time/qtimezoneprivate_tz.cpp.orig 2020-09-12 18:44:11 UTC
|
||||
+++ src/corelib/time/qtimezoneprivate_tz.cpp
|
||||
@@ -1155,6 +1155,8 @@ class ZoneNameReader : public QObject (public)
|
||||
return m_name;
|
||||
|
||||
m_name = etcLocalTime();
|
||||
+ if (m_name.isEmpty())
|
||||
+ m_name = varDBZoneinfo();
|
||||
if (!m_name.isEmpty()) {
|
||||
m_last = local;
|
||||
return m_name;
|
||||
@@ -1203,6 +1205,27 @@ class ZoneNameReader : public QObject (public)
|
||||
return path.midRef(index + zoneinfo.size()).toUtf8();
|
||||
} while (!path.isEmpty() && --iteration > 0);
|
||||
|
||||
+ return QByteArray();
|
||||
+ }
|
||||
+
|
||||
+ static QByteArray varDBZoneinfo()
|
||||
+ {
|
||||
+ // On some FreeBSD systems, /etc/localtime is a regular file while
|
||||
+ // the actual name is in /var/db/zoneinfo
|
||||
+ QFile tzif(QStringLiteral("/var/db/zoneinfo"));
|
||||
+ if (tzif.open(QIODevice::ReadOnly)) {
|
||||
+ const int maximumTZNameLength = 256;
|
||||
+ QByteArray tzcontents( tzif.read( maximumTZNameLength ) );
|
||||
+ if (tzcontents.size() >= 2) {
|
||||
+ const int newlineIndex = tzcontents.indexOf('\n');
|
||||
+ if (newlineIndex < 0) // No newline in file
|
||||
+ return tzcontents;
|
||||
+ // Shortest TZ name in FreeBSD is "GB", "NZ" or "US"
|
||||
+ if (newlineIndex >= 2) // Newline, chop it off
|
||||
+ return tzcontents.left(newlineIndex);
|
||||
+ // Newline on position 0 or 1 is an invalid name
|
||||
+ }
|
||||
+ }
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--- src/corelib/time/qtimezoneprivate_tz.cpp.orig 2020-05-11 08:15:08 UTC
|
||||
+++ src/corelib/time/qtimezoneprivate_tz.cpp
|
||||
@@ -1153,6 +1153,25 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() cons
|
||||
}
|
||||
}
|
||||
|
||||
+ // On some FreeBSD systems, /etc/localtime is a regular file while
|
||||
+ // the actual name is in /var/db/zoneinfo
|
||||
+ if (ianaId.isEmpty()) {
|
||||
+ QFile tzif(QStringLiteral("/var/db/zoneinfo"));
|
||||
+ if (tzif.open(QIODevice::ReadOnly)) {
|
||||
+ const int maximumTZNameLength = 256;
|
||||
+ QByteArray tzcontents( tzif.read( maximumTZNameLength ) );
|
||||
+ if (tzcontents.size() >= 2) {
|
||||
+ // Shortest TZ would be UTC, or r/z, but there's special
|
||||
+ // cases "GB" and "US"
|
||||
+ const int newlineIndex = tzcontents.indexOf('\n');
|
||||
+ if (newlineIndex < 0) // No newline in file
|
||||
+ ianaId = tzcontents;
|
||||
+ if (newlineIndex > 2) // Newline, chop it off
|
||||
+ ianaId = tzcontents.left(newlineIndex);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
|
||||
if (ianaId.isEmpty()) {
|
||||
QFile zone(QStringLiteral("/etc/TZ"));
|
||||
@@ -1,28 +1,39 @@
|
||||
--- src/corelib/time/qtimezoneprivate_tz.cpp.orig 2020-05-11 08:15:08 UTC
|
||||
--- src/corelib/time/qtimezoneprivate_tz.cpp.orig 2020-09-12 18:44:11 UTC
|
||||
+++ src/corelib/time/qtimezoneprivate_tz.cpp
|
||||
@@ -1153,6 +1153,25 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() cons
|
||||
}
|
||||
}
|
||||
@@ -1155,6 +1155,8 @@ class ZoneNameReader : public QObject (public)
|
||||
return m_name;
|
||||
|
||||
+ // On some FreeBSD systems, /etc/localtime is a regular file while
|
||||
+ // the actual name is in /var/db/zoneinfo
|
||||
+ if (ianaId.isEmpty()) {
|
||||
m_name = etcLocalTime();
|
||||
+ if (m_name.isEmpty())
|
||||
+ m_name = varDBZoneinfo();
|
||||
if (!m_name.isEmpty()) {
|
||||
m_last = local;
|
||||
return m_name;
|
||||
@@ -1203,6 +1205,27 @@ class ZoneNameReader : public QObject (public)
|
||||
return path.midRef(index + zoneinfo.size()).toUtf8();
|
||||
} while (!path.isEmpty() && --iteration > 0);
|
||||
|
||||
+ return QByteArray();
|
||||
+ }
|
||||
+
|
||||
+ static QByteArray varDBZoneinfo()
|
||||
+ {
|
||||
+ // On some FreeBSD systems, /etc/localtime is a regular file while
|
||||
+ // the actual name is in /var/db/zoneinfo
|
||||
+ QFile tzif(QStringLiteral("/var/db/zoneinfo"));
|
||||
+ if (tzif.open(QIODevice::ReadOnly)) {
|
||||
+ const int maximumTZNameLength = 256;
|
||||
+ QByteArray tzcontents( tzif.read( maximumTZNameLength ) );
|
||||
+ if (tzcontents.size() >= 2) {
|
||||
+ // Shortest TZ would be UTC, or r/z, but there's special
|
||||
+ // cases "GB" and "US"
|
||||
+ const int newlineIndex = tzcontents.indexOf('\n');
|
||||
+ if (newlineIndex < 0) // No newline in file
|
||||
+ ianaId = tzcontents;
|
||||
+ if (newlineIndex > 2) // Newline, chop it off
|
||||
+ ianaId = tzcontents.left(newlineIndex);
|
||||
+ return tzcontents;
|
||||
+ // Shortest TZ name in FreeBSD is "GB", "NZ" or "US"
|
||||
+ if (newlineIndex >= 2) // Newline, chop it off
|
||||
+ return tzcontents.left(newlineIndex);
|
||||
+ // Newline on position 0 or 1 is an invalid name
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
|
||||
if (ianaId.isEmpty()) {
|
||||
QFile zone(QStringLiteral("/etc/TZ"));
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ COMMENT= PostgreSQL database design and management system
|
||||
|
||||
|
||||
LIB_DEPENDS+= libwx_baseu.so:xapp/libwxWidget
|
||||
USES+= pgsql
|
||||
#USES+= pgsql
|
||||
|
||||
RUN_DEPENDS+= gtk-update-icon-cache:gnome/libgtk2
|
||||
RUN_DEPENDS+= update-desktop-database:xfce/desktop-file-utils
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# $FreeBSD: head/graphics/wayland-protocols/Makefile 492698 2019-02-11 16:05:56Z zeising $
|
||||
|
||||
PORTNAME= wayland-protocols
|
||||
PORTVERSION= 1.17
|
||||
PORTVERSION= 1.20
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= https://wayland.freedesktop.org/releases/
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1542038372
|
||||
SHA256 (wayland-protocols-1.17.tar.xz) = df1319cf9705643aea9fd16f9056f4e5b2471bd10c0cc3713d4a4cdc23d6812f
|
||||
SIZE (wayland-protocols-1.17.tar.xz) = 107680
|
||||
TIMESTAMP = 1613891544
|
||||
SHA256 (wayland-protocols-1.20.tar.xz) = 9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7
|
||||
SIZE (wayland-protocols-1.20.tar.xz) = 111684
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# $FreeBSD: head/graphics/wayland/Makefile 490980 2019-01-22 20:51:38Z zeising $
|
||||
|
||||
PORTNAME= wayland
|
||||
PORTVERSION= 1.16.0
|
||||
PORTVERSION= 1.19.0
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= https://wayland.freedesktop.org/releases/
|
||||
|
||||
@@ -14,13 +14,16 @@ LIB_DEPENDS+= libffi.so:devel/libffi
|
||||
LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim
|
||||
|
||||
CFLAGS+= -I${LOCALBASE}/include/libepoll-shim
|
||||
CFLAGS+= -DHAVE_SYS_UCRED_H=1
|
||||
CFLAGS+= -DHAVE_SYS_EPOLL_H=1
|
||||
LDFLAGS+= -L${LOCALBASE}/lib -lepoll-shim
|
||||
|
||||
USES= autoreconf gmake libtool localbase pathfix pkgconfig tar:xz
|
||||
|
||||
USE_LDCONFIG= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --disable-documentation
|
||||
CONFIGURE_ENV= ac_cv_func_posix_fallocate=no # EINVAL for many FS on 12.0
|
||||
|
||||
|
||||
INSTALL_TARGET= install-strip
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1539381179
|
||||
SHA256 (wayland-1.16.0.tar.xz) = 4e72c2b56109ccfb6610d776e465f4ca0af2280c9c2f7d5cc23f0ed2548752f5
|
||||
SIZE (wayland-1.16.0.tar.xz) = 435216
|
||||
TIMESTAMP = 1613888532
|
||||
SHA256 (wayland-1.19.0.tar.xz) = baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15
|
||||
SIZE (wayland-1.19.0.tar.xz) = 456380
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- src/wayland-server.c.orig 2018-04-09 17:19:26 UTC
|
||||
--- src/wayland-server.c.orig 2020-12-21 10:17:10 UTC
|
||||
+++ src/wayland-server.c
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
@@ -6,22 +6,26 @@
|
||||
|
||||
+#include "../config.h"
|
||||
+
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
@@ -43,6 +45,11 @@
|
||||
@@ -44,6 +46,15 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
+#ifdef HAVE_SYS_UCRED_H
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/ucred.h>
|
||||
+#ifndef SOL_LOCAL
|
||||
+/* DragonFly or FreeBSD < 12.2 */
|
||||
+#define SOL_LOCAL 0
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#include "wayland-util.h"
|
||||
#include "wayland-private.h"
|
||||
#include "wayland-server.h"
|
||||
@@ -77,7 +84,13 @@ struct wl_client {
|
||||
#include "wayland-server-private.h"
|
||||
@@ -79,7 +86,13 @@ struct wl_client {
|
||||
struct wl_list link;
|
||||
struct wl_map objects;
|
||||
struct wl_priv_signal destroy_signal;
|
||||
@@ -35,13 +39,17 @@
|
||||
int error;
|
||||
struct wl_priv_signal resource_created_signal;
|
||||
};
|
||||
@@ -303,7 +316,13 @@ wl_resource_post_error(struct wl_resource *resource,
|
||||
@@ -315,7 +328,17 @@ wl_resource_post_error(struct wl_resource *resource,
|
||||
static void
|
||||
destroy_client_with_error(struct wl_client *client, const char *reason)
|
||||
{
|
||||
+#ifdef HAVE_SYS_UCRED_H
|
||||
+ /* FreeBSD */
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1300030
|
||||
+ wl_log("%s (pid %u)\n", reason, client->xucred.cr_pid);
|
||||
+#else
|
||||
+ wl_log("%s\n", reason);
|
||||
+#endif
|
||||
+#else
|
||||
+ /* Linux */
|
||||
wl_log("%s (pid %u)\n", reason, client->ucred.pid);
|
||||
@@ -49,7 +57,7 @@
|
||||
wl_client_destroy(client);
|
||||
}
|
||||
|
||||
@@ -517,10 +536,20 @@ wl_client_create(struct wl_display *display, int fd)
|
||||
@@ -529,10 +552,20 @@ wl_client_create(struct wl_display *display, int fd)
|
||||
if (!client->source)
|
||||
goto err_client;
|
||||
|
||||
@@ -62,7 +70,7 @@
|
||||
+#elif defined(LOCAL_PEERCRED)
|
||||
+ /* FreeBSD */
|
||||
+ len = sizeof client->xucred;
|
||||
+ if (getsockopt(fd, SOL_SOCKET, LOCAL_PEERCRED,
|
||||
+ if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERCRED,
|
||||
+ &client->xucred, &len) < 0 ||
|
||||
+ client->xucred.cr_version != XUCRED_VERSION)
|
||||
+ goto err_source;
|
||||
@@ -70,14 +78,19 @@
|
||||
|
||||
client->connection = wl_connection_create(fd);
|
||||
if (client->connection == NULL)
|
||||
@@ -574,12 +603,23 @@ WL_EXPORT void
|
||||
@@ -586,12 +619,28 @@ WL_EXPORT void
|
||||
wl_client_get_credentials(struct wl_client *client,
|
||||
pid_t *pid, uid_t *uid, gid_t *gid)
|
||||
{
|
||||
+#ifdef HAVE_SYS_UCRED_H
|
||||
+ /* FreeBSD */
|
||||
+ /* DragonFly or FreeBSD */
|
||||
if (pid)
|
||||
+ *pid = 0; /* FIXME: not defined on FreeBSD */
|
||||
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1300030
|
||||
+ /* Since https://cgit.freebsd.org/src/commit/?id=c5afec6e895a */
|
||||
+ *pid = client->xucred.cr_pid;
|
||||
+#else
|
||||
+ *pid = 0;
|
||||
+#endif
|
||||
+ if (uid)
|
||||
+ *uid = client->xucred.cr_uid;
|
||||
+ if (gid)
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
--- src/wayland-shm.c.orig 2018-04-09 17:19:26 UTC
|
||||
--- src/wayland-shm.c.orig 2020-02-11 23:46:03 UTC
|
||||
+++ src/wayland-shm.c
|
||||
@@ -30,6 +30,8 @@
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "config.h"
|
||||
|
||||
+#include "../config.h"
|
||||
+
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -59,6 +61,9 @@ struct wl_shm_pool {
|
||||
char *data;
|
||||
@@ -64,6 +66,9 @@ struct wl_shm_pool {
|
||||
int32_t size;
|
||||
int32_t new_size;
|
||||
bool sigbus_is_impossible;
|
||||
+#ifdef HAVE_SYS_UCRED_H
|
||||
+ int fd;
|
||||
+#endif
|
||||
};
|
||||
|
||||
struct wl_shm_buffer {
|
||||
@@ -76,15 +81,24 @@ struct wl_shm_sigbus_data {
|
||||
@@ -81,15 +86,24 @@ struct wl_shm_sigbus_data {
|
||||
int fallback_mapping_used;
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if (data == MAP_FAILED) {
|
||||
wl_resource_post_error(pool->resource,
|
||||
WL_SHM_ERROR_INVALID_FD,
|
||||
@@ -110,6 +124,10 @@ shm_pool_unref(struct wl_shm_pool *pool, bool external
|
||||
@@ -115,6 +129,10 @@ shm_pool_unref(struct wl_shm_pool *pool, bool external
|
||||
if (pool->internal_refcount + pool->external_refcount)
|
||||
return;
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
munmap(pool->data, pool->size);
|
||||
free(pool);
|
||||
}
|
||||
@@ -223,6 +241,73 @@ shm_pool_destroy(struct wl_client *client, struct wl_r
|
||||
@@ -228,6 +246,73 @@ shm_pool_destroy(struct wl_client *client, struct wl_r
|
||||
wl_resource_destroy(resource);
|
||||
}
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
static void
|
||||
shm_pool_resize(struct wl_client *client, struct wl_resource *resource,
|
||||
int32_t size)
|
||||
@@ -284,7 +369,14 @@ shm_create_pool(struct wl_client *client, struct wl_re
|
||||
"failed mmap fd %d: %m", fd);
|
||||
@@ -300,7 +385,14 @@ shm_create_pool(struct wl_client *client, struct wl_re
|
||||
strerror(errno));
|
||||
goto err_free;
|
||||
}
|
||||
+
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- tests/event-loop-test.c.orig 2017-08-08 18:20:52 UTC
|
||||
--- tests/event-loop-test.c.orig 2020-02-11 23:46:03 UTC
|
||||
+++ tests/event-loop-test.c
|
||||
@@ -167,10 +167,10 @@ TEST(event_loop_signal)
|
||||
@@ -168,10 +168,10 @@ TEST(event_loop_signal)
|
||||
signal_callback, &got_it);
|
||||
assert(source);
|
||||
|
||||
@@ -14,26 +14,31 @@
|
||||
assert(got_it == 1);
|
||||
|
||||
wl_event_source_remove(source);
|
||||
@@ -234,11 +234,19 @@ TEST(event_loop_timer)
|
||||
@@ -235,11 +235,11 @@ TEST(event_loop_timer)
|
||||
|
||||
source = wl_event_loop_add_timer(loop, timer_callback, &got_it);
|
||||
assert(source);
|
||||
- wl_event_source_timer_update(source, 10);
|
||||
- wl_event_loop_dispatch(loop, 0);
|
||||
+ assert(wl_event_source_timer_update(source, 10) == 0);
|
||||
+ assert(wl_event_loop_dispatch(loop, 0) == 0);
|
||||
assert(!got_it);
|
||||
- wl_event_loop_dispatch(loop, 20);
|
||||
+ /* FreeBSD has a bug where it converts ms_timeout to ticks; it always adds 1 to the tick count.
|
||||
+ * Consequently, we need to grossly overcompensate here.
|
||||
+ * See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2012-07/msg00319.html */
|
||||
+ assert(wl_event_loop_dispatch(loop, 50) == 0);
|
||||
source1 = wl_event_loop_add_timer(loop, timer_callback, &got_it);
|
||||
assert(source1);
|
||||
- wl_event_source_timer_update(source1, 20);
|
||||
+ assert(wl_event_source_timer_update(source1, 20) == 0);
|
||||
|
||||
source2 = wl_event_loop_add_timer(loop, timer_callback, &got_it);
|
||||
assert(source2);
|
||||
- wl_event_source_timer_update(source2, 100);
|
||||
+ assert(wl_event_source_timer_update(source2, 100) == 0);
|
||||
|
||||
/* Check that the timer marked for 20 msec from now fires within 30
|
||||
* msec, and that the timer marked for 100 msec is expected to fire
|
||||
@@ -248,11 +248,11 @@ TEST(event_loop_timer)
|
||||
|
||||
wl_event_loop_dispatch(loop, 0);
|
||||
assert(got_it == 0);
|
||||
- wl_event_loop_dispatch(loop, 30);
|
||||
+ assert(wl_event_loop_dispatch(loop, 30) == 0);
|
||||
assert(got_it == 1);
|
||||
+
|
||||
+ /* Check it doesn't fire again. */
|
||||
+ got_it = 0;
|
||||
+ assert(wl_event_loop_dispatch(loop, 20) == 0);
|
||||
+ assert(!got_it);
|
||||
wl_event_loop_dispatch(loop, 0);
|
||||
assert(got_it == 1);
|
||||
- wl_event_loop_dispatch(loop, 90);
|
||||
+ assert(wl_event_loop_dispatch(loop, 90) == 0);
|
||||
assert(got_it == 2);
|
||||
|
||||
wl_event_source_remove(source);
|
||||
wl_event_loop_destroy(loop);
|
||||
wl_event_source_remove(source1);
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
--- tests/test-helpers.c.orig 2018-08-24 18:04:36 UTC
|
||||
--- tests/test-helpers.c.orig 2020-02-11 23:46:03 UTC
|
||||
+++ tests/test-helpers.c
|
||||
@@ -25,6 +25,12 @@
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include "../config.h"
|
||||
+
|
||||
+#ifdef HAVE_SYS_PARAM_H
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
@@ -40,6 +46,16 @@
|
||||
@@ -41,6 +43,16 @@
|
||||
|
||||
#include "test-runner.h"
|
||||
|
||||
@@ -30,7 +26,7 @@
|
||||
int
|
||||
count_open_fds(void)
|
||||
{
|
||||
@@ -47,8 +63,8 @@ count_open_fds(void)
|
||||
@@ -48,8 +60,8 @@ count_open_fds(void)
|
||||
struct dirent *ent;
|
||||
int count = 0;
|
||||
|
||||
@@ -41,7 +37,7 @@
|
||||
|
||||
errno = 0;
|
||||
while ((ent = readdir(dir))) {
|
||||
@@ -57,7 +73,7 @@ count_open_fds(void)
|
||||
@@ -58,7 +70,7 @@ count_open_fds(void)
|
||||
continue;
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
--- tests/test-runner.c.orig 2018-08-24 18:04:36 UTC
|
||||
--- tests/test-runner.c.orig 2020-02-11 23:46:03 UTC
|
||||
+++ tests/test-runner.c
|
||||
@@ -25,6 +25,12 @@
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
+#include "../config.h"
|
||||
+
|
||||
+#ifdef HAVE_SYS_PARAM_H
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -37,19 +43,36 @@
|
||||
@@ -37,13 +39,23 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <sys/ptrace.h>
|
||||
@@ -27,19 +23,6 @@
|
||||
|
||||
#include "test-runner.h"
|
||||
|
||||
static int num_alloc;
|
||||
+
|
||||
+extern const struct test __start_test_section, __stop_test_section;
|
||||
+
|
||||
+/* This is all disabled for FreeBSD because it gives "can't allocate initial
|
||||
+ * thread" aborts otherwise. */
|
||||
+#ifndef __FreeBSD__
|
||||
static void* (*sys_malloc)(size_t);
|
||||
static void (*sys_free)(void*);
|
||||
static void* (*sys_realloc)(void*, size_t);
|
||||
static void* (*sys_calloc)(size_t, size_t);
|
||||
+#endif
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+/* XXX review ptrace() usage */
|
||||
+#define PTRACE_ATTACH PT_ATTACH
|
||||
@@ -47,10 +30,10 @@
|
||||
+#define PTRACE_DETACH PT_DETACH
|
||||
+#endif
|
||||
+
|
||||
/* when set to 1, check if tests are not leaking memory and opened files.
|
||||
/* when set to 1, check if tests are not leaking opened files.
|
||||
* It is turned on by default. It can be turned off by
|
||||
* WAYLAND_TEST_NO_LEAK_CHECK environment variable. */
|
||||
@@ -57,7 +80,7 @@ int leak_check_enabled;
|
||||
@@ -51,7 +63,7 @@ int fd_leak_check_enabled;
|
||||
|
||||
/* when this var is set to 0, every call to test_set_timeout() is
|
||||
* suppressed - handy when debugging the test. Can be set by
|
||||
@@ -59,23 +42,7 @@
|
||||
static int timeouts_enabled = 1;
|
||||
|
||||
/* set to one if the output goes to the terminal */
|
||||
@@ -65,6 +88,7 @@ static int is_atty = 0;
|
||||
|
||||
extern const struct test __start_test_section, __stop_test_section;
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
__attribute__ ((visibility("default"))) void *
|
||||
malloc(size_t size)
|
||||
{
|
||||
@@ -98,6 +122,7 @@ calloc(size_t nmemb, size_t size)
|
||||
|
||||
return sys_calloc(nmemb, size);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static const struct test *
|
||||
find_test(const char *name)
|
||||
@@ -292,6 +317,8 @@ is_debugger_attached(void)
|
||||
@@ -239,6 +251,8 @@ is_debugger_attached(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +51,7 @@
|
||||
pid = fork();
|
||||
if (pid == -1) {
|
||||
perror("fork");
|
||||
@@ -312,13 +339,14 @@ is_debugger_attached(void)
|
||||
@@ -259,13 +273,14 @@ is_debugger_attached(void)
|
||||
_exit(1);
|
||||
if (!waitpid(-1, NULL, 0))
|
||||
_exit(1);
|
||||
@@ -100,7 +67,7 @@
|
||||
rc = prctl(PR_SET_PTRACER, pid);
|
||||
if (rc != 0 && errno != EINVAL) {
|
||||
/* An error prevents us from telling if a debugger is attached.
|
||||
@@ -328,7 +356,9 @@ is_debugger_attached(void)
|
||||
@@ -275,7 +290,9 @@ is_debugger_attached(void)
|
||||
*/
|
||||
perror("prctl");
|
||||
write(pipefd[1], "-", 1);
|
||||
@@ -111,7 +78,7 @@
|
||||
/* Signal to client that parent is ready by passing '+' */
|
||||
write(pipefd[1], "+", 1);
|
||||
}
|
||||
@@ -346,17 +376,19 @@ int main(int argc, char *argv[])
|
||||
@@ -293,7 +310,11 @@ int main(int argc, char *argv[])
|
||||
const struct test *t;
|
||||
pid_t pid;
|
||||
int total, pass;
|
||||
@@ -121,38 +88,9 @@
|
||||
+ int status;
|
||||
+#endif
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
/* Load system malloc, free, and realloc */
|
||||
sys_calloc = dlsym(RTLD_NEXT, "calloc");
|
||||
sys_realloc = dlsym(RTLD_NEXT, "realloc");
|
||||
sys_malloc = dlsym(RTLD_NEXT, "malloc");
|
||||
sys_free = dlsym(RTLD_NEXT, "free");
|
||||
|
||||
- if (isatty(fileno(stderr)))
|
||||
- is_atty = 1;
|
||||
-
|
||||
if (is_debugger_attached()) {
|
||||
leak_check_enabled = 0;
|
||||
timeouts_enabled = 0;
|
||||
@@ -364,7 +396,17 @@ int main(int argc, char *argv[])
|
||||
leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK");
|
||||
timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS");
|
||||
}
|
||||
+#else
|
||||
+ /* Disable leak checking on FreeBSD since we can't override malloc(). */
|
||||
+ leak_check_enabled = 0;
|
||||
+ /* XXX review later */
|
||||
+ timeouts_enabled = 0;
|
||||
+#endif
|
||||
|
||||
+ if (isatty(fileno(stderr)))
|
||||
+ is_atty = 1;
|
||||
+
|
||||
+
|
||||
if (argc == 2 && strcmp(argv[1], "--help") == 0)
|
||||
usage(argv[0], EXIT_SUCCESS);
|
||||
|
||||
@@ -395,7 +437,8 @@ int main(int argc, char *argv[])
|
||||
if (isatty(fileno(stderr)))
|
||||
is_atty = 1;
|
||||
@@ -336,7 +357,8 @@ int main(int argc, char *argv[])
|
||||
if (pid == 0)
|
||||
run_test(t); /* never returns */
|
||||
|
||||
@@ -160,9 +98,9 @@
|
||||
+#ifdef HAVE_WAITID
|
||||
+ if (waitid(P_PID, 0, &info, WEXITED)) {
|
||||
stderr_set_color(RED);
|
||||
fprintf(stderr, "waitid failed: %m\n");
|
||||
stderr_reset_color();
|
||||
@@ -426,6 +469,25 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "waitid failed: %s\n",
|
||||
strerror(errno));
|
||||
@@ -368,6 +390,25 @@ int main(int argc, char *argv[])
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11,16 +11,12 @@ include/wayland-server-protocol.h
|
||||
include/wayland-server.h
|
||||
include/wayland-util.h
|
||||
include/wayland-version.h
|
||||
lib/libwayland-client.la
|
||||
lib/libwayland-client.so
|
||||
lib/libwayland-client.so.3
|
||||
lib/libwayland-cursor.la
|
||||
lib/libwayland-cursor.so
|
||||
lib/libwayland-cursor.so.0
|
||||
lib/libwayland-egl.la
|
||||
lib/libwayland-egl.so
|
||||
lib/libwayland-egl.so.1
|
||||
lib/libwayland-server.la
|
||||
lib/libwayland-server.so
|
||||
lib/libwayland-server.so.1
|
||||
lib/pkgconfig/wayland-client.pc
|
||||
@@ -33,5 +29,4 @@ share/aclocal/wayland-scanner.m4
|
||||
share/wayland/wayland-scanner.mk
|
||||
share/wayland/wayland.dtd
|
||||
share/wayland/wayland.xml
|
||||
@dir share/aclocal
|
||||
@dir share/wayland
|
||||
|
||||
Reference in New Issue
Block a user