]> diplodocus.org Git - nmh/commitdiff
Fixed build on Cygwin by adding configure check for ncurses/termcap.h.
authorDavid Levine <levinedl@acm.org>
Mon, 16 Jan 2012 15:50:10 +0000 (09:50 -0600)
committerDavid Levine <levinedl@acm.org>
Mon, 16 Jan 2012 15:50:10 +0000 (09:50 -0600)
MACHINES
configure.ac
h/prototypes.h
uip/termsbr.c

index ddd30fa..60741ef 100644 (file)
--- a/MACHINES
+++ b/MACHINES
@@ -6,6 +6,7 @@ nmh is known to compile on the following platforms (save the
 exceptions noted below), using an ANSI C compiler, such as gcc.
 
 AIX 4.1.5.0.01
 exceptions noted below), using an ANSI C compiler, such as gcc.
 
 AIX 4.1.5.0.01
+Cygwin, setup version 2.763
 FreeBSD
 IRIX 6.5
 Linux 2.2, 2.3, 2.4 (glibc 2.1, glibc 2.2)
 FreeBSD
 IRIX 6.5
 Linux 2.2, 2.3, 2.4 (glibc 2.1, glibc 2.2)
@@ -38,6 +39,12 @@ Will not compile correctly unless you configure with the --enable-debug
 option. It appears to find conflicts in the headers only when debugging
 is disabled. With debugging enabled, it compiles and runs happily.
 
 option. It appears to find conflicts in the headers only when debugging
 is disabled. With debugging enabled, it compiles and runs happily.
 
+--------------------------------------
+Cygwin:
+
+Be sure to install Cygwin package libncurses-devel, in the Devel or
+Libs category.  And libncurses10 or later in the Lib category.
+
 --------------------------------------
 HPUX:
 
 --------------------------------------
 HPUX:
 
@@ -91,7 +98,7 @@ SunOS 4.1.1/4.1.3/4.1.4:
 
 You can't use the C compiler that comes with SunOS 4 since
 it isn't ANSI C.  But nmh builds just fine with gcc. With
 
 You can't use the C compiler that comes with SunOS 4 since
 it isn't ANSI C.  But nmh builds just fine with gcc. With
---enable-debug you will see a lot of warnings. 
+--enable-debug you will see a lot of warnings.
 --------------------------------------
 
 
 --------------------------------------
 
 
index 7b6859a..e4b0e9f 100644 (file)
@@ -485,7 +485,7 @@ AC_SUBST(OURDEFS)
 
 AC_HEADER_STDC
 AC_HEADER_TIOCGWINSZ
 
 AC_HEADER_STDC
 AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
+AC_CHECK_HEADERS(errno.h fcntl.h crypt.h ncurses/termcap.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
                  sys/param.h sys/time.h sys/stream.h)
 
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
                  sys/param.h sys/time.h sys/stream.h)
 
index fcc8f0c..12124cd 100644 (file)
@@ -6,13 +6,13 @@
 /*
  * missing system prototypes
  */
 /*
  * missing system prototypes
  */
-#ifndef HAVE_TERMCAP_H
-extern int tgetent (char *bp, char *name);
-extern int tgetnum (char *id);
-extern int tgetflag (char *id);
-extern char *tgetstr (char *id, char **area);
-extern char *tgoto (char *cm, int destcol, int destline);
-extern int tputs (char *cp, int affcnt, int (*outc) (int));
+#if ! defined(HAVE_TERMCAP_H) && ! defined (HAVE_NCURSES_TERMCAP_H)
+  extern int tgetent (char *bp, char *name);
+  extern int tgetnum (char *id);
+  extern int tgetflag (char *id);
+  extern char *tgetstr (char *id, char **area);
+  extern char *tgoto (char *cm, int destcol, int destline);
+  extern int tputs (char *cp, int affcnt, int (*outc) (int));
 #endif
 
 /*
 #endif
 
 /*
index f30a058..4804776 100644 (file)
 
 #include <termios.h>
 
 
 #include <termios.h>
 
+/* It might be better to tie this to the termcap_curses_order in
+   configure.ac.  It would be fine to check for ncurses/termcap.h
+   first on Linux, it's a symlink to termcap.h.  */
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
+#elif defined (HAVE_NCURSES_TERMCAP_H)
+# include <ncurses/termcap.h>
 #endif
 
 /* <sys/ioctl.h> is need anyway for ioctl()
 #endif
 
 /* <sys/ioctl.h> is need anyway for ioctl()