mandoc: Add GCC2 patch.

This commit is contained in:
Augustin Cavalier
2020-04-19 15:11:04 -04:00
parent a91cd9ac42
commit ee10bf4a17
2 changed files with 92 additions and 8 deletions

View File

@@ -31,12 +31,15 @@ REVISION="2"
SOURCE_URI="http://mandoc.bsd.lv/snapshots/mandoc-$portVersion.tar.gz"
CHECKSUM_SHA256="0b0c8f67958c1569ead4b690680c337984b879dfd2ad4648d96924332fd99528"
PATCHES="mandoc-$portVersion.patchset"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
PATCHES="$PATCHES
mandoc-$portVersion-gcc2.patch"
fi
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
ARCHITECTURES="x86_gcc2 x86_64"
PROVIDES="
mandoc$secondaryArchSuffix = $portVersion
mandoc = $portVersion
cmd:apropos = $portVersion
cmd:demandoc = $portVersion
cmd:makewhatis = $portVersion
@@ -47,8 +50,8 @@ PROVIDES="
cmd:whatis = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
haiku
lib:libz
"
CONFLICTS="
cmd:man
@@ -58,11 +61,11 @@ REPLACES="
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
haiku_devel
devel:libz
"
BUILD_PREREQUIRES="
cmd:cc$secondaryArchSuffix
cmd:cc
cmd:make
"

View File

@@ -0,0 +1,81 @@
From 738da7e153ec5dd9e6992ac4fbc4666d031bb56d Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Sun, 19 Apr 2020 15:03:11 -0400
Subject: [PATCH] GCC2 fixes.
---
dba.c | 2 +-
mandoc_xr.h | 2 +-
mandocdb.c | 2 +-
roff.c | 2 +-
tag.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dba.c b/dba.c
index ee43933..1cadf20 100644
--- a/dba.c
+++ b/dba.c
@@ -43,7 +43,7 @@
struct macro_entry {
struct dba_array *pages;
- char value[];
+ char value[0];
};
static void *prepend(const char *, char);
diff --git a/mandoc_xr.h b/mandoc_xr.h
index e0c6af0..7e0b619 100644
--- a/mandoc_xr.h
+++ b/mandoc_xr.h
@@ -22,7 +22,7 @@ struct mandoc_xr {
int line; /* Or -1 for this page's own names. */
int pos;
int count;
- char hashkey[];
+ char hashkey[0];
};
void mandoc_xr_reset(void);
diff --git a/mandocdb.c b/mandocdb.c
index 8559b95..46ed712 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -71,7 +71,7 @@ enum op {
struct str {
const struct mpage *mpage; /* if set, the owning parse */
uint64_t mask; /* bitmask in sequence */
- char key[]; /* rendered text */
+ char key[0]; /* rendered text */
};
struct inodev {
diff --git a/roff.c b/roff.c
index e2e498d..e399fa3 100644
--- a/roff.c
+++ b/roff.c
@@ -80,7 +80,7 @@ struct roffreg {
*/
struct roffreq {
enum roff_tok tok;
- char name[];
+ char name[0];
};
struct roff {
diff --git a/tag.c b/tag.c
index 21ac6b3..4a1f456 100644
--- a/tag.c
+++ b/tag.c
@@ -35,7 +35,7 @@ struct tag_entry {
size_t maxlines;
size_t nlines;
int prio;
- char s[];
+ char s[0];
};
static void tag_signal(int) __attribute__((__noreturn__));
--
2.24.1