diff options
author | joerg <joerg> | 2007-08-30 13:46:03 +0000 |
---|---|---|
committer | joerg <joerg> | 2007-08-30 13:46:03 +0000 |
commit | 8c682c63de0ef03acbbc4f0ed4c4cec01a81d1ea (patch) | |
tree | b0791c7783266b51611bb0b0862f972dd004e632 /editors/TeXmacs/patches/patch-aj | |
parent | b5c5557a2d32eb15ccc14d02e4b61993caa1abe6 (diff) | |
download | pkgsrc-8c682c63de0ef03acbbc4f0ed4c4cec01a81d1ea.tar.gz |
Fix build on DragonFly. Should be easy to adopt for other systems
lacking pselect.
Diffstat (limited to 'editors/TeXmacs/patches/patch-aj')
-rw-r--r-- | editors/TeXmacs/patches/patch-aj | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/editors/TeXmacs/patches/patch-aj b/editors/TeXmacs/patches/patch-aj index 0bed49f5575..96aba5f8516 100644 --- a/editors/TeXmacs/patches/patch-aj +++ b/editors/TeXmacs/patches/patch-aj @@ -1,13 +1,44 @@ -$NetBSD: patch-aj,v 1.4 2007/08/09 19:16:25 drochner Exp $ +$NetBSD: patch-aj,v 1.5 2007/08/30 13:46:03 joerg Exp $ ---- plugins/r/src/tm_r.c.orig 2007-08-05 21:28:21.000000000 +0200 +--- plugins/r/src/tm_r.c.orig 2007-05-15 17:54:35.000000000 +0000 +++ plugins/r/src/tm_r.c -@@ -11,7 +11,7 @@ +@@ -11,7 +11,13 @@ #include <stdio.h> #include <sys/select.h> --#include <pty.h> ++#if defined(__DragonFly__) || defined(__FreeBSD__) ++#include <libutil.h> ++#elif defined(__NetBSD__) || defined(__OpenBSD__) +#include <util.h> ++#else + #include <pty.h> ++#endif #include <utmp.h> #include <unistd.h> #include <termios.h> +@@ -344,6 +350,10 @@ int main(int arc, char *argv[]) + char *TEXMACS_PATH, *TEXMACS_R, *TEXMACS_SEND, *TEXMACS_LIB ; + struct termios termi ; + sigset_t sigmask, orig_sigmask; ++#if defined(__DragonFly__) ++ sigset_t cur_sigmask; ++ int select_retval; ++#endif + + struct stat stat_buf; + +@@ -466,7 +476,14 @@ int main(int arc, char *argv[]) + #endif + + /* Main pselect switch --------------- */ ++#if defined(__DragonFly__) ++ sigprocmask(SIG_SETMASK, &orig_sigmask, &cur_sigmask); ++ select_retval = select( master+1, &rd, &wr, &er, NULL ); ++ sigprocmask(SIG_SETMASK, &cur_sigmask, NULL); ++ if ( select_retval > 0) { ++#else + if( pselect( master+1, &rd, &wr, &er, NULL, &orig_sigmask ) > 0 ) { ++#endif + if( FD_ISSET( STDIN_FILENO, &rd ) ) { + /* =============== read input from TeXmacs */ + nread = read_B( STDIN_FILENO, RB, 1000 ) ; |