Accepting request 311564 from home:Andreas_Schwab:Factory

- keyword-identifier.patch: rename identifier conflicting with keyword

OBS-URL: https://build.opensuse.org/request/show/311564
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cdecl?expand=0&rev=6
This commit is contained in:
Jan Engelhardt 2015-06-11 09:40:20 +00:00 committed by Git OBS Bridge
parent 450dfe05ad
commit 2ee84eaa85
3 changed files with 62 additions and 0 deletions

View File

@ -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

View File

@ -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
@ -42,6 +43,7 @@ library.
%prep
%setup
%patch -P 1 -p1
%patch2 -p1
%build
make CFLAGS="%optflags -DUSE_READLINE -DOLD_READLINE" %{?_smp_mflags};

55
keyword-identifier.patch Normal file
View File

@ -0,0 +1,55 @@
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 */
}
}