On Wed, 2010-04-21 at 20:45 +0100, Nicholas Marriott wrote:
> Actually, I lie, we need curses.h for ncurses because term.h doesn't
> include OK :-).
The values for OK and ERR won't ever change, so this new patch defines
them if they don't exist. It also removes the broken curses.h detection
on NetBSD ;)
Thanks
Roy
Index: configure
===================================================================
RCS file: /cvsroot/tmux/tmux/configure,v
retrieving revision 1.49
diff -u -p -r1.49 configure
--- configure 5 Apr 2010 22:28:25 -0000 1.49
+++ configure 21 Apr 2010 21:22:40 -0000
@@ -29,7 +29,6 @@ echo "# $TMUX_PLATFORM" >$CONFIG_MK
cat <<EOF >>$CONFIG_H
#undef HAVE_ASPRINTF
#undef HAVE_BROKEN_CMSG_FIRSTHDR
-#undef HAVE_BROKEN_CURSES_H
#undef HAVE_BROKEN_KQUEUE
#undef HAVE_BROKEN_POLL
#undef HAVE_BZERO
@@ -234,7 +233,6 @@ EOF
NetBSD)
cat <<EOF >>$CONFIG_H
#define HAVE_ASPRINTF
-#define HAVE_BROKEN_CURSES_H
#define HAVE_BZERO
#define HAVE_DAEMON
#define HAVE_FGETLN
@@ -250,10 +248,20 @@ EOF
#define HAVE_UTIL_H
#define HAVE_U_INT
EOF
- cat <<EOF >>$CONFIG_MK
+ # NetBSD-6 has it's own terminfo implementation
+ if test -f /lib/libterminfo.so; then
+ cat <<EOF >>$CONFIG_MK
+LIBS+= -lterminfo
+EOF
+ else
+ cat <<EOF >>$CONFIG_MK
CPPFLAGS+= -I/usr/pkg/include
LDFLAGS+= -L/usr/pkg/lib
-LIBS+= -lncurses -lcrypt -lutil -levent
+LIBS+= -lncurses
+EOF
+ fi
+ cat <<EOF >>$CONFIG_MK
+LIBS+= -lcrypt -lutil -levent
SRCS+= osdep-netbsd.c \
compat/strtonum.c \
compat/vis.c \
Index: tty-term.c
===================================================================
RCS file: /cvsroot/tmux/tmux/tty-term.c,v
retrieving revision 1.41
diff -u -p -r1.41 tty-term.c
--- tty-term.c 18 Dec 2009 07:42:30 -0000 1.41
+++ tty-term.c 21 Apr 2010 21:22:40 -0000
@@ -18,11 +18,6 @@
#include <sys/types.h>
-#ifdef HAVE_BROKEN_CURSES_H
-#include <ncurses.h>
-#else
-#include <curses.h>
-#endif
#include <fnmatch.h>
#include <stdlib.h>
#include <string.h>
@@ -30,6 +25,12 @@
#include "tmux.h"
+/* term.h does not always define ERR or OK */
+#ifndef ERR
+#define ERR (-1) /* Error return */
+#define OK (0) /* Success return */
+#endif
+
void tty_term_override(struct tty_term *, const char *);
char *tty_term_strip(const char *);
------------------------------------------------------------------------------
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users