diff -u -ur configure.ac configure.ac --- /configure.ac 2019-06-11 20:12:01 +0000 +++ configure.ac 2019-08-27 22:08:08 +0000 @@ -632,7 +632,13 @@ * The value returned from tgetent on success. * Some HP-UX systems return 0 on success. */ -#define TGETENT_OK 1 +#ifdef __hpux +#define TGETENT_OK 0 +#define TGETFLAG_OK 0 +#else +#define TGETENT_OK 1 +#define TGETFLAG_OK 1 +#endif /* * HAVE_ANSI_PROTOS is 1 if your compiler supports ANSI function prototypes. diff -u -ur screen.c screen.c --- screen.c 2019-06-11 20:12:01 +0000 +++ screen.c 2019-08-27 22:07:34 +0000 @@ -674,7 +674,10 @@ return (*s != '\0' && *s != '0'); if (hardcopy) return (0); - return (tgetflag(capname)); + if (tgetflag(capname) == TGETFLAG_OK) + return 1; + else + return 0; } static int