diff options
author | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
commit | da8fe31a7ba4acf109097d5696ad0145b991cdfd (patch) | |
tree | 1c74d6f075702a73e557872f2a6f020ea4eb5432 /xorg-server/hw/kdrive/src | |
parent | 6590f805a12779909cb8504c230fa367148fe38c (diff) | |
parent | 529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff) | |
download | vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2 vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip |
Changes for VC compilation
Diffstat (limited to 'xorg-server/hw/kdrive/src')
-rw-r--r-- | xorg-server/hw/kdrive/src/kdrive.c | 7 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kinput.c | 27 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kmap.c | 9 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/makefile | 20 |
4 files changed, 60 insertions, 3 deletions
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c index e2ee4adea..3e739b8ec 100644 --- a/xorg-server/hw/kdrive/src/kdrive.c +++ b/xorg-server/hw/kdrive/src/kdrive.c @@ -340,6 +340,7 @@ KdProcessSwitch (void) KdEnableScreens (); } +#ifndef _MSC_VER void AbortDDX(void) { @@ -362,6 +363,7 @@ ddxGiveUp () { AbortDDX (); } +#endif Bool kdDumbDriver; Bool kdSoftCursor; @@ -1394,6 +1396,7 @@ KdInitOutput (ScreenInfo *pScreenInfo, } #ifdef DPMSExtension +#ifndef _MSC_VER int DPMSSet(ClientPtr client, int level) { @@ -1411,6 +1414,8 @@ DPMSSupported (void) return FALSE; } #endif +#endif +#ifndef _MSC_VER void ddxInitGlobals(void) { /* THANK YOU XPRINT */ } - +#endif diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index 9ba11661c..b1b04fa52 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -110,21 +110,29 @@ KdSigio (int sig) static void KdBlockSigio (void) { +#ifdef _MSC_VER + __asm int 3; +#else sigset_t set; sigemptyset (&set); sigaddset (&set, SIGIO); sigprocmask (SIG_BLOCK, &set, 0); +#endif } static void KdUnblockSigio (void) { +#ifdef _MSC_VER + __asm int 3; +#else sigset_t set; sigemptyset (&set); sigaddset (&set, SIGIO); sigprocmask (SIG_UNBLOCK, &set, 0); +#endif } #ifdef DEBUG_SIGIO @@ -170,15 +178,22 @@ KdResetInputMachine (void) static void KdNonBlockFd (int fd) { +#ifdef _MSC_VER + __asm int 3; +#else int flags; flags = fcntl (fd, F_GETFL); flags |= FASYNC|NOBLOCK; fcntl (fd, F_SETFL, flags); +#endif } static void KdAddFd (int fd) { +#ifdef _MSC_VER + __asm int 3; +#else struct sigaction act; sigset_t set; @@ -195,11 +210,15 @@ KdAddFd (int fd) sigaction (SIGIO, &act, 0); sigemptyset (&set); sigprocmask (SIG_SETMASK, &set, 0); +#endif } static void KdRemoveFd (int fd) { +#ifdef _MSC_VER + __asm int 3; +#else struct sigaction act; int flags; @@ -215,6 +234,7 @@ KdRemoveFd (int fd) sigemptyset (&act.sa_mask); sigaction (SIGIO, &act, 0); } +#endif } Bool @@ -513,11 +533,13 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return BadImplementation; } +#ifndef _MSC_VER Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return TRUE; } +#endif static void KdBell (int volume, DeviceIntPtr pDev, pointer arg, int something) @@ -536,6 +558,7 @@ KdBell (int volume, DeviceIntPtr pDev, pointer arg, int something) KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration); } +#ifndef _MSC_VER void DDXRingBell(int volume, int pitch, int duration) { @@ -551,7 +574,7 @@ DDXRingBell(int volume, int pitch, int duration) } } } - +#endif void KdRingBell(KdKeyboardInfo *ki, int volume, int pitch, int duration) { @@ -2345,6 +2368,7 @@ miPointerScreenFuncRec kdPointerScreenFuncs = KdWarpCursor }; +#ifndef _MSC_VER void ProcessInputEvents () { @@ -2354,6 +2378,7 @@ ProcessInputEvents () KdProcessSwitch (); KdCheckLock (); } +#endif /* FIXME use XSECURITY to work out whether the client should be allowed to * open and close. */ diff --git a/xorg-server/hw/kdrive/src/kmap.c b/xorg-server/hw/kdrive/src/kmap.c index ce1e28ae4..0762e72af 100644 --- a/xorg-server/hw/kdrive/src/kmap.c +++ b/xorg-server/hw/kdrive/src/kmap.c @@ -24,6 +24,7 @@ #include "kdrive.h" #include <errno.h> +#ifndef _MSC_VER #include <unistd.h> #include <sys/mman.h> #ifdef HAVE_ASM_MTRR_H @@ -31,6 +32,9 @@ #endif #include <sys/ioctl.h> +#else +#define DRAW_DEBUG(a) +#endif void * KdMapDevice (CARD32 addr, CARD32 size) @@ -39,7 +43,8 @@ KdMapDevice (CARD32 addr, CARD32 size) void *a; void *d; - d = VirtualAlloc (NULL, size, MEM_RESERVE, PAGE_NOACCESS); + d = VirtualAlloc (NULL, size, MEM_RESERVE, PAGE_READWRITE|PAGE_NOCACHE); +/* if (!d) return NULL; DRAW_DEBUG ((DEBUG_S3INIT, "Virtual address of 0x%x is 0x%x", addr, d)); @@ -53,6 +58,8 @@ KdMapDevice (CARD32 addr, CARD32 size) return NULL; } DRAW_DEBUG ((DEBUG_S3INIT, "Device mapped successfully")); +*/ + __asm int 3; return d; #endif #ifdef linux diff --git a/xorg-server/hw/kdrive/src/makefile b/xorg-server/hw/kdrive/src/makefile new file mode 100644 index 000000000..1400d0427 --- /dev/null +++ b/xorg-server/hw/kdrive/src/makefile @@ -0,0 +1,20 @@ +LIBRARY = libkdrive + +CSRCS = kaa.c \ + kaapict.c \ + kasync.c \ + kcmap.c \ + kcurscol.c \ + kinfo.c \ + kkeymap.c \ + kmap.c \ + kmode.c \ + knoop.c \ + koffscreen.c \ + kshadow.c \ + kinput.c \ + kdrive.c \ + ktest.c + + + |