summaryrefslogtreecommitdiff
path: root/app/xinit
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 13:25:47 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 13:25:47 +0000
commita22fc870294684bbe4a11de228df75197659b51b (patch)
tree09efc4928e5dd5307417dafacd44e45b23c4c678 /app/xinit
parentfbeab7401184292815a346d44483ca8478250e72 (diff)
Get rid of the Xwrapper hack. OpenBSD doesn't support XFree86 3.3.x anymore.
Diffstat (limited to 'app/xinit')
-rw-r--r--app/xinit/xinit.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c
index 80eda27af..6c0dfe537 100644
--- a/app/xinit/xinit.c
+++ b/app/xinit/xinit.c
@@ -1,6 +1,6 @@
/* $Xorg: xinit.c,v 1.5 2001/02/09 02:05:49 xorgcvs Exp $ */
/* $XdotOrg: xc/programs/xinit/xinit.c,v 1.4 2005/10/04 01:27:34 ajax Exp $ */
-/* $OpenBSD: xinit.c,v 1.3 2007/09/15 17:12:01 matthieu Exp $ */
+/* $OpenBSD: xinit.c,v 1.4 2008/04/20 13:25:46 matthieu Exp $ */
/*
@@ -39,7 +39,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
-#include <sys/param.h>
#ifdef X_POSIX_C_SOURCE
#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
@@ -163,9 +162,6 @@ char xserverrcbuf[256];
#define OK_EXIT 0
#define ERR_EXIT 1
-char *default_wrapper = BINDIR "/Xwrapper";
-char real_server[MAXPATHLEN];
-char test_path[MAXPATHLEN];
char *default_server = "X";
char *default_display = ":0"; /* choose most efficient */
char *default_client[] = {"xterm", "-geometry", "+1+1", "-n", "login", NULL};
@@ -251,8 +247,7 @@ main(int argc, char *argv[], char *envp[])
register char **sptr = server;
register char **cptr = client;
register char **ptr;
- char *path, *p;
- int pid, n;
+ int pid;
int client_given = 0, server_given = 0;
int client_args_given = 0, server_args_given = 0;
int start_of_client_args, start_of_server_args;
@@ -323,36 +318,7 @@ main(int argc, char *argv[], char *envp[])
if (argc == 0 ||
#ifndef __UNIXOS2__
(**argv != '/' && **argv != '.')) {
- /* hack for the Xfree86 3.3.6 servers: if the X link
- points to XF86_*, start Xwrapper instead of X */
- path = strdup(getenv("PATH"));
- if (path == NULL) {
- Error("Can't find PATH\n");
- exit(1);
- }
- /* Walk through the PATH */
- for (p = strtok(path, ":"); p != NULL; p = strtok(NULL, ":")) {
- strlcpy(test_path, p, sizeof(test_path));
- strlcat(test_path, "/", sizeof(test_path));
- strlcat(test_path, default_server, sizeof(test_path));
- if ((n = readlink(test_path, real_server,
- sizeof(real_server) - 1)) > 0) {
- real_server[n] = '\0';
- /* if the target path contains XF86_, we
- need Xwrapper */
- if (strstr(real_server, "XF86_") != NULL) {
- *sptr++ = default_wrapper;
- } else {
- *sptr++ = default_server;
- }
- break;
- }
- }
- if (p == NULL) {
- Error("Can't find X link\n");
- exit(1);
- }
- free(path);
+ *sptr++ = default_server;
#else
(**argv != '/' && **argv != '\\' && **argv != '.' &&
!(isalpha(**argv) && (*argv)[1]==':'))) {