texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6149] avoid ncurses dependency under mingw


From: Gavin D. Smith
Subject: [6149] avoid ncurses dependency under mingw
Date: Tue, 24 Feb 2015 18:21:51 +0000

Revision: 6149
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6149
Author:   gavin
Date:     2015-02-24 18:21:51 +0000 (Tue, 24 Feb 2015)
Log Message:
-----------
avoid ncurses dependency under mingw

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/terminal.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-02-24 18:18:24 UTC (rev 6148)
+++ trunk/ChangeLog     2015-02-24 18:21:51 UTC (rev 6149)
@@ -1,3 +1,9 @@
+2015-02-24  Eli Zaretskii  <address@hidden>
+
+       * info/terminal.c [HAVE_NCURSES_TERMCAP_H && __MINGW32__]: Don't
+       include ncurses/termcap.h on MinGW, even if it's available, to
+       avoid a useless run-time dependency on the ncurses shared library.
+
 2015-02-24  Gavin Smith  <address@hidden>
 
        * doc/texinfo.texi: Remove obsolete note about running

Modified: trunk/info/terminal.c
===================================================================
--- trunk/info/terminal.c       2015-02-24 18:18:24 UTC (rev 6148)
+++ trunk/info/terminal.c       2015-02-24 18:21:51 UTC (rev 6149)
@@ -30,12 +30,15 @@
 #include <signal.h>
 
 /* The Unix termcap interface code. */
-#ifdef HAVE_NCURSES_TERMCAP_H
+/* With MinGW, if the user has ncurses installed, including
+   ncurses/termcap.h will cause the Info binary depend on the ncurses
+   DLL, just because BC and PC are declared there, although they are
+   never used in the MinGW build.  Avoid that useless dependency.  */
+#if defined (HAVE_NCURSES_TERMCAP_H) && !defined (__MINGW32__)
 #include <ncurses/termcap.h>
-#else
-#ifdef HAVE_TERMCAP_H
+#elif defined (HAVE_TERMCAP_H)
 #include <termcap.h>
-#else
+#else  /* (!HAVE_NCURSES_TERMCAP_H || __MINGW32__) && !HAVE_TERMCAP_H */
 /* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC.
    Unfortunately, PC is a global variable used by the termcap library. */
 #undef PC
@@ -47,7 +50,6 @@
 extern int tgetnum (), tgetflag (), tgetent ();
 extern char *tgetstr (), *tgoto ();
 extern int tputs ();
-#endif /* not HAVE_TERMCAP_H */
 #endif /* not HAVE_NCURSES_TERMCAP_H */
 
 /* Function "hooks".  If you make one of these point to a function, that




reply via email to

[Prev in Thread] Current Thread [Next in Thread]