- (stevesk) pty.c: use __hpux to identify HP-UX.
diff --git a/ChangeLog b/ChangeLog
index 0e5113c..bf69859 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
  - (bal) auth2-skey.c - Checked in.  Missing from portable tree.
  - (bal) Reworked NEWS-OS and NeXT ports to extract waitpid() and
    setsid() into more common files
+ - (stevesk) pty.c: use __hpux to identify HP-UX.
 
 20001029
  - (stevesk) Fix typo in auth.c: USE_PAM not PAM
diff --git a/pty.c b/pty.c
index 04004d2..cdf1d12 100644
--- a/pty.c
+++ b/pty.c
@@ -117,12 +117,15 @@
 		return 0;
 	}
 #ifndef HAVE_CYGWIN
-	/* Push the appropriate streams modules, as described in Solaris pts(7). */
+	/*
+	 * Push the appropriate streams modules, as described in Solaris pts(7).
+	 * HP-UX pts(7) doesn't have ttcompat module.
+	 */
 	if (ioctl(*ttyfd, I_PUSH, "ptem") < 0)
 		error("ioctl I_PUSH ptem: %.100s", strerror(errno));
 	if (ioctl(*ttyfd, I_PUSH, "ldterm") < 0)
 		error("ioctl I_PUSH ldterm: %.100s", strerror(errno));
-#ifndef _HPUX_SOURCE
+#ifndef __hpux
 	if (ioctl(*ttyfd, I_PUSH, "ttcompat") < 0)
 		error("ioctl I_PUSH ttcompat: %.100s", strerror(errno));
 #endif