pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Compiling xine with gcc without "inline-all-stringops"
Hi,
Trying to build xine on a raspberry pi 4:
At configure target:
[...]
checking whether gcc supports __attribute ((target ("inline-all-stringops")))... no
[...]
So the macro ATTR_INLINE_ALL_STRINGOPS ends up undefined, generating errors when compiling.
These patches add simple #ifdef blocks to avoid those errors.
Regards,
adr.
patch-src_common_utils.h:
================================================================
$NetBSD$
--- src/common/utils.h.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/common/utils.h
@@ -74,7 +74,11 @@ size_t strlcat(char *dst, const char *sr
#endif
#ifndef HAVE_STRLCPY
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t strlcpy (char *dst, const char *src, size_t size) ATTR_INLINE_ALL_STRINGOPS;
+#else
+size_t strlcpy (char *dst, const char *src, size_t size);
+#endif
#endif
char *xitk_vasprintf(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
================================================================
patch-src_xitk_kbindings__common.c:
================================================================
$NetBSD$
--- src/xitk/kbindings_common.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/kbindings_common.c
@@ -43,7 +43,11 @@ typedef union {
char s[4 * 32];
} refs_dummy_t;
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#else
+static char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#endif
size_t l = strlen (text) + 1;
if (l > sizeof (*dummy) - 8)
l = sizeof (*dummy) - 8;
@@ -54,7 +58,11 @@ static ATTR_INLINE_ALL_STRINGOPS char *r
return dummy->s + 4;
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_strdup (const char *text) {
+#else
+static char *refs_strdup (const char *text) {
+#endif
size_t l, s;
char *m;
@@ -660,8 +668,12 @@ static int _kbindings_modifier_from_stri
/*
* Return a key binding entry (if available) matching with action string.
- */
+ */
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#else
+static kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#endif
union {
int32_t i[6];
char s[6 * 4];
================================================================
patch-src_xitk_xine-toolkit_skin.c:
================================================================
$NetBSD$
--- src/xitk/xine-toolkit/skin.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/skin.c
@@ -75,7 +75,11 @@ struct xitk_skin_config_s {
char sbuf[8192];
};
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#else
+static uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#endif
uint32_t r = skonfig->sbuf_pos;
uint32_t l = strlen (s) + 1;
if (l > sizeof (skonfig->sbuf) - r)
================================================================
patch-src_xitk_xine-toolkit_xitk.c:
================================================================
$NetBSD$
--- src/xitk/xine-toolkit/xitk.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/xitk.c
@@ -2131,7 +2131,11 @@ static void _xitk_lower (uint8_t *s, siz
}
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t ATTR_INLINE_ALL_STRINGOPS xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#else
+size_t xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#endif
uint8_t *q = (uint8_t *)dest;
const uint8_t *p = (const uint8_t *)src;
size_t l;
================================================================
$NetBSD$
--- src/common/utils.h.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/common/utils.h
@@ -74,7 +74,11 @@ size_t strlcat(char *dst, const char *sr
#endif
#ifndef HAVE_STRLCPY
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t strlcpy (char *dst, const char *src, size_t size) ATTR_INLINE_ALL_STRINGOPS;
+#else
+size_t strlcpy (char *dst, const char *src, size_t size);
+#endif
#endif
char *xitk_vasprintf(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
$NetBSD$
--- src/xitk/kbindings_common.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/kbindings_common.c
@@ -43,7 +43,11 @@ typedef union {
char s[4 * 32];
} refs_dummy_t;
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#else
+static char *refs_set_dummy (refs_dummy_t *dummy, const char *text) {
+#endif
size_t l = strlen (text) + 1;
if (l > sizeof (*dummy) - 8)
l = sizeof (*dummy) - 8;
@@ -54,7 +58,11 @@ static ATTR_INLINE_ALL_STRINGOPS char *r
return dummy->s + 4;
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS char *refs_strdup (const char *text) {
+#else
+static char *refs_strdup (const char *text) {
+#endif
size_t l, s;
char *m;
@@ -660,8 +668,12 @@ static int _kbindings_modifier_from_stri
/*
* Return a key binding entry (if available) matching with action string.
- */
+ */
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#else
+static kbinding_entry_t *_kbindings_lookup_action (kbinding_t *kbt, const char *action) {
+#endif
union {
int32_t i[6];
char s[6 * 4];
$NetBSD$
--- src/xitk/xine-toolkit/skin.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/skin.c
@@ -75,7 +75,11 @@ struct xitk_skin_config_s {
char sbuf[8192];
};
+#ifdef ATTR_INLINE_ALL_STRINGOPS
static ATTR_INLINE_ALL_STRINGOPS uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#else
+static uint32_t _skin_strdup (xitk_skin_config_t *skonfig, const char *s) {
+#endif
uint32_t r = skonfig->sbuf_pos;
uint32_t l = strlen (s) + 1;
if (l > sizeof (skonfig->sbuf) - r)
$NetBSD$
--- src/xitk/xine-toolkit/xitk.c.orig 2021-12-12 19:49:29.000000000 +0000
+++ src/xitk/xine-toolkit/xitk.c
@@ -2131,7 +2131,11 @@ static void _xitk_lower (uint8_t *s, siz
}
}
+#ifdef ATTR_INLINE_ALL_STRINGOPS
size_t ATTR_INLINE_ALL_STRINGOPS xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#else
+size_t xitk_lower_strlcpy (char *dest, const char *src, size_t dlen) {
+#endif
uint8_t *q = (uint8_t *)dest;
const uint8_t *p = (const uint8_t *)src;
size_t l;
Home |
Main Index |
Thread Index |
Old Index