From e036cbfccbe33775524a469082306913843c63df Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Thu, 6 Nov 2014 13:54:11 +0000 Subject: [PATCH] Make PseudoramiXExtensionInit() prototype more generally available Make PseudoramiXExtensionInit() prototype available to hw/xwin Rather than avoiding a reference to it being pulled in to Xorg by sdksyms by hiding this prototype behind the INXQUARTZ define, which is only defined when building Xquartz, introduce nonsdk_extinit.h and move it there. (The only remaining use of INXQUARTZ is in mi/miiniext.c, in order to do PseudoramiXExtensionInit() at the point apparently needed by Xquartz) Also remove duplicate declaration of noPseudoramiXExtension from pseudoramiX.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xquartz/quartz.c | 1 + include/Makefile.am | 1 + include/extinit.h | 5 ----- include/nonsdk_extinit.h | 35 +++++++++++++++++++++++++++++++++++ pseudoramiX/pseudoramiX.c | 2 +- pseudoramiX/pseudoramiX.h | 2 -- 6 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 include/nonsdk_extinit.h diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index d7229cecb..851ce4842 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -43,6 +43,7 @@ #include "darwinEvents.h" #include "pseudoramiX.h" #include "extension.h" +#include "nonsdk_extinit.h" #include "glx_extinit.h" #define _APPLEWM_SERVER_ #include "applewmExt.h" diff --git a/include/Makefile.am b/include/Makefile.am index 168b00f70..738b582e9 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -33,6 +33,7 @@ sdk_HEADERS = \ misc.h \ miscstruct.h \ opaque.h \ + nonsdk_extinit.h \ optionstr.h \ os.h \ pixmap.h \ diff --git a/include/extinit.h b/include/extinit.h index fa5f29378..4ad4fcac0 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -163,11 +163,6 @@ extern void SELinuxExtensionInit(void); extern void XTestExtensionInit(void); #endif -#ifdef INXQUARTZ -extern _X_EXPORT Bool noPseudoramiXExtension; -extern void PseudoramiXExtensionInit(void); -#endif - #if defined(XV) #include #include diff --git a/include/nonsdk_extinit.h b/include/nonsdk_extinit.h new file mode 100644 index 000000000..da8d370bd --- /dev/null +++ b/include/nonsdk_extinit.h @@ -0,0 +1,35 @@ +/*********************************************************** + +Copyright 2014 Jon TURNEY + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +******************************************************************/ + +#ifndef NONSDK_EXT_INIT_H +#define NONSDK_EXT_INIT_H + +/* this is separate from extinit.h to avoid references to these symbols being + pulled in by sdksyms */ + +extern _X_EXPORT Bool noPseudoramiXExtension; +extern void PseudoramiXExtensionInit(void); + +#endif diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c index f47c7836d..d0e2603b9 100644 --- a/pseudoramiX/pseudoramiX.c +++ b/pseudoramiX/pseudoramiX.c @@ -39,7 +39,7 @@ #include "pseudoramiX.h" #include "extnsionst.h" -#include "extinit.h" +#include "nonsdk_extinit.h" #include "dixstruct.h" #include "window.h" #include diff --git a/pseudoramiX/pseudoramiX.h b/pseudoramiX/pseudoramiX.h index f063919dd..5393062ee 100644 --- a/pseudoramiX/pseudoramiX.h +++ b/pseudoramiX/pseudoramiX.h @@ -2,8 +2,6 @@ * Minimal implementation of PanoramiX/Xinerama */ -extern int noPseudoramiXExtension; - void PseudoramiXAddScreen(int x, int y, int w, int h); void