summaryrefslogtreecommitdiffstats
path: root/rfbserver.c
diff options
context:
space:
mode:
authordscho <dscho>2001-10-06 17:45:42 +0000
committerdscho <dscho>2001-10-06 17:45:42 +0000
commit446f334cc1ee67b280e218ae58fef34d5b063cea (patch)
treef238279505d71a241b20154a43aee10b7acde3fa /rfbserver.c
parent018e90db5918a75ceaf3835be084e2387f31a47e (diff)
downloadlibtdevnc-446f334cc1ee67b280e218ae58fef34d5b063cea.tar.gz
libtdevnc-446f334cc1ee67b280e218ae58fef34d5b063cea.zip
WIN32 compatibility, removed kbdptr.c
Diffstat (limited to 'rfbserver.c')
-rw-r--r--rfbserver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/rfbserver.c b/rfbserver.c
index 2460130..6c20323 100644
--- a/rfbserver.c
+++ b/rfbserver.c
@@ -27,12 +27,16 @@
#include <stdlib.h>
#include "rfb.h"
#include "sraRegion.h"
+#ifdef WIN32
+#define write(sock,buf,len) send(sock,buf,len,0)
+#else
#include <unistd.h>
#include <pwd.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#endif
+#include <sys/types.h>
#ifdef CORBA
#include <vncserverctrl.h>
@@ -984,8 +988,8 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion)
fu->type = rfbFramebufferUpdate;
if (nUpdateRegionRects != 0xFFFF) {
- fu->nRects = Swap16IfLE(sraRgnCountRects(updateCopyRegion)
- + nUpdateRegionRects + !!sendCursorShape);
+ fu->nRects = Swap16IfLE((CARD16)(sraRgnCountRects(updateCopyRegion)
+ + nUpdateRegionRects + !!sendCursorShape));
} else {
fu->nRects = 0xFFFF;
}
@@ -1277,7 +1281,7 @@ rfbSendSetColourMapEntries(cl, firstColour, nColours)
len = sz_rfbSetColourMapEntriesMsg;
for (i = 0; i < nColours; i++) {
- if(i<cm->count) {
+ if(i<(int)cm->count) {
if(cm->is16) {
rgb[i*3] = Swap16IfLE(cm->data.shorts[i*3]);
rgb[i*3+1] = Swap16IfLE(cm->data.shorts[i*3+1]);