shithub: mc

Download patch

ref: d99446a4eb050905981afd2c9f58341f739eba64
parent: 61a9e807de75f67fd5467aa671b00935d202f0e3
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Jan 20 08:33:19 EST 2015

Add missing stdarg.h includes.

--- a/6/gen.c
+++ b/6/gen.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/6/main.c
+++ b/6/main.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
@@ -111,8 +112,7 @@
     else
         base = path;
     gettimeofday(&tv, NULL);
-    srand(tv.tv_usec);
-    snprintf(buf, bufsz, "%s/tmp%lx%lx-%s%s", tmpdir, (long)rand(), (long)tv.tv_usec, base, suffix);
+    snprintf(buf, bufsz, "%s/tmp%lx%lx-%s%s", tmpdir, (long)tv.tv_sec, (long)tv.tv_usec, base, suffix);
     return buf;
 }
 
--- a/6/simp.c
+++ b/6/simp.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/6/typeinfo.c
+++ b/6/typeinfo.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/muse/muse.c
+++ b/muse/muse.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/bitset.c
+++ b/parse/bitset.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <assert.h>
 #include <limits.h>
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -4,6 +4,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/htab.c
+++ b/parse/htab.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <assert.h>
 #include <limits.h>
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <inttypes.h>
 #include <ctype.h>
--- a/parse/names.c
+++ b/parse/names.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/type.c
+++ b/parse/type.c
@@ -1,6 +1,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>
--- a/parse/use.c
+++ b/parse/use.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include <string.h>