forked from pool/cdecl
Jan Engelhardt
1b8e761de4
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cdecl?expand=0&rev=7
61 lines
1.6 KiB
Diff
61 lines
1.6 KiB
Diff
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 */
|
|
}
|
|
}
|