diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-09-03 15:19:43 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-07-23 23:56:58 +0100 |
commit | 15febb05d77cc7e7185c942f35459838f75cfdc0 (patch) | |
tree | 01bb406e0cd8d5fb4f18fc371093704e24b7433f /dix/main.c | |
parent | d5ebe20f9ba9569351c4a41449866679fd60ba45 (diff) |
Allow DDX to provide a main()
XQuartz already conditionally renames main() as dix_main() so it can provide
it's own main(). This isn't the ideal way of doing this, as it prevents libdix
built this way from being useful with any other DDX.
So instead, always name that function dix_main(), and also provide a stub main()
which just calls dix_main(), which can be overriden in the DDX.
Add a main() to XWin (XQuartz already has one, of course).
It's no longer neccessary to link XWin and XQuartz with libmain.
v2: Remove unneeded stub main hw/xwin/InitOutput.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'dix/main.c')
-rw-r--r-- | dix/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/dix/main.c b/dix/main.c index e69cd931f..05dcbeddd 100644 --- a/dix/main.c +++ b/dix/main.c @@ -125,14 +125,10 @@ BOOL serverRunning = FALSE; pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER; -int dix_main(int argc, char *argv[], char *envp[]); +#endif int dix_main(int argc, char *argv[], char *envp[]) -#else -int -main(int argc, char *argv[], char *envp[]) -#endif { int i; HWEventQueueType alwaysCheckForInput[2]; |