[Pinfo-devel] [PATCH] Minor Cygwin compile errors

Snow snowl at snow.vg
Sat Jul 1 12:08:38 UTC 2006


Hi,

Thanks for pinfo, it's a big improvement on info.

I've attached a small patch that enabled pinfo to compile using Cygwin.
I've also tested that the patched source still compiles on Linux (Gentoo).

-- 
Snow
-------------- next part --------------
diff -ur pinfo-0.6.9-orig/macros/curses.m4 pinfo-0.6.9/macros/curses.m4
--- pinfo-0.6.9-orig/macros/curses.m4	2006-07-01 12:49:44.000000000 +0000
+++ pinfo-0.6.9/macros/curses.m4	2006-07-01 13:02:57.000000000 +0000
@@ -257,8 +257,8 @@
 	dnl save CFLAGS and LDFLAGS and set new ones
 	CFLAGS_OLD=$CFLAGS
 	CFLAGS="$CFLAGS $curses_includes"
-	LDFLAGS_OLD=$LDFLAGS
-	LDFLAGS="$LDFLAGS $curses_libs"
+	LIBS_OLD=$LIBS
+	LIBS="$LIBS $curses_libs"
 
 	dnl do the compile test 
 	AC_MSG_CHECKING([if curses is usable])
@@ -288,7 +288,7 @@
 
 	dnl restore variables
 	CFLAGS=$CFLAGS_OLD
-	LDFLAGS=$LDFLAGS_OLD
+	LIBS=$LIBS_OLD
 
 ])
 
diff -ur pinfo-0.6.9-orig/src/utils.c pinfo-0.6.9/src/utils.c
--- pinfo-0.6.9-orig/src/utils.c	2006-07-01 12:49:44.000000000 +0000
+++ pinfo-0.6.9/src/utils.c	2006-07-01 13:02:57.000000000 +0000
@@ -50,7 +50,13 @@
 #ifdef HAS_READLINE
 #include <readline/readline.h>
 #include <readline/history.h>
+
+#ifdef __CYGWIN__
+#include <ncurses/term.h>
+#else
 #include <term.h>
+#endif
+
 /* HAS_READLINE */
 #endif
 


More information about the Pinfo-devel mailing list