[PATCH 1/2] Make PseudoramiXExtensionInit() prototype more generally available
Jon TURNEY
jon.turney at dronecode.org.uk
Mon Mar 16 10:10:11 PDT 2015
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 <jon.turney at dronecode.org.uk>
---
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 d7229ce..851ce48 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 168b00f..738b582 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 fa5f293..4ad4fca 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 <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
diff --git a/include/nonsdk_extinit.h b/include/nonsdk_extinit.h
new file mode 100644
index 0000000..da8d370
--- /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 f47c783..d0e2603 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 <X11/extensions/panoramiXproto.h>
diff --git a/pseudoramiX/pseudoramiX.h b/pseudoramiX/pseudoramiX.h
index f063919..5393062 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
--
2.1.4
More information about the xorg-devel
mailing list