summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-06-10 10:47:37 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-06-10 10:51:58 -0700
commitc180a52332385b98635068d63a8fe0bba4835be7 (patch)
tree9976ae1679ed8d0fda2e9e3c9bd4aadf290cc4ca
parent49751fee3b82ebc4917bfb168ec78aad7874f1f1 (diff)
XQuartz: Removed code path for old startup
(cherry picked from commit a9ee6b0d00fab01a78408a85e6542e88c19fda7c)
-rw-r--r--hw/xquartz/Makefile.am3
-rw-r--r--hw/xquartz/mach-startup/Makefile.am3
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c28
-rw-r--r--hw/xquartz/mach-startup/stub.c11
4 files changed, 2 insertions, 43 deletions
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 69778c129..77d662f97 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -7,8 +7,7 @@ AM_CPPFLAGS = \
-DINXQUARTZ \
-DUSE_NEW_CLUT \
-DXFree86Server \
- -I$(top_srcdir)/miext/rootless \
- -DNEW_LAUNCH_METHOD
+ -I$(top_srcdir)/miext/rootless
SUBDIRS = bundle . GL xpr mach-startup doc
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 59018a977..2da30625f 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -1,7 +1,6 @@
AM_CPPFLAGS = \
-DBUILD_DATE=\"$(BUILD_DATE)\" \
- -DXSERVER_VERSION=\"$(VERSION)\" \
- -DNEW_LAUNCH_METHOD -DNEW_LAUNCH_METHOD_2
+ -DXSERVER_VERSION=\"$(VERSION)\"
x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
x11app_PROGRAMS = X11
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index d7b6c3753..d2bc9d382 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -78,7 +78,6 @@ static pthread_t create_thread(void *func, void *arg) {
return tid;
}
-#ifdef NEW_LAUNCH_METHOD
/*** Mach-O IPC Stuffs ***/
union MaxMsgSize {
@@ -278,25 +277,13 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv,
}
int startup_trigger(int argc, char **argv, char **envp) {
-#else
-void *add_launchd_display_thread(void *data);
-
-int main(int argc, char **argv, char **envp) {
-#endif
Display *display;
const char *s;
size_t i;
-#ifndef NEW_LAUNCH_METHOD
- fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
- for(i=0; i < argc; i++) {
- fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
- }
-#endif
/* Take care of the case where we're called like a normal DDX */
if(argc > 1 && argv[1][0] == ':') {
-#ifdef NEW_LAUNCH_METHOD
kern_return_t kr;
mach_port_t mp;
string_array_t newenvp;
@@ -336,10 +323,6 @@ int main(int argc, char **argv, char **envp) {
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
-#else
- create_thread(add_launchd_display_thread, NULL);
- return server_main(argc, argv, envp);
-#endif
}
/* If we have a process serial number and it's our only arg, act as if
@@ -369,7 +352,6 @@ int main(int argc, char **argv, char **envp) {
return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
}
-#ifdef NEW_LAUNCH_METHOD
/*** Main ***/
int main(int argc, char **argv, char **envp) {
Bool listenOnly = FALSE;
@@ -411,16 +393,6 @@ int main(int argc, char **argv, char **envp) {
return EXIT_SUCCESS;
}
-#else
-void *add_launchd_display_thread(void *data) {
- /* Start listening on the launchd fd */
- int launchd_fd = launchd_display_fd();
- if(launchd_fd != -1) {
- DarwinListenOnOpenFD(launchd_fd);
- }
- return NULL;
-}
-#endif
static int execute(const char *command) {
const char *newargv[7];
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 7d9875275..d7b248b15 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -113,7 +113,6 @@ static void set_x11_path() {
}
}
-#ifdef NEW_LAUNCH_METHOD
static int create_socket(char *filename_out) {
struct sockaddr_un servaddr_un;
struct sockaddr *servaddr;
@@ -201,10 +200,8 @@ static void send_fd_handoff(int handoff_fd, int launchd_fd) {
close(connected_fd);
fprintf(stderr, "send %d %d %d %s\n", handoff_fd, launchd_fd, errno, strerror(errno));
}
-#endif
int main(int argc, char **argv, char **envp) {
-#ifdef NEW_LAUNCH_METHOD
int envpc;
kern_return_t kr;
mach_port_t mp;
@@ -213,7 +210,6 @@ int main(int argc, char **argv, char **envp) {
size_t i;
int launchd_fd;
string_t handoff_socket_filename;
-#endif
sig_t handler;
if(argc == 2 && !strcmp(argv[1], "-version")) {
@@ -232,7 +228,6 @@ int main(int argc, char **argv, char **envp) {
kill(getppid(), SIGUSR1);
signal(SIGUSR1, handler);
-#ifdef NEW_LAUNCH_METHOD
/* Get the $DISPLAY FD */
launchd_fd = launchd_display_fd();
@@ -313,10 +308,4 @@ int main(int argc, char **argv, char **envp) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
-
-#else
- set_x11_path();
- argv[0] = x11_path;
- return execvp(x11_path, argv);
-#endif
}