summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/mcpp/03-gniibe-fix-11.patch21
-rw-r--r--user/mcpp/04-gniibe-fix-12.patch17
-rw-r--r--user/mcpp/05-gniibe-fix-13.patch52
-rw-r--r--user/mcpp/APKBUILD18
4 files changed, 103 insertions, 5 deletions
diff --git a/user/mcpp/03-gniibe-fix-11.patch b/user/mcpp/03-gniibe-fix-11.patch
new file mode 100644
index 000000000..576ac50e7
--- /dev/null
+++ b/user/mcpp/03-gniibe-fix-11.patch
@@ -0,0 +1,21 @@
+Description: Fix for a bug reported to sourceforge.net #11
+Author: NIIBE Yutaka
+
+Index: mcpp/src/support.c
+===================================================================
+--- mcpp.orig/src/support.c
++++ mcpp/src/support.c
+@@ -1747,9 +1747,11 @@ not_comment:
+ *tp++ = '\t';
+ else
+ *tp++ = ' '; /* Convert to ' ' */
+- } else if (! (char_type[ *(tp - 1) & UCHARMAX] & HSP)) {
++ } else if (temp == tp
++ || ! (char_type[ *(tp - 1) & UCHARMAX] & HSP)) {
+ *tp++ = ' '; /* Squeeze white spaces */
+- } else if (mcpp_mode == OLD_PREP && *(tp - 1) == COM_SEP) {
++ } else if (mcpp_mode == OLD_PREP && tp > temp
++ && *(tp - 1) == COM_SEP) {
+ *(tp - 1) = ' '; /* Replace COM_SEP with ' ' */
+ }
+ break;
diff --git a/user/mcpp/04-gniibe-fix-12.patch b/user/mcpp/04-gniibe-fix-12.patch
new file mode 100644
index 000000000..13d29d62f
--- /dev/null
+++ b/user/mcpp/04-gniibe-fix-12.patch
@@ -0,0 +1,17 @@
+Description: Fix for a bug reported to sourceforge.net #12
+Author: NIIBE Yutaka
+
+Index: mcpp/src/support.c
+===================================================================
+--- mcpp.orig/src/support.c
++++ mcpp/src/support.c
+@@ -1948,6 +1948,9 @@ static char * get_line(
+ dump_string( NULL, ptr);
+ }
+ len = strlen( ptr);
++ if (len == 0)
++ cwarn( "null character ignored", NULL, 0L, NULL);
++
+ if (NBUFF - 1 <= ptr - infile->buffer + len
+ && *(ptr + len - 1) != '\n') {
+ /* The line does not yet end, though the buffer is full. */
diff --git a/user/mcpp/05-gniibe-fix-13.patch b/user/mcpp/05-gniibe-fix-13.patch
new file mode 100644
index 000000000..717b16fe9
--- /dev/null
+++ b/user/mcpp/05-gniibe-fix-13.patch
@@ -0,0 +1,52 @@
+Description: Fix for a bug reported to sourceforge.net #13
+ by fixing error messages.
+ Also, fix erroneous messages.
+Author: NIIBE Yutaka
+
+Index: mcpp/src/support.c
+===================================================================
+--- mcpp.orig/src/support.c
++++ mcpp/src/support.c
+@@ -822,7 +822,7 @@ escape:
+ if (diag && iscntrl( c) && ((char_type[ c] & SPA) == 0)
+ && (warn_level & 1))
+ cwarn(
+- "Illegal control character %.0s0lx%02x in quotation" /* _W1_ */
++ "Illegal control character %.0s0x%02x in quotation" /* _W1_ */
+ , NULL, (long) c, NULL);
+ *out_p++ = c;
+ chk_limit:
+@@ -861,10 +861,10 @@ chk_limit:
+ if (mcpp_mode != POST_STD && option_flags.lang_asm) {
+ /* STD, KR */
+ if (warn_level & 1)
+- cwarn( unterm_char, out, 0L, NULL); /* _W1_ */
++ cwarn( unterm_char, NULL, (long)delim, NULL); /* _W1_ */
+ goto done;
+ } else {
+- cerror( unterm_char, out, 0L, skip); /* _E_ */
++ cerror( unterm_char, NULL, (long)delim, skip); /* _E_ */
+ }
+ } else {
+ cerror( "Unterminated header name %s%.0ld%s" /* _E_ */
+@@ -875,9 +875,9 @@ chk_limit:
+ if (mcpp_mode != POST_STD && option_flags.lang_asm) {
+ /* STD, KR */
+ if (warn_level & 1)
+- cwarn( empty_const, out, 0L, skip); /* _W1_ */
++ cwarn( empty_const, NULL, (long)delim, skip); /* _W1_ */
+ } else {
+- cerror( empty_const, out, 0L, skip); /* _E_ */
++ cerror( empty_const, NULL, (long)delim, skip); /* _E_ */
+ out_p = NULL;
+ goto done;
+ }
+@@ -1774,7 +1774,7 @@ not_comment:
+ default:
+ if (iscntrl( c)) {
+ cerror( /* Skip the control character */
+- "Illegal control character %.0s0x%lx, skipped the character" /* _E_ */
++ "Illegal control character %.0s0x%02x, skipped the character" /* _E_ */
+ , NULL, (long) c, NULL);
+ } else { /* Any valid character */
+ *tp++ = c;
diff --git a/user/mcpp/APKBUILD b/user/mcpp/APKBUILD
index 761a3149e..99c16d539 100644
--- a/user/mcpp/APKBUILD
+++ b/user/mcpp/APKBUILD
@@ -2,17 +2,21 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=mcpp
pkgver=2.7.2
-pkgrel=2
+pkgrel=3
pkgdesc="Portable C preprocessor"
-url="http://mcpp.sourceforge.net"
+url="https://mcpp.sourceforge.net"
arch="all"
license="BSD-2-Clause"
depends=""
makedepends=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
-source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+source="https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
01-zeroc-fixes.patch
- 02-gniibe-fixes.patch"
+ 02-gniibe-fixes.patch
+ 03-gniibe-fix-11.patch
+ 04-gniibe-fix-12.patch
+ 05-gniibe-fix-13.patch
+ "
prepare() {
default_prepare
@@ -43,4 +47,8 @@ package() {
sha512sums="1ca885cb13fdb684de9d0595a9215b52f48a93a69077d82cdcacafe40d9a61fb77b00a3ff2b8890e7bc0a0fcc0c8d70d4093c00c280351cd4459aba67c573235 mcpp-2.7.2.tar.gz
86b2e851490e180dfe3028a5a37019ea423924c921ab053a642fb78d4533a87f913ede2928daf9da4daf60e67795a24521186b40c76961ae99ebeb75f8aa95ad 01-zeroc-fixes.patch
-a31a0f2e7430381e5e62ea4257a35891ce9d2f3beed60c6caad3b6d298a58557e9c850223840ef8c6f6c2e8139cf4a4edf29ac93b2532680feafba503fcfaf6d 02-gniibe-fixes.patch"
+a31a0f2e7430381e5e62ea4257a35891ce9d2f3beed60c6caad3b6d298a58557e9c850223840ef8c6f6c2e8139cf4a4edf29ac93b2532680feafba503fcfaf6d 02-gniibe-fixes.patch
+747734cb9d36d3045830b1ad0d42cc2d1e308137b5873be1693e55f5908c407f7c8ccad4a48df78a880a946f98a8183f7dd2e138bae429f72e051d08021275ba 03-gniibe-fix-11.patch
+b07c7eeaa6079c611d209a8b26d74ed326cf0aa402e038dc85a99ceefb47cfedd0e4d704cce760d44645267fb3513585bc4de3a99a02dadd7c9f9274bef2ab72 04-gniibe-fix-12.patch
+12a72a2c527358effc4ed8e0c5f80f1a06a005ba3b050c7d99a4aa67ad5fe7e4c4c2a75d0808382b67e359076c5bac6065ec284d32f55e7e31466331a47db882 05-gniibe-fix-13.patch
+cf0809c509e7ccdad0becd3381f34e7a744b5e301b849ba3c4cb0afe1d8ddbddd2e3032950030bc344dcdd23efb2436b18d64e2c43d9f05d10b32e6108e957a8 fix-struct-initialization.patch"