ektou 1.11 Clang用パッチ 2014/12/29 nide@ics.nara-wu.ac.jp ektou 1.11を、UNIX環境(MacOSX含む)にて、Clangでもコンパイルできるように するパッチです。コンパイラが無用な警告を出さないようにするため、Makefile にてCFLAGSにオプションを追加、および一部のソースに#includeを追加します。 diff -ru ektou111.orig/src/Makefile ektou111/src/Makefile --- ektou111.orig/src/Makefile 1999-08-04 01:09:00.000000000 +0900 +++ ektou111/src/Makefile 2014-11-29 01:11:00.000000000 +0900 @@ -2,8 +2,11 @@ BIN=$(INSTALLBASE)/bin MAN=$(INSTALLBASE)/man -CC=gcc -CFLAGS=-O2 -s +#CC=gcc +CC=cc +#CFLAGS=-O2 -s +CFLAGS=-O2 -s -Wno-return-type -Wno-implicit-int -Wno-format-zero-length \ + -Wno-parentheses -Wno-implicit-function-declaration GETOPTOBJ= #CC=cc #CFLAGS=-O -s diff -ru ektou111.orig/src/atoec.c ektou111/src/atoec.c --- ektou111.orig/src/atoec.c 1997-01-07 01:02:00.000000000 +0900 +++ ektou111/src/atoec.c 2014-11-29 01:11:00.000000000 +0900 @@ -3,9 +3,12 @@ #ifndef VOS3 # include # include -#endif -#ifdef MSDOS -# include +# ifdef MSDOS +# include +# else +# include +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/atoek.c ektou111/src/atoek.c --- ektou111.orig/src/atoek.c 1997-01-07 01:02:00.000000000 +0900 +++ ektou111/src/atoek.c 2014-11-29 01:11:00.000000000 +0900 @@ -3,9 +3,12 @@ #ifndef VOS3 # include # include -#endif -#ifdef MSDOS -# include +# ifdef MSDOS +# include +# else +# include +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/cconv.c ektou111/src/cconv.c --- ektou111.orig/src/cconv.c 1997-01-07 01:02:00.000000000 +0900 +++ ektou111/src/cconv.c 2014-11-29 01:11:00.000000000 +0900 @@ -7,6 +7,9 @@ #ifndef VOS3 # include # include +# ifndef MSDOS +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/ctok.c ektou111/src/ctok.c --- ektou111.orig/src/ctok.c 1997-01-07 01:02:00.000000000 +0900 +++ ektou111/src/ctok.c 2014-11-29 01:11:00.000000000 +0900 @@ -19,9 +19,12 @@ #ifndef VOS3 # include # include -#endif -#ifdef MSDOS -# include +# ifdef MSDOS +# include +# else +# include +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/ektou.c ektou111/src/ektou.c --- ektou111.orig/src/ektou.c 1997-01-07 01:04:00.000000000 +0900 +++ ektou111/src/ektou.c 2014-11-29 01:11:00.000000000 +0900 @@ -3,9 +3,11 @@ #ifndef VOS3 # include # include -#endif -#ifdef MSDOS -# include +# ifdef MSDOS +# include +# else +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/jeftou.dif ektou111/src/jeftou.dif --- ektou111.orig/src/jeftou.dif 1997-01-07 01:04:00.000000000 +0900 +++ ektou111/src/jeftou.dif 2014-11-29 01:11:00.000000000 +0900 @@ -6,9 +6,9 @@ 場にないので、これ以上のサポートはできません。EUCからJEFへの変換ツールや、 EUCとIBM漢字コードとの相互変換のツールなどは作っていません。 ---- ektou.c Tue Jan 7 01:04:00 1997 -+++ jeftou.c Tue Jan 7 01:04:00 1997 -@@ -47,7 +47,7 @@ +--- ektou.c Mon Dec 29 01:12:00 2014 ++++ jeftou.c Mon Dec 29 01:12:00 2014 +@@ -49,7 +49,7 @@ char *com; @@ -17,7 +17,7 @@ extern char ATOEBTBL[][0x100]; char *mes[] = { -@@ -286,14 +286,15 @@ +@@ -288,14 +288,15 @@ return(0); } @@ -38,7 +38,7 @@ #define eputc(c, f) \ if(EOF == putc((c), (f))) errexit((char *)NULL, 2) -@@ -310,16 +311,25 @@ +@@ -312,16 +313,25 @@ while((c = getc(inf)) != EOF){ if(c == EB_SPC){ @@ -70,7 +70,7 @@ } else { switch(mode){ case 1: -@@ -337,6 +347,7 @@ +@@ -339,6 +349,7 @@ default: c = tbl[c]; diff -ru ektou111.orig/src/utoek.c ektou111/src/utoek.c --- ektou111.orig/src/utoek.c 1997-01-07 01:04:00.000000000 +0900 +++ ektou111/src/utoek.c 2014-11-29 01:11:00.000000000 +0900 @@ -3,9 +3,11 @@ #ifndef VOS3 # include # include -#endif -#ifdef MSDOS -# include +# ifdef MSDOS +# include +# else +# include +# endif #endif #ifdef LSI_C diff -ru ektou111.orig/src/uudecode.c ektou111/src/uudecode.c --- ektou111.orig/src/uudecode.c 2001-04-10 01:11:00.000000000 +0900 +++ ektou111/src/uudecode.c 2014-11-29 01:11:00.000000000 +0900 @@ -9,6 +9,7 @@ # include # else # include /* for getpwnam */ +# include # endif # include # include diff -ru ektou111.orig/src/uuencode.c ektou111/src/uuencode.c --- ektou111.orig/src/uuencode.c 2001-04-10 01:11:00.000000000 +0900 +++ ektou111/src/uuencode.c 2014-11-29 01:11:00.000000000 +0900 @@ -12,6 +12,9 @@ # include # include # endif +# ifndef MSDOS +# include +# endif #endif #ifdef TOOLS