diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-07-23 19:28:48 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2022-07-23 19:28:48 +0000 |
commit | ff81d9e3a4a58d8477f9e8007cd43bea866fee8e (patch) | |
tree | f308376c8b9656bb984aa20874ad9d4546f8f306 /lib/libX11/src | |
parent | 3ee2fc403c2c8cd734d382d98a49b1a99fe297b6 (diff) |
Update to libX11 1.8.1
Diffstat (limited to 'lib/libX11/src')
-rw-r--r-- | lib/libX11/src/config.h.in | 3 | ||||
-rw-r--r-- | lib/libX11/src/globals.c | 16 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKB.c | 2 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKBGAlloc.c | 11 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKBGeom.c | 3 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKBMisc.c | 2 | ||||
-rw-r--r-- | lib/libX11/src/xlibi18n/lcCT.c | 2 |
7 files changed, 21 insertions, 18 deletions
diff --git a/lib/libX11/src/config.h.in b/lib/libX11/src/config.h.in index c9668aea1..34740901c 100644 --- a/lib/libX11/src/config.h.in +++ b/lib/libX11/src/config.h.in @@ -189,6 +189,9 @@ #endif +/* Call XInitThreads() from the library constructor */ +#undef USE_THREAD_SAFETY_CONSTRUCTOR + /* Version number of package */ #undef VERSION diff --git a/lib/libX11/src/globals.c b/lib/libX11/src/globals.c index 1aaa8c670..ea3fe6e11 100644 --- a/lib/libX11/src/globals.c +++ b/lib/libX11/src/globals.c @@ -97,12 +97,10 @@ int XTestInputActionType = 0; int XTestFakeAckType = 1; #endif -/* - * NOTE: any additional external definition NEED - * to be inserted BELOW this point!!! - */ - -/* - * NOTE: any additional external definition NEED - * to be inserted ABOVE this point!!! - */ +#ifdef USE_THREAD_SAFETY_CONSTRUCTOR +__attribute__((constructor)) static void +xlib_ctor(void) +{ + XInitThreads(); +} +#endif diff --git a/lib/libX11/src/xkb/XKB.c b/lib/libX11/src/xkb/XKB.c index 055eb367e..4df82b24c 100644 --- a/lib/libX11/src/xkb/XKB.c +++ b/lib/libX11/src/xkb/XKB.c @@ -721,7 +721,7 @@ XkbGetPerClientControls(Display *dpy, unsigned *ctrls) } Display * -XkbOpenDisplay(char *name, +XkbOpenDisplay(_Xconst char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, diff --git a/lib/libX11/src/xkb/XKBGAlloc.c b/lib/libX11/src/xkb/XKBGAlloc.c index 3a257c04b..5b02f34c9 100644 --- a/lib/libX11/src/xkb/XKBGAlloc.c +++ b/lib/libX11/src/xkb/XKBGAlloc.c @@ -650,7 +650,7 @@ XkbAllocGeometry(XkbDescPtr xkb, XkbGeometrySizesPtr sizes) /***====================================================================***/ XkbPropertyPtr -XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value) +XkbAddGeomProperty(XkbGeometryPtr geom, _Xconst char *name, _Xconst char *value) { register int i; register XkbPropertyPtr prop; @@ -683,7 +683,8 @@ XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value) } XkbKeyAliasPtr -XkbAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr) +XkbAddGeomKeyAlias(XkbGeometryPtr geom, _Xconst char *aliasStr, + _Xconst char *realStr) { register int i; register XkbKeyAliasPtr alias; @@ -711,7 +712,7 @@ XkbAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr) } XkbColorPtr -XkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel) +XkbAddGeomColor(XkbGeometryPtr geom, _Xconst char *spec, unsigned int pixel) { register int i; register XkbColorPtr color; @@ -898,8 +899,8 @@ XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) XkbOverlayKeyPtr XkbAddGeomOverlayKey(XkbOverlayPtr overlay, XkbOverlayRowPtr row, - char *over, - char *under) + _Xconst char *over, + _Xconst char *under) { register int i; XkbOverlayKeyPtr key; diff --git a/lib/libX11/src/xkb/XKBGeom.c b/lib/libX11/src/xkb/XKBGeom.c index be7537b96..ab3bbc7c3 100644 --- a/lib/libX11/src/xkb/XKBGeom.c +++ b/lib/libX11/src/xkb/XKBGeom.c @@ -208,7 +208,8 @@ XkbComputeSectionBounds(XkbGeometryPtr geom, XkbSectionPtr section) /***====================================================================***/ char * -XkbFindOverlayForKey(XkbGeometryPtr geom, XkbSectionPtr wanted, char *under) +XkbFindOverlayForKey(XkbGeometryPtr geom, XkbSectionPtr wanted, + _Xconst char *under) { int s; XkbSectionPtr section; diff --git a/lib/libX11/src/xkb/XKBMisc.c b/lib/libX11/src/xkb/XKBMisc.c index 880a616e9..1ffb4404f 100644 --- a/lib/libX11/src/xkb/XKBMisc.c +++ b/lib/libX11/src/xkb/XKBMisc.c @@ -857,7 +857,7 @@ XkbUpdateKeyTypeVirtualMods(XkbDescPtr xkb, XkbChangesPtr changes) { register unsigned int i; - unsigned int mask; + unsigned int mask = 0; XkbVirtualModsToReal(xkb, type->mods.vmods, &mask); type->mods.mask = type->mods.real_mods | mask; diff --git a/lib/libX11/src/xlibi18n/lcCT.c b/lib/libX11/src/xlibi18n/lcCT.c index 2ffb00978..9e797036a 100644 --- a/lib/libX11/src/xlibi18n/lcCT.c +++ b/lib/libX11/src/xlibi18n/lcCT.c @@ -620,7 +620,7 @@ _XlcCheckCTSequence( return resOK; case XctExtSeg: if (tmp_ctext_len > 2 - && (tmp_ctext[0] & 0x80) && (tmp_ctext[0] & 0x80)) { + && (tmp_ctext[0] & 0x80) && (tmp_ctext[1] & 0x80)) { unsigned int msb = tmp_ctext[0] & 0x7f; unsigned int lsb = tmp_ctext[1] & 0x7f; ext_seg_left = (msb << 7) + lsb; |