]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
openpty: Remove support for IRIX.
authorBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 21:13:08 +0000 (23:13 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 21:13:08 +0000 (23:13 +0200)
* lib/openpty.c (openpty): Remove code for IRIX.
* m4/pty.m4 (gl_FUNC_OPENPTY): Don't test for _getpty.

ChangeLog
lib/openpty.c
m4/pty.m4

index 7d5ab08d270c04388447e3ece673558be93c36a8..d313f33ee3479d29a273e766d1f8a3d776eddbf5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-10  Bruno Haible  <bruno@clisp.org>
 
+       openpty: Remove support for IRIX.
+       * lib/openpty.c (openpty): Remove code for IRIX.
+       * m4/pty.m4 (gl_FUNC_OPENPTY): Don't test for _getpty.
+
        nproc: Remove support for IRIX.
        * lib/nproc.c: Remove code for IRIX.
        * m4/nproc.m4 (gl_PREREQ_NPROC): Don't test for <sys/sysmp.h> and sysmp.
index fc93e32bb4eeda33c36b3becc62971d59ca2cc62..0d6f80f40b14ad1dcef8a1386407d45284de355b 100644 (file)
@@ -47,7 +47,7 @@ openpty (_GL_UNUSED int *amaster, _GL_UNUSED int *aslave,
   return -1;
 }
 
-#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10 */
+#else /* AIX 5.1, HP-UX 11, Solaris 10 */
 
 # include <fcntl.h>
 # include <stdlib.h>
@@ -67,36 +67,24 @@ openpty (int *amaster, int *aslave, char *name,
   char *slave_name;
   int slave;
 
-# if HAVE__GETPTY /* IRIX */
-
-  slave_name = _getpty (&master, O_RDWR, 0622, 0);
-  if (slave_name == NULL)
-    return -1;
-
-# else /* AIX 5.1, HP-UX 11, Solaris 10, mingw */
-
   /* This call uses the 'posix_openpt' module.  */
   master = posix_openpt (O_RDWR | O_NOCTTY);
   if (master < 0)
     return -1;
 
-# endif
-
   /* This call does not require a dependency to the 'grantpt' module,
-     because AIX, HP-UX, IRIX, Solaris all have the grantpt() function.  */
+     because AIX, HP-UX, Solaris all have the grantpt() function.  */
   if (grantpt (master))
     goto fail;
 
   /* This call does not require a dependency to the 'unlockpt' module,
-     because AIX, HP-UX, IRIX, Solaris all have the unlockpt() function.  */
+     because AIX, HP-UX, Solaris all have the unlockpt() function.  */
   if (unlockpt (master))
     goto fail;
 
-# if !HAVE__GETPTY /* !IRIX */
   slave_name = ptsname (master);
   if (slave_name == NULL)
     goto fail;
-# endif
 
   slave = open (slave_name, O_RDWR | O_NOCTTY);
   if (slave == -1)
index db9e73dcf41528a3b6047276784e7b085d6cc9be..3a919ab951b74f537a66d1506695478d8e1b94a8 100644 (file)
--- a/m4/pty.m4
+++ b/m4/pty.m4
@@ -1,5 +1,5 @@
 # pty.m4
-# serial 20
+# serial 21
 dnl Copyright (C) 2010-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -154,7 +154,6 @@ AC_DEFUN([gl_FUNC_OPENPTY],
     dnl The system does not have openpty.
     HAVE_OPENPTY=0
     dnl Prerequisites of lib/openpty.c in this case.
-    AC_CHECK_FUNCS([_getpty])
     gl_CHECK_FUNCS_ANDROID([posix_openpt], [[#include <stdlib.h>]])
   fi
 ])