diff options
author | ed <ed@FreeBSD.org> | 2009-03-24 05:08:37 +0800 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-03-24 05:08:37 +0800 |
commit | 2dbb0a015959af39d5b7a27710b08c35369f4b74 (patch) | |
tree | 75d039c400ff3127628d94e18dd0e14c53bf63e1 /x11/rxvt | |
parent | 75a72c7d274493c537fdaf4804d008653a8de6d6 (diff) | |
download | freebsd-ports-gnome-2dbb0a015959af39d5b7a27710b08c35369f4b74.tar.gz freebsd-ports-gnome-2dbb0a015959af39d5b7a27710b08c35369f4b74.tar.zst freebsd-ports-gnome-2dbb0a015959af39d5b7a27710b08c35369f4b74.zip |
Multiple fixes to rxvt:
- Fix compilation on -CURRENT by letting it use posix_openpt() to
allocate PTYs.
- Fix compilation when enabling WITH_GREEK.
PR: ports/132928
Approved by: port maintainer
Diffstat (limited to 'x11/rxvt')
-rw-r--r-- | x11/rxvt/Makefile | 3 | ||||
-rw-r--r-- | x11/rxvt/files/patch-ad | 16 | ||||
-rw-r--r-- | x11/rxvt/files/patch-grkelot.c | 26 | ||||
-rw-r--r-- | x11/rxvt/files/patch-logging.c | 12 |
4 files changed, 49 insertions, 8 deletions
diff --git a/x11/rxvt/Makefile b/x11/rxvt/Makefile index 3534807058ad..44c52d1aad50 100644 --- a/x11/rxvt/Makefile +++ b/x11/rxvt/Makefile @@ -95,6 +95,9 @@ CONFIGURE_ARGS+= --enable-xim CONFIGURE_ARGS+= --enable-xterm-scroll .endif +post-patch: + @${REINPLACE_CMD} -e 's|getpt()|posix_openpt(0)|' ${WRKSRC}/configure + post-install: @${CHMOD} 4711 ${PREFIX}/bin/rxvt diff --git a/x11/rxvt/files/patch-ad b/x11/rxvt/files/patch-ad index eb7db3a2dc0b..fa962bd1fd41 100644 --- a/x11/rxvt/files/patch-ad +++ b/x11/rxvt/files/patch-ad @@ -1,14 +1,14 @@ --- src/command.c.orig Thu Nov 1 22:18:35 2001 +++ src/command.c Mon Oct 10 00:29:07 2005 -@@ -322,7 +322,7 @@ - ttydev = tty_name; +@@ -254,7 +254,7 @@ + extern char *ptsname(); - # define PTYCHAR1 "pqrstuvwxyz" --# define PTYCHAR2 "0123456789abcdef" -+# define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv" - for (c1 = PTYCHAR1; *c1; c1++) { - ptydev[len] = ttydev[len] = *c1; - for (c2 = PTYCHAR2; *c2; c2++) { + # ifdef PTYS_ARE_GETPT +- if ((fd = getpt()) >= 0) { ++ if ((fd = posix_openpt(O_RDWR)) >= 0) { + # else + if ((fd = open("/dev/ptmx", O_RDWR)) >= 0) { + # endif @@ -519,6 +519,9 @@ # ifdef VEOL2 FOO(VEOL2, "VEOL2"); diff --git a/x11/rxvt/files/patch-grkelot.c b/x11/rxvt/files/patch-grkelot.c new file mode 100644 index 000000000000..c5824b44e0a1 --- /dev/null +++ b/x11/rxvt/files/patch-grkelot.c @@ -0,0 +1,26 @@ +--- src/grkelot.c ++++ src/grkelot.c +@@ -80,10 +80,6 @@ + #define MAX_SWITCHER 2U /* per state */ + #define MAX_VAL 256 /* for temp allocation */ + +-typedef unsigned char u_char; +-typedef unsigned int u_int; +-typedef unsigned long u_long; +- + typedef struct s_xlat { + u_int first, last; + u_int *pval; /* array of translated values */ +@@ -158,9 +154,9 @@ + + #define NUM_XLAT_TYPES (sizeof(xlat_type) / sizeof(xlat_type[0])) + +-static void kstate_add_xlat(char *str); +-static void kstate_add_switcher(char *str); +-static void kstate_set_life(char *str); ++void kstate_add_xlat(char *str); ++void kstate_add_switcher(char *str); ++void kstate_set_life(char *str); + + /* --- Functions ------------- */ + /* INTPROTO */ diff --git a/x11/rxvt/files/patch-logging.c b/x11/rxvt/files/patch-logging.c new file mode 100644 index 000000000000..63bc9440d194 --- /dev/null +++ b/x11/rxvt/files/patch-logging.c @@ -0,0 +1,12 @@ +--- src/logging.c ++++ src/logging.c +@@ -131,6 +131,9 @@ + STRNCPY(ut_id, (pty + 3), sizeof(ut_id)); + else + #ifndef USE_SYSV_UTMP ++ if (!strncmp(pty, "pts/", 4)) ++ STRNCPY(ut_id, (pty + 4), sizeof(ut_id)); ++ else + { + print_error("can't parse tty name \"%s\"", pty); + ut_id[0] = '\0'; /* entry not made */ |