Anonymous avatar Anonymous committed 9389d6c

added -DLINUX and #if for pty.h vs util.h (thx Aled)

Comments (0)

Files changed (2)

 # srw version
-VERSION = 0.1
+VERSION = 0.2
 
 # Customize below to fit your system
 
 LIBS = -L/usr/lib -lc -lutil
 
 # flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
+# use for BSDs
+#CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE -DLINUX
 CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 LDFLAGS = -s ${LIBS}
 
-#include <sys/wait.h>
-#include <unistd.h>
 #include <err.h>
 #include <signal.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include <sys/ioctl.h>
 #include <sys/select.h>
-#include <stdio.h>
-#include <pty.h>
-#include <termios.h>
-#include <sys/ioctl.h>
+#include <sys/wait.h>
+
+#ifdef LINUX
+ #include <pty.h>
+#else  // LINUX
+ #include <util.h>
+#endif // LINUX
 
 #define STDIN  0
 #define STDOUT 1
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.