Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37817383
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: librpc2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: rpc2-c99.patch
Скачать


Add missing return types and function prototypes, for improved C99
compatibility.
Fixed upstream via:
commit f9b366855c127c4ac95af04e94e19a057b7e2f51
Author: Jan Harkes <jaharkes@cs.cmu.edu>
Date:   Tue Nov 20 11:59:39 2018 -0500
    Add missing function prototypes for rp2gen code.
commit 8b432a0268499edecd2e5bab90a17debea8eb33f
Author: Jan Harkes <jaharkes@cs.cmu.edu>
Date:   Thu Jan 10 16:02:46 2019 -0500
    Cleanup formatting
    
    Fix comment indentations and old-style function prototypes.
diff --git a/rp2gen/crout.c b/rp2gen/crout.c
index 7f72b6ab6399f39a..8079382361029161 100644
--- a/rp2gen/crout.c
+++ b/rp2gen/crout.c
@@ -357,7 +357,7 @@ void copcodes(PROC *head, WHO who, FILE *where)
 
 }
 
-cproc(head, who, where)
+void cproc(head, who, where)
     PROC *head;
     WHO who;
     FILE *where;
@@ -840,14 +840,14 @@ static void inc4(char *what, FILE *where)
     fprintf(where, "    %s += 4;\n", what);
 }
 
-static inc8(what, where)
+static void inc8(what, where)
     char *what;
     FILE *where;
 {
     fprintf(where, "    %s += 8;\n", what);
 }
 
-static checkbuffer(where, what, size)
+static void checkbuffer(where, what, size)
     char *what;
     FILE *where;
     int32_t size;
@@ -1550,7 +1550,7 @@ static void execute(PROC *head, FILE *where)
 }
 
 /* spit out code to pretty print packets in tcpdump */
-static print_dump(head, where)
+static void print_dump(head, where)
     PROC *head;
     FILE *where;
 {
diff --git a/rp2gen/rp2.h b/rp2gen/rp2.h
index f3969df0f924fdcb..a8a4a64fd67de6a2 100644
--- a/rp2gen/rp2.h
+++ b/rp2gen/rp2.h
@@ -136,4 +136,7 @@ extern rp2_bool ansi;
 
 extern int line;
 
-
+void yyerror(char *s);
+int yylex(void);
+void yywarn(char *s);
+void spit_include(char *filename);
diff --git a/rp2gen/rp2gen_parser.y b/rp2gen/rp2gen_parser.y
index 611b74fb8ef36065..ff4b2bf02224b84d 100644
--- a/rp2gen/rp2gen_parser.y
+++ b/rp2gen/rp2gen_parser.y
@@ -58,6 +58,7 @@ extern void no_storage(char *);
 extern void spit_define(char *, char *);
 extern void insert(PROC *proc);
 
+
 /* Structure for handling IDENTIFIER lists */
 
 #define MAX_IDS	100
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin