* aclocal.m4 (KRB5_AC_PRIOCNTL_HACK): Check for Solaris patch
authorTom Yu <tlyu@mit.edu>
Fri, 19 Nov 2004 20:36:45 +0000 (20:36 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 19 Nov 2004 20:36:45 +0000 (20:36 +0000)
117171-11 (sparc) or 117172-11 (x86), which fixes the Solaris 9
bug which can cause final pty output to be on close.

ticket: 2776
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16891 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4

index 3af220123899660a03fc6f77e5b6a717a101e7eb..a00fc94d74ebcf5cbc07bbc574faf046c0cc4819 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-19  Tom Yu  <tlyu@mit.edu>
+
+       * aclocal.m4 (KRB5_AC_PRIOCNTL_HACK): Check for Solaris patch
+       117171-11 (sparc) or 117172-11 (x86), which fixes the Solaris 9
+       bug which can cause final pty output to be on close.
+
 2004-11-18  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in (install-headers-mkdirs): Create KRB5_INCDIR/gssrpc.
index a060ac94f6040d5a4fc7656d636983c831569e18..595e41dd4764f9654e42b957b7aee1da1d64db7c 100644 (file)
@@ -1636,14 +1636,37 @@ dnl KRB5_AC_PRIOCNTL_HACK
 dnl
 dnl
 AC_DEFUN([KRB5_AC_PRIOCNTL_HACK],
+[AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_LANG_COMPILER_REQUIRE])dnl
+AC_CACHE_CHECK([whether to use priocntl hack], [krb5_cv_priocntl_hack],
 [case $krb5_cv_host in
 *-*-solaris2.9*)
-       PRIOCNTL_HACK=1
+       if test "$cross_compiling" = yes; then
+               krb5_cv_priocntl_hack=yes
+       else
+               # Solaris patch 117171-11 (sparc) or 117172-11 (x86)
+               # fixes the Solaris 9 bug where final pty output
+               # gets lost on close.
+               if showrev -p | $AWK 'BEGIN { e = 1 }
+/Patch: 11717[[12]]/ { x = index[]([$]2, "-");
+if (substr[]([$]2, x + 1, length([$]2) - x) >= 11)
+{ e = 0 } else { e = 1 } }
+END { exit e; }'; then
+                       krb5_cv_priocntl_hack=no
+               else
+                       krb5_cv_priocntl_hack=yes
+               fi
+       fi
        ;;
 *)
-       PRIOCNTL_HACK=0
+       krb5_cv_priocntl_hack=no
        ;;
-esac
+esac])
+if test "$krb5_cv_priocntl_hack" = yes; then
+       PRIOCNTL_HACK=1
+else
+       PRIOCNTL_HACK=0
+fi
 AC_SUBST(PRIOCNTL_HACK)])
 dnl
 dnl