libX11/p_xlib_skip_ext_env.diff

24 lines
555 B
Diff

--- QuExt.c 2006-05-12 20:46:51.000000000 +0200
+++ src/QuExt.c 2006-05-20 21:07:13.000000000 +0200
@@ -43,6 +43,20 @@
xQueryExtensionReply rep;
register xQueryExtensionReq *req;
+ if (name && strlen (name) < 256)
+ {
+ char var[256 + 15];
+ int i;
+
+ strcpy (var, "XLIB_SKIP_EXT_");
+ for (i = 0; name[i]; i++)
+ var[i + 14] = name[i] == '-' ? '_' : name[i];
+
+ var[i + 14] = 0;
+ if (getenv (var))
+ return False;
+ }
+
LockDisplay(dpy);
GetReq(QueryExtension, req);
req->nbytes = name ? strlen(name) : 0;