aboutsummaryrefslogtreecommitdiff
path: root/japanese/edict
diff options
context:
space:
mode:
Diffstat (limited to 'japanese/edict')
-rw-r--r--japanese/edict/files/patch-aa4
-rw-r--r--japanese/edict/files/patch-xjdfrontend.c32
2 files changed, 34 insertions, 2 deletions
diff --git a/japanese/edict/files/patch-aa b/japanese/edict/files/patch-aa
index bf66c1d716d9..56d01b34317b 100644
--- a/japanese/edict/files/patch-aa
+++ b/japanese/edict/files/patch-aa
@@ -14,7 +14,7 @@
SAOBJECTS = xjdsa.o xjdcomm_sa.o xjdservcomm_sa.o xjdfrontend_sa.o
#SACFLAGS = -DXJDFRONTEND -DXJDDIC -DDEMAND_PAGING
-SACFLAGS = -DXJDFRONTEND -DXJDDIC -DMMAP
-+SACFLAGS = -D__STRICT_BSD__ -DXJDFRONTEND -DXJDDIC -DMMAP ${CFLAGS}
++SACFLAGS = -D__POSIX__ -DXJDFRONTEND -DXJDDIC -DMMAP ${CFLAGS}
#SACFLAGS = -DXJDFRONTEND -DXJDDIC -DRAM_LOAD
xjdic_sa: $(SAOBJECTS)
$(CC) $(SAOBJECTS) -o xjdic_sa
@@ -23,7 +23,7 @@
#
CLOBJECTS = xjdclient.o xjdcomm_cl.o xjdfrontend_cl.o
-CLCFLAGS = -DXJDFRONTEND -DXJDCLSERV
-+CLCFLAGS = -D__STRICT_BSD__ -DXJDFRONTEND -DXJDCLSERV ${CFLAGS}
++CLCFLAGS = -D__POSIX__ -DXJDFRONTEND -DXJDCLSERV ${CFLAGS}
xjdic_cl: $(CLOBJECTS)
$(CC) $(CLOBJECTS) $(LIBS) -o xjdic_cl
xjdclient.o: xjdclient.c
diff --git a/japanese/edict/files/patch-xjdfrontend.c b/japanese/edict/files/patch-xjdfrontend.c
new file mode 100644
index 000000000000..6a9ef853962c
--- /dev/null
+++ b/japanese/edict/files/patch-xjdfrontend.c
@@ -0,0 +1,32 @@
+--- xjdfrontend.c 1998-09-16 02:28:03.000000000 +0200
++++ xjdfrontend.c 2007-12-28 19:54:07.000000000 +0100
+@@ -55,6 +55,8 @@
+
+ #ifdef __STRICT_BSD__
+ static struct sgttyb orig,new;
++#elif defined(__POSIX__)
++static struct termios orig,new;
+ #else
+ static struct termio orig,new;
+ #endif
+@@ -240,6 +242,11 @@
+ ioctl(0, TIOCGETP, &orig); ioctl(0, TIOCGETP, &new);
+ new.sg_flags |= CBREAK; new.sg_flags &= ~ECHO;
+ ioctl(0, TIOCSETP, &new);
++#elif defined(__POSIX__)
++ tcgetattr(0, &orig); tcgetattr(0, &new);
++ new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO;
++ new.c_lflag &= ~IXON;
++ new.c_cc[4] = 1; new.c_cc[5] = 0; tcsetattr(0, TCSANOW, &new);
+ #else
+ ioctl(0, TCGETA, &orig); ioctl(0, TCGETA, &new);
+ new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO;
+@@ -255,6 +262,8 @@
+ {
+ #ifdef __STRICT_BSD__
+ ioctl(0, TIOCSETP, &orig);
++#elif defined(__POSIX__)
++ tcsetattr(0, TCSANOW, &orig);
+ #else
+ ioctl(0, TCSETA, &orig);
+ #endif