diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-09-05 14:27:14 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-09-05 14:27:14 +0800 |
commit | e3e97d8d52a1e1f1798b7c36cb60d629f710db1c (patch) | |
tree | cda55c0586f42dafb497f13e10e8c508db12414f | |
parent | ba47cfc77c9adab809e506bfcf5eab1a9389260d (diff) | |
download | freebsd-ports-graphics-e3e97d8d52a1e1f1798b7c36cb60d629f710db1c.tar.gz freebsd-ports-graphics-e3e97d8d52a1e1f1798b7c36cb60d629f710db1c.tar.zst freebsd-ports-graphics-e3e97d8d52a1e1f1798b7c36cb60d629f710db1c.zip |
Fix build error with clang.
-rw-r--r-- | chinese/c2t/files/patch-01 | 10 | ||||
-rw-r--r-- | chinese/c2t/files/patch-02 | 42 |
2 files changed, 44 insertions, 8 deletions
diff --git a/chinese/c2t/files/patch-01 b/chinese/c2t/files/patch-01 index ad06a1ab20f..5f94a834b3f 100644 --- a/chinese/c2t/files/patch-01 +++ b/chinese/c2t/files/patch-01 @@ -1,15 +1,15 @@ ---- Makefile.orig Wed Feb 24 14:21:39 1993 -+++ Makefile Sun Apr 2 11:42:44 2000 +--- Makefile.orig 1993-02-24 14:21:39.000000000 +0800 ++++ Makefile 2011-09-05 14:22:03.000000000 +0800 @@ -1,9 +1,9 @@ -CC=cc -+CC=cc -DCHINDICT=\"$(PREFIX)/share/chinese/gb/TONEPY.tit\" ++DEFINE= -DCHINDICT=\"$(PREFIX)/share/chinese/gb/TONEPY.tit\" all: c2t c2t: c2t.o - $(CC) -O -o c2t c2t.o -+ $(CC) $(CFLAGS) -o c2t c2t.o ++ $(CC) $(CFLAGS) $(DEFINE) -o c2t c2t.o c2t.o: c2t.c - $(CC) -O -c c2t.c -+ $(CC) $(CFLAGS) -c c2t.c ++ $(CC) $(CFLAGS) $(DEFINE) -c c2t.c diff --git a/chinese/c2t/files/patch-02 b/chinese/c2t/files/patch-02 index 00f27112275..6d732adfa97 100644 --- a/chinese/c2t/files/patch-02 +++ b/chinese/c2t/files/patch-02 @@ -1,6 +1,11 @@ ---- c2t.c.orig Wed Feb 24 07:29:23 1993 -+++ c2t.c Tue Dec 19 19:51:28 2006 -@@ -22,10 +22,14 @@ +--- c2t.c.orig 1993-02-24 14:29:23.000000000 +0800 ++++ c2t.c 2011-09-05 14:25:34.000000000 +0800 +@@ -18,14 +18,18 @@ + + #define MEMAREA 4096 /* max number of lines in DICT file, wc -l DICT */ + +-main(argc, argv) ++int main(argc, argv) int argc; char **argv; { @@ -16,3 +21,34 @@ register int rpit=0, tila=0, rraja=0, mulpin=0; int monitila=0; FILE *piffi=0; +@@ -57,12 +61,12 @@ char **argv; + i =0; + } /*if argc > 1 */ + if ((piffi = fopen (DICT, "r")) == 0) { +- printf (stderr, "Error: unable to open pinyin dictionnary %s\n", ++ fprintf (stderr, "Error: unable to open pinyin dictionnary %s\n", + DICT); + exit (-1); + } + if ((taulu = (char **)malloc (MEMAREA*sizeof(char *))) == 0) { +- printf (stderr, "Error: out of memory when allocating taulu(MEMAREA too large)\n"); ++ fprintf (stderr, "Error: out of memory when allocating taulu(MEMAREA too large)\n"); + exit (-2); + } + pipo = taulu; +@@ -81,13 +85,13 @@ char **argv; + } else { + if (rivi[0] == '#') continue; + if ((*pipo = (char *)malloc (rpit+8)) == 0) { +- printf (stderr, "Error: out of memory when allocating *pipo\n"); ++ fprintf (stderr, "Error: out of memory when allocating *pipo\n"); + exit (-3); + } + strcpy (*pipo, rivi); + pipo++; + if (++rraja >= MEMAREA) { +- printf (stderr, "Error: out of memory when allocating *pipo(MEMAREA too small)...\n"); ++ fprintf (stderr, "Error: out of memory when allocating *pipo(MEMAREA too small)...\n"); + exit (-4); + } + } |