japanese/canna: prepare for upcoming libc bump

Don't assume stdin is a compile-time constant. Initialize in1 and in2 at
the top of main instead.

ok espie
master
tb 2023-07-19 17:16:46 +00:00
parent e99aedc55c
commit bd75ad5c8b
1 changed files with 16 additions and 2 deletions

View File

@ -1,8 +1,22 @@
--- dic/ideo/pubdic/pod.c.orig Fri Aug 29 16:57:13 2008
+++ dic/ideo/pubdic/pod.c Fri Aug 29 16:57:24 2008
Index: dic/ideo/pubdic/pod.c
--- dic/ideo/pubdic/pod.c.orig
+++ dic/ideo/pubdic/pod.c
@@ -26,4 +26,5 @@ static char rcsid[] = "$Id: pod.c,v 1.41 1994/05/31 11
#include <stdio.h>
+#include <stdlib.h>
#define bzero(a, c) memset(a, 0, c)
@@ -52,5 +53,5 @@ static int list_kinds;
static int copy_frequency, extract_kana = 0;
static long specific_kind;
-static FILE *in1 = stdin, *in2 = stdin;
+static FILE *in1, *in2;
static char *common_out, *old_out, *new_out, *hinshi_table, *bunrui;
static char *description_table;
@@ -1378,4 +1379,5 @@ char *argv[];
#endif
+ in1 = in2 = stdin;
(void)internkind(kihonh); /* 基本辞書用。1L として登録 */
parseargs(argc, argv);