mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-11 20:48:49 +00:00
cmake: restore check for fixed-args tparm ("Solaris tparm kludge")
This commit is contained in:
parent
64194d02fc
commit
ce46c80492
2 changed files with 31 additions and 2 deletions
|
@ -82,4 +82,33 @@ IF(EXISTS "/proc/self/stat")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
CHECK_TYPE_SIZE("wchar_t[8]" WCHAR_T_BITS LANGUAGE CXX)
|
CHECK_TYPE_SIZE("wchar_t[8]" WCHAR_T_BITS LANGUAGE CXX)
|
||||||
|
|
||||||
# Not checked yet: non-varargs tparm ("Solaris tparm kludge")
|
# Solaris, NetBSD and X/Open-conforming systems have a fixed-args tparm
|
||||||
|
SET(TPARM_INCLUDES)
|
||||||
|
IF(HAVE_NCURSES_H)
|
||||||
|
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <ncurses.h>\n")
|
||||||
|
ELSEIF(HAVE_NCURSES_CURSES_H)
|
||||||
|
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <ncurses/curses.h>\n")
|
||||||
|
ELSE()
|
||||||
|
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <curses.h>\n")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(HAVE_TERM_H)
|
||||||
|
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <term.h>\n")
|
||||||
|
ELSEIF(HAVE_NCURSES_TERM_H)
|
||||||
|
SET(TPARM_INCLUDES "${TPARM_INCLUDES}#include <ncurses/term.h>\n")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY})
|
||||||
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
|
${TPARM_INCLUDES}
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
tparm( \"\" );
|
||||||
|
}
|
||||||
|
"
|
||||||
|
TPARM_TAKES_VARARGS
|
||||||
|
)
|
||||||
|
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
IF(NOT TPARM_TAKES_VARARGS)
|
||||||
|
SET(TPARM_SOLARIS_KLUDGE 1)
|
||||||
|
ENDIF()
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
#define PACKAGE_NAME "fish"
|
#define PACKAGE_NAME "fish"
|
||||||
|
|
||||||
/* Define to 1 if tparm accepts a fixed amount of paramters. */
|
/* Define to 1 if tparm accepts a fixed amount of paramters. */
|
||||||
// #cmakedefine TPARM_SOLARIS_KLUDGE 1
|
#cmakedefine TPARM_SOLARIS_KLUDGE 1
|
||||||
|
|
||||||
/* The size of wchar_t in bits. */
|
/* The size of wchar_t in bits. */
|
||||||
#define WCHAR_T_BITS ${WCHAR_T_BITS}
|
#define WCHAR_T_BITS ${WCHAR_T_BITS}
|
||||||
|
|
Loading…
Reference in a new issue