diff options
author | Keith Packard <keithp@keithp.com> | 2013-01-18 21:43:40 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-10-31 16:57:57 -0700 |
commit | 7710f2b927ec8e3c631f72d66d494b523377b48e (patch) | |
tree | f5fb0ccb0a55fdd89e01f06086fc2373dddae930 /Xext | |
parent | 2eedf42c229e2251035d716a96b654222155cd51 (diff) |
Xext: Move MIT-SHM 'ShmDesc' to shmint.h
This data structure is required to use shared memory objects in any
extension. That includes the Xv extension, which (before this patch)
duplicated the definition of this structure in its own code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/shm.c | 9 | ||||
-rw-r--r-- | Xext/shmint.h | 9 | ||||
-rw-r--r-- | Xext/xvdisp.c | 13 |
3 files changed, 10 insertions, 21 deletions
diff --git a/Xext/shm.c b/Xext/shm.c index 55960907b..f6995ccfb 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -89,15 +89,6 @@ in this Software without prior written authorization from The Open Group. #include "extinit.h" -typedef struct _ShmDesc { - struct _ShmDesc *next; - int shmid; - int refcnt; - char *addr; - Bool writable; - unsigned long size; -} ShmDescRec, *ShmDescPtr; - typedef struct _ShmScrPrivateRec { CloseScreenProcPtr CloseScreen; ShmFuncsPtr shmFuncs; diff --git a/Xext/shmint.h b/Xext/shmint.h index fa6941c90..9002ce501 100644 --- a/Xext/shmint.h +++ b/Xext/shmint.h @@ -56,6 +56,15 @@ typedef struct _ShmFuncs { void (*PutImage) (XSHM_PUT_IMAGE_ARGS); } ShmFuncs, *ShmFuncsPtr; +typedef struct _ShmDesc { + struct _ShmDesc *next; + int shmid; + int refcnt; + char *addr; + Bool writable; + unsigned long size; +} ShmDescRec, *ShmDescPtr; + extern _X_EXPORT void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 787729387..613867a6b 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -43,6 +43,7 @@ SOFTWARE. #include "xvdix.h" #ifdef MITSHM #include <X11/extensions/shmproto.h> +#include "shmint.h" #endif #include "xvdisp.h" @@ -949,18 +950,6 @@ ProcXvPutImage(ClientPtr client) } #ifdef MITSHM -/* redefined here since it's not in any header file */ -typedef struct _ShmDesc { - struct _ShmDesc *next; - int shmid; - int refcnt; - char *addr; - Bool writable; - unsigned long size; -} ShmDescRec, *ShmDescPtr; - -extern RESTYPE ShmSegType; -extern int ShmCompletionCode; static int ProcXvShmPutImage(ClientPtr client) |