bug-ncurses
[Top][All Lists]
Advanced

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

<ncursesw/curses.h> and addnwstr


From: Florian Weimer
Subject: <ncursesw/curses.h> and addnwstr
Date: Fri, 17 Mar 2023 19:15:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

ocaml-curses has a configure check like this

    AC_MSG_CHECKING(for wide character support in ncurses library)
    AC_TRY_LINK(
      [#include <wchar.h>
       #include CURSES_HEADER
      ],
      [wchar_t wch = 0;
       addnwstr(&wch, 1);],
      [AC_MSG_RESULT(yes)
       AC_DEFINE(HAVE_WIDE_CURSES, 1, [Defined if ncurses library includes wide 
character support])
       BOOL_WIDE_CURSES="true"],
      [AC_MSG_RESULT(no)])

CURSES_HEADER in our builds is <ncursesw/curses.h>.  But curiously, that
does not declare define, only <curses.h> does.  The symbol is defined in
libncursesw.so.6.2, though, which is why this issue is not apparent with
current compilers which still support implicit function declarations.

How should we resolve this?  Is there a better function for ocaml-curses
to probe?  What about portability beyond ncurses?

Thanks,
Florian




reply via email to

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