aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-12-21 14:53:11 +0100
committermarha <marha@users.sourceforge.net>2013-12-21 14:53:11 +0100
commit90077a910e62ec55bc1e5a98f5946754c9c5f8bd (patch)
treea480babd4a7c61d52edc2cc555b5d20eab69f737
parent52cd3051ba15ddda117f8d8cae1979cd3c86f5b6 (diff)
downloadvcxsrv-90077a910e62ec55bc1e5a98f5946754c9c5f8bd.tar.gz
vcxsrv-90077a910e62ec55bc1e5a98f5946754c9c5f8bd.tar.bz2
vcxsrv-90077a910e62ec55bc1e5a98f5946754c9c5f8bd.zip
Solved 64-bit run-time problems
-rw-r--r--include/stdint.h2
-rw-r--r--libX11/src/xcb_io.c2
-rw-r--r--libXaw/src/Pixmap.c6
-rw-r--r--libXaw/src/XawIm.c4
-rw-r--r--libXt/include/X11/Intrinsic.h2
-rw-r--r--libXt/src/EventUtil.c4
-rw-r--r--xorg-server/dix/gc.c2
-rw-r--r--xorg-server/record/record.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/include/stdint.h b/include/stdint.h
index 4836190c5..87010ca5c 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -243,6 +243,6 @@ typedef uint64_t uintmax_t;
#endif // __STDC_CONSTANT_MACROS ]
-typedef int ssize_t;
+typedef intptr_t ssize_t;
#endif // _MSC_STDINT_H_ ]
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c
index 26e547ee5..db75e4a24 100644
--- a/libX11/src/xcb_io.c
+++ b/libX11/src/xcb_io.c
@@ -151,7 +151,7 @@ static void check_internal_connections(Display *dpy)
static PendingRequest *append_pending_request(Display *dpy, unsigned long sequence)
{
PendingRequest *node = malloc(sizeof(PendingRequest));
- assert(node);
+ assert(node!=NULL);
node->next = NULL;
node->sequence = sequence;
node->reply_waiter = 0;
diff --git a/libXaw/src/Pixmap.c b/libXaw/src/Pixmap.c
index 1c5a8c5ed..0741b052f 100644
--- a/libXaw/src/Pixmap.c
+++ b/libXaw/src/Pixmap.c
@@ -47,7 +47,7 @@
* Types
*/
typedef struct _XawCache {
- long value;
+ intptr_t value;
XtPointer *elems;
unsigned int num_elems;
} XawCache;
@@ -415,7 +415,7 @@ qcmp_string(register _Xconst void *left, register _Xconst void *right)
static int
bcmp_long(register _Xconst void *value, register _Xconst void *cache)
{
- return ((long)value - (long)((*(XawCache **)cache)->value));
+ return ((intptr_t)value - (intptr_t)((*(XawCache **)cache)->value));
}
static int
@@ -492,7 +492,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth)
XtRealloc((char *)xaw->elems,
sizeof(XtPointer) * xaw->num_elems);
}
- pcache->value = (long)screen;
+ pcache->value = (intptr_t)screen;
pcache->elems = NULL;
pcache->num_elems = 0;
xaw->elems[xaw->num_elems - 1] = (XtPointer)pcache;
diff --git a/libXaw/src/XawIm.c b/libXaw/src/XawIm.c
index 7a7152fb6..ee0a09a6e 100644
--- a/libXaw/src/XawIm.c
+++ b/libXaw/src/XawIm.c
@@ -196,7 +196,7 @@ SetExtPart(VendorShellWidget w, XawVendorShellExtWidget vew)
contextData = XtNew(contextDataRec);
contextData->parent = (Widget)w;
contextData->ve = (Widget)vew;
- if (XSaveContext(XtDisplay(w), (Window)w, extContext, (char *)contextData)) {
+ if (XSaveContext(XtDisplay(w), (Window)(((intptr_t)w)&0xffffffff), extContext, (char *)contextData)) {
return(NULL);
}
return(&(vew->vendor_ext));
@@ -208,7 +208,7 @@ GetExtPart(VendorShellWidget w)
contextDataRec *contextData;
XawVendorShellExtWidget vew;
- if (XFindContext(XtDisplay(w), (Window)w, extContext,
+ if (XFindContext(XtDisplay(w), (Window)(((intptr_t)w)& 0xffffffff), extContext,
(XPointer*)&contextData)) {
return(NULL);
}
diff --git a/libXt/include/X11/Intrinsic.h b/libXt/include/X11/Intrinsic.h
index 44a1b360a..0488be908 100644
--- a/libXt/include/X11/Intrinsic.h
+++ b/libXt/include/X11/Intrinsic.h
@@ -113,7 +113,7 @@ typedef struct _XtEventRec *XtEventTable;
typedef struct _XtAppStruct *XtAppContext;
typedef unsigned long XtValueMask;
-typedef unsigned long XtIntervalId;
+typedef uintptr_t XtIntervalId;
typedef unsigned long XtInputId;
typedef unsigned long XtWorkProcId;
typedef unsigned long XtSignalId;
diff --git a/libXt/src/EventUtil.c b/libXt/src/EventUtil.c
index 91ad31fae..3127efc84 100644
--- a/libXt/src/EventUtil.c
+++ b/libXt/src/EventUtil.c
@@ -111,7 +111,7 @@ XtPerWidgetInput _XtGetPerWidgetInput(
perWidgetInputContext = XUniqueContext();
if (XFindContext(dpy,
- (Window)widget,
+ (Window)(((intptr_t)widget)&0xffffffff),
perWidgetInputContext,
(XPointer *)&pwi) &&
create)
@@ -134,7 +134,7 @@ XtPerWidgetInput _XtGetPerWidgetInput(
_XtDestroyServerGrabs, (XtPointer)pwi);
(void) XSaveContext(dpy,
- (Window)widget,
+ (Window)(((intptr_t)widget)&0xffffffff),
perWidgetInputContext,
(char *) pwi);
}
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index fc13f46a0..57190d11f 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -127,7 +127,7 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
PixmapPtr pPixmap;
BITS32 maskQ;
- assert(pUnion);
+ assert(pUnion!=NULL);
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
maskQ = mask; /* save these for when we walk the GCque */
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c
index 1b7eb8a43..7a37ec06a 100644
--- a/xorg-server/record/record.c
+++ b/xorg-server/record/record.c
@@ -2734,7 +2734,7 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata,
/* RecordDisableContext modifies contents of ppAllContexts. */
numContextsCopy = numContexts;
ppAllContextsCopy = malloc(numContextsCopy * sizeof(RecordContextPtr));
- assert(ppAllContextsCopy);
+ assert(ppAllContextsCopy!=NULL);
memcpy(ppAllContextsCopy, ppAllContexts,
numContextsCopy * sizeof(RecordContextPtr));