From 7f307e12a3ce56bc62cc227f2b2af910d9cad22e Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 9 Apr 2009 16:07:32 -0400 Subject: [PATCH] More fixes for K&R C --- src/convickt.c | 9 +++++++++ src/oil.y | 1 + src/yuk.h | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/convickt.c b/src/convickt.c index deb3f89..d98e076 100644 --- a/src/convickt.c +++ b/src/convickt.c @@ -47,6 +47,15 @@ extern int ick_clc_cset_convert(const char* in, /*@partial@*/ char* out, const c #define ICKDATADIR "/usr/local/share/ick-0.27" #endif +/* In case we don't have vsnprintf. */ +void /*@noreturn@*/ ick_lose(const char *m, int n, /*@null@*/ const char *s) +{ + (void) m; + (void) n; + (void) s; + abort(); +} + /*@-redef@*/ /* because only one main is used at a time */ int main(int argc, char** argv) /*@=redef@*/ diff --git a/src/oil.y b/src/oil.y index de751f0..5e5cecb 100644 --- a/src/oil.y +++ b/src/oil.y @@ -762,6 +762,7 @@ int main(void) freopen("oilout-m.c","w",stdout); puts("/* Automatically generated output, edit source and recompile to " "change */"); + puts("#include \"config.h\""); puts("#include \"ick.h\""); i=filenumber+1; while(i--) printf("extern int optimize_pass1_%x(node*);\n",i); diff --git a/src/yuk.h b/src/yuk.h index 7428264..53e5335 100644 --- a/src/yuk.h +++ b/src/yuk.h @@ -150,5 +150,5 @@ extern int globalargc; touch anything but the bottom byte). */ #if SIZEOF_SIG_ATOMIC_T + 0 == 0 #undef sig_atomic_t -typedef char sig_atomic_t +typedef char sig_atomic_t; #endif -- 2.43.0