]> thyrsus.com Git - intercal.git/commitdiff
More fixes for K&R C
authorAlex Smith <ais523@bham.ac.uk>
Thu, 9 Apr 2009 20:07:32 +0000 (16:07 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:39 +0000 (20:35 -0400)
src/convickt.c
src/oil.y
src/yuk.h

index deb3f89c3e8453614b37784904fa02ade6754e84..d98e0768fa82308bbd1e76edf420eba3fa57bebf 100644 (file)
@@ -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@*/
index de751f09afb0ea37e58116b2105852c9dd08adc5..5e5cecbec5c1f017dee0d89d4e1c0f1f0e58b62f 100644 (file)
--- 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);
index 742826409088a7c71d0c5d88ee186c3548f4bb8c..53e5335419451ca913753ddde55e0bced19f901a 100644 (file)
--- 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