SHA256
1
0
forked from pool/cdecl

Accepting request 311993 from devel:tools

OBS-URL: https://build.opensuse.org/request/show/311993
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cdecl?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2015-06-15 15:49:48 +00:00 committed by Git OBS Bridge
commit 36255dd7d7
3 changed files with 67 additions and 1 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
@ -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};

60
keyword-identifier.patch Normal file
View File

@ -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 */
}
}