xserver: Branch 'master' - 14 commits
Keith Packard
keithp at kemper.freedesktop.org
Tue Feb 10 22:17:12 PST 2015
configure.ac | 2 +-
dix/Xserver.d | 5 ++++-
dix/dispatch.c | 5 +----
dix/events.c | 8 +-------
dix/getevents.c | 7 +------
dix/resource.c | 5 +----
hw/dmx/config/dmxparse.h | 3 ++-
hw/dmx/config/dmxprint.c | 20 ++++----------------
hw/dmx/dmx.c | 1 +
hw/dmx/dmxcb.c | 3 ---
hw/dmx/dmxfont.h | 2 --
hw/dmx/dmxgc.c | 4 ++--
hw/dmx/dmxgc.h | 4 ++--
hw/dmx/dmxinit.c | 42 +++++++++++++++++++++---------------------
hw/dmx/dmxpict.c | 1 -
hw/dmx/dmxprop.c | 6 +++---
hw/dmx/dmxscrinit.c | 1 -
hw/dmx/dmxwindow.c | 4 ----
hw/dmx/glxProxy/compsize.h | 7 +++++++
hw/dmx/glxProxy/g_disptab.h | 21 ++++++++++++++++++++-
hw/dmx/glxProxy/glxcmds.c | 7 +++----
hw/dmx/glxProxy/glxcmds.h | 6 ++++++
hw/dmx/glxProxy/glxcmdsswap.c | 2 --
hw/dmx/glxProxy/glxext.h | 1 +
hw/dmx/glxProxy/glxscreens.c | 6 +++---
hw/dmx/glxProxy/glxscreens.h | 2 ++
hw/dmx/glxProxy/glxserver.h | 8 --------
hw/dmx/glxProxy/glxsingle.c | 6 ++----
hw/dmx/glxProxy/glxsingle.h | 4 ----
hw/dmx/glxProxy/glxswap.c | 4 +---
hw/dmx/glxProxy/glxvendor.c | 6 ++----
hw/dmx/input/dmxinputinit.c | 10 +++++-----
include/Makefile.am | 1 +
include/probes.h | 41 +++++++++++++++++++++++++++++++++++++++++
os/connection.c | 12 +++---------
35 files changed, 141 insertions(+), 126 deletions(-)
New commits:
commit 3a06faf3fcdb7451125a46181f9152e8e59e9770
Author: Keith Packard <keithp at keithp.com>
Date: Tue Feb 10 22:16:49 2015 -0800
Mark development version for 1.18
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/configure.ac b/configure.ac
index 2b46552..280c369 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.17.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.17.99.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
RELEASE_DATE="2015-02-02"
RELEASE_NAME="Côte de veau"
AC_CONFIG_SRCDIR([Makefile.am])
commit 4a758f59a8a65c313244e06852745c8e180ff247
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:38:26 2014 -0800
dmx: include header for DMXExtensionInit() in dmx.c
Gets rid of gcc 4.8 warning:
dmx.c:1193:1: warning: no previous prototype for ‘DMXExtensionInit’ [-Wmissing-prototypes]
DMXExtensionInit(void)
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 99e970c..2988df3 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -55,6 +55,7 @@
#include "extinit.h"
#include "opaque.h"
+#include "dmx.h"
#include "dmxextension.h"
#include <X11/extensions/dmxproto.h>
#include <X11/extensions/dmx.h>
commit a0e44ddfb0c641e7896a55abf26621ae3d17e337
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:33:54 2014 -0800
dmx: constify GCOps & GCFuncs pointers
Gets rid of 16 instances of gcc 4.8 warnings:
In file included from dmxgc.c:41:0:
dmx.h:327:23: warning: assignment discards ‘const’ qualifier from
pointer target type [enabled by default]
(_saved)->_entry = (_actual)->_entry; \
^
dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’
DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \
^
dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’
DMX_GC_FUNC_EPILOGUE(pGC);
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index 2343167..ec15d27 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -49,7 +49,7 @@
#include "pixmapstr.h"
#include "migc.h"
-static GCFuncs dmxGCFuncs = {
+static const GCFuncs dmxGCFuncs = {
dmxValidateGC,
dmxChangeGC,
dmxCopyGC,
@@ -59,7 +59,7 @@ static GCFuncs dmxGCFuncs = {
dmxCopyClip,
};
-static GCOps dmxGCOps = {
+static const GCOps dmxGCOps = {
dmxFillSpans,
dmxSetSpans,
dmxPutImage,
diff --git a/hw/dmx/dmxgc.h b/hw/dmx/dmxgc.h
index c8ecb53..c5c6b77 100644
--- a/hw/dmx/dmxgc.h
+++ b/hw/dmx/dmxgc.h
@@ -41,8 +41,8 @@
/** GC private area. */
typedef struct _dmxGCPriv {
- GCOps *ops;
- GCFuncs *funcs;
+ const GCOps *ops;
+ const GCFuncs *funcs;
XlibGC gc;
Bool msc;
} dmxGCPrivRec, *dmxGCPrivPtr;
commit 9682c47e228962e4008855c4da7467748742685e
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:20:24 2014 -0800
dmx: Mark glxIsExtensionSupported as a const char *
Gets rid of 9 instances of gcc 4.8 warning:
glxcmds.c: In function ‘CreateContext’:
glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’
discards ‘const’ qualifier from pointer target type [enabled by default]
else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
^
In file included from glxserver.h:49:0,
from glxcmds.c:41:
glxscreens.h:53:12: note: expected ‘char *’ but argument is of type
‘const char *’
extern int glxIsExtensionSupported(char *ext);
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index b62776c..15bb1e8 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -335,7 +335,7 @@ __glXGetServerString(unsigned int name)
}
int
-glxIsExtensionSupported(char *ext)
+glxIsExtensionSupported(const char *ext)
{
return (strstr(ExtensionsString, ext) != NULL);
}
diff --git a/hw/dmx/glxProxy/glxscreens.h b/hw/dmx/glxProxy/glxscreens.h
index 9a538d1..bb7477b 100644
--- a/hw/dmx/glxProxy/glxscreens.h
+++ b/hw/dmx/glxProxy/glxscreens.h
@@ -50,6 +50,6 @@ extern void __glXScreenReset(void);
extern char *__glXGetServerString(unsigned int name);
-extern int glxIsExtensionSupported(char *ext);
+extern int glxIsExtensionSupported(const char *ext);
#endif /* !__GLX_screens_h__ */
commit 45ec646d77086eeb5f94766b055a93b5c75bdef0
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:16:49 2014 -0800
dmx: remove redundant redeclarations of variables from other headers
Gets rid of these gcc 4.8 warnings:
dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’
[-Wredundant-decls]
extern int PanoramiXPixWidth;
^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:12:22: note: previous declaration of
‘PanoramiXPixWidth’ was here
extern _X_EXPORT int PanoramiXPixWidth;
^
dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’
[-Wredundant-decls]
extern int PanoramiXPixHeight;
^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:13:22: note: previous declaration of
‘PanoramiXPixHeight’ was here
extern _X_EXPORT int PanoramiXPixHeight;
^
dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’
[-Wredundant-decls]
extern int PanoramiXNumScreens;
^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:11:22: note: previous declaration of
‘PanoramiXNumScreens’ was here
extern _X_EXPORT int PanoramiXNumScreens;
^
dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’
[-Wredundant-decls]
extern int RenderErrBase;
^
In file included from ../../render/glyphstr.h:29:0,
from ../../render/picturestr.h:28,
from dmx.h:65,
from dmxpict.c:42:
../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’
was here
extern _X_EXPORT int RenderErrBase;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxcb.c b/hw/dmx/dmxcb.c
index 86015f3..cca5702 100644
--- a/hw/dmx/dmxcb.c
+++ b/hw/dmx/dmxcb.c
@@ -47,9 +47,6 @@ extern int connBlockScreenStart;
#ifdef PANORAMIX
#include "panoramiXsrv.h"
-extern int PanoramiXPixWidth;
-extern int PanoramiXPixHeight;
-extern int PanoramiXNumScreens;
#endif
int dmxGlobalWidth, dmxGlobalHeight;
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 64d0ae1..aaca178 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -57,7 +57,6 @@
#include "mipict.h"
#include "fbpict.h"
-extern int RenderErrBase;
extern int (*ProcRenderVector[RenderNumberRequests]) (ClientPtr);
static int (*dmxSaveRenderVector[RenderNumberRequests]) (ClientPtr);
commit 1033b85196e0f25877b4b9081993aff16bf32138
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:13:28 2014 -0800
dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h
Gets rid of 8 instances of gcc 4.8 warning:
In file included from glxcmds.c:38:0:
../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of
‘dmxFontPrivateIndex’ [-Wredundant-decls]
extern int dmxFontPrivateIndex;
^
In file included from glxcmds.c:35:0:
../../../hw/dmx/dmx.h:388:12: note: previous declaration of
‘dmxFontPrivateIndex’ was here
extern int dmxFontPrivateIndex; /**< Private index for Fonts */
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxfont.h b/hw/dmx/dmxfont.h
index 8575ca9..66c6633 100644
--- a/hw/dmx/dmxfont.h
+++ b/hw/dmx/dmxfont.h
@@ -54,6 +54,4 @@ extern Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont);
-extern int dmxFontPrivateIndex;
-
#endif /* DMXFONT_H */
commit ac64a653fb4935a799baca7545ba6ca401e20fa1
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 22:09:14 2014 -0800
dmx: glxproxy prototype cleanup
Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings
from gcc 4.8
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/glxProxy/compsize.h b/hw/dmx/glxProxy/compsize.h
index 3609662..5e759b0 100644
--- a/hw/dmx/glxProxy/compsize.h
+++ b/hw/dmx/glxProxy/compsize.h
@@ -48,4 +48,11 @@ extern GLint __glTexGeniv_size(GLenum e);
extern GLint __glTexParameterfv_size(GLenum e);
extern GLint __glTexParameteriv_size(GLenum e);
+extern GLint __glCallLists_size(GLsizei n, GLenum type);
+extern GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
+extern GLint __glBitmap_size(GLsizei w, GLsizei h);
+extern GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w);
+extern GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
+extern GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d);
+
#endif /* !__compsize_h__ */
diff --git a/hw/dmx/glxProxy/g_disptab.h b/hw/dmx/glxProxy/g_disptab.h
index 5303387..783f87a 100644
--- a/hw/dmx/glxProxy/g_disptab.h
+++ b/hw/dmx/glxProxy/g_disptab.h
@@ -655,7 +655,6 @@ extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *);
extern void __glXDispSwap_SeparableFilter2D(GLbyte *);
extern void __glXDispSwap_TexImage3D(GLbyte *);
extern void __glXDispSwap_TexSubImage3D(GLbyte *);
-extern void __glXDispSwap_DrawArrays(GLbyte *);
extern void __glXDispSwap_PrioritizeTextures(GLbyte *);
extern void __glXDispSwap_CopyTexImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexImage2D(GLbyte *);
@@ -663,6 +662,26 @@ extern void __glXDispSwap_CopyTexSubImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage2D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage3D(GLbyte *);
+extern void __glXDispSwap_BindTexture(GLbyte *);
+extern void __glXDispSwap_BlendColor(GLbyte *);
+extern void __glXDispSwap_BlendEquation(GLbyte *);
+extern void __glXDispSwap_ColorTable(GLbyte *);
+extern void __glXDispSwap_ColorTableParameterfv(GLbyte *);
+extern void __glXDispSwap_ColorTableParameteriv(GLbyte *);
+extern void __glXDispSwap_CopyColorTable(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameterf(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameteri(GLbyte *);
+extern void __glXDispSwap_Histogram(GLbyte *);
+extern void __glXDispSwap_Minmax(GLbyte *);
+extern void __glXDispSwap_ResetHistogram(GLbyte *);
+extern void __glXDispSwap_ResetMinmax(GLbyte *);
+
+extern int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapBindSwapBarrierSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapJoinSwapGroupSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *, GLbyte *);
+
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
#define __GLX_MIN_RENDER_OPCODE 1
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 88c2eb1..4c500c9 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -61,7 +61,6 @@
extern __GLXFBConfig **__glXFBConfigs;
extern int __glXNumFBConfigs;
-extern int glxIsExtensionSupported(char *ext);
extern int __glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
#define BE_TO_CLIENT_ERROR(x) \
diff --git a/hw/dmx/glxProxy/glxcmds.h b/hw/dmx/glxProxy/glxcmds.h
index b074592..689e334 100644
--- a/hw/dmx/glxProxy/glxcmds.h
+++ b/hw/dmx/glxProxy/glxcmds.h
@@ -33,5 +33,11 @@ extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc);
extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
+ GLXContextTag tag);
+
+extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
+extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
+ int s);
#endif /* !__GLX_cmds_h__ */
diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
index ab3e7ed..600a6e1 100644
--- a/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/hw/dmx/glxProxy/glxcmdsswap.c
@@ -39,8 +39,6 @@
#include "glxext.h"
#include "glxvendor.h"
-extern int glxIsExtensionSupported(char *ext);
-
int __glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
/************************************************************************/
diff --git a/hw/dmx/glxProxy/glxext.h b/hw/dmx/glxProxy/glxext.h
index 47cec15..b96ebc1 100644
--- a/hw/dmx/glxProxy/glxext.h
+++ b/hw/dmx/glxProxy/glxext.h
@@ -53,6 +53,7 @@ extern void __glXFlushContextCache(void);
extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
+extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
extern void __glXNoSuchRenderOpcode(GLbyte *);
extern int __glXNoSuchSingleOpcode(__GLXclientState *, GLbyte *);
diff --git a/hw/dmx/glxProxy/glxscreens.h b/hw/dmx/glxProxy/glxscreens.h
index a9fe2a9..9a538d1 100644
--- a/hw/dmx/glxProxy/glxscreens.h
+++ b/hw/dmx/glxProxy/glxscreens.h
@@ -50,4 +50,6 @@ extern void __glXScreenReset(void);
extern char *__glXGetServerString(unsigned int name);
+extern int glxIsExtensionSupported(char *ext);
+
#endif /* !__GLX_screens_h__ */
diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
index 754ad30..7aa5ad2 100644
--- a/hw/dmx/glxProxy/glxserver.h
+++ b/hw/dmx/glxProxy/glxserver.h
@@ -149,9 +149,7 @@ extern __GLXclientState *__glXClients[];
typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
-extern __GLXdispatchSingleProcPtr __glXSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[];
-extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[];
@@ -193,9 +191,6 @@ extern RESTYPE __glXPbufferRes;
extern char *__glXcombine_strings(const char *, const char *);
-extern void __glXDisp_DrawArrays(GLbyte *);
-extern void __glXDispSwap_DrawArrays(GLbyte *);
-
/*
** Routines for sending swapped replies.
*/
@@ -287,9 +282,6 @@ extern int __glXConvolutionParameterfvSize(GLenum pname);
extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname);
-extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
-extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
-
extern int __glXVersionMajor;
extern int __glXVersionMinor;
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index 0344973..79d426b 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -45,6 +45,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
+#include "glxcmds.h"
+#include "glxsingle.h"
#include "GL/glxproto.h"
@@ -81,10 +83,6 @@
#define X_GLXSingle 0 /* needed by GetReqExtra */
-extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
-extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
- int s);
-
static int swap_vec_element_size = 0;
static void
diff --git a/hw/dmx/glxProxy/glxsingle.h b/hw/dmx/glxProxy/glxsingle.h
index 32a9d49..6126177 100644
--- a/hw/dmx/glxProxy/glxsingle.h
+++ b/hw/dmx/glxProxy/glxsingle.h
@@ -47,8 +47,4 @@ extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc);
-
#endif
diff --git a/hw/dmx/glxProxy/glxswap.c b/hw/dmx/glxProxy/glxswap.c
index 5f56501..bc18e55 100644
--- a/hw/dmx/glxProxy/glxswap.c
+++ b/hw/dmx/glxProxy/glxswap.c
@@ -39,9 +39,7 @@
#include "dmxwindow.h"
#include "glxserver.h"
#include "glxswap.h"
-
-extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
- GLXContextTag tag);
+#include "glxcmds.h"
typedef struct _SwapGroup *SwapGroupPtr;
diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c
index fc8aff0..52d70eb 100644
--- a/hw/dmx/glxProxy/glxvendor.c
+++ b/hw/dmx/glxProxy/glxvendor.c
@@ -44,6 +44,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
+#include "glxcmds.h"
+#include "glxvendor.h"
#include "GL/glxproto.h"
@@ -78,10 +80,6 @@
dpy->request++
#endif
-extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
-extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
- int s);
-
static int swap_vec_element_size = 0;
static void
commit bd563fd48f909094d6660854e97811ad7e676ddf
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 21:11:17 2014 -0800
dmx: more unshadowing of variables
Gets rid of gcc 4.8 warnings:
dmxinputinit.c: In function ‘dmxInputScanForExtensions’:
dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow]
Display *display;
^
In file included from ../../../include/windowstr.h:60:0,
from dmxinputinit.c:72:
../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow]
extern _X_EXPORT const char *display;
^
glxcmds.c: In function ‘__glXCreatePbuffer’:
glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow]
CARD32 *pc = (CARD32 *) (be_req + 1);
^
glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow]
__glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
^
glxscreens.c: In function ‘CalcServerVersionAndExtensions’:
glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow]
xGLXQueryServerStringReq *req;
^
glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow]
xGLXQueryVersionReq *req;
^
glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow]
xGLXQueryServerStringReply reply;
^
glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow]
xGLXQueryVersionReply reply;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index fb4d5ac..88c2eb1 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3394,11 +3394,11 @@ __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
/* Send attributes */
if (attr != NULL) {
- CARD32 *pc = (CARD32 *) (be_req + 1);
+ CARD32 *pca = (CARD32 *) (be_req + 1);
while (numAttribs-- > 0) {
- *pc++ = *attr++; /* token */
- *pc++ = *attr++; /* value */
+ *pca++ = *attr++; /* token */
+ *pca++ = *attr++; /* value */
}
}
diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
index 138afed..b62776c 100644
--- a/hw/dmx/glxProxy/glxscreens.c
+++ b/hw/dmx/glxProxy/glxscreens.c
@@ -65,8 +65,6 @@ static void
CalcServerVersionAndExtensions(void)
{
int s;
- xGLXQueryVersionReq *req;
- xGLXQueryVersionReply reply;
char **be_extensions;
char *ext;
char *denied_extensions;
@@ -80,6 +78,8 @@ CalcServerVersionAndExtensions(void)
for (s = 0; s < __glXNumActiveScreens; s++) {
DMXScreenInfo *dmxScreen = &dmxScreens[s];
Display *dpy = dmxScreen->beDisplay;
+ xGLXQueryVersionReq *req;
+ xGLXQueryVersionReply reply;
/* Send the glXQueryVersion request */
LockDisplay(dpy);
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index abb6a85..56a39df 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -874,17 +874,17 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
{
XExtensionVersion *ext;
XDeviceInfo *devices;
- Display *display;
+ Display *dsp;
int num;
int i, j;
XextErrorHandler handler;
- if (!(display = XOpenDisplay(dmxInput->name)))
+ if (!(dsp = XOpenDisplay(dmxInput->name)))
return;
/* Print out information about the XInput Extension. */
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
- ext = XGetExtensionVersion(display, INAME);
+ ext = XGetExtensionVersion(dsp, INAME);
XSetExtensionErrorHandler(handler);
if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
@@ -894,7 +894,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
dmxInput->name, INAME,
ext->major_version, ext->minor_version);
- devices = XListInputDevices(display, &num);
+ devices = XListInputDevices(dsp, &num);
XFree(ext);
ext = NULL;
@@ -956,7 +956,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
}
XFreeDeviceList(devices);
}
- XCloseDisplay(display);
+ XCloseDisplay(dsp);
}
/** Re-initialize all the devices described in \a dmxInput. Called from
commit 57e08fae82f733304200a473f55b86e689404c13
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 21:07:12 2014 -0800
dmx: attempt to untangle nested loops using same index variable
This doesn't just make gcc sad, it makes my brain sad.
Change from:
for (i = 0; i < dmxNumScreens; i++) {
int i;
for (i = 0; i < nconfigs; i++) {
for (j = 0; j < dmxScreen->beNumVisuals; j++) {
to the easier to follow:
for (i = 0; i < dmxNumScreens; i++) {
for (j = 0; j < nconfigs; j++) {
for (k = 0; k < dmxScreen->beNumVisuals; k++) {
Gets rid of gcc 4.8 warning:
dmxinit.c: In function ‘InitOutput’:
dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
int i;
^
dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow]
int i;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 37961b8..025dc86 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -762,7 +762,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
dmxGlxVisualPrivate **configprivs = NULL;
int nconfigs = 0;
int (*oldErrorHandler) (Display *, XErrorEvent *);
- int i;
/* Catch errors if when using an older GLX w/o FBconfigs */
oldErrorHandler = XSetErrorHandler(dmxNOPErrorHandler);
@@ -797,28 +796,29 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
configprivs = malloc(nconfigs * sizeof(dmxGlxVisualPrivate *));
if (configs != NULL && configprivs != NULL) {
+ int j;
/* Initialize our private info for each visual
* (currently only x_visual_depth and x_visual_class)
*/
- for (i = 0; i < nconfigs; i++) {
+ for (j = 0; j < nconfigs; j++) {
- configprivs[i] = (dmxGlxVisualPrivate *)
+ configprivs[j] = (dmxGlxVisualPrivate *)
malloc(sizeof(dmxGlxVisualPrivate));
- configprivs[i]->x_visual_depth = 0;
- configprivs[i]->x_visual_class = 0;
+ configprivs[j]->x_visual_depth = 0;
+ configprivs[j]->x_visual_class = 0;
/* Find the visual depth */
- if (configs[i].vid > 0) {
- int j;
-
- for (j = 0; j < dmxScreen->beNumVisuals; j++) {
- if (dmxScreen->beVisuals[j].visualid ==
- configs[i].vid) {
- configprivs[i]->x_visual_depth =
- dmxScreen->beVisuals[j].depth;
- configprivs[i]->x_visual_class =
- dmxScreen->beVisuals[j].class;
+ if (configs[j].vid > 0) {
+ int k;
+
+ for (k = 0; k < dmxScreen->beNumVisuals; k++) {
+ if (dmxScreen->beVisuals[k].visualid ==
+ configs[j].vid) {
+ configprivs[j]->x_visual_depth =
+ dmxScreen->beVisuals[k].depth;
+ configprivs[j]->x_visual_class =
+ dmxScreen->beVisuals[k].class;
break;
}
}
commit 0fbebad72428abbc9fc3fa9f406f7a7e1b9d95b2
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 20:53:33 2014 -0800
dmx: remove unused variables
Gets rid of gcc 4.8 warnings:
dmxscrinit.c: In function ‘dmxBEScreenInit’:
dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable]
XGCValues gcvals;
^
dmxwindow.c: In function ‘dmxResizeWindow’:
dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable]
dmxWinPrivPtr pSibPriv;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
index 963d3a9..097418d 100644
--- a/hw/dmx/dmxscrinit.c
+++ b/hw/dmx/dmxscrinit.c
@@ -80,7 +80,6 @@ dmxBEScreenInit(ScreenPtr pScreen)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
XSetWindowAttributes attribs;
- XGCValues gcvals;
unsigned long mask;
int i, j;
diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c
index c753735..c157e10 100644
--- a/hw/dmx/dmxwindow.c
+++ b/hw/dmx/dmxwindow.c
@@ -857,13 +857,9 @@ dmxResizeWindow(WindowPtr pWindow, int x, int y,
ScreenPtr pScreen = pWindow->drawable.pScreen;
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
- dmxWinPrivPtr pSibPriv;
unsigned int m;
XWindowChanges c;
- if (pSib)
- pSibPriv = DMX_GET_WINDOW_PRIV(pSib);
-
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
#if 1
if (pScreen->ResizeWindow)
commit f358f0d50cadaf10f7d97e21da00419a4a37c4e1
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 19:09:36 2014 -0800
dmx: fix printf format argument warnings
Gets rid of these gcc 4.8 warnings:
dmxinit.c: In function ‘dmxErrorHandler’:
dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 3 has type ‘XID64’ [-Wformat=]
ev->resourceid);
^
dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 3 has type ‘XID64’ [-Wformat=]
ev->resourceid);
^
dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 3 has type ‘XID64’ [-Wformat=]
ev->resourceid);
^
dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘long unsigned int’ [-Wformat=]
ev->serial);
^
dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘long unsigned int’ [-Wformat=]
dpy->request);
^
dmxinit.c: In function ‘InitOutput’:
dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘long unsigned int’ [-Wformat=]
dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration);
^
dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’:
dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long
unsigned int’, but argument 4 has type ‘Window’ [-Wformat=]
dmxScreen->name, win, tp.value);
^
dmxprop.c: In function ‘dmxPropertyWindow’:
dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
unsigned int’, but argument 5 has type ‘Window’ [-Wformat=]
other->index, other->name, other->scrnWin);
^
dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
unsigned int’, but argument 8 has type ‘Window’ [-Wformat=]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index fd2ade0..37961b8 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -164,23 +164,23 @@ dmxErrorHandler(Display * dpy, XErrorEvent * ev)
switch (ev->error_code) {
case BadValue:
dmxLog(dmxWarning, " Value: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
case BadAtom:
dmxLog(dmxWarning, " AtomID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
default:
dmxLog(dmxWarning, " ResourceID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
}
/* Provide serial number information */
dmxLog(dmxWarning, " Failed serial number: %d\n",
- ev->serial);
+ (unsigned int) ev->serial);
dmxLog(dmxWarning, " Current serial number: %d\n",
- dpy->request);
+ (unsigned int) dpy->request);
return 0;
}
@@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
if (major > 0 && minor > 0)
year += 2000;
- dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration);
+ dmxLog(dmxInfo, "Generation: %lu\n", dmxGeneration);
dmxLog(dmxInfo, "DMX version: %d.%d.%02d%02d%02d (%s)\n",
major, minor, year, month, day, VENDOR_STRING);
diff --git a/hw/dmx/dmxprop.c b/hw/dmx/dmxprop.c
index 4be2dbd..5e306d2 100644
--- a/hw/dmx/dmxprop.c
+++ b/hw/dmx/dmxprop.c
@@ -220,7 +220,7 @@ dmxPropertyCheckOtherWindows(DMXScreenInfo * dmxScreen, Atom atom)
if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
dmxLog(dmxDebug, "On %s/%lu: %s\n",
- dmxScreen->name, win, tp.value);
+ dmxScreen->name, (unsigned long) win, tp.value);
if (!strncmp((char *) tp.value, (char *) id,
strlen((char *) id))) {
int idx;
@@ -360,8 +360,8 @@ dmxPropertyWindow(DMXScreenInfo * dmxScreen)
dmxScreen->next = (other->next ? other->next : other);
other->next = (tmp ? tmp : dmxScreen);
dmxLog(dmxDebug, "%d/%s/%lu and %d/%s/%lu are on the same backend\n",
- dmxScreen->index, dmxScreen->name, dmxScreen->scrnWin,
- other->index, other->name, other->scrnWin);
+ dmxScreen->index, dmxScreen->name, (unsigned long) dmxScreen->scrnWin,
+ other->index, other->name, (unsigned long) other->scrnWin);
}
snprintf(buf, sizeof(buf), ".%d,%lu", dmxScreen->index,
commit 11af200b004b4810c9267e3e16449c3175c64d4a
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 18:58:01 2014 -0800
dmx: move format strings inline so gcc can check
Gets rid of gcc 4.8 warnings:
dmxprint.c: In function ‘dmxConfigPrintPair’:
dmxprint.c:284:25: warning: format not a string literal,
argument types not checked [-Wformat-nonliteral]
p->ysign < 0 ? '-' : '+', p->y);
^
dmxprint.c:289:9: warning: format not a string literal,
argument types not checked [-Wformat-nonliteral]
dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
^
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/config/dmxprint.c b/hw/dmx/config/dmxprint.c
index 536d92b..c80e830 100644
--- a/hw/dmx/config/dmxprint.c
+++ b/hw/dmx/config/dmxprint.c
@@ -261,32 +261,20 @@ dmxConfigPrintString(DMXConfigStringPtr p, int quote)
static int
dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace)
{
- const char *format = NULL;
-
if (!p)
return 0;
- switch (p->token) {
- case T_ORIGIN:
- format = "@%dx%d";
- break;
- case T_DIMENSION:
- format = "%dx%d";
- break;
- case T_OFFSET:
- format = "%c%d%c%d";
- break;
- }
if (p->token == T_OFFSET) {
if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0)
return 0;
- dmxConfigOutput(addSpace, 0, p->comment, format,
+ dmxConfigOutput(addSpace, 0, p->comment, "%c%d%c%d",
p->xsign < 0 ? '-' : '+', p->x,
p->ysign < 0 ? '-' : '+', p->y);
}
else {
if (!p->comment && !p->x && !p->y)
return 0;
- dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
+ dmxConfigOutput(addSpace, 0, p->comment, "%s%dx%d",
+ (p->token == T_ORIGIN) ? "@" : "", p->x, p->y);
}
return 1;
}
commit 5e01eac10e915568324aff81b51d3af558757042
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Dec 12 18:52:05 2014 -0800
dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput()
Gets rid of gcc 4.8 warnings:
dmxparse.c: In function ‘dmxConfigLog’:
dmxparse.c:61:5: warning: function might be possible candidate for
‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
vprintf(format, args); /* RATS: All calls to dmxConfigLog from
^
dmxprint.c: In function ‘dmxConfigOutput’:
dmxprint.c:149:9: warning: function might be possible candidate for
‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
pos += vfprintf(str, format, args); /* assumes no newlines! */
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Rémi Cardona <remi at gentoo.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/dmx/config/dmxparse.h b/hw/dmx/config/dmxparse.h
index 7d31b63..cc2f0eb 100644
--- a/hw/dmx/config/dmxparse.h
+++ b/hw/dmx/config/dmxparse.h
@@ -38,6 +38,7 @@
#define _DMXPARSE_H_
#include <stdio.h> /* For FILE */
+#include <X11/Xfuncproto.h> /* For _X_ATTRIBUTE_PRINTF */
/** Stores tokens not stored in other structures (e.g., keywords and ;) */
typedef struct _DMXConfigToken {
@@ -203,7 +204,7 @@ extern int yylex(void);
extern int yydebug;
extern void yyerror(const char *message);
-extern void dmxConfigLog(const char *format, ...);
+extern void dmxConfigLog(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,0);
extern void *dmxConfigAlloc(unsigned long bytes);
extern void *dmxConfigRealloc(void *orig,
unsigned long orig_bytes, unsigned long bytes);
diff --git a/hw/dmx/config/dmxprint.c b/hw/dmx/config/dmxprint.c
index 9dec52b..536d92b 100644
--- a/hw/dmx/config/dmxprint.c
+++ b/hw/dmx/config/dmxprint.c
@@ -130,7 +130,7 @@ dmxConfigPopState(void)
dmxConfigNewline();
}
-static void
+static void _X_ATTRIBUTE_PRINTF(4, 5)
dmxConfigOutput(int addSpace, int doNewline, const char *comment,
const char *format, ...)
{
commit 9e002dfcd71439fd81563db1f70e8c1964d52fab
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Tue Dec 9 18:27:11 2014 -0800
Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls
Use typedefs to work around dtrace dropping const qualifiers from probe
arguments when generating Xserver-dtrace.h. Add new probes.h header to
avoid having to replicate these typedefs in every file with dtrace probes.
Gets rid of these warnings from gcc 4.8:
getevents.c:1096:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' discards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1096:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1651:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1651:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1791:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1791:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1921:9:
warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
getevents.c:1921:9:
warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/Xserver.d b/dix/Xserver.d
index 248d48e..f4f229d 100644
--- a/dix/Xserver.d
+++ b/dix/Xserver.d
@@ -31,6 +31,9 @@
#include <sys/types.h>
#endif
+typedef const uint8_t *const_uint8_p;
+typedef const double *const_double_p;
+
provider Xserver {
/* reqType, data, length, client id, request buffer */
probe request__start(string, uint8_t, uint16_t, int, void *);
@@ -49,7 +52,7 @@ provider Xserver {
/* client id, event type, event* */
probe send__event(int, uint8_t, void *);
/* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */
- probe input__event(int, int, uint32_t, uint32_t, int8_t, uint8_t*, double*);
+ probe input__event(int, int, uint32_t, uint32_t, int8_t, const_uint8_p, const_double_p);
};
#pragma D attributes Unstable/Unstable/Common provider Xserver provider
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 9044ac7..17fa75e 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -131,10 +131,7 @@ int ProcInitialConnection();
#ifdef XSERVER_DTRACE
#include "registry.h"
-#include <sys/types.h>
-typedef const char *string;
-
-#include "Xserver-dtrace.h"
+#include "probes.h"
#endif
#define mskcnt ((MAXCLIENTS + 31) / 32)
diff --git a/dix/events.c b/dix/events.c
index b8c67fd..c232eba 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -125,13 +125,7 @@ Equipment Corporation.
#include <X11/extensions/XKBproto.h>
#include "xkbsrv.h"
#include "xace.h"
-
-#ifdef XSERVER_DTRACE
-#include <sys/types.h>
-typedef const char *string;
-
-#include "Xserver-dtrace.h"
-#endif
+#include "probes.h"
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XI2proto.h>
diff --git a/dix/getevents.c b/dix/getevents.c
index 6fb12c5..bc7ffa6 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -68,12 +68,7 @@
#include "exevents.h"
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
-
-#if XSERVER_DTRACE
-#include <sys/types.h>
-typedef const char *string;
-#include <Xserver-dtrace.h>
-#endif
+#include "probes.h"
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256
diff --git a/dix/resource.c b/dix/resource.c
index 26debdb..964f0b3 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -144,10 +144,7 @@ Equipment Corporation.
#include "gcstruct.h"
#ifdef XSERVER_DTRACE
-#include <sys/types.h>
-typedef const char *string;
-
-#include "Xserver-dtrace.h"
+#include "probes.h"
#define TypeNameString(t) LookupResourceName(t)
#endif
diff --git a/include/Makefile.am b/include/Makefile.am
index 6578038..168b00f 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -71,6 +71,7 @@ EXTRA_DIST = \
busfault.h dbus-core.h \
dix-config-apple-verbatim.h \
dixfontstubs.h eventconvert.h eventstr.h inpututils.h \
+ probes.h \
protocol-versions.h \
systemd-logind.h \
xsha1.h
diff --git a/include/probes.h b/include/probes.h
new file mode 100644
index 0000000..e9cdd3e
--- /dev/null
+++ b/include/probes.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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 XORG_PROBES_H
+#define XORG_PROBES_H
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+/* definitions needed to include Dtrace probes in a source file */
+
+#if XSERVER_DTRACE
+#include <sys/types.h>
+typedef const char *string;
+typedef const uint8_t *const_uint8_p;
+typedef const double *const_double_p;
+#include "../dix/Xserver-dtrace.h"
+#endif
+
+#endif /* XORG_PROBES_H */
diff --git a/os/connection.c b/os/connection.c
index da3397d..ddfe50a 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -113,17 +113,11 @@ SOFTWARE.
#ifdef HAVE_GETPEERUCRED
#include <ucred.h>
#include <zone.h>
-#endif
-
-#ifdef XSERVER_DTRACE
-#include <sys/types.h>
-typedef const char *string;
-
-#ifndef HAVE_GETPEERUCRED
+#else
#define zoneid_t int
#endif
-#include "../dix/Xserver-dtrace.h"
-#endif
+
+#include "probes.h"
static int lastfdesc; /* maximum file descriptor */
More information about the xorg-commit
mailing list