diff options
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r-- | xorg-server/Xext/Makefile | 38 | ||||
-rw-r--r-- | xorg-server/Xext/dpms.c | 2 | ||||
-rw-r--r-- | xorg-server/Xext/hashtable.c | 15 | ||||
-rw-r--r-- | xorg-server/Xext/saver.c | 6 | ||||
-rw-r--r-- | xorg-server/Xext/security.c | 2 | ||||
-rw-r--r-- | xorg-server/Xext/securitysrv.h | 5 | ||||
-rw-r--r-- | xorg-server/Xext/shape.c | 2 | ||||
-rw-r--r-- | xorg-server/Xext/shm.c | 19 | ||||
-rw-r--r-- | xorg-server/Xext/sync.c | 6 | ||||
-rw-r--r-- | xorg-server/Xext/xace.c | 2 | ||||
-rw-r--r-- | xorg-server/Xext/xf86bigfont.c | 5 | ||||
-rw-r--r-- | xorg-server/Xext/xres.c | 6 | ||||
-rw-r--r-- | xorg-server/Xext/xvmain.c | 4 |
13 files changed, 96 insertions, 16 deletions
diff --git a/xorg-server/Xext/Makefile b/xorg-server/Xext/Makefile new file mode 100644 index 000000000..d59f345d0 --- /dev/null +++ b/xorg-server/Xext/Makefile @@ -0,0 +1,38 @@ +CSRCS=\ +bigreq.c \ +dpms.c \ +dpmsstubs.c \ +saver.c \ +security.c \ +shape.c \ +sleepuntil.c \ +sync.c \ +xace.c \ +xcmisc.c \ +hashtable.c \ +xres.c \ +xtest.c \ +geext.c \ +panoramiX.c \ +panoramiXprocs.c \ +xf86bigfont.c \ +panoramiXSwap.c + +#shm.c \ +#appgroup.c \ +#fontcache.c \ +#mbufbf.c \ +#mbufpx.c \ +#xcalibrate.c \ +#xprint.c \ +#xselinux.c \ +#xvdisp.c \ +#xvmain.c \ +#xvmc.c + +LIBRARY=libxext + +INCLUDES += ..\hw\xfree86\dixmods\extmod ..\composite ..\miext\sync + + + diff --git a/xorg-server/Xext/dpms.c b/xorg-server/Xext/dpms.c index 348c87289..bf01c8905 100644 --- a/xorg-server/Xext/dpms.c +++ b/xorg-server/Xext/dpms.c @@ -28,6 +28,8 @@ Equipment Corporation. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define DPMSExtension #endif #include <X11/X.h> diff --git a/xorg-server/Xext/hashtable.c b/xorg-server/Xext/hashtable.c index 2adf92e56..5cfaeb863 100644 --- a/xorg-server/Xext/hashtable.c +++ b/xorg-server/Xext/hashtable.c @@ -1,3 +1,6 @@ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif #include <stdlib.h> #include "misc.h" #include "hashtable.h" @@ -68,7 +71,7 @@ void ht_destroy(HashTable ht) { int c; - BucketPtr it, tmp; + BucketPtr it=NULL, tmp; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { @@ -95,7 +98,7 @@ double_size(HashTable ht) } for (c = 0; c < numBuckets; ++c) { - BucketPtr it, tmp; + BucketPtr it=NULL, tmp; xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { struct xorg_list *newBucket = &newBuckets[ht->hash(ht->cdata, it->key, newBucketBits)]; @@ -164,7 +167,7 @@ ht_remove(HashTable ht, pointer key) { unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); struct xorg_list *bucket = &ht->buckets[index]; - BucketPtr it; + BucketPtr it=NULL; xorg_list_for_each_entry(it, bucket, l) { if (ht->compare(ht->cdata, key, it->key) == 0) { @@ -183,7 +186,7 @@ ht_find(HashTable ht, pointer key) { unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); struct xorg_list *bucket = &ht->buckets[index]; - BucketPtr it; + BucketPtr it=NULL; xorg_list_for_each_entry(it, bucket, l) { if (ht->compare(ht->cdata, key, it->key) == 0) { @@ -200,7 +203,7 @@ ht_dump_distribution(HashTable ht) int c; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { - BucketPtr it; + BucketPtr it=NULL; int n = 0; xorg_list_for_each_entry(it, &ht->buckets[c], l) { @@ -273,7 +276,7 @@ ht_dump_contents(HashTable ht, int c; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { - BucketPtr it; + BucketPtr it=NULL; int n = 0; printf("%d: ", c); diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index 61fc044d7..6c8fc6e0b 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -28,6 +28,12 @@ in this Software without prior written authorization from the X Consortium. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define SCREENSAVER +#endif + +#ifdef CreateWindow +#undef CreateWindow #endif #include <X11/X.h> diff --git a/xorg-server/Xext/security.c b/xorg-server/Xext/security.c index 3699510d3..1e0bfefb9 100644 --- a/xorg-server/Xext/security.c +++ b/xorg-server/Xext/security.c @@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define XACE #endif #include "scrnintstr.h" diff --git a/xorg-server/Xext/securitysrv.h b/xorg-server/Xext/securitysrv.h index 8904242d6..b5084fea4 100644 --- a/xorg-server/Xext/securitysrv.h +++ b/xorg-server/Xext/securitysrv.h @@ -31,10 +31,7 @@ from The Open Group. #define _SECURITY_SRV_H /* Allow client side portions of <X11/extensions/security.h> to compile */ -#ifndef Status -#define Status int -#define NEED_UNDEF_Status -#endif +typedef int Status; #ifndef Display #define Display void #define NEED_UNDEF_Display diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c index cc5214a1b..d3859a51d 100644 --- a/xorg-server/Xext/shape.c +++ b/xorg-server/Xext/shape.c @@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define SHAPE #endif #include <stdlib.h> diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c index de480207d..7a73640dd 100644 --- a/xorg-server/Xext/shm.c +++ b/xorg-server/Xext/shm.c @@ -33,8 +33,10 @@ in this Software without prior written authorization from The Open Group. #endif #include <sys/types.h> +#if !defined(_MSC_VER) #include <sys/ipc.h> #include <sys/shm.h> +#endif #include <unistd.h> #include <sys/stat.h> #include <X11/X.h> @@ -296,8 +298,10 @@ ProcShmQueryVersion(ClientPtr client) rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0; rep.majorVersion = SERVER_SHM_MAJOR_VERSION; rep.minorVersion = SERVER_SHM_MINOR_VERSION; +#ifndef _MSC_VER rep.uid = geteuid(); rep.gid = getegid(); +#endif if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); @@ -347,6 +351,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) if (uid == 0) { return 0; } + #ifdef _MSC_VER + __asm int 3; + #else /* Check the owner */ if (SHMPERM_UID(perm) == uid || SHMPERM_CUID(perm) == uid) { mask = S_IRUSR; @@ -355,10 +362,14 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; } + #endif } if (gidset) { /* Check the group */ + #ifdef _MSC_VER + __asm int 3; + #else if (SHMPERM_GID(perm) == gid || SHMPERM_CGID(perm) == gid) { mask = S_IRGRP; if (!readonly) { @@ -366,14 +377,20 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; } + #endif } } + #ifdef _MSC_VER + __asm int 3; + return -1; + #else /* Otherwise, check everyone else */ mask = S_IROTH; if (!readonly) { mask |= S_IWOTH; } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; + #endif } static int @@ -439,7 +456,9 @@ ShmDetachSegment(pointer value, /* must conform to DeleteType */ if (--shmdesc->refcnt) return TRUE; +#ifndef _MSC_VER shmdt(shmdesc->addr); +#endif for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next); *prev = shmdesc->next; free(shmdesc); diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index 91968e498..44e2b12eb 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -1153,6 +1153,10 @@ FreeAwait(void *addr, XID id) return Success; } +#ifdef _MSC_VER +#pragma warning(disable:4715) /* Not all control paths return a value */ +#endif + /* loosely based on dix/events.c/OtherClientGone */ static int FreeAlarmClient(void *value, XID id) @@ -1209,7 +1213,7 @@ static int ProcSyncListSystemCounters(ClientPtr client) { xSyncListSystemCountersReply rep; - SysCounterInfo *psci; + SysCounterInfo *psci=NULL; int len = 0; xSyncSystemCounter *list = NULL, *walklist = NULL; diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c index b2e7ddaf0..b4884fb6e 100644 --- a/xorg-server/Xext/xace.c +++ b/xorg-server/Xext/xace.c @@ -19,6 +19,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define XACE #endif #include <stdarg.h> diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c index 9de785678..d10a36eef 100644 --- a/xorg-server/Xext/xf86bigfont.c +++ b/xorg-server/Xext/xf86bigfont.c @@ -282,8 +282,13 @@ ProcXF86BigfontQueryVersion(ClientPtr client) reply.sequenceNumber = client->sequence; reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION; reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION; + #ifdef WIN32 + reply.uid = 0; + reply.gid = 0; + #else reply.uid = geteuid(); reply.gid = getegid(); + #endif #ifdef HAS_SHM reply.signature = signature; #else diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c index ecef0c032..7b2e609bd 100644 --- a/xorg-server/Xext/xres.c +++ b/xorg-server/Xext/xres.c @@ -117,7 +117,7 @@ AddFragment(struct xorg_list *frags, int bytes) static void WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags) { - FragmentList *it; + FragmentList *it=NULL; xorg_list_for_each_entry(it, frags, l) { WriteToClient(client, it->bytes, (char*) it + sizeof(*it)); } @@ -130,7 +130,7 @@ WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags) static void DestroyFragments(struct xorg_list *frags) { - FragmentList *it, *tmp; + FragmentList *it=NULL, *tmp; xorg_list_for_each_entry_safe(it, tmp, frags, l) { xorg_list_del(&it->l); free(it); @@ -818,7 +818,7 @@ AddResourceSizeValue(pointer ptr, XID id, RESTYPE type, pointer cdata) Bool ok = TRUE; HashTable ht; HtGenericHashSetupRec htSetup = { - .keySize = sizeof(void*) + /*.keySize = */sizeof(void*) }; /* it doesn't matter that we don't undo the work done here diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c index 48061a286..28f2a56df 100644 --- a/xorg-server/Xext/xvmain.c +++ b/xorg-server/Xext/xvmain.c @@ -270,7 +270,7 @@ XvScreenInit(ScreenPtr pScreen) /* ALLOCATE SCREEN PRIVATE RECORD */ - pxvs = malloc(sizeof(XvScreenRec)); + pxvs = calloc(1,sizeof(XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); return BadAlloc; @@ -301,7 +301,7 @@ XvCloseScreen(int ii, ScreenPtr pScreen) pScreen->DestroyWindow = pxvs->DestroyWindow; pScreen->CloseScreen = pxvs->CloseScreen; - (*pxvs->ddCloseScreen) (ii, pScreen); + if (pxvs->ddCloseScreen) (*pxvs->ddCloseScreen) (ii, pScreen); free(pxvs); |