Use varargs tparm on netbsd

This needs to be defined _early_.
This commit is contained in:
Fabian Homborg 2018-12-11 16:48:11 +01:00
parent aaee5dd32d
commit a3085a3059
3 changed files with 4 additions and 2 deletions

View File

@ -324,6 +324,7 @@ AC_CHECK_FUNCS( futimens clock_gettime )
AC_CHECK_FUNCS( getpwent flock )
AC_CHECK_FUNCS( dirfd )
AC_CHECK_DECL( [__NetBSD__], AC_DEFINE([TPARM_VARARGS], 1, [ Make tparm take varargs ]) )
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
#
@ -554,6 +555,7 @@ AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[
#define TPARM_VARARGS 1
#if HAVE_NCURSES_H
#include <ncurses.h>
#elif HAVE_NCURSES_CURSES_H

View File

@ -43,7 +43,7 @@
#include "fallback.h" // IWYU pragma: keep
#include "util.h" // IWYU pragma: keep
#ifdef TPARM_SOLARIS_KLUDGE
#if defined(TPARM_SOLARIS_KLUDGE)
#undef tparm
char *tparm_solaris_kludge(char *str, long p1, long p2, long p3, long p4,

View File

@ -63,7 +63,7 @@ struct winsize {
#endif
#ifdef TPARM_SOLARIS_KLUDGE
#if defined(TPARM_SOLARIS_KLUDGE)
/// Solaris tparm has a set fixed of paramters in its curses implementation, work around this here.
#define tparm tparm_solaris_kludge
char *tparm_solaris_kludge(char *str, long p1 = 0, long p2 = 0, long p3 = 0, long p4 = 0,