summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2021-10-02 22:17:18 +0900
committerAkinori Hattori <hattya@gentoo.org>2021-10-02 22:20:16 +0900
commit62390628210b52ac46aaf708334fc39656e936a1 (patch)
treea6c32b4598e96830d7f6bd0c8e2853bf207a5d9f /dev-scheme/c-wrapper
parentkde-apps/marble: Fix build with gpsd-3.23.1 (diff)
downloadgentoo-62390628210b52ac46aaf708334fc39656e936a1.tar.gz
gentoo-62390628210b52ac46aaf708334fc39656e936a1.tar.bz2
gentoo-62390628210b52ac46aaf708334fc39656e936a1.zip
dev-scheme/c-wrapper: update patch
Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'dev-scheme/c-wrapper')
-rw-r--r--dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch42
1 files changed, 18 insertions, 24 deletions
diff --git a/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch b/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch
index 98dfaa2f945c..46ab531b389a 100644
--- a/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch
+++ b/dev-scheme/c-wrapper/files/c-wrapper-gcc-5.patch
@@ -4,46 +4,40 @@
{
static ScmObj trigger_line = SCM_FALSE;
ScmObj line_str;
-+ ScmObj regexp = Scm_RegComp(SCM_STRING(SCM_MAKE_STR_IMMUTABLE("^#\\s+\\d+\\s+\"<stdin>\"")), 0);
++ ScmObj rx;
/* skip the first line '# 1 "<stdin>"' */
Scm_ReadLineUnsafe(SCM_PORT(in));
-@@ -1682,16 +1683,30 @@
+@@ -1682,7 +1683,22 @@
}
}
- while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
-- if (SCM_NULLP(macro_list)) {
-+ line_str = SCM_NIL;
-+ while (!SCM_NULLP(macro_list)) {
++ rx = Scm_RegComp(SCM_STRING(SCM_MAKE_STR_IMMUTABLE("^#\\s+\\d+\\s+\"<stdin>\"")), 0);
++ line_str = Scm_ReadLineUnsafe(SCM_PORT(in));
++ while (!SCM_EOFP(line_str)) {
+ ScmObj body_str = line_str;
-+ if (SCM_NULLP(body_str)
-+ && SCM_EOFP(body_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
- Scm_Error("[bug] lost macro body");
-- } else {
-- ScmObj pos_name_args = SCM_CDAR(macro_list);
-- macro_list = SCM_CDR(macro_list);
-- Scm_FilenameSet(SCM_CAAR(pos_name_args));
-- Scm_LineNumberSet(SCM_INT_VALUE(SCM_CDAR(pos_name_args)));
-- parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), line_str);
- }
+ while (!SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))
++ && SCM_STRING_LENGTH(line_str) >= 13
+#ifdef SCM_REGEXP_MULTI_LINE
-+ && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(regexp), SCM_STRING(line_str), SCM_UNDEFINED, SCM_UNDEFINED))) {
++ && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str), SCM_UNDEFINED, SCM_UNDEFINED))) {
+#else
-+ && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(regexp), SCM_STRING(line_str)))) {
++ && SCM_REGMATCHP(Scm_RegExec(SCM_REGEXP(rx), SCM_STRING(line_str)))) {
+#endif
+ if (SCM_EOFP(line_str = Scm_ReadLineUnsafe(SCM_PORT(in)))) {
+ Scm_Error("[bug] unexpected EOF while parsing macro body");
+ }
+ body_str = Scm_StringAppend2(SCM_STRING(body_str), SCM_STRING(line_str));
-+ line_str = SCM_NIL;
+ }
-+ ScmObj pos_name_args = SCM_CDAR(macro_list);
-+ macro_list = SCM_CDR(macro_list);
-+ Scm_FilenameSet(SCM_CAAR(pos_name_args));
-+ Scm_LineNumberSet(SCM_INT_VALUE(SCM_CDAR(pos_name_args)));
-+ parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), body_str);
+ if (SCM_NULLP(macro_list)) {
+ Scm_Error("[bug] lost macro body");
+ } else {
+@@ -1690,7 +1706,7 @@
+ macro_list = SCM_CDR(macro_list);
+ Scm_FilenameSet(SCM_CAAR(pos_name_args));
+ Scm_LineNumberSet(SCM_INT_VALUE(SCM_CDAR(pos_name_args)));
+- parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), line_str);
++ parse_macro_body(SCM_CADR(pos_name_args), SCM_CDDR(pos_name_args), body_str);
+ }
}
- SCM_RETURN(SCM_UNDEFINED);