Explorar o código

ifdef util/pty.h (taken from st)

Jochen Sprickerhof %!s(int64=6) %!d(string=hai) anos
pai
achega
73ec48334d
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  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 {