Martin's autoconf patch works for me on glibc-2.1.
I have changed ptsname_r to ptsname as requested.
It has been tested lightly:
Index: src/process.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/process.h,v
retrieving revision 1.8
diff -u -r1.8 process.h
--- process.h 1998/04/11 05:37:05 1.8
+++ process.h 1999/09/22 03:40:23
@@ -134,4 +134,12 @@
#endif /* emacs */
+#ifdef HAVE_GETPT
+#define PTY_ITERATION
+#define PTY_OPEN \
+ if ((fd = getpt()) < 0 || grantpt (fd) < 0 || unlockpt (fd) < 0) \
+ return -1;
+#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ptsname (fd));
+#endif
+
#endif /* _XEMACS_PROCESS_H_ */
Index: src/process-unix.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/process-unix.c,v
retrieving revision 1.11.2.5
diff -u -r1.11.2.5 process-unix.c
--- process-unix.c 1998/12/29 10:54:27 1.11.2.5
+++ process-unix.c 1999/09/22 03:47:27
@@ -265,7 +265,7 @@
if (access (pty_name, 6) != 0)
{
close (fd);
-#if !defined(IRIS) && !defined(__sgi)
+#if !defined(IRIS) && !defined(__sgi) && !defined (HAVE_GETPT)
continue;
#else
return -1;