diff options
author | martin <martin@pkgsrc.org> | 2012-11-26 16:56:15 +0000 |
---|---|---|
committer | martin <martin@pkgsrc.org> | 2012-11-26 16:56:15 +0000 |
commit | e8f4ca2777e2d71ee0eda86116587041fd87fa11 (patch) | |
tree | 5343b3280b69f386f7ba37c4ec0f8efdc599cd00 /editors/emacs24/patches | |
parent | 12e203fdbf0fa5f54f8e09e0f5a967ff482359ce (diff) | |
download | pkgsrc-e8f4ca2777e2d71ee0eda86116587041fd87fa11.tar.gz |
Use openpty() from libutil on *BSD (patch from Peter Bex).
Declare proper POSIX version for fcntl.h *at functions.
Diffstat (limited to 'editors/emacs24/patches')
-rw-r--r-- | editors/emacs24/patches/patch-aa | 11 | ||||
-rw-r--r-- | editors/emacs24/patches/patch-ab | 11 | ||||
-rw-r--r-- | editors/emacs24/patches/patch-lib-careadlinkat.h | 14 | ||||
-rw-r--r-- | editors/emacs24/patches/patch-src-s-bsd--common.h | 29 |
4 files changed, 63 insertions, 2 deletions
diff --git a/editors/emacs24/patches/patch-aa b/editors/emacs24/patches/patch-aa index 42b3dafbd51..c3fd99bf4b8 100644 --- a/editors/emacs24/patches/patch-aa +++ b/editors/emacs24/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.3 2012/10/03 21:32:42 marino Exp $ +$NetBSD: patch-aa,v 1.4 2012/11/26 16:56:16 martin Exp $ Add DragonFly @@ -19,6 +19,15 @@ Add DragonFly ## OpenBSD ports *-*-openbsd* ) +@@ -955,7 +955,7 @@ + ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. + aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; + +- freebsd) LIBS_SYSTEM="-lutil" ;; ++ freebsd|netbsd|openbsd) LIBS_SYSTEM="-lutil" ;; + + hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; + @@ -999,6 +1007,11 @@ case $opsys in LIB_MATH= START_FILES='pre-crt0.o' diff --git a/editors/emacs24/patches/patch-ab b/editors/emacs24/patches/patch-ab index f918185a5f5..990fb7db2b6 100644 --- a/editors/emacs24/patches/patch-ab +++ b/editors/emacs24/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.3 2012/10/03 21:32:42 marino Exp $ +$NetBSD: patch-ab,v 1.4 2012/11/26 16:56:16 martin Exp $ Add DragonFly @@ -20,6 +20,15 @@ Add DragonFly ## OpenBSD ports *-*-openbsd* ) opsys=openbsd +@@ -7854,7 +7854,7 @@ + ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. + aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; + +- freebsd) LIBS_SYSTEM="-lutil" ;; ++ freebsd|netbsd|openbsd) LIBS_SYSTEM="-lutil" ;; + + hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; + @@ -8095,6 +8104,11 @@ case $opsys in LIB_MATH= START_FILES='pre-crt0.o' diff --git a/editors/emacs24/patches/patch-lib-careadlinkat.h b/editors/emacs24/patches/patch-lib-careadlinkat.h new file mode 100644 index 00000000000..53014e43d79 --- /dev/null +++ b/editors/emacs24/patches/patch-lib-careadlinkat.h @@ -0,0 +1,14 @@ +$NetBSD: patch-lib-careadlinkat.h,v 1.1 2012/11/26 16:56:16 martin Exp $ + +# the *at functions are only available for newer POSIX versions + +--- lib/careadlinkat.h.orig 2012-08-23 07:33:42.000000000 +0200 ++++ lib/careadlinkat.h 2012-11-26 17:22:41.000000000 +0100 +@@ -20,6 +20,7 @@ + #ifndef _GL_CAREADLINKAT_H + #define _GL_CAREADLINKAT_H + ++#define _POSIX_C_SOURCE 200809L + #include <fcntl.h> + #include <unistd.h> + diff --git a/editors/emacs24/patches/patch-src-s-bsd--common.h b/editors/emacs24/patches/patch-src-s-bsd--common.h new file mode 100644 index 00000000000..25ebbc7d9a6 --- /dev/null +++ b/editors/emacs24/patches/patch-src-s-bsd--common.h @@ -0,0 +1,29 @@ +$NetBSD: patch-src-s-bsd--common.h,v 1.1 2012/11/26 16:56:16 martin Exp $ + +# make NetBSD use openpty(), like MacOS + +--- src/s/bsd-common.h.orig 2012-11-14 22:04:22.000000000 +0100 ++++ src/s/bsd-common.h 2012-11-14 22:23:22.000000000 +0100 +@@ -59,6 +59,21 @@ + + /* Define HAVE_PTYS if the system supports pty devices. */ + #define HAVE_PTYS ++/* Run only once. We need a `for'-loop because the code uses `continue'. */ ++#define PTY_ITERATION int i; for (i = 0; i < 1; i++) ++#define PTY_NAME_SPRINTF /* none */ ++#define PTY_TTY_NAME_SPRINTF /* none */ ++ ++#define PTY_OPEN \ ++ do \ ++ { \ ++ int slave; \ ++ if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) \ ++ fd = -1; \ ++ else \ ++ emacs_close (slave); \ ++ } \ ++ while (0) + + /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ + #define HAVE_SOCKETS + |