diff --git a/cdecl.changes b/cdecl.changes index e9c8ba3..830e7f9 100644 --- a/cdecl.changes +++ b/cdecl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 11 09:08:54 UTC 2015 - schwab@suse.de + +- keyword-identifier.patch: rename identifier conflicting with keyword + ------------------------------------------------------------------- Mon Feb 13 10:44:51 UTC 2012 - coolo@suse.com diff --git a/cdecl.spec b/cdecl.spec index 904b9fb..9f687ee 100644 --- a/cdecl.spec +++ b/cdecl.spec @@ -27,6 +27,7 @@ License: SUSE-Public-Domain Source: %name-%version.tar.xz Patch1: %name-2.5-deb11.diff +Patch2: keyword-identifier.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison flex readline-devel xz @@ -41,7 +42,7 @@ library. %prep %setup -%patch -P 1 -p1 +%patch -P 1 -P 2 -p1 %build make CFLAGS="%optflags -DUSE_READLINE -DOLD_READLINE" %{?_smp_mflags}; diff --git a/keyword-identifier.patch b/keyword-identifier.patch new file mode 100644 index 0000000..ce6b210 --- /dev/null +++ b/keyword-identifier.patch @@ -0,0 +1,60 @@ +From: schwab@suse.de +Date: Thu Jun 11 09:08:54 +0000 + +"restrict" is a keyword used by the programming language. Rename it. + +Index: cdecl-2.5/cdecl.c +=================================================================== +--- cdecl-2.5.orig/cdecl.c ++++ cdecl-2.5/cdecl.c +@@ -241,7 +241,7 @@ struct + /* for unsupported combinations of types. */ + void mbcheck() + { +- register int i, j, restrict; ++ register int i, j, restriction; + char *t1, *t2; + + /* Loop through the types */ +@@ -258,26 +258,26 @@ void mbcheck() + if (!(modbits & crosstypes[j].bit)) + continue; + /* check the type of restriction */ +- restrict = crosscheck[i][j]; +- if (restrict == ALWAYS) ++ restriction = crosscheck[i][j]; ++ if (restriction == ALWAYS) + continue; + t1 = crosstypes[i].name; + t2 = crosstypes[j].name; +- if (restrict == NEVER) ++ if (restriction == NEVER) + { + notsupported("", t1, t2); + } +- else if (restrict == RITCHIE) ++ else if (restriction == RITCHIE) + { + if (RitchieFlag) + notsupported(" (Ritchie Compiler)", t1, t2); + } +- else if (restrict == PREANSI) ++ else if (restriction == PREANSI) + { + if (PreANSIFlag || RitchieFlag) + notsupported(" (Pre-ANSI Compiler)", t1, t2); + } +- else if (restrict == ANSI) ++ else if (restriction == ANSI) + { + if (!RitchieFlag && !PreANSIFlag) + notsupported(" (ANSI Compiler)", t1, t2); +@@ -286,7 +286,7 @@ void mbcheck() + { + (void) fprintf (stderr, + "%s: Internal error in crosscheck[%d,%d]=%d!\n", +- progname, i, j, restrict); ++ progname, i, j, restriction); + exit(1); /* NOTREACHED */ + } + }