Hi folks,

find the patch attached to make GNU readline 8.0:

* respect HP-UX's faulty tgetent()
* properly create a shared library

I have positively tested it on
HP-UX deblndw0 B.11.31 U ia64 HP-UX
aCC: HP C/aC++ B3910B A.06.29 [Oct 18 2016]

Bash 5.0, ktutil, Python 3 successfully link against and run.
bash-5.0# ldd /opt/ports/lib/hpux32/libreadline.so

/opt/ports/lib/hpux32/libreadline.so:
        libxcurses.so.1 =>      /usr/lib/hpux32/libxcurses.so.
bash-5.0# ldd /opt/ports/lib/hpux32/libhistory.so

/opt/ports/lib/hpux32/libhistory.so:
        libxcurses.so.1 =>      /usr/lib/hpux32/libxcurses.so.1

Can you apply this one to your canonical Git repo?

Michael
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);
_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to