aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r--xorg-server/Xext/Makefile37
-rw-r--r--xorg-server/Xext/dpms.c2
-rw-r--r--xorg-server/Xext/saver.c6
-rw-r--r--xorg-server/Xext/security.c2
-rw-r--r--xorg-server/Xext/securitysrv.h5
-rw-r--r--xorg-server/Xext/shape.c2
-rw-r--r--xorg-server/Xext/shm.c19
-rw-r--r--xorg-server/Xext/sync.c4
-rw-r--r--xorg-server/Xext/syncsrv.h2
-rw-r--r--xorg-server/Xext/xace.c2
-rw-r--r--xorg-server/Xext/xvmain.c4
11 files changed, 78 insertions, 7 deletions
diff --git a/xorg-server/Xext/Makefile b/xorg-server/Xext/Makefile
new file mode 100644
index 000000000..1fd048d52
--- /dev/null
+++ b/xorg-server/Xext/Makefile
@@ -0,0 +1,37 @@
+CSRCS=\
+bigreq.c \
+dpms.c \
+dpmsstubs.c \
+saver.c \
+security.c \
+shape.c \
+sleepuntil.c \
+sync.c \
+xace.c \
+xcmisc.c \
+xres.c \
+xtest.c \
+geext.c \
+panoramiX.c \
+panoramiXprocs.c \
+panoramiXSwap.c
+
+#shm.c \
+#appgroup.c \
+#fontcache.c \
+#mbufbf.c \
+#mbufpx.c \
+#xcalibrate.c \
+#xf86bigfont.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 0c8f18f47..e82f495aa 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/saver.c b/xorg-server/Xext/saver.c
index 18d5e468d..78f8efac3 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -29,6 +29,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 df5bd5822..bc2930ce7 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 3d3894a18..68f51d2f5 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 cb2a0e0f6..3263c0224 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 7ca027a90..7c9fbc7a9 100644
--- a/xorg-server/Xext/shm.c
+++ b/xorg-server/Xext/shm.c
@@ -34,8 +34,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>
@@ -299,8 +301,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);
@@ -350,6 +354,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;
@@ -358,10 +365,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) {
@@ -369,14 +380,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
@@ -449,7 +466,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;
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 23360f002..830552381 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -1235,6 +1235,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)
diff --git a/xorg-server/Xext/syncsrv.h b/xorg-server/Xext/syncsrv.h
index 2b7077364..46f25bdfc 100644
--- a/xorg-server/Xext/syncsrv.h
+++ b/xorg-server/Xext/syncsrv.h
@@ -118,7 +118,7 @@ typedef union {
} SyncAwaitUnion;
extern pointer SyncCreateSystemCounter(
- const char */* name */,
+ const char * /* name */,
CARD64 /* inital_value */,
CARD64 /* resolution */,
SyncCounterType /* change characterization */,
diff --git a/xorg-server/Xext/xace.c b/xorg-server/Xext/xace.c
index 28c51687c..77b713ffb 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/xvmain.c b/xorg-server/Xext/xvmain.c
index d21a56c3e..a530a1b77 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/Xext/xvmain.c
@@ -280,7 +280,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");
@@ -314,7 +314,7 @@ XvCloseScreen(
pScreen->DestroyWindow = pxvs->DestroyWindow;
pScreen->CloseScreen = pxvs->CloseScreen;
- (* pxvs->ddCloseScreen)(ii, pScreen);
+ if (pxvs->ddCloseScreen) (* pxvs->ddCloseScreen)(ii, pScreen);
free(pxvs);