emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9076a63 1/3: Port to Solaris 10


From: Paul Eggert
Subject: master 9076a63 1/3: Port to Solaris 10
Date: Fri, 1 Jan 2021 15:58:25 -0500 (EST)

branch: master
commit 9076a631fe331763414a5d323496846d563ccaa0
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Port to Solaris 10
    
    * configure.ac: Instead of AC_CHECK_HEADER, use AC_COMPILE_IFELSE
    with X11/Intrinsic.h when checking for X11/extensions/Xrender.h.
    This suppresses a bogus "report a bug to bug-gnu-emacs" diagnostic
    from 'configure' in Solaris 10.
    (SETUP_SLAVE_PTY): Adjust to recent renaming of forkin to
    std_in in callproc.c.  Needed on Solaris and Unixware.
    * lib-src/Makefile.in (LIB_GETRANDOM, LIBS_ETAGS): New vars,
    needed because on Solaris 10 the Gnulib tempname module now needs
    the -lrt library for clock_gettime.  Throw in the LIB_GETRANDOM
    stuff too while we’re at it; from getrandom.m4 it seems to be
    needed for MingW.
    (LIBS_MOVE, etags_libs): Use them.
    * src/callproc.c [SETUP_SLAVE_PTY]: Include sys/stream.h
    and sys/stropts.h, for SETUP_SLAVE_PTY’s definiens.
    * src/process.c [NEED_BSDTTY]: Don’t include bsdtty.h; hasn’t been
    needed in years.
    [USG5_4]: Don’t include sys/stream.h or sys/stropts.h; these
    directives havbe been moved to callproc.c because the only use of
    SETUP_SLAVE_PTY is there now.
---
 configure.ac        | 9 +++++++--
 lib-src/Makefile.in | 9 +++++++--
 src/callproc.c      | 5 +++++
 src/process.c       | 9 ---------
 4 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 574024a..5f822fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3291,7 +3291,12 @@ fi
 # Check for XRender
 HAVE_XRENDER=no
 if test "${HAVE_X11}" = "yes"; then
-  AC_CHECK_HEADER([X11/extensions/Xrender.h],
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM(
+       [[#include <X11/Intrinsic.h>
+        #include <X11/extensions/Xrender.h>
+       ]],
+       [[return !XRenderQueryExtension;]])],
     [AC_CHECK_LIB([Xrender], [XRenderQueryExtension], [HAVE_XRENDER=yes])])
   if test $HAVE_XRENDER = yes; then
     XRENDER_LIBS="-lXrender"
@@ -4926,7 +4931,7 @@ case $opsys in
     AC_DEFINE(FIRST_PTY_LETTER, ['z'])
     AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
     dnl Push various streams modules onto a PTY channel.  Used in process.c.
-    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (forkin, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (forkin, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (forkin, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
+    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (std_in, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (std_in, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (std_in, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
     ;;
 esac
 
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 064342b..0a6dd82 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -204,14 +204,19 @@ LIBRESOLV=@LIBRESOLV@
 LIBS_MAIL=@LIBS_MAIL@
 ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+## empty or -lbcrypt or -ladvapi32
+LIB_GETRANDOM = @LIB_GETRANDOM@
 ## Whatever libraries are needed for euidaccess
 LIB_EACCESS=@LIB_EACCESS@
 ## empty or -lwsock2 for MinGW
 LIB_WSOCK32=@LIB_WSOCK32@
 
+## Extra libraries for etags
+LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM)
+
 ## Extra libraries to use when linking movemail.
 LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
-            $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32)
+  $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32) $(LIBS_ETAGS)
 
 ## Extra libraries when linking emacsclient
 ## (empty or -lcomctl32 for MinGW)
@@ -360,7 +365,7 @@ TAGS: etags${EXEEXT} ${tagsfiles}
        $(MAKE) -C ../lib all
 
 etags_deps = ${srcdir}/etags.c $(NTLIB) $(config_h)
-etags_libs = $(NTLIB) $(LOADLIBES)
+etags_libs = $(NTLIB) $(LOADLIBES) $(LIBS_ETAGS)
 
 etags${EXEEXT}: ${etags_deps}
        $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -o $@ $< $(etags_libs)
diff --git a/src/callproc.c b/src/callproc.c
index 7c5863e..8d2a561 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -30,6 +30,11 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 
 #include "lisp.h"
 
+#ifdef SETUP_SLAVE_PTY
+# include <sys/stream.h>
+# include <sys/stropts.h>
+#endif
+
 #ifdef WINDOWSNT
 #include <sys/socket.h>        /* for fcntl */
 #include <windows.h>
diff --git a/src/process.c b/src/process.c
index eaa7fa1..06d750d 100644
--- a/src/process.c
+++ b/src/process.c
@@ -80,15 +80,6 @@ static struct rlimit nofile_limit;
 
 #endif
 
-#ifdef NEED_BSDTTY
-#include <bsdtty.h>
-#endif
-
-#ifdef USG5_4
-# include <sys/stream.h>
-# include <sys/stropts.h>
-#endif
-
 #ifdef HAVE_UTIL_H
 #include <util.h>
 #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]