aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/today/files/patch-ae
blob: dab46f2fbd374de72ac800e397c127983815a301 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- main.c.orig Fri Sep 19 20:27:37 1997
+++ main.c  Fri Sep 19 20:27:01 1997
@@ -18,7 +18,14 @@
 #include "date.h"
 #include "event.h"
 #include "getfile.h"
-#include "getopt.h"
+#ifdef __FreeBSD__
+/* FreeBSD version 2.x and earlier has them defined in stdlib.h */
+  #if __FreeBSD__ >= 3
+    #include <unistd.h>
+  #endif
+#else
+  #include "getopt.h"
+#endif
 #include "history.h"
 #include "kyureki.h"
 #include "machine.h"
@@ -710,7 +717,7 @@
 
    va_start(ap, fmt);
 
-   fprintf(stderr, "today: ", func);
+   fprintf(stderr, "today: %s", func);
    if (level != ERR_INFO) {
        fprintf(stderr, "%s: ", statname[level - ERR_WARN]);
    }
@@ -726,7 +733,11 @@
 /*
  * インタラプトやエラーによるプログラム中断処理
  */
+#ifndef __FreeBSD__
 void   terminate_program(int sig, int subcode)
+#else
+void   terminate_program(int sig)
+#endif
 {
    switch (sig) {
    case SIGINT: