1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/devel/rlwrap/files/patch-src::ptytty.c
Philip M. Gollucci 62e76e61f5 - update to 0.37
- remove -lutil cruft from before AC_CHECK_LIB() was added
- either use openpty() or search manually (not sure)[1]

[1] PTYS_ARE_PTMX ifdef patch was incorrect, anyway. According to
configure.ac there can be only one of PTYS_ARE_XXX be defined at a
time because the check uses `else if'.

PR:             ports/150694
Submitted by:   swell.k@gmail.com
Approved by:    maintainer timeout (gamato@users.sf.net ; 14 days)
2010-10-06 03:40:46 +00:00

28 lines
778 B
C

--- src/ptytty.c.orig 2010-01-24 01:05:53.000000000 -0800
+++ src/ptytty.c 2010-01-24 01:09:19.000000000 -0800
@@ -159,11 +159,19 @@
char pty_name[] = "/dev/pty??";
char tty_name[] = "/dev/tty??";
-# ifndef PTYCHAR1
-# define PTYCHAR1 "pqrstuvwxyz"
-# endif
-# ifndef PTYCHAR2
-# define PTYCHAR2 "0123456789abcdef"
+# ifdef __FreeBSD__
+/* Auto-detected pty names do not work well with devfs! */
+# undef PTYCHAR1
+# define PTYCHAR1 "pqrsPQRS"
+# undef PTYCHAR2
+# define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv"
+# else
+# ifndef PTYCHAR1
+# define PTYCHAR1 "pqrstuvwxyz"
+# endif
+# ifndef PTYCHAR2
+# define PTYCHAR2 "0123456789abcdef"
+# endif
# endif
for (c1 = PTYCHAR1; *c1; c1++) {
pty_name[(sizeof(pty_name) - 3)] =