aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/include/X11/Xlibint.h
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2022-01-19 00:45:43 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-04-27 14:08:46 +0200
commit4875a15ca61358a1c95b156b2279fce092451278 (patch)
tree79054df1730d4723658b02cec311bc8ba7655662 /nx-X11/lib/include/X11/Xlibint.h
parenta502149a844736dcc7f7dedd7c63229c74a448ee (diff)
downloadnx-libs-4875a15ca61358a1c95b156b2279fce092451278.tar.gz
nx-libs-4875a15ca61358a1c95b156b2279fce092451278.tar.bz2
nx-libs-4875a15ca61358a1c95b156b2279fce092451278.zip
Update libNX_X11 to upstream's libX11-1.7.3.1-10-gd60ede78
Diffstat (limited to 'nx-X11/lib/include/X11/Xlibint.h')
-rw-r--r--nx-X11/lib/include/X11/Xlibint.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/nx-X11/lib/include/X11/Xlibint.h b/nx-X11/lib/include/X11/Xlibint.h
index ce20b9a3d..e5b97e3a5 100644
--- a/nx-X11/lib/include/X11/Xlibint.h
+++ b/nx-X11/lib/include/X11/Xlibint.h
@@ -236,6 +236,11 @@ struct _XDisplay
unsigned long last_request_read_upper32bit;
unsigned long request_upper32bit;
#endif
+
+ struct _XErrorThreadInfo *error_threads;
+
+ XIOErrorExitHandler exit_handler;
+ void *exit_handler_data;
};
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
@@ -475,15 +480,15 @@ extern LockInfoPtr _Xglobal_lock;
*/
#if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__)
-# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
-# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
-# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
+# define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size)))
+# define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size)))
+# define Xcalloc(nelem, elsize) calloc((size_t)((nelem) == 0 ? 1 : (nelem)), (size_t)(elsize))
#else
-# define Xmalloc(size) malloc((size))
-# define Xrealloc(ptr, size) realloc((ptr), (size))
-# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
+# define Xmalloc(size) malloc((size_t)(size))
+# define Xrealloc(ptr, size) realloc((ptr), (size_t)(size))
+# define Xcalloc(nelem, elsize) calloc((size_t)(nelem), (size_t)(elsize))
#endif
@@ -581,7 +586,7 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
bytes after the request. "n" must be a multiple of 4! */
#define GetReqExtra(name, n, req) \
- GetReqSized(name, SIZEOF(x##name##Req) + n, req)
+ GetReqSized(name, SIZEOF(x##name##Req) + n, req)
/*
* GetResReq is for those requests that have a resource ID
@@ -591,7 +596,7 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
#define GetResReq(name, rid, req) \
req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \
- req->id = (rid)
+ if (req) req->id = (rid)
/*
* GetEmptyReq is for those requests that have no arguments
@@ -673,7 +678,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
#ifndef DataRoutineIsProcedure
#define Data(dpy, data, len) {\
if (dpy->bufptr + (len) <= dpy->bufmax) {\
- memcpy(dpy->bufptr, data, (int)len);\
+ memcpy(dpy->bufptr, data, (int)(len));\
dpy->bufptr += ((len) + 3) & ~3;\
} else\
_XSend(dpy, data, len);\
@@ -709,7 +714,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
#define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len)
extern int _XData32(
Display *dpy,
- _Xconst long *data,
+ _Xconst long *data,
unsigned len
);
extern void _XRead32(
@@ -1427,6 +1432,10 @@ extern int _XDefaultError(
extern int _XDefaultIOError(
Display *dpy);
+extern void _XDefaultIOErrorExit(
+ Display *dpy,
+ void *user_data);
+
extern void _XSetClipRectangles (
Display *dpy,
GC gc,