Module Name:    xsrc
Committed By:   mrg
Date:           Sun Mar 11 10:46:02 UTC 2018

Modified Files:
        xsrc/external/mit/xinit/dist: compile startx.cpp xinit.c

Log Message:
merge xinit 1.4.0.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xinit/dist/compile
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xinit/dist/startx.cpp
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xinit/dist/xinit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xinit/dist/compile
diff -u xsrc/external/mit/xinit/dist/compile:1.3 xsrc/external/mit/xinit/dist/compile:1.4
--- xsrc/external/mit/xinit/dist/compile:1.3	Mon Mar 17 09:43:11 2014
+++ xsrc/external/mit/xinit/dist/compile	Sun Mar 11 10:46:02 2018
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify

Index: xsrc/external/mit/xinit/dist/startx.cpp
diff -u xsrc/external/mit/xinit/dist/startx.cpp:1.7 xsrc/external/mit/xinit/dist/startx.cpp:1.8
--- xsrc/external/mit/xinit/dist/startx.cpp:1.7	Tue Jul 28 15:45:46 2015
+++ xsrc/external/mit/xinit/dist/startx.cpp	Sun Mar 11 10:46:02 2018
@@ -56,7 +56,7 @@ defaultclient=XTERM
 defaultserver=XSERVER
 defaultclientargs=""
 defaultserverargs="-noretro"
-defaultdisplay=":0"
+defaultdisplay=""
 clientargs=""
 serverargs=""
 vtarg=""
@@ -80,6 +80,10 @@ if ! defaults read $X11_PREFS_DOMAIN nol
     defaults write $X11_PREFS_DOMAIN nolisten_tcp -bool true
 fi
 
+if ! defaults read $X11_PREFS_DOMAIN enable_iglx > /dev/null 2>&1 ; then
+    defaults write $X11_PREFS_DOMAIN enable_iglx -bool false
+fi
+
 XCOMM First, start caching fonts
 if [ x`defaults read $X11_PREFS_DOMAIN cache_fonts` = x1 ] ; then
     if [ -x $bindir/font_cache ] ; then
@@ -91,10 +95,10 @@ if [ x`defaults read $X11_PREFS_DOMAIN c
     fi
 fi
 
-if [ -x XINITDIR/privileged_startx ] ; then
+if [ -x __libexecdir__/privileged_startx ] ; then
 	# Don't push this into the background becasue it can cause
 	# a race to create /tmp/.X11-unix
-	XINITDIR/privileged_startx
+	__libexecdir__/privileged_startx
 fi
 
 if [ x`defaults read $X11_PREFS_DOMAIN no_auth` = x0 ] ; then
@@ -105,6 +109,14 @@ fi
 
 if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then
     defaultserverargs="$defaultserverargs -nolisten tcp"
+else
+    defaultserverargs="$defaultserverargs -listen tcp"
+fi
+
+if [ x`defaults read $X11_PREFS_DOMAIN enable_iglx` = x1 ] ; then
+    defaultserverargs="$defaultserverargs +iglx"
+else
+    defaultserverargs="$defaultserverargs -iglx"
 fi
 
 XCOMM The second check is the real one.  The first is to hopefully avoid
@@ -120,7 +132,7 @@ enable_xauth=1
 XCOMM Automatically determine an unused $DISPLAY
 d=0
 while true ; do
-    [ -e /tmp/.X$d-lock ] || break
+    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break
     d=$(($d + 1))
 done
 defaultdisplay=":$d"
@@ -193,9 +205,9 @@ if [ x"$server" = x ]; then
     XCOMM the startx session being seen as inactive:
     XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491";
     tty=$(tty)
-    if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
+    if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
         tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
-        vtarg="vt$tty_num"
+        vtarg="vt$tty_num -keeptty"
     fi
 #endif
 
@@ -283,7 +295,7 @@ EOF
 
     XCOMM now add the same credentials to the client authority file
     XCOMM if '$displayname' already exists do not overwrite it as another
-    XCOMM server man need it. Add them to the '$xserverauthfile' instead.
+    XCOMM server may need it. Add them to the '$xserverauthfile' instead.
     for displayname in $authdisplay $hostname$authdisplay; do
         authcookie=`XAUTH list "$displayname" @@
         | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
@@ -326,11 +338,6 @@ if command -v deallocvt > /dev/null 2>&1
 fi
 #endif
 
-#ifdef macII
-Xrepair
-screenrestore
-#endif
-
 #if defined(sun)
 kbd_mode -a
 #endif

Index: xsrc/external/mit/xinit/dist/xinit.c
diff -u xsrc/external/mit/xinit/dist/xinit.c:1.6 xsrc/external/mit/xinit/dist/xinit.c:1.7
--- xsrc/external/mit/xinit/dist/xinit.c:1.6	Wed Jul 22 08:36:10 2015
+++ xsrc/external/mit/xinit/dist/xinit.c	Sun Mar 11 10:46:02 2018
@@ -638,7 +638,7 @@ shutdown(void)
             Fatal("Unable to run program \"%s\"", "kbd_mode");
             break;
 
-        case 1:
+        case -1:
             Error("fork failed");
             break;
 

Reply via email to