bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 2/2] aclocal.m4 (CF_MAN_PAGES): Rewrite term.h #includes as well.


From: G. Branden Robinson
Subject: [PATCH 2/2] aclocal.m4 (CF_MAN_PAGES): Rewrite term.h #includes as well.
Date: Thu, 26 Dec 2024 21:32:45 -0600

When not overwriting existing system header files, but instead creating
an "ncurses" or "ncursesw" subdirectory of $DESTDIR/include to house the
ncurses header files, perform the same transformation to the advertised
name of the "term.h" header file as we do to "curses.h".

Fixes scenarios like this:

SYNOPSIS
     #include <ncursesw/curses.h>
     #include <term.h>

     TERMINAL * cur_term;

We can't be confident that, say, an SVr4 Unix "term.h" works well with
an ncurses "curses.h".

Also see lines 409-420 of "INSTALL".
---
 aclocal.m4 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index b08857740..f444c6dfb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -6213,14 +6213,17 @@ CF_EOF
 
 if test "$with_overwrite" != yes ; then
 cat >>$cf_edit_man <<CF_EOF
-       sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < 
\$TMP >\$TMP.out
+       sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," \
+           -e "/\\#[    ]*include/s,<term.h,<ncurses$LIB_SUFFIX/term.h," \
+         < \$TMP >\$TMP.out
        mv \$TMP.out \$TMP
 CF_EOF
 fi
 
 if test "$with_curses_h" != yes ; then
 cat >>$cf_edit_man <<CF_EOF
-       sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+       sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," \
+         < \$TMP >\$TMP.out
        mv \$TMP.out \$TMP
 CF_EOF
 fi
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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