From: Bruno Haible Date: Wed, 10 Sep 2025 21:13:08 +0000 (+0200) Subject: openpty: Remove support for IRIX. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0fdb109298749c58105e2c4288f70e166427e1a;p=thirdparty%2Fgnulib.git openpty: Remove support for IRIX. * lib/openpty.c (openpty): Remove code for IRIX. * m4/pty.m4 (gl_FUNC_OPENPTY): Don't test for _getpty. --- diff --git a/ChangeLog b/ChangeLog index 7d5ab08d27..d313f33ee3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-09-10 Bruno Haible + 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 and sysmp. diff --git a/lib/openpty.c b/lib/openpty.c index fc93e32bb4..0d6f80f40b 100644 --- a/lib/openpty.c +++ b/lib/openpty.c @@ -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 # include @@ -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) diff --git a/m4/pty.m4 b/m4/pty.m4 index db9e73dcf4..3a919ab951 100644 --- 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 ]]) fi ])