merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214

This commit is contained in:
Kaleb Keithley
2004-02-23 21:37:29 +00:00
parent 30ac3efde2
commit 03d893bff9
69 changed files with 1792 additions and 520 deletions

View File

@@ -1,4 +1,4 @@
/* $XdotOrg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.1.4.4 2003/12/18 19:29:15 kaleb Exp $ */
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/*
@@ -50,7 +50,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/os/utils.c,v 3.95 2003/10/01 18:36:38 alanh Exp $ */
/* $XFree86: xc/programs/Xserver/os/utils.c,v 3.97 2004/01/09 00:35:06 dawes Exp $ */
#ifdef __CYGWIN__
#include <stdlib.h>
@@ -245,6 +245,7 @@ LockServer(void)
int lfd, i, haslock, l_pid, t;
char *tmppath = NULL;
int len;
char port[20];
if (nolock) return;
/*
@@ -259,13 +260,14 @@ LockServer(void)
FatalError("No TMP dir found\n");
#endif
sprintf(port, "%d", atoi(display));
len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) :
strlen(LOCK_TMP_PREFIX);
len += strlen(tmppath) + strlen(display) + strlen(LOCK_SUFFIX) + 1;
len += strlen(tmppath) + strlen(port) + strlen(LOCK_SUFFIX) + 1;
if (len > sizeof(LockFile))
FatalError("Display name `%s' is too long\n", display);
(void)sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, display);
(void)sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, display);
FatalError("Display name `%s' is too long\n", port);
(void)sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, port);
(void)sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port);
/*
* Create a temporary file containing our PID. Attempt three times
@@ -360,7 +362,7 @@ LockServer(void)
*/
unlink(tmp);
FatalError("Server is already active for display %s\n%s %s\n%s\n",
display, "\tIf this server is no longer running, remove",
port, "\tIf this server is no longer running, remove",
LockFile, "\tand start again.");
}
}
@@ -585,8 +587,10 @@ ProcessCommandLine(int argc, char *argv[])
defaultKeyboardControl.autoRepeat = TRUE;
#ifdef PART_NET
PartialNetwork = TRUE;
#ifdef NO_PART_NET
PartialNetwork = FALSE;
#else
PartialNetwork = TRUE;
#endif
for ( i = 1; i < argc; i++ )