소스 검색

ifdef util/pty.h (taken from st)

Jochen Sprickerhof 6 년 전
부모
커밋
73ec48334d
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      scroll.c

+ 7 - 3
scroll.c

@@ -16,9 +16,13 @@
 #include <termios.h>
 #include <unistd.h>
 
-// TODO: OpenBSD/Linux ifdef
-#include <util.h>
-//#include <pty.h>
+#if   defined(__linux)
+ #include <pty.h>
+#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+ #include <util.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <libutil.h>
+#endif
 
 typedef struct Line Line;
 struct Line {