diff -ur support/shobj-conf support/shobj-conf --- support/shobj-conf 2016-10-05 22:02:11 +0000 +++ support/shobj-conf 2019-05-07 14:13:40 +0000 @@ -398,21 +398,17 @@ ;; hpux11*) - SHOBJ_STATUS=unsupported - SHLIB_STATUS=unsupported - - # If you are using the HP ANSI C compiler, you can uncomment and use - # this code (I have not tested it) -# SHOBJ_STATUS=supported -# SHLIB_STATUS=supported -# -# SHOBJ_CFLAGS='+z' -# SHOBJ_LD='ld' -# SHOBJ_LDFLAGS='-b +s +h $@' + SHOBJ_STATUS=supported + SHLIB_STATUS=supported # -# SHLIB_XLDFLAGS='+b $(libdir)' -# SHLIB_LIBSUFF='sl' -# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + SHOBJ_CFLAGS='+z' + SHOBJ_LD='$(CC)' + SHOBJ_LDFLAGS='-b -Wl,+s -Wl,+h,$@' + + SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' + SHLIB_LIBSUFF='so' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' + SHLIB_LIBS='$(TERMCAP_LIB)' ;; diff -ur terminal.c terminal.c --- terminal.c 2018-10-29 15:56:27 +0000 +++ terminal.c 2019-05-07 14:00:31 +0000 @@ -483,7 +483,14 @@ tgetent_ret = tgetent (term_buffer, term); } +/* On HP-UX tgetent returns 0 on success and -1 if there is no entry or the + * terminfo database has not been found + */ +#ifdef __hpux + if (tgetent_ret < 0) +#else if (tgetent_ret <= 0) +#endif { FREE (term_string_buffer); FREE (term_buffer);