summary refs log tree commit diff
path: root/curtis
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-07-16 12:48:41 -0400
committerJune McEnroe <programble@gmail.com>2017-07-16 12:48:41 -0400
commit9e1c0b78fc26860b366f45631cd0170d79265c3f (patch)
treeffd2038c870c5f2007cbfed80afd1535e5f833df /curtis
parentSend ^L on attach, rmcup reset on detach (diff)
downloadsrc-9e1c0b78fc26860b366f45631cd0170d79265c3f.tar.gz
src-9e1c0b78fc26860b366f45631cd0170d79265c3f.zip
Fix dtch portability
Diffstat (limited to 'curtis')
-rwxr-xr-xcurtis/.bin/dtch.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/curtis/.bin/dtch.c b/curtis/.bin/dtch.c
index ac7164fd..2c19e1d2 100755
--- a/curtis/.bin/dtch.c
+++ b/curtis/.bin/dtch.c
@@ -1,7 +1,7 @@
 #if 0
 set -e
 bin=$(dirname $0)
-cc -Wall -Wextra -pedantic $@ -o $bin/dtch $0
+cc -Wall -Wextra -pedantic $@ -lutil -o $bin/dtch $0
 ln -f $bin/dtch $bin/atch
 exit
 #endif
@@ -22,7 +22,14 @@ exit
 #include <sysexits.h>
 #include <termios.h>
 #include <unistd.h>
+
+#if defined __FreeBSD__
+#include <libutil.h>
+#elif defined __linux__
+#include <pty.h>
+#else
 #include <util.h>
+#endif
 
 static struct passwd *getUser(void) {
     uid_t uid = getuid();
0-02-19 18:05:09 -0500'>2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe 2020-01-28Change scout sensitivity to 1.4June McEnroe 2020-01-28Import shows.txtJune McEnroe