aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/Makefile.in6
-rw-r--r--xorg-server/os/utils.c44
2 files changed, 45 insertions, 5 deletions
diff --git a/xorg-server/os/Makefile.in b/xorg-server/os/Makefile.in
index 92ca50dcc..542e24340 100644
--- a/xorg-server/os/Makefile.in
+++ b/xorg-server/os/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -288,8 +288,11 @@ SHELL = @SHELL@
SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@
SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@
STRIP = @STRIP@
+SYSCONFDIR = @SYSCONFDIR@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
+UDEV_CFLAGS = @UDEV_CFLAGS@
+UDEV_LIBS = @UDEV_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
VERSION = @VERSION@
@@ -349,6 +352,7 @@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@
XWIN_SYS_LIBS = @XWIN_SYS_LIBS@
YACC = @YACC@
YFLAGS = @YFLAGS@
+__XCONFIGDIR__ = @__XCONFIGDIR__@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index a3fc1acf8..b5015b2c9 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -517,9 +517,7 @@ void UseMsg(void)
#ifdef RLIMIT_STACK
ErrorF("-ls int limit stack space to N Kb\n");
#endif
-#ifdef SERVER_LOCK
ErrorF("-nolock disable the locking mechanism\n");
-#endif
#ifndef NOLOGOHACK
ErrorF("-logo enable logo in screen saver\n");
ErrorF("nologo disable logo in screen saver\n");
@@ -771,7 +769,6 @@ ProcessCommandLine(int argc, char *argv[])
UseMsg();
}
#endif
-#ifdef SERVER_LOCK
else if ( strcmp ( argv[i], "-nolock") == 0)
{
#if !defined(WIN32) && !defined(__CYGWIN__)
@@ -781,7 +778,6 @@ ProcessCommandLine(int argc, char *argv[])
#endif
nolock = TRUE;
}
-#endif
#ifndef NOLOGOHACK
else if ( strcmp( argv[i], "-logo") == 0)
{
@@ -1885,6 +1881,46 @@ CheckUserAuthorization(void)
#endif
}
+/*
+ * Tokenize a string into a NULL terminated array of strings. Always returns
+ * an allocated array unless an error occurs.
+ */
+char**
+xstrtokenize(const char *str, const char *separators)
+{
+ char **list, **nlist;
+ char *tok, *tmp;
+ unsigned num = 0, n;
+
+ if (!str)
+ return NULL;
+ list = calloc(1, sizeof(*list));
+ if (!list)
+ return NULL;
+ tmp = strdup(str);
+ if (!tmp)
+ goto error;
+ for (tok = strtok(tmp, separators); tok; tok = strtok(NULL, separators)) {
+ nlist = realloc(list, (num + 2) * sizeof(*list));
+ if (!nlist)
+ goto error;
+ list = nlist;
+ list[num] = strdup(tok);
+ if (!list[num])
+ goto error;
+ list[++num] = NULL;
+ }
+ free(tmp);
+ return list;
+
+error:
+ free(tmp);
+ for (n = 0; n < num; n++)
+ free(list[n]);
+ free(list);
+ return NULL;
+}
+
#ifdef __SCO__
#include <fcntl.h>