summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-10-26 20:37:15 +0000
committerjoerg <joerg@pkgsrc.org>2012-10-26 20:37:15 +0000
commitc2079fa986da2dfe38334969085d0d73ad8880ad (patch)
tree93e63f737a013c8b880577ce59acdd29b0d279da
parent31efd415a2a25d9ef27ec8f25f3a68923a86f692 (diff)
downloadpkgsrc-c2079fa986da2dfe38334969085d0d73ad8880ad.tar.gz
Add some missing prototypes and correctly tag functions as void if
needed.
-rw-r--r--lang/cim/distinfo14
-rw-r--r--lang/cim/patches/patch-src_dekl.c253
-rw-r--r--lang/cim/patches/patch-src_dekl.h26
-rw-r--r--lang/cim/patches/patch-src_error.c101
-rw-r--r--lang/cim/patches/patch-src_expbuilder.c13
-rw-r--r--lang/cim/patches/patch-src_expchecker.c15
-rw-r--r--lang/cim/patches/patch-src_extspec.c26
-rw-r--r--lang/cim/patches/patch-src_extspec.h13
-rw-r--r--lang/cim/patches/patch-src_gen.h18
-rw-r--r--lang/cim/patches/patch-src_genexp.c23
-rw-r--r--lang/cim/patches/patch-src_genpar.c14
-rw-r--r--lang/cim/patches/patch-src_genstr.c14
-rw-r--r--lang/cim/patches/patch-src_lex.c13
13 files changed, 542 insertions, 1 deletions
diff --git a/lang/cim/distinfo b/lang/cim/distinfo
index 86519fa3440..44a6eb44967 100644
--- a/lang/cim/distinfo
+++ b/lang/cim/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2007/11/30 20:30:22 rillig Exp $
+$NetBSD: distinfo,v 1.8 2012/10/26 20:37:15 joerg Exp $
SHA1 (cim-3.30.tar.gz) = 8636ac8d1eaee793769051af60140af80b82b22f
RMD160 (cim-3.30.tar.gz) = d5c07046799dec8840c7c7d9f5c88e552a4c6432
@@ -6,3 +6,15 @@ Size (cim-3.30.tar.gz) = 416809 bytes
SHA1 (patch-aa) = 6e20870f7bf0c2befdc0a73d00827606958e2931
SHA1 (patch-ab) = e5d14212cbc4fbf956ade6c8b68f1dcc92a0841a
SHA1 (patch-ac) = e63f63f906a968ef7dc8343e44235916eddf6574
+SHA1 (patch-src_dekl.c) = 3900ef403be2e62eafc4b826504d58eb28fed7b7
+SHA1 (patch-src_dekl.h) = 4a88d45fc715233ed4d56376104149f2299a2177
+SHA1 (patch-src_error.c) = 99a51cd6a779a6626b945df43c31ae05c43e2ad2
+SHA1 (patch-src_expbuilder.c) = e8b34170917105dcad13605c8418b21457818ce3
+SHA1 (patch-src_expchecker.c) = c5ae46c6932fd276b093ff4c149f597f7757162a
+SHA1 (patch-src_extspec.c) = 913d43ffa911e03f260f52c59bec7d3d2ce016b1
+SHA1 (patch-src_extspec.h) = e4a6bf554e045997276589baaa3e7dbc20e72a26
+SHA1 (patch-src_gen.h) = b1a6ec2dce0e518fb5430af5d42530ea82898207
+SHA1 (patch-src_genexp.c) = 1c826b32b490de0c428f8e7d0144a79298fce4ee
+SHA1 (patch-src_genpar.c) = 5675cf1ec69bf5378a709a03c25d981434628540
+SHA1 (patch-src_genstr.c) = c2e1a75636273a8281c4070ff25928e4847753be
+SHA1 (patch-src_lex.c) = c7c5011d24f8abb076b17c132d9b3cbdac816cce
diff --git a/lang/cim/patches/patch-src_dekl.c b/lang/cim/patches/patch-src_dekl.c
new file mode 100644
index 00000000000..bab601f4758
--- /dev/null
+++ b/lang/cim/patches/patch-src_dekl.c
@@ -0,0 +1,253 @@
+$NetBSD: patch-src_dekl.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/dekl.c.orig 2012-10-26 12:55:39.000000000 +0000
++++ src/dekl.c
+@@ -522,8 +522,7 @@ subordinate (rda, rdb)
+
+ /* Kalles fra syntakssjekkeren hver gang en ny blokk entres */
+
+-beginBlock (kind)
+- char kind;
++void beginBlock (char kind)
+ {
+ static int cblno = STARTBLNO;
+ static struct BLOCK *lblock;
+@@ -650,9 +649,7 @@ beginBlock (kind)
+ /* Kalles fra syntakssjekkeren hver gang en blokk terminerer */
+
+ /*VARARGS0 */
+-endBlock (rtname, codeclass)
+- char *rtname;
+- char codeclass;
++void endBlock (char *rtname, char codeclass)
+ {
+ #ifdef DEBUG
+ if (option_input)
+@@ -688,8 +685,7 @@ endBlock (rtname, codeclass)
+ /* RegDecl kalles fra syntakssjekkeren
+ * hver gang vi leser en deklarasjon */
+
+-regDecl (ident, type, kind, categ)
+- char *ident, type, kind, categ;
++void regDecl (char *ident, char type, char kind, char categ)
+ {
+ struct DECL *pd,
+ *pdx = NULL;
+@@ -858,7 +854,7 @@ regDecl (ident, type, kind, categ)
+ }
+ break;
+ default:
+- d1error (37);
++ d1error (37, NULL);
+ break;
+ }
+ #ifdef DEBUG
+@@ -881,11 +877,11 @@ regInner ()
+ ,lineno, cblev);
+ #endif
+ if (cblock->quant.kind != KCLASS)
+- d1error (38);
++ d1error (38, NULL);
+ else
+ {
+ if (cblock->inner)
+- d1error (39);
++ d1error (39, NULL);
+ else
+ cblock->inner = TRUE;
+ }
+@@ -1233,13 +1229,13 @@ setqualprefchain (rd, param)
+ rd->plev = 0;
+ if (rdx->categ == CNEW)
+ {
+- d2error (53, rd);
++ d2error (53, rd, NULL);
+ rdx->categ = CERROR;
+ }
+ else if (rdx->kind != KCLASS)
+ {
+ if (rdx->categ != CERROR)
+- d2error (54, rd);
++ d2error (54, rd, NULL);
+ rdx->categ = CERROR;
+ rd->type = TERROR;
+ }
+@@ -1259,8 +1255,7 @@ setqualprefchain (rd, param)
+ * Prefikskjeden og kvalifikasjoner settes ved kall på setqualprefchain
+ * den sjekker også konsistensen for type kind og categ */
+
+-static sjekkdekl (rb)
+- struct BLOCK *rb;
++static void sjekkdekl (struct BLOCK *rb)
+ {
+ struct DECL *rd = NULL,
+ *rdx = NULL,
+@@ -1344,11 +1339,11 @@ static sjekkdekl (rb)
+ obstack_free (&osDecl, s);
+ }
+ else
+- d2error (55, rd);
++ d2error (55, rd, NULL);
+ }
+ }
+ if (rd->kind == KNOKD && rd->type != TVARARGS)
+- d2error (63, rd);
++ d2error (63, rd, NULL);
+ if (rd->kind == KARRAY && rd->type == TNOTY)
+ rd->type = TREAL;
+ switch (rd->categ)
+@@ -1369,12 +1364,12 @@ static sjekkdekl (rb)
+ if (rd->type == TVARARGS)
+ {
+ if (rd->next != NULL)
+- d2error (80, rd);
++ d2error (80, rd, NULL);
+ if (kind != KPROC || rb->quant.categ != CCPROC)
+- d2error (81, rd);
++ d2error (81, rd, NULL);
+ }
+ if (rd->type == TLABEL && rb->quant.categ == CCPROC)
+- d2error (82, rd);
++ d2error (82, rd, NULL);
+ break;
+ case CVALUE:
+ /* Sjekker om lovlig valueoverføring */
+@@ -1388,14 +1383,14 @@ static sjekkdekl (rb)
+ else if (rd->type == TVARARGS)
+ {
+ if (rd->next != NULL)
+- d2error (80, rd);
++ d2error (80, rd, NULL);
+ if (kind != KPROC || rb->quant.categ != CCPROC)
+- d2error (81, rd);
++ d2error (81, rd, NULL);
+ }
+ else
+- d2error (57, rd);
++ d2error (57, rd, NULL);
+ if (rd->type == TLABEL && rb->quant.categ == CCPROC)
+- d2error (82, rd);
++ d2error (82, rd, NULL);
+ break;
+ case CVAR:
+ if (rd->type == TREF && (rd->kind == KSIMPLE | rd->kind == KARRAY))
+@@ -1408,27 +1403,27 @@ static sjekkdekl (rb)
+ d2error (58, rd);*/
+ if (kind == KPROC && rb->quant.categ == CCPROC &&
+ (rd->type == TTEXT || rd->type == TREF))
+- d2error (77, rd);
++ d2error (77, rd, NULL);
+ if (rd->type == TVARARGS)
+ {
+ if (rd->next != NULL)
+- d2error (80, rd);
++ d2error (80, rd, NULL);
+ if (kind != KPROC || rb->quant.categ != CCPROC)
+- d2error (81, rd);
++ d2error (81, rd, NULL);
+ }
+ if (rd->type == TLABEL && rb->quant.categ == CCPROC)
+- d2error (82, rd);
++ d2error (82, rd, NULL);
+ break;
+ case CEXTR:
+ case CEXTRMAIN:
+ break;
+ case CCPROC:
+ if (rd->type == TREF)
+- d2error (78, rd);
++ d2error (78, rd, NULL);
+ break;
+ default:
+ /* ULOVLIG CATEG */
+- d2error (59, rd);
++ d2error (59, rd, NULL);
+ }
+ }
+ if (rb->quant.kind == KCLASS || rb->quant.kind == KPRBLK)
+@@ -1474,7 +1469,7 @@ static sjekkdekl (rb)
+ va->protected == TRUE; va = va->next);
+ if (va != vc)
+ {
+- d2error (60, vc);
++ d2error (60, vc, NULL);
+ while (va->next != vc)
+ va = va->next;
+ va->next = vc->next;
+@@ -1485,7 +1480,7 @@ static sjekkdekl (rb)
+ /* Sjekker om det er lovlig virtuell */
+ if (vc->kind != KPROC && vc->type != TLABEL)
+ {
+- d2error (61, vc);
++ d2error (61, vc, NULL);
+ vc->type = TERROR;
+ vc->kind = KERROR;
+ }
+@@ -1560,7 +1555,7 @@ static sjekkdekl (rb)
+ vc->prefqual = va->prefqual;
+ }
+ else
+- d2error (62, va);
++ d2error (62, va, NULL);
+ }
+ else if (vc->match == vc)
+ vc->match = NULL;
+@@ -1573,11 +1568,11 @@ static sjekkdekl (rb)
+ rdx = findLocal (rd->ident, &rb->quant, TRUE);
+ if (rdx->categ == CNEW)
+ {
+- d2error (74, rd);
++ d2error (74, rd, NULL);
+ rdx->categ = CERROR;
+ }
+ else if (rd->categ != CHIDEN && rdx->encl != rb)
+- d2error (75, rd);
++ d2error (75, rd, NULL);
+ else if (rd->categ != CHIDEN && rdx->categ == CVIRT)
+ {
+ if (rb->quant.plev == 0)
+@@ -1587,7 +1582,7 @@ static sjekkdekl (rb)
+ else
+ vno = rb->quant.prefqual->descr->navirtlab;
+ if (rdx->virtno <= vno)
+- d2error (75, rd);
++ d2error (75, rd, NULL);
+ else
+ rd->match = rdx;
+ }
+@@ -1607,7 +1602,7 @@ static sjekkdekl (rb)
+ for (rd = rb->hiprot; rd != NULL; rd = rd->next)
+ if (rd->categ == CHIDEN && rd->match != NULL &&
+ rd->match->protected == FALSE)
+- d2error (76, rd);
++ d2error (76, rd, NULL);
+ }
+ }
+
+@@ -1710,7 +1705,7 @@ reginsp (rb, rd) struct BLOCK *rb; struc
+ {
+ if (rd == NULL)
+ {
+- d2error (73, &rb->quant);
++ d2error (73, &rb->quant, NULL);
+ rd = findGlobal (tag ("Noqual"), FALSE);
+ rd->categ = CERROR;
+ }
+@@ -1755,7 +1750,7 @@ regThis (ident)
+ if (rd->ident == ident)
+ {
+ if (rd->descr->thisused == MAYBEE)
+- d2error (72, rd);
++ d2error (72, rd, NULL);
+ rd->descr->thisused |= TRUE;
+ #ifdef DEBUG
+ if (option_input)
+@@ -1776,7 +1771,7 @@ regThis (ident)
+ if (option_input)
+ printf ("---end\n");
+ #endif
+- d2error (79, rd = findGlobal (ident, FALSE));
++ d2error (79, rd = findGlobal (ident, FALSE), NULL);
+ return (rd);
+ }
+
diff --git a/lang/cim/patches/patch-src_dekl.h b/lang/cim/patches/patch-src_dekl.h
new file mode 100644
index 00000000000..c45741bbfa3
--- /dev/null
+++ b/lang/cim/patches/patch-src_dekl.h
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_dekl.h,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/dekl.h.orig 2012-10-26 12:56:08.000000000 +0000
++++ src/dekl.h
+@@ -189,9 +189,9 @@ struct BLOCK
+ #define CCCPROC 8 /* Ekstern C-prosedyre */
+
+
+-extern beginBlock ();
+-extern endBlock ();
+-extern regDecl ();
++void beginBlock (char kind);
++void endBlock (char *rtname, char codeclass);
++void regDecl (char *ident, char type, char kind, char categ);
+ extern regInner ();
+ extern struct DECL *newDecl ();
+ extern struct BLOCK *firstclass ();
+@@ -236,4 +236,8 @@ extern sameParam ();
+ extern reinit ();
+ extern initDecl ();
+
++void d1error (int errcode, char *name);
++void d2error (int errcode, struct DECL *rd1, struct DECL *rd2);
++void merror (int errcode, char *name);
++
+ extern char yaccerror;
diff --git a/lang/cim/patches/patch-src_error.c b/lang/cim/patches/patch-src_error.c
new file mode 100644
index 00000000000..5c82cae2ca3
--- /dev/null
+++ b/lang/cim/patches/patch-src_error.c
@@ -0,0 +1,101 @@
+$NetBSD: patch-src_error.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/error.c.orig 2012-10-26 12:50:41.000000000 +0000
++++ src/error.c
+@@ -34,16 +34,15 @@
+ #include "extspec.h"
+ #include "mapline.h"
+
+-#if STDC_HEADERS
++#include <ctype.h>
+ #include <stdlib.h>
+-#endif
++#include <string.h>
+
+ int anterror;
+
+ /******************************************************************************
+ STARTERROR */
+-static starterror (line)
+- long line;
++static void starterror (long line)
+ {
+ anterror++;
+ if (line == 0)
+@@ -57,8 +56,7 @@ static starterror (line)
+
+ /* Feil som oppdages av LEX */
+
+-lerror (errcode)
+- int errcode;
++void lerror(int errcode)
+ {
+ if (option_nowarning && (errcode == 8 || errcode == 32))
+ return;
+@@ -179,10 +177,7 @@ lerror (errcode)
+
+ /* Feil som oppdages av YACC */
+
+-/*VARARGS1 */
+-yerror (errcode, txt)
+- int errcode;
+- char *txt;
++void yerror (int errcode, char *txt)
+ {
+ char c;
+ starterror (lineno);
+@@ -215,7 +210,7 @@ yerror (errcode, txt)
+ exit (TRUE);
+ break;
+ case 21:
+- c = toupper ((int) txt[0]);
++ c = toupper ((unsigned char) txt[0]);
+ txt++;
+ fprintf (stderr, "%c%s.\n", c, txt);
+ break;
+@@ -250,9 +245,7 @@ yerror (errcode, txt)
+ /* Feil som oppdages av DECL PASS 1 */
+
+ /*VARARGS1 */
+-d1error (errcode, name)
+- int errcode;
+- char *name;
++void d1error (int errcode, char *name)
+ {
+ starterror (lineno);
+ switch (errcode)
+@@ -293,10 +286,7 @@ d1error (errcode, name)
+ /* Feil som oppdages av DECL PASS 2 */
+
+ /*VARARGS1 */
+-d2error (errcode, rd1, rd2)
+- int errcode;
+- struct DECL *rd1,
+- *rd2;
++void d2error (int errcode, struct DECL *rd1, struct DECL *rd2)
+ {
+ char *name1 = rd1->ident;
+ starterror (errcode == 79 ? lineno : rd1->line);
+@@ -460,10 +450,7 @@ textnumber (i)
+ /* Feil som oppdages av SJEKKEREN */
+
+ /*VARARGS1 */
+-serror (errcode, name, ant)
+- int errcode,
+- ant;
+- char *name;
++void serror (int errcode, char *name, int ant)
+ {
+ char *antt;
+ if (option_nowarning && errcode >= 81 && errcode <= 83 )
+@@ -684,9 +671,7 @@ gerror (errcode, name)
+ /* Feil som oppdages under innlesing av eksterne moduler */
+
+ /*VARARGS1 */
+-merror (errcode, name)
+- int errcode;
+- char *name;
++void merror (int errcode, char *name)
+ {
+ if (option_nowarning && errcode == 3 && option_atr)
+ return;
diff --git a/lang/cim/patches/patch-src_expbuilder.c b/lang/cim/patches/patch-src_expbuilder.c
new file mode 100644
index 00000000000..02b79d72a3f
--- /dev/null
+++ b/lang/cim/patches/patch-src_expbuilder.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_expbuilder.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/expbuilder.c.orig 2012-10-26 13:06:11.000000000 +0000
++++ src/expbuilder.c
+@@ -195,7 +195,7 @@ struct EXP *elook()
+
+ /* Bygger opp et uttrykstree, Alle operatorene leses postfix */
+
+-ebuild ()
++void ebuild (void)
+ {
+ struct EXP *re;
+
diff --git a/lang/cim/patches/patch-src_expchecker.c b/lang/cim/patches/patch-src_expchecker.c
new file mode 100644
index 00000000000..05b154a06dd
--- /dev/null
+++ b/lang/cim/patches/patch-src_expchecker.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_expchecker.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/expchecker.c.orig 2012-10-26 13:06:29.000000000 +0000
++++ src/expchecker.c
+@@ -237,9 +237,7 @@ static sametype (rel, rer)
+ /******************************************************************************
+ ARGUMENTERROR */
+
+-static argumenterror (melding, re)
+- int melding;
+- struct EXP *re;
++static void argumenterror (int melding, struct EXP *re)
+ {
+ int i = 1;
+ if (TYPE == TERROR)
diff --git a/lang/cim/patches/patch-src_extspec.c b/lang/cim/patches/patch-src_extspec.c
new file mode 100644
index 00000000000..80233f1ba01
--- /dev/null
+++ b/lang/cim/patches/patch-src_extspec.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_extspec.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/extspec.c.orig 2012-10-26 13:02:40.000000000 +0000
++++ src/extspec.c
+@@ -473,10 +473,7 @@ found:
+ /******************************************************************************
+ LESINN_EXTERNAL_SPEC */
+
+-lesinn_external_spec (ident, filename, kind)
+- char *ident;
+- char *filename;
+- char kind;
++void lesinn_external_spec (char *ident, char *filename, char kind)
+ {
+ char *hprefquantident;
+ struct BLOCK *hcblock;
+@@ -562,8 +559,7 @@ static write_text_mif (f, s) FILE *f; un
+ /******************************************************************************
+ WRITE_DECL_MIF */
+
+-static write_decl_mif (f, rd, level)
+- FILE *f; struct DECL *rd; int level;
++static void write_decl_mif (FILE *f, struct DECL *rd, int level)
+ {
+ if (rd->kind == KBLOKK || rd->kind == KPRBLK || rd->kind == KFOR ||
+ rd->kind == KINSP) return;
diff --git a/lang/cim/patches/patch-src_extspec.h b/lang/cim/patches/patch-src_extspec.h
new file mode 100644
index 00000000000..eb96df008c6
--- /dev/null
+++ b/lang/cim/patches/patch-src_extspec.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_extspec.h,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/extspec.h.orig 2012-10-26 13:03:54.000000000 +0000
++++ src/extspec.h
+@@ -28,7 +28,7 @@ void gettimestamp ();
+ void initExtspec ();
+ extern char *directive_timestamp;
+ extern char *timestamp;
+-extern lesinn_external_spec ();
++void lesinn_external_spec (char *ident, char *filename, char kind);
+ extern more_modules ();
+ extern struct stamp *first_stamp;
+ extern skrivut_external_spec ();
diff --git a/lang/cim/patches/patch-src_gen.h b/lang/cim/patches/patch-src_gen.h
new file mode 100644
index 00000000000..7c0c8060c27
--- /dev/null
+++ b/lang/cim/patches/patch-src_gen.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_gen.h,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/gen.h.orig 2012-10-26 13:04:50.000000000 +0000
++++ src/gen.h
+@@ -68,11 +68,11 @@ extern gentype ();
+ extern genmodulemark();
+ extern gen_adr_prot();
+
+-extern genvalue();
++void genvalue (struct EXP *re);
+
+ /* genpar.c */
+ extern genprocparam ();
+-extern genpredefproccall ();
++void genpredefproccall (struct EXP *re);
+ extern gencproccall ();
+ extern gen_thunk_simple_address ();
+ extern gen_thunk_simple_value ();
diff --git a/lang/cim/patches/patch-src_genexp.c b/lang/cim/patches/patch-src_genexp.c
new file mode 100644
index 00000000000..0d9fac2b74a
--- /dev/null
+++ b/lang/cim/patches/patch-src_genexp.c
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_genexp.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/genexp.c.orig 2012-10-26 13:04:17.000000000 +0000
++++ src/genexp.c
+@@ -20,6 +20,8 @@
+ #include "gen.h"
+ #include "extspec.h"
+
++#include <string.h>
++
+ int stack;
+ static int anttext;
+ int inthunk; /* Brukes i forbindelse med uttrykk i
+@@ -196,8 +198,7 @@ genmodulemark(maintimestamp) char *maint
+ /******************************************************************************
+ GENVALUE */
+
+-genvalue (re)
+- struct EXP *re;
++void genvalue (struct EXP *re)
+ {
+ struct EXP *rex;
+ static struct EXP *ree;
diff --git a/lang/cim/patches/patch-src_genpar.c b/lang/cim/patches/patch-src_genpar.c
new file mode 100644
index 00000000000..be8c1b66db1
--- /dev/null
+++ b/lang/cim/patches/patch-src_genpar.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_genpar.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/genpar.c.orig 2012-10-26 12:54:44.000000000 +0000
++++ src/genpar.c
+@@ -1112,8 +1112,7 @@ genprocparam (re)
+ /******************************************************************************
+ GENPREDEFPROCCALL */
+
+-genpredefproccall (re)
+- struct EXP *re;
++void genpredefproccall (struct EXP *re)
+ {
+ int i;
+ /* Hvis danger = TRUE s} skal returverdien legges p} stakken */
diff --git a/lang/cim/patches/patch-src_genstr.c b/lang/cim/patches/patch-src_genstr.c
new file mode 100644
index 00000000000..963b197b10b
--- /dev/null
+++ b/lang/cim/patches/patch-src_genstr.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_genstr.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/genstr.c.orig 2012-10-26 13:02:23.000000000 +0000
++++ src/genstr.c
+@@ -258,8 +258,7 @@ static blockmainstructure (rb, output_re
+ /******************************************************************************
+ BLOCKSTRUCTURE */
+
+-static blockstructure (rb)
+- struct BLOCK *rb;
++static void blockstructure (struct BLOCK *rb)
+ {
+ int i;
+ struct DECL *rd;
diff --git a/lang/cim/patches/patch-src_lex.c b/lang/cim/patches/patch-src_lex.c
new file mode 100644
index 00000000000..593a48c2ffe
--- /dev/null
+++ b/lang/cim/patches/patch-src_lex.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lex.c,v 1.1 2012/10/26 20:37:15 joerg Exp $
+
+--- src/lex.c.orig 2012-10-26 13:05:36.000000000 +0000
++++ src/lex.c
+@@ -730,7 +730,7 @@ static scanDirflags ()
+ /******************************************************************************
+ DIRLINE */
+
+-static scanDirline ()
++static void scanDirline (void)
+ {
+ FILE *file;
+ lineno += antnewline;