mirror of OpenBSD xenocara tree github.com/openbsd/xenocara
openbsd
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update to libX11 1.8.12. ok tb@ jsg@

+914 -434
+630
lib/libX11/ChangeLog
··· 1 + commit 59917d28a3c41ad22d6fc52e323cafe2cdd596d5 2 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 + Date: Sat Mar 8 15:23:04 2025 -0800 4 + 5 + libX11 1.8.12 6 + 7 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 8 + 9 + commit 5f8077b257ea27a5fd6f114d2bc15284b2416b3c 10 + Author: Olivier Fourdan <ofourdan@redhat.com> 11 + Date: Thu Nov 28 14:09:04 2024 +0100 12 + 13 + xkb: Fix buffer overflow in XkbChangeTypesOfKey() 14 + 15 + If XkbChangeTypesOfKey() is called with nGroups == 0, it will resize the 16 + key syms to 0 but leave the key actions unchanged. 17 + 18 + If later, the same function is called with a non-zero value for nGroups, 19 + this will cause a buffer overflow because the key actions are of the wrong 20 + size. 21 + 22 + To avoid the issue, make sure to resize both the key syms and key actions 23 + when nGroups is 0. 24 + 25 + (cherry picked from xorg/xserver@0e4ed94952b255c04fe910f6a1d9c852878dcd64) 26 + 27 + Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> 28 + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> 29 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 30 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 31 + 32 + commit 865fd56aeb5c5d1812cce46ed197873c48b08692 33 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 34 + Date: Sun Nov 1 15:45:08 2020 -0800 35 + 36 + xkb: always set *mask_rtrn in XkbVirtualModsToReal 37 + 38 + Resolves warning from Oracle Parfait static analyser: 39 + 40 + Error: Uninitialised memory 41 + Uninitialised memory variable [uninitialised-mem-var] (CWE 457): 42 + Possible access to uninitialised memory referenced by variable 'mask' 43 + at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'. 44 + Path in callee avoiding write at line 720 45 + mask allocated at line 718 46 + 47 + (cherry picked from xorg/xserver@a6574033f464c7cde02bce8f1b130ff6b2b2d9eb) 48 + 49 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 50 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 51 + 52 + commit 88d1a84ca3c0f87ffcb83b9b96e34a7121d5e2d3 53 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 54 + Date: Sat Feb 22 11:59:13 2025 -0800 55 + 56 + XkbChangeTypesOfKey: verify newTypesIn is not null before using it 57 + 58 + Based on xorg/xserver@97c9e6a7139e07a0761be05034fae42fcd65ba36 59 + 60 + Fixes: 8ba0ca32 ("Janitor: ansification, make distcheck, compiler warnings.") 61 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 62 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 63 + 64 + commit 48a1335cab13d883e15b4eb5e9a5e080289a5c64 65 + Author: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> 66 + Date: Tue May 29 10:17:50 2012 +0530 67 + 68 + xkb: Allocate size_syms correctly when width of a type increases 69 + 70 + The current code seems to skip syms with width less than 71 + type->num_levels when calculating the total size for the new 72 + size_syms. This leads to less space being allocated than necessary 73 + during the next phase, which is to copy over the syms to the new 74 + location. This results in an overflow leading to a crash. 75 + 76 + (cherry picked from xorg/xserver@42ae2e8199fe875319978249963de7499607988b) 77 + 78 + Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> 79 + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> 80 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 81 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 82 + 83 + commit 158be3ebd7d1da4d16bfc2dee82aac477fbcb833 84 + Author: Daniel Stone <daniel@fooishbar.org> 85 + Date: Wed Mar 21 02:04:12 2007 +0200 86 + 87 + XKB: Fix size_syms calculation bug 88 + 89 + Apparently it needed to be nSyms*15/10, not *12/10; make it match the 90 + other allocation code. 91 + 92 + (cherry picked from xorg/xserver@f292de2ef13dc994a38029cee9e2642576893332) 93 + 94 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 95 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 96 + 97 + commit d6e1ca046aef42ec5465ece5edbdffe0bc7c0cb6 98 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 99 + Date: Sat Feb 22 10:13:52 2025 -0800 100 + 101 + XkbFreeKeyboard: set xkb->geom to NULL after freeing it 102 + 103 + Because XkbFreeGeometry takes a pointer to the geometry structure, 104 + and not the overall xkb structure like the other XkbFree*() calls, 105 + the caller is responsible for clearing the xkb->geom pointer to 106 + ensure it is not used after free. 107 + 108 + Based on xorg/xserver@629798c73ad76a77fa6a55bc6403fd9b95ade2bb 109 + 110 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 111 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279> 112 + 113 + commit 4a3ca6eeced253aacb0e2ecf640b9eb93863badc 114 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 115 + Date: Sun Feb 23 15:19:54 2025 -0800 116 + 117 + x11.pc: Add URL field 118 + 119 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 120 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/280> 121 + 122 + commit 23f0352eca362515d598bfdbd8ecec070dcd1b28 123 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 124 + Date: Sun Feb 2 13:54:27 2025 -0800 125 + 126 + libX11 1.8.11 127 + 128 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 129 + 130 + commit 4665733565eda7ae32302c3abf1aaf5075b8abde 131 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 132 + Date: Sat Jan 11 10:31:08 2025 -0800 133 + 134 + configure: drop `pthread-stubs` dependency on Dragonfly, FreeBSD, & NetBSD 135 + 136 + syncs with changes to libxcb 1.16 & 1.16.1 137 + 138 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 139 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/277> 140 + 141 + commit ba15d51bfe789e84e291ccfb31d5f0ae6192969e 142 + Author: Aaron Muir Hamilton <aaron@correspondwith.me> 143 + Date: Sun Oct 27 21:42:23 2024 -0400 144 + 145 + ximcp/imRm.c: allow XNArea with OnTheSpot 146 + 147 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/270> 148 + 149 + commit 61175323a8a374aaedb139894987ddaf2bb2ba27 150 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 151 + Date: Mon Dec 30 10:27:23 2024 -0800 152 + 153 + cmsColNm: remove obsolete comment about FirstCmp being public 154 + 155 + It was made a static function in May 14, 1991 by rws in 156 + commit "make FirstCmp static" for X11R5 157 + 158 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 159 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/276> 160 + 161 + commit 7c75a066454fbafe586f7c24aeee65348f9d2bcc 162 + Author: Pierre Le Marre <dev@wismill.eu> 163 + Date: Mon Dec 9 14:51:17 2024 +0100 164 + 165 + Fix misuse of UCSConvertCase in XConvertCase 166 + 167 + There are two issues with the use of `UCSConvertCase` in `XConvertCase`: 168 + 169 + - Some Latin-1 keysyms do not map within Latin-1, e.g. `ssharp`. 170 + Only Latin-1 keysyms have the same value as the Unicode code point of 171 + their corresponding character. So `UCSConvertCase` does not work for 172 + some Latin-1 keysyms as it returns Unicode code points outside Latin-1 173 + that do not match their corresponding keysyms values. 174 + - Some Unicode keysyms should map to Latin-1 keysyms (<0x100). But the 175 + Unicode keysym mask 0x01000000 is applied blindly to the result of 176 + `UCSConvertCase`, resulting in invalid Unicode keysyms (0x010000nn) 177 + while they should be Latin-1 keysyms. 178 + 179 + Example with ß/ẞ: 180 + 181 + ```c 182 + KeySym lower, upper; 183 + 184 + XConvertCase(XK_ssharp, &lower, &upper); 185 + // Expected: lower == XK_ssharp, upper == U1E9E 186 + // Got: lower == XK_ssharp, upper == 0x1E9E 187 + 188 + XConvertCase(U1E9E, &lower, &upper); 189 + // Expected: lower == XK_ssharp, upper == U1E9E 190 + // Got: lower == 0x10000df, upper == U1E9E 191 + ``` 192 + 193 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/274> 194 + 195 + commit 5a7d94e07fc7e4a10d6399f5e44793fa0c896af6 196 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 197 + Date: Tue Nov 12 12:40:04 2024 -0800 198 + 199 + xkb: avoid undefined behavior due to left shift overflow 200 + 201 + Closes: #225 202 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 203 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/273> 204 + 205 + commit 1ef3c6f010c03eade038b4e662c0eef47014800d 206 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 207 + Date: Sun Nov 10 15:38:25 2024 -0800 208 + 209 + XIM_SET_PAD: add do ... while (0) to avoid -Wextra-semi-stmt warnings 210 + 211 + Clears 8 warnings from clang of the form: 212 + 213 + imDefIc.c:366:29: warning: empty expression statement has no effect; 214 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 215 + XIM_SET_PAD(&buf_s[2], len); /* pad */ 216 + ^ 217 + 218 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 219 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 220 + 221 + commit 22ded6890e9d11cc9eca59737fc531d40ec284a6 222 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 223 + Date: Sun Nov 10 15:30:48 2024 -0800 224 + 225 + Xrm.c: remove unneccessary ; after {} 226 + 227 + Clears 2 clang warnings: 228 + 229 + Xrm.c:1186:51: warning: empty expression statement has no effect; 230 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 231 + while (is_space(bits = next_char(c, str))) {}; 232 + ^ 233 + Xrm.c:1191:48: warning: empty expression statement has no effect; 234 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 235 + while (is_space(bits = next_char(c, str))) {}; 236 + ^ 237 + 238 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 239 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 240 + 241 + commit b7f59114abb4a4766d7fd5805d0435d023cd0c4b 242 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 243 + Date: Sun Nov 10 15:29:21 2024 -0800 244 + 245 + DL_APPEND/DL_DELETE: remove trailing semicolon from definitions 246 + 247 + Clears 2 clang warnings: 248 + 249 + XlibInt.c:672:26: warning: empty expression statement has no effect; 250 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 251 + DL_APPEND(*head, add); 252 + ^ 253 + XlibInt.c:694:36: warning: empty expression statement has no effect; 254 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 255 + DL_DELETE(*head, event); 256 + ^ 257 + 258 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 259 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 260 + 261 + commit da431b8f7ff21d36b5a88237c991ca43b185d65f 262 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 263 + Date: Sun Nov 10 15:25:40 2024 -0800 264 + 265 + xcb_io.c: add do ... while (0) to avoid -Wextra-semi-stmt warnings 266 + 267 + Clears 10 warnings from clang of the form: 268 + 269 + xcb_io.c:177:56: warning: empty expression statement has no effect; 270 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 271 + xcb_xlib_unknown_req_in_deq); 272 + ^ 273 + 274 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 275 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 276 + 277 + commit a53c45d69e88799e59dfbd324843df65a30cf4a9 278 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 279 + Date: Sun Nov 10 13:16:41 2024 -0800 280 + 281 + CI_GET_*_INFO_*: add do ... while (0) to avoid -Wextra-semi-stmt warnings 282 + 283 + Clears 24 warnings from clang of the form: 284 + 285 + TextExt16.c:63:34: warning: empty expression statement has no effect; 286 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 287 + CI_GET_DEFAULT_INFO_1D (fs, def); 288 + ^ 289 + 290 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 291 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 292 + 293 + commit 68912288218527846b04cbe8d647a2c252e82e20 294 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 295 + Date: Sun Nov 10 13:11:12 2024 -0800 296 + 297 + RETURN: add do ... while (0) to avoid -Wextra-semi-stmt warnings 298 + 299 + Clears 5 warnings from clang of the form: 300 + 301 + RdBitF.c:141:32: warning: empty expression statement has no effect; 302 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 303 + RETURN (BitmapFileInvalid); 304 + ^ 305 + 306 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 307 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 308 + 309 + commit 38c642c8ebd69f761fdda03664eba6889a331598 310 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 311 + Date: Sun Nov 10 13:08:31 2024 -0800 312 + 313 + poly.h: add do ... while (0) to avoid -Wextra-semi-stmt warnings 314 + 315 + Clears 3 warnings from clang of the form: 316 + 317 + PolyReg.c:224:67: warning: empty expression statement has no effect; 318 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 319 + BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); 320 + ^ 321 + 322 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 323 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 324 + 325 + commit 906bf4a86d174ed20fda925d8f82de023aa26d2d 326 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 327 + Date: Sun Nov 10 12:37:53 2024 -0800 328 + 329 + PutCommandResource: add do ... while (0) to avoid -Wextra-semi-stmt warnings 330 + 331 + Clears 4 warnings from clang of the form: 332 + 333 + ParseCmd.c:158:43: warning: empty expression statement has no effect; 334 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 335 + PutCommandResource(options[i].value); 336 + ^ 337 + 338 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 339 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 340 + 341 + commit c0768ab687fa07f83d0030dd161f4aa49cbe84f8 342 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 343 + Date: Sun Nov 10 12:35:44 2024 -0800 344 + 345 + GetFunc: add do ... while (0) to avoid -Wextra-semi-stmt warnings 346 + 347 + Clears 4 warnings from clang of the form: 348 + 349 + CrGlCur.c:140:64: warning: empty expression statement has no effect; 350 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 351 + GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func); 352 + ^ 353 + 354 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 355 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 356 + 357 + commit 49350501687d9633a86ae317d5311228e7d812e8 358 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 359 + Date: Sun Nov 10 12:33:01 2024 -0800 360 + 361 + _XCreateMutex/_XFreeMutex: remove trailing semicolon from definitions 362 + 363 + Makes them match the style of the other macros here and clears 364 + up 5 clang warnings of the form: 365 + 366 + Context.c:194:27: warning: empty expression statement has no effect; 367 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 368 + _XCreateMutex(&db->linfo); 369 + ^ 370 + 371 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 372 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 373 + 374 + commit 41c4aa408c3488e920e1f08eb946442faa051e6c 375 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 376 + Date: Sun Nov 10 11:52:19 2024 -0800 377 + 378 + OneDataCard32: add do ... while (0) to avoid -Wextra-semi-stmt warnings 379 + 380 + Clears 13 warnings from clang of the form: 381 + 382 + Backgnd.c:44:72: warning: empty expression statement has no effect; 383 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 384 + OneDataCard32 (dpy, NEXTPTR(req,xChangeWindowAttributesReq), pixel); 385 + ^ 386 + 387 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 388 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 389 + 390 + commit 68e6caad8fcad28143769384536d4529fe0161c4 391 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 392 + Date: Sun Nov 10 11:48:41 2024 -0800 393 + 394 + _XkbCheckPendingRefresh: add do ... while (0) to avoid -Wextra-semi-stmt 395 + 396 + Clears 6 warnings from clang of the form: 397 + 398 + XKBBind.c:74:48: warning: empty expression statement has no effect; 399 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 400 + _XkbCheckPendingRefresh(dpy, dpy->xkb_info); 401 + ^ 402 + 403 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 404 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 405 + 406 + commit 563ddd4ff5575e3f8bbf635cbdc339b09a7e285e 407 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 408 + Date: Sun Nov 10 11:09:56 2024 -0800 409 + 410 + BufAlloc: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings 411 + 412 + Clears 46 warnings from clang of the form: 413 + 414 + XKB.c:207:69: warning: empty expression statement has no effect; 415 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 416 + BufAlloc(char *, out, (((size * 2) + (unsigned) 3) / 4) * 4); 417 + ^ 418 + 419 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 420 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 421 + 422 + commit 5e22c4b3d56d8327d8610faabc8ecfc0c45399de 423 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 424 + Date: Sun Nov 10 11:06:28 2024 -0800 425 + 426 + set_toupper: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings 427 + 428 + Clears 4 warnings from clang of the form: 429 + 430 + lcUtil.c:53:18: warning: empty expression statement has no effect; 431 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 432 + set_toupper(ch1); 433 + ^ 434 + 435 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 436 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 437 + 438 + commit 4cb567d9a05b4a995a50e2fe178c2e697d339668 439 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 440 + Date: Sun Nov 10 10:27:39 2024 -0800 441 + 442 + Data: add do ... while (0) to avoid -Wextra-semi-stmt warnings 443 + 444 + Clears 38 warnings from clang of the form: 445 + 446 + cmsLkCol.c:155:35: warning: empty expression statement has no effect; 447 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 448 + Data (dpy, colorname, (long)n); 449 + ^ 450 + 451 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 452 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 453 + 454 + commit 9ab8f6a5f73cbe0675d1555504f6ec269c9dde8d 455 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 456 + Date: Sun Nov 10 10:14:49 2024 -0800 457 + 458 + DeqAsyncHandler: add do ... while (0) to avoid -Wextra-semi-stmt warnings 459 + 460 + Clears 12 warnings from clang of the form: 461 + 462 + cmsCmap.c:194:34: warning: empty expression statement has no effect; 463 + remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] 464 + DeqAsyncHandler(dpy, &async); 465 + ^ 466 + 467 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 468 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272> 469 + 470 + commit 8703ecf105d5bf6e5b105bc25ceaee8f43344c71 471 + Author: Julien Cristau <jcristau@debian.org> 472 + Date: Fri Nov 1 13:03:56 2024 +0100 473 + 474 + ximcp: hide internal functions 475 + 476 + commit 13e9ac4d45 "ximcp: Unmark to fabricate key events with XKeyEvent 477 + serial" added new _XimFabricateSerial / _XimUnfabricateSerial / 478 + _XimIsFabricatedSerial functions; they don't need to be exported by 479 + libX11. 480 + 481 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/271> 482 + 483 + commit 41bc1a9dbe5b634489539f7779078d4a3b35df5e 484 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 485 + Date: Sat Oct 26 11:02:42 2024 -0700 486 + 487 + ximcp: don't leak window if XGetAtomName() fails 488 + 489 + Found by Oracle Parfait 13.3 static analyzer: 490 + X Resource Leak [X-resource-leak]: 491 + Leaked X Resource window 492 + at line 306 of imDefIm.c in function '_XimPreConnectionIM'. 493 + window initialized at line 300 with XCreateSimpleWindow 494 + 495 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 496 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/269> 497 + 498 + commit df1f1a47f90e71fbe68b1fe57bd021ac2320579b 499 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 500 + Date: Sun Jul 21 12:31:56 2024 -0700 501 + 502 + _XGetRequest: Set data field to 0 when initializing new requests 503 + 504 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 505 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/268> 506 + 507 + commit f2ebbce6d0978d2d84f840196b03ee35a3ca1736 508 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 509 + Date: Sun Sep 29 10:24:23 2024 -0700 510 + 511 + _XimStrConversionCallback: use size_t to calculate size to malloc 512 + 513 + Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: 514 + 515 + imCallbk.c:346:9: error: ‘memcpy’ offset 10 is out of the bounds [0, 1] 516 + [-Werror=array-bounds=] 517 + 346 | memcpy(&buf[p],&cbrec.text->string.mbs,length_in_bytes); 518 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 519 + 520 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 521 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267> 522 + 523 + commit 75c5bdee81b3a1147c2f123db7a052a4a79fbea4 524 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 525 + Date: Sun Sep 29 10:04:40 2024 -0700 526 + 527 + _XimEncodingNegotiation: swap order of arguments to calloc 528 + 529 + Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: 530 + 531 + imDefIm.c: In function ‘_XimEncodingNegotiation’: 532 + imDefIm.c:1739:15: error: ‘memcpy’ offset 8 is out of the bounds [0, 1] 533 + [-Werror=array-bounds=] 534 + 1739 | (void)memcpy((char *)&buf_s[2], name_ptr, name_len); 535 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 536 + 537 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 538 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267> 539 + 540 + commit 1f01aafa6d9100c5d4a48636b188334cdb223bd5 541 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 542 + Date: Sun Sep 29 09:06:32 2024 -0700 543 + 544 + _XlcDefaultMapModifiers: remove conversions between size_t & int 545 + 546 + Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: 547 + 548 + lcWrap.c: In function ‘_XlcDefaultMapModifiers’: 549 + lcWrap.c:149:9: warning: ‘strcpy’ writing between 4294967296 and 550 + 9223372036854775806 bytes into a region of size 1 [-Wstringop-overflow=] 551 + 149 | strcpy(mods, prog_mods); 552 + | ^~~~~~~~~~~~~~~~~~~~~~~ 553 + ../../include/X11/Xlibint.h:457:24: note: destination object of size 1 554 + allocated by ‘malloc’ 555 + 457 | # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size))) 556 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 557 + lcWrap.c:147:12: note: in expansion of macro ‘Xmalloc’ 558 + 147 | mods = Xmalloc(i); 559 + | ^~~~~~~ 560 + lcWrap.c:149:9: error: ‘__builtin_memcpy’ forming offset [1, 4294967295] 561 + is out of the bounds [0, 1] [-Werror=array-bounds=] 562 + 149 | strcpy(mods, prog_mods); 563 + | ^~~~~~~~~~~~~~~~~~~~~~~ 564 + 565 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 566 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/267> 567 + 568 + commit 86e71472bc826ac5c850e200cb3820485b5689cf 569 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 570 + Date: Sat Aug 31 10:49:16 2024 -0700 571 + 572 + SetFontPath: if ndirs is 0, skip work to make a list of directories 573 + 574 + Clears warning from gcc 14.1: 575 + 576 + SetFPath.c: In function ‘XSetFontPath’: 577 + ../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero 578 + [-Walloc-zero] 579 + 463 | # define Xmalloc(size) malloc((size_t)(size)) 580 + | ^~~~~~~~~~~~~~~~~~~~~~ 581 + SetFPath.c:61:18: note: in expansion of macro ‘Xmalloc’ 582 + 61 | if ((p = Xmalloc (nbytes))) { 583 + | ^~~~~~~ 584 + 585 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 586 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/266> 587 + 588 + commit 19b2f5c2d0935cbf9c17ecf30604f80592807b59 589 + Author: Olivier Fourdan <ofourdan@redhat.com> 590 + Date: Fri Aug 9 10:24:13 2024 +0200 591 + 592 + Fix indentation 593 + 594 + Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> 595 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264> 596 + 597 + commit f3d6ebac35301d4ad068e307f0fbe6aa12ccbccb 598 + Author: Olivier Fourdan <ofourdan@redhat.com> 599 + Date: Fri Aug 9 09:21:31 2024 +0200 600 + 601 + Close xcb connection after freeing display structure 602 + 603 + Commit 1472048b7 to fix a colormap threading issue added a display 604 + lock/unlock and a call to SyncHandle() to _XcmsFreeClientCmaps(). 605 + 606 + When running synchronized, that means calling XSync(). 607 + 608 + _XcmsFreeClientCmaps() is called from _XFreeDisplayStructure() via 609 + XCloseDisplay() after the xcb connection is closed. 610 + 611 + So when running synchronized, we may end up calling XSync() after the 612 + xcb connection to the display is closed, which will generate a spurious 613 + XIO error: 614 + 615 + | #0 in _XDefaultIOError () at /lib64/libX11.so.6 616 + | #1 in _XIOError () at /lib64/libX11.so.6 617 + | #2 in _XReply () at /lib64/libX11.so.6 618 + | #3 in XSync () at /lib64/libX11.so.6 619 + | #4 in _XSyncFunction () at /lib64/libX11.so.6 620 + | 8#5 in _XFreeDisplayStructure () at /lib64/libX11.so.6 621 + | 8#6 in XCloseDisplay () at /lib64/libX11.so.6 622 + 623 + To avoid that issue, closed the xcb connection to the display last. 624 + 625 + v2: And same in OutOfMemory() as well (José Expósito) 626 + 627 + Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> 628 + Reviewed-by: José Expósito <jexposit@redhat.com> 629 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264> 630 + 1 631 commit ed9fb5535efe1e5278654b6b3994a34337b4bf1a 2 632 Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 633 Date: Sun Jul 28 10:37:55 2024 -0700
+2 -2
lib/libX11/Makefile.bsd-wrapper
··· 1 - # $OpenBSD: Makefile.bsd-wrapper,v 1.31 2024/08/04 17:15:57 matthieu Exp $ 1 + # $OpenBSD: Makefile.bsd-wrapper,v 1.32 2025/04/30 17:26:10 matthieu Exp $ 2 2 .include <bsd.xconf.mk> 3 3 4 4 # when buming X11 major also bump: ··· 10 10 # when bumping X11_xcb also bump: 11 11 # libEGL libGL libIntelXvMC libGLU 12 12 13 - SHARED_LIBS= X11 18.2 X11_xcb 2.0 13 + SHARED_LIBS= X11 19.0 X11_xcb 2.0 14 14 15 15 CONFIGURE_ARGS= --enable-tcp-transport --enable-unix-transport --enable-ipv6 \ 16 16 --disable-composecache \
+22
lib/libX11/README.md
··· 31 31 32 32 https://www.x.org/wiki/Development/Documentation/SubmittingPatches 33 33 34 + ## Release 1.8.12 35 + 36 + * x11.pc: Add URL field (!280) 37 + * xkb: Bring over fixes from Xserver to shared XKB source files (!279) 38 + 39 + ## Release 1.8.11 40 + 41 + * Close xcb connection after freeing display structure to avoid XIO error 42 + when running synchronized (!264) 43 + * Don't allocate memory for a zero-sized list of directories when 44 + `SetFontPath()` is called with `ndirs == 0` (!266) 45 + * Fix `-Werror=array-bounds` build failures with gcc 14.2 when 46 + `MALLOC_0_RETURNS_NULL` is defined (!267) 47 + * Set `data` field to 0 when initializing new requests (!268) 48 + * ximcp: don't leak window if `XGetAtomName()` fails (!269) 49 + * ximcp: allow XNArea with OnTheSpot (!270) 50 + * ximcp: hide internal functions added in 1.8.10 (!271) 51 + * Handle `-Wextra-semi-stmt` warnings from clang (!272) 52 + * xkb: avoid undefined behavior due to left shift overflow (#225, !273) 53 + * Fix misuse of `UCSConvertCase()` in `XConvertCase()` (!274) 54 + * drop `pthread-stubs` dependency on Dragonfly, FreeBSD, & NetBSD (!277) 55 + 34 56 ## Release 1.8.10 35 57 36 58 * Re-fix XIM input sometimes jumbled (#205, #206, #207, #208, !246)
+29 -104
lib/libX11/aclocal.m4
··· 19 19 If you have problems, you may need to regenerate the build system entirely. 20 20 To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 21 21 22 - # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- 22 + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 23 23 # serial 12 (pkg-config-0.29.2) 24 24 25 25 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. ··· 107 107 dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 108 108 dnl 109 109 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110 - dnl only at the first occurrence in configure.ac, so if the first place 110 + dnl only at the first occurence in configure.ac, so if the first place 111 111 dnl it's called might be skipped (such as if it is within an "if", you 112 112 dnl have to call PKG_CHECK_EXISTS manually 113 113 AC_DEFUN([PKG_CHECK_EXISTS], ··· 176 176 AC_MSG_RESULT([no]) 177 177 _PKG_SHORT_ERRORS_SUPPORTED 178 178 if test $_pkg_short_errors_supported = yes; then 179 - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 179 + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 180 180 else 181 - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 181 + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 182 182 fi 183 - # Put the nasty error message in config.log where it belongs 184 - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 183 + # Put the nasty error message in config.log where it belongs 184 + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 185 185 186 - m4_default([$4], [AC_MSG_ERROR( 186 + m4_default([$4], [AC_MSG_ERROR( 187 187 [Package requirements ($2) were not met: 188 188 189 189 $$1_PKG_ERRORS ··· 195 195 ]) 196 196 elif test $pkg_failed = untried; then 197 197 AC_MSG_RESULT([no]) 198 - m4_default([$4], [AC_MSG_FAILURE( 198 + m4_default([$4], [AC_MSG_FAILURE( 199 199 [The pkg-config script could not be found or is too old. Make sure it 200 200 is in your PATH or set the PKG_CONFIG environment variable to the full 201 201 path to pkg-config. ··· 205 205 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 206 206 ]) 207 207 else 208 - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 209 - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 208 + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 209 + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 210 210 AC_MSG_RESULT([yes]) 211 - $3 211 + $3 212 212 fi[]dnl 213 213 ])dnl PKG_CHECK_MODULES 214 214 ··· 295 295 AS_VAR_IF([$1], [""], [$5], [$4])dnl 296 296 ])dnl PKG_CHECK_VAR 297 297 298 - dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 299 - dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 300 - dnl [DESCRIPTION], [DEFAULT]) 301 - dnl ------------------------------------------ 302 - dnl 303 - dnl Prepare a "--with-" configure option using the lowercase 304 - dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 305 - dnl PKG_CHECK_MODULES in a single macro. 306 - AC_DEFUN([PKG_WITH_MODULES], 307 - [ 308 - m4_pushdef([with_arg], m4_tolower([$1])) 309 - 310 - m4_pushdef([description], 311 - [m4_default([$5], [build with ]with_arg[ support])]) 312 - 313 - m4_pushdef([def_arg], [m4_default([$6], [auto])]) 314 - m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 315 - m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 316 - 317 - m4_case(def_arg, 318 - [yes],[m4_pushdef([with_without], [--without-]with_arg)], 319 - [m4_pushdef([with_without],[--with-]with_arg)]) 320 - 321 - AC_ARG_WITH(with_arg, 322 - AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 323 - [AS_TR_SH([with_]with_arg)=def_arg]) 324 - 325 - AS_CASE([$AS_TR_SH([with_]with_arg)], 326 - [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 327 - [auto],[PKG_CHECK_MODULES([$1],[$2], 328 - [m4_n([def_action_if_found]) $3], 329 - [m4_n([def_action_if_not_found]) $4])]) 330 - 331 - m4_popdef([with_arg]) 332 - m4_popdef([description]) 333 - m4_popdef([def_arg]) 334 - 335 - ])dnl PKG_WITH_MODULES 336 - 337 - dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 338 - dnl [DESCRIPTION], [DEFAULT]) 339 - dnl ----------------------------------------------- 340 - dnl 341 - dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 342 - dnl check._[VARIABLE-PREFIX] is exported as make variable. 343 - AC_DEFUN([PKG_HAVE_WITH_MODULES], 344 - [ 345 - PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 346 - 347 - AM_CONDITIONAL([HAVE_][$1], 348 - [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 349 - ])dnl PKG_HAVE_WITH_MODULES 350 - 351 - dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 352 - dnl [DESCRIPTION], [DEFAULT]) 353 - dnl ------------------------------------------------------ 354 - dnl 355 - dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 356 - dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 357 - dnl and preprocessor variable. 358 - AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 359 - [ 360 - PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 361 - 362 - AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 363 - [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 364 - ])dnl PKG_HAVE_DEFINE_WITH_MODULES 365 - 366 298 # Copyright (C) 2002-2012 Free Software Foundation, Inc. 367 299 # 368 300 # This file is free software; the Free Software Foundation ··· 1430 1362 # See the "minimum version" comment for each macro you use to see what 1431 1363 # version you require. 1432 1364 m4_defun([XORG_MACROS_VERSION],[ 1433 - m4_define([vers_have], [1.20.1]) 1365 + m4_define([vers_have], [1.20.2]) 1434 1366 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1435 1367 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1436 1368 m4_if(m4_cmp(maj_have, maj_needed), 0,, ··· 2768 2700 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2769 2701 # malloc(0) returns NULL. Packages should add one of these cflags to 2770 2702 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2703 + # 2704 + # No longer actually tests since there is no guarantee applications will 2705 + # run with the same malloc implementation we tested against, and the cost 2706 + # of always ensuring the size passed to malloc is non-zero is minimal now. 2707 + # Still allows builders to override when they have complete control over 2708 + # which malloc implementation will be used. 2771 2709 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2772 2710 AC_ARG_ENABLE(malloc0returnsnull, 2773 2711 AS_HELP_STRING([--enable-malloc0returnsnull], 2774 - [malloc(0) returns NULL (default: auto)]), 2712 + [assume malloc(0) can return NULL (default: yes)]), 2775 2713 [MALLOC_ZERO_RETURNS_NULL=$enableval], 2776 - [MALLOC_ZERO_RETURNS_NULL=auto]) 2714 + [MALLOC_ZERO_RETURNS_NULL=yes]) 2777 2715 2778 - AC_MSG_CHECKING([whether malloc(0) returns NULL]) 2779 - if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2780 - AC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2781 - [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2782 - #include <stdlib.h> 2783 - ],[ 2784 - char *m0, *r0, *c0, *p; 2785 - m0 = malloc(0); 2786 - p = malloc(10); 2787 - r0 = realloc(p,0); 2788 - c0 = calloc(0,10); 2789 - exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2790 - ])], 2791 - [xorg_cv_malloc0_returns_null=yes], 2792 - [xorg_cv_malloc0_returns_null=no])]) 2793 - MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2794 - fi 2716 + AC_MSG_CHECKING([whether to act as if malloc(0) can return NULL]) 2795 2717 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2796 2718 2797 2719 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then ··· 3088 3010 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 3089 3011 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 3090 3012 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 3091 - XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 3092 3013 ] 3093 3014 ) 3094 3015 ··· 3332 3253 ]) # XORG_CHANGELOG 3333 3254 3334 3255 dnl 3335 - dnl Copyright (c) 2005, Oracle and/or its affiliates. 3256 + dnl Copyright (c) 2005, 2025, Oracle and/or its affiliates. 3336 3257 dnl 3337 3258 dnl Permission is hereby granted, free of charge, to any person obtaining a 3338 3259 dnl copy of this software and associated documentation files (the "Software"), ··· 3366 3287 fi 3367 3288 3368 3289 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 3290 + AC_CHECK_FUNCS([getaddrinfo inet_ntop]) 3291 + 3369 3292 AC_ARG_ENABLE(ipv6, 3370 3293 AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 3371 3294 [IPV6CONN=$enableval], 3372 - [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 3295 + [IPV6CONN=$ac_cv_func_getaddrinfo]) 3373 3296 AC_MSG_CHECKING([if IPv6 support should be built]) 3374 3297 if test "$IPV6CONN" = "yes"; then 3375 3298 AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) ··· 3386 3309 ]) 3387 3310 3388 3311 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 3389 - AC_CHECK_TYPES([socklen_t], [], [], [ 3312 + # and added a type defined to be large enough to hold any sockaddr format. 3313 + AC_CHECK_TYPES([socklen_t, struct sockaddr_storage], [], [], [ 3390 3314 AC_INCLUDES_DEFAULT 3391 - #include <sys/socket.h>]) 3315 + #include <sys/socket.h> 3316 + ]) 3392 3317 3393 3318 # XPG4v2/UNIX95 added msg_control - check to see if we need to define 3394 3319 # _XOPEN_SOURCE to get it (such as on Solaris)
+60 -209
lib/libX11/configure
··· 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 - # Generated by GNU Autoconf 2.71 for libX11 1.8.10. 3 + # Generated by GNU Autoconf 2.71 for libX11 1.8.12. 4 4 # 5 5 # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues>. 6 6 # ··· 682 682 # Identity of this package. 683 683 PACKAGE_NAME='libX11' 684 684 PACKAGE_TARNAME='libX11' 685 - PACKAGE_VERSION='1.8.10' 686 - PACKAGE_STRING='libX11 1.8.10' 685 + PACKAGE_VERSION='1.8.12' 686 + PACKAGE_STRING='libX11 1.8.12' 687 687 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues' 688 688 PACKAGE_URL='' 689 689 ··· 1548 1548 # Omit some internal or obsolete options to make the list less imposing. 1549 1549 # This message is too long to be a string in the A/UX 3.1 sh. 1550 1550 cat <<_ACEOF 1551 - \`configure' configures libX11 1.8.10 to adapt to many kinds of systems. 1551 + \`configure' configures libX11 1.8.12 to adapt to many kinds of systems. 1552 1552 1553 1553 Usage: $0 [OPTION]... [VAR=VALUE]... 1554 1554 ··· 1619 1619 1620 1620 if test -n "$ac_init_help"; then 1621 1621 case $ac_init_help in 1622 - short | recursive ) echo "Configuration of libX11 1.8.10:";; 1622 + short | recursive ) echo "Configuration of libX11 1.8.12:";; 1623 1623 esac 1624 1624 cat <<\_ACEOF 1625 1625 ··· 1668 1668 --disable-composecache Disable compose table cache support 1669 1669 --enable-lint-library Create lint library (default: disabled) 1670 1670 --enable-malloc0returnsnull 1671 - malloc(0) returns NULL (default: auto) 1671 + assume malloc(0) can return NULL (default: yes) 1672 1672 1673 1673 Optional Packages: 1674 1674 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ··· 1789 1789 test -n "$ac_init_help" && exit $ac_status 1790 1790 if $ac_init_version; then 1791 1791 cat <<\_ACEOF 1792 - libX11 configure 1.8.10 1792 + libX11 configure 1.8.12 1793 1793 generated by GNU Autoconf 2.71 1794 1794 1795 1795 Copyright (C) 2021 Free Software Foundation, Inc. ··· 2257 2257 This file contains any messages produced by compilers while 2258 2258 running configure, to aid debugging if configure makes a mistake. 2259 2259 2260 - It was created by libX11 $as_me 1.8.10, which was 2260 + It was created by libX11 $as_me 1.8.12, which was 2261 2261 generated by GNU Autoconf 2.71. Invocation command line was 2262 2262 2263 2263 $ $0$ac_configure_args_raw ··· 4807 4807 4808 4808 # Define the identity of the package. 4809 4809 PACKAGE='libX11' 4810 - VERSION='1.8.10' 4810 + VERSION='1.8.12' 4811 4811 4812 4812 4813 4813 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h ··· 14139 14139 14140 14140 14141 14141 14142 - 14143 - 14144 - 14145 - 14146 - 14147 - 14148 - 14149 - 14150 - 14151 - 14152 - xorg_testset_save_CFLAGS="$CFLAGS" 14153 - 14154 - if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then 14155 - CFLAGS="$CFLAGS -Werror=unknown-warning-option" 14156 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 14157 - printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } 14158 - if test ${xorg_cv_cc_flag_unknown_warning_option+y} 14159 - then : 14160 - printf %s "(cached) " >&6 14161 - else $as_nop 14162 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14163 - /* end confdefs.h. */ 14164 - int i; 14165 - _ACEOF 14166 - if ac_fn_c_try_compile "$LINENO" 14167 - then : 14168 - xorg_cv_cc_flag_unknown_warning_option=yes 14169 - else $as_nop 14170 - xorg_cv_cc_flag_unknown_warning_option=no 14171 - fi 14172 - rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 14173 - fi 14174 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 14175 - printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } 14176 - xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option 14177 - CFLAGS="$xorg_testset_save_CFLAGS" 14178 - fi 14179 - 14180 - if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then 14181 - if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then 14182 - CFLAGS="$CFLAGS -Werror=unknown-warning-option" 14183 - fi 14184 - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 14185 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 14186 - printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } 14187 - if test ${xorg_cv_cc_flag_unused_command_line_argument+y} 14188 - then : 14189 - printf %s "(cached) " >&6 14190 - else $as_nop 14191 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14192 - /* end confdefs.h. */ 14193 - int i; 14194 - _ACEOF 14195 - if ac_fn_c_try_compile "$LINENO" 14196 - then : 14197 - xorg_cv_cc_flag_unused_command_line_argument=yes 14198 - else $as_nop 14199 - xorg_cv_cc_flag_unused_command_line_argument=no 14200 - fi 14201 - rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 14202 - fi 14203 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 14204 - printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } 14205 - xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument 14206 - CFLAGS="$xorg_testset_save_CFLAGS" 14207 - fi 14208 - 14209 - found="no" 14210 - 14211 - if test $found = "no" ; then 14212 - if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then 14213 - CFLAGS="$CFLAGS -Werror=unknown-warning-option" 14214 - fi 14215 - 14216 - if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then 14217 - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 14218 - fi 14219 - 14220 - CFLAGS="$CFLAGS -Wdeclaration-after-statement" 14221 - 14222 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 14223 - printf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; } 14224 - cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement 14225 - if eval test \${$cacheid+y} 14226 - then : 14227 - printf %s "(cached) " >&6 14228 - else $as_nop 14229 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14230 - /* end confdefs.h. */ 14231 - int i; 14232 - int 14233 - main (void) 14234 - { 14235 - 14236 - ; 14237 - return 0; 14238 - } 14239 - _ACEOF 14240 - if ac_fn_c_try_link "$LINENO" 14241 - then : 14242 - eval $cacheid=yes 14243 - else $as_nop 14244 - eval $cacheid=no 14245 - fi 14246 - rm -f core conftest.err conftest.$ac_objext conftest.beam \ 14247 - conftest$ac_exeext conftest.$ac_ext 14248 - fi 14249 - 14250 - 14251 - CFLAGS="$xorg_testset_save_CFLAGS" 14252 - 14253 - eval supported=\$$cacheid 14254 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 14255 - printf "%s\n" "$supported" >&6; } 14256 - if test "$supported" = "yes" ; then 14257 - BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" 14258 - found="yes" 14259 - fi 14260 - fi 14261 - 14262 - 14263 - 14264 - 14265 - 14266 14142 # This chunk adds additional warnings that could catch undesired effects. 14267 14143 14268 14144 ··· 20621 20497 fi 20622 20498 20623 20499 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 20500 + ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" 20501 + if test "x$ac_cv_func_getaddrinfo" = xyes 20502 + then : 20503 + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h 20504 + 20505 + fi 20506 + ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" 20507 + if test "x$ac_cv_func_inet_ntop" = xyes 20508 + then : 20509 + printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h 20510 + 20511 + fi 20512 + 20513 + 20624 20514 # Check whether --enable-ipv6 was given. 20625 20515 if test ${enable_ipv6+y} 20626 20516 then : 20627 20517 enableval=$enable_ipv6; IPV6CONN=$enableval 20628 20518 else $as_nop 20629 - ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" 20630 - if test "x$ac_cv_func_getaddrinfo" = xyes 20631 - then : 20632 - IPV6CONN=yes 20633 - else $as_nop 20634 - IPV6CONN=no 20635 - fi 20636 - 20519 + IPV6CONN=$ac_cv_func_getaddrinfo 20637 20520 fi 20638 20521 20639 20522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5 ··· 20662 20545 20663 20546 20664 20547 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 20548 + # and added a type defined to be large enough to hold any sockaddr format. 20665 20549 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " 20666 20550 $ac_includes_default 20667 20551 #include <sys/socket.h> 20552 + 20668 20553 " 20669 20554 if test "x$ac_cv_type_socklen_t" = xyes 20670 20555 then : ··· 20673 20558 20674 20559 20675 20560 fi 20561 + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " 20562 + $ac_includes_default 20563 + #include <sys/socket.h> 20564 + 20565 + " 20566 + if test "x$ac_cv_type_struct_sockaddr_storage" = xyes 20567 + then : 20568 + 20569 + printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h 20570 + 20571 + 20572 + fi 20676 20573 20677 20574 20678 20575 # XPG4v2/UNIX95 added msg_control - check to see if we need to define ··· 21234 21131 else 21235 21132 # This should be kept in sync with libxcb 21236 21133 case $host_os in 21237 - linux*|darwin*|solaris*) ;; 21134 + linux*|darwin*|solaris*|dragonfly*|freebsd*|netbsd*) ;; 21238 21135 *) X11_REQUIRES="$X11_REQUIRES pthread-stubs" ;; 21239 21136 esac 21240 21137 fi ··· 21407 21304 _pkg_short_errors_supported=no 21408 21305 fi 21409 21306 if test $_pkg_short_errors_supported = yes; then 21410 - BIGFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xf86bigfontproto >= 1.2.0" 2>&1` 21307 + BIGFONT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xf86bigfontproto >= 1.2.0" 2>&1` 21411 21308 else 21412 - BIGFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xf86bigfontproto >= 1.2.0" 2>&1` 21309 + BIGFONT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xf86bigfontproto >= 1.2.0" 2>&1` 21413 21310 fi 21414 - # Put the nasty error message in config.log where it belongs 21415 - echo "$BIGFONT_PKG_ERRORS" >&5 21311 + # Put the nasty error message in config.log where it belongs 21312 + echo "$BIGFONT_PKG_ERRORS" >&5 21416 21313 21417 - XF86BIGFONT="no" 21314 + XF86BIGFONT="no" 21418 21315 elif test $pkg_failed = untried; then 21419 21316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 21420 21317 printf "%s\n" "no" >&6; } 21421 - XF86BIGFONT="no" 21318 + XF86BIGFONT="no" 21422 21319 else 21423 - BIGFONT_CFLAGS=$pkg_cv_BIGFONT_CFLAGS 21424 - BIGFONT_LIBS=$pkg_cv_BIGFONT_LIBS 21320 + BIGFONT_CFLAGS=$pkg_cv_BIGFONT_CFLAGS 21321 + BIGFONT_LIBS=$pkg_cv_BIGFONT_LIBS 21425 21322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 21426 21323 printf "%s\n" "yes" >&6; } 21427 21324 ··· 21897 21794 _pkg_short_errors_supported=no 21898 21795 fi 21899 21796 if test $_pkg_short_errors_supported = yes; then 21900 - X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$X11_REQUIRES" 2>&1` 21797 + X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$X11_REQUIRES" 2>&1` 21901 21798 else 21902 - X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$X11_REQUIRES" 2>&1` 21799 + X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$X11_REQUIRES" 2>&1` 21903 21800 fi 21904 - # Put the nasty error message in config.log where it belongs 21905 - echo "$X11_PKG_ERRORS" >&5 21801 + # Put the nasty error message in config.log where it belongs 21802 + echo "$X11_PKG_ERRORS" >&5 21906 21803 21907 - as_fn_error $? "Package requirements ($X11_REQUIRES) were not met: 21804 + as_fn_error $? "Package requirements ($X11_REQUIRES) were not met: 21908 21805 21909 21806 $X11_PKG_ERRORS 21910 21807 ··· 21917 21814 elif test $pkg_failed = untried; then 21918 21815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 21919 21816 printf "%s\n" "no" >&6; } 21920 - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 21817 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 21921 21818 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 21922 21819 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 21923 21820 is in your PATH or set the PKG_CONFIG environment variable to the full ··· 21930 21827 To get pkg-config, see <http://pkg-config.freedesktop.org/>. 21931 21828 See \`config.log' for more details" "$LINENO" 5; } 21932 21829 else 21933 - X11_CFLAGS=$pkg_cv_X11_CFLAGS 21934 - X11_LIBS=$pkg_cv_X11_LIBS 21830 + X11_CFLAGS=$pkg_cv_X11_CFLAGS 21831 + X11_LIBS=$pkg_cv_X11_LIBS 21935 21832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 21936 21833 printf "%s\n" "yes" >&6; } 21937 21834 ··· 22063 21960 then : 22064 21961 enableval=$enable_malloc0returnsnull; MALLOC_ZERO_RETURNS_NULL=$enableval 22065 21962 else $as_nop 22066 - MALLOC_ZERO_RETURNS_NULL=auto 22067 - fi 22068 - 22069 - 22070 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc(0) returns NULL" >&5 22071 - printf %s "checking whether malloc(0) returns NULL... " >&6; } 22072 - if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 22073 - if test ${xorg_cv_malloc0_returns_null+y} 22074 - then : 22075 - printf %s "(cached) " >&6 22076 - else $as_nop 22077 - if test "$cross_compiling" = yes 22078 - then : 22079 - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 22080 - printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 22081 - as_fn_error $? "cannot run test program while cross compiling 22082 - See \`config.log' for more details" "$LINENO" 5; } 22083 - else $as_nop 22084 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22085 - /* end confdefs.h. */ 22086 - 22087 - #include <stdlib.h> 22088 - 22089 - int 22090 - main (void) 22091 - { 22092 - 22093 - char *m0, *r0, *c0, *p; 22094 - m0 = malloc(0); 22095 - p = malloc(10); 22096 - r0 = realloc(p,0); 22097 - c0 = calloc(0,10); 22098 - exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 22099 - 22100 - ; 22101 - return 0; 22102 - } 22103 - _ACEOF 22104 - if ac_fn_c_try_run "$LINENO" 22105 - then : 22106 - xorg_cv_malloc0_returns_null=yes 22107 - else $as_nop 22108 - xorg_cv_malloc0_returns_null=no 22109 - fi 22110 - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22111 - conftest.$ac_objext conftest.beam conftest.$ac_ext 21963 + MALLOC_ZERO_RETURNS_NULL=yes 22112 21964 fi 22113 21965 22114 - fi 22115 21966 22116 - MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 22117 - fi 21967 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to act as if malloc(0) can return NULL" >&5 21968 + printf %s "checking whether to act as if malloc(0) can return NULL... " >&6; } 22118 21969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MALLOC_ZERO_RETURNS_NULL" >&5 22119 21970 printf "%s\n" "$MALLOC_ZERO_RETURNS_NULL" >&6; } 22120 21971 ··· 22718 22569 # report actual input values of CONFIG_FILES etc. instead of their 22719 22570 # values after options handling. 22720 22571 ac_log=" 22721 - This file was extended by libX11 $as_me 1.8.10, which was 22572 + This file was extended by libX11 $as_me 1.8.12, which was 22722 22573 generated by GNU Autoconf 2.71. Invocation command line was 22723 22574 22724 22575 CONFIG_FILES = $CONFIG_FILES ··· 22786 22637 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 22787 22638 ac_cs_config='$ac_cs_config_escaped' 22788 22639 ac_cs_version="\\ 22789 - libX11 config.status 1.8.10 22640 + libX11 config.status 1.8.12 22790 22641 configured by $0, generated by GNU Autoconf 2.71, 22791 22642 with options \\"\$ac_cs_config\\" 22792 22643
+2 -2
lib/libX11/configure.ac
··· 1 1 2 2 # Initialize Autoconf 3 3 AC_PREREQ([2.70]) 4 - AC_INIT([libX11], [1.8.10], 4 + AC_INIT([libX11], [1.8.12], 5 5 [https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues], [libX11]) 6 6 AC_CONFIG_SRCDIR([Makefile.am]) 7 7 AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h]) ··· 240 240 else 241 241 # This should be kept in sync with libxcb 242 242 case $host_os in 243 - linux*|darwin*|solaris*) ;; 243 + linux*|darwin*|solaris*|dragonfly*|freebsd*|netbsd*) ;; 244 244 *) X11_REQUIRES="$X11_REQUIRES pthread-stubs" ;; 245 245 esac 246 246 fi
+16 -15
lib/libX11/include/X11/Xlibint.h
··· 432 432 #define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock) 433 433 #define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock) 434 434 #endif 435 - #define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock); 436 - #define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock); 435 + #define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock) 436 + #define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock) 437 437 438 438 #else /* XTHREADS */ 439 439 #define LockDisplay(dis) ··· 644 644 * "len" is the length of the data buffer. 645 645 */ 646 646 #ifndef DataRoutineIsProcedure 647 - #define Data(dpy, data, len) {\ 647 + #define Data(dpy, data, len) do {\ 648 648 if (dpy->bufptr + (len) <= dpy->bufmax) {\ 649 649 memcpy(dpy->bufptr, data, (size_t)(len));\ 650 650 dpy->bufptr += ((size_t)((len) + 3) & (size_t)~3);\ 651 651 } else\ 652 652 _XSend(dpy, (_Xconst char*)(data), (long)(len));\ 653 - } 653 + } while (0) 654 654 #endif /* DataRoutineIsProcedure */ 655 655 656 656 ··· 668 668 * BufAlloc (xTextElt *, elt, nbytes) 669 669 */ 670 670 671 - #define BufAlloc(type, ptr, n) \ 671 + #define BufAlloc(type, ptr, n) do { \ 672 672 if (dpy->bufptr + (n) > dpy->bufmax) \ 673 673 _XFlush (dpy); \ 674 674 ptr = (type) dpy->bufptr; \ 675 675 memset(ptr, '\0', (size_t)(n)); \ 676 - dpy->bufptr += (n); 676 + dpy->bufptr += (n); \ 677 + } while (0) 677 678 678 679 #define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len)) 679 680 #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len)) ··· 716 717 * char. 717 718 */ 718 719 #define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \ 719 - { \ 720 + do { \ 720 721 cs = def; \ 721 722 if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ 722 723 if (fs->per_char == NULL) { \ ··· 726 727 if (CI_NONEXISTCHAR(cs)) cs = def; \ 727 728 } \ 728 729 } \ 729 - } 730 + } while (0) 730 731 731 732 #define CI_GET_DEFAULT_INFO_1D(fs,cs) \ 732 733 CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs) ··· 738 739 * column. This is used for fonts that have more than row zero. 739 740 */ 740 741 #define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \ 741 - { \ 742 + do { \ 742 743 cs = def; \ 743 744 if (row >= fs->min_byte1 && row <= fs->max_byte1 && \ 744 745 col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ ··· 752 753 if (CI_NONEXISTCHAR(cs)) cs = def; \ 753 754 } \ 754 755 } \ 755 - } 756 + } while (0) 756 757 757 758 #define CI_GET_DEFAULT_INFO_2D(fs,cs) \ 758 - { \ 759 + do { \ 759 760 unsigned int r = (fs->default_char >> 8); \ 760 761 unsigned int c = (fs->default_char & 0xff); \ 761 762 CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \ 762 - } 763 + } while (0) 763 764 764 765 765 766 /* srcvar must be a variable for large architecture version */ 766 767 #define OneDataCard32(dpy,dstaddr,srcvar) \ 767 - { *(CARD32 *)(dstaddr) = (srcvar); } 768 + do { *(CARD32 *)(dstaddr) = (srcvar); } while (0) 768 769 769 770 770 771 typedef struct _XInternalAsync { ··· 804 805 } _XAsyncErrorState; 805 806 806 807 extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler); 807 - #define DeqAsyncHandler(dpy,handler) { \ 808 + #define DeqAsyncHandler(dpy,handler) do { \ 808 809 if (dpy->async_handlers == (handler)) \ 809 810 dpy->async_handlers = (handler)->next; \ 810 811 else \ 811 812 _XDeqAsyncHandler(dpy, handler); \ 812 - } 813 + } while (0) 813 814 814 815 typedef void (*FreeFuncType) ( 815 816 Display* /* display */
+4 -2
lib/libX11/modules/im/ximcp/imCallbk.c
··· 327 327 * `cbrec.text->length' means the string length in characters 328 328 */ 329 329 { 330 + size_t blen; 330 331 length_in_bytes = (cbrec.text->encoding_is_wchar)? 331 332 sizeof(wchar_t) * cbrec.text->length: /* wchar */ 332 333 strlen(cbrec.text->string.mbs); /* mb */ 333 - buf_len = XIM_HEADER_SIZE + 334 + blen = XIM_HEADER_SIZE + 334 335 sz_CARD16 + 335 336 2 + length_in_bytes + 336 337 XIM_PAD(2 + length_in_bytes) + 337 338 2 + 2 + sz_CARD32 * cbrec.text->length; 338 - buf = Xmalloc(buf_len); 339 + buf = Xmalloc(blen); 340 + buf_len = (INT16) blen; 339 341 } 340 342 _XimSetHeader((XPointer)buf, XIM_STR_CONVERSION_REPLY, 0, &buf_len); 341 343 buf_len -= XIM_HEADER_SIZE; /* added by _XimSetHeader (HACK) */
+2 -2
lib/libX11/modules/im/ximcp/imDefIm.c
··· 303 303 304 304 /* server name check */ 305 305 if( !(str = XGetAtomName( display, selection )) ) 306 - return False; 306 + goto Error; 307 307 if(!_XimCheckServerName(im, str)) { 308 308 XFree( (XPointer)str ); 309 309 goto Error; ··· 1728 1728 + sizeof(CARD16) 1729 1729 + detail_len; 1730 1730 1731 - if (!(buf = Xcalloc(XIM_HEADER_SIZE + len, 1))) 1731 + if (!(buf = Xcalloc(1, XIM_HEADER_SIZE + len))) 1732 1732 goto free_detail_ptr; 1733 1733 1734 1734 buf_s = (CARD16 *)&buf[XIM_HEADER_SIZE];
+1 -1
lib/libX11/modules/im/ximcp/imRm.c
··· 1942 1942 (XIM_MODE_STS_DEFAULT | XIM_MODE_STS_SET | XIM_MODE_STS_GET), 1943 1943 0}, 1944 1944 {OFFSET_XNAREA, 1945 - 0, 1945 + (XIM_MODE_PRE_SET | XIM_MODE_PRE_GET), 1946 1946 (XIM_MODE_PRE_DEFAULT | XIM_MODE_PRE_SET | XIM_MODE_PRE_GET), 1947 1947 (XIM_MODE_PRE_DEFAULT | XIM_MODE_PRE_SET | XIM_MODE_PRE_GET), 1948 1948 0,
+2 -2
lib/libX11/modules/om/generic/omDefault.c
··· 231 231 bzero((char *) &overall, sizeof(XCharStruct)); 232 232 *num_chars = 0; 233 233 234 - CI_GET_DEFAULT_INFO_1D(font, def) 234 + CI_GET_DEFAULT_INFO_1D(font, def); 235 235 236 236 while (length-- > 0) { 237 - CI_GET_CHAR_INFO_1D(font, *text, def, cs) 237 + CI_GET_CHAR_INFO_1D(font, *text, def, cs); 238 238 text++; 239 239 if (cs == NULL) 240 240 continue;
+4 -4
lib/libX11/modules/om/generic/omTextPer.c
··· 92 92 } 93 93 94 94 if (is_xchar2b) { 95 - CI_GET_DEFAULT_INFO_2D(font, def) 95 + CI_GET_DEFAULT_INFO_2D(font, def); 96 96 xchar2b_ptr = xchar2b_buf; 97 97 } else { 98 - CI_GET_DEFAULT_INFO_1D(font, def) 98 + CI_GET_DEFAULT_INFO_1D(font, def); 99 99 xchar_ptr = (char *) xchar2b_buf; 100 100 } 101 101 102 102 while (buf_len-- > 0) { 103 103 if (is_xchar2b) { 104 104 CI_GET_CHAR_INFO_2D(font, xchar2b_ptr->byte1, 105 - xchar2b_ptr->byte2, def, cs) 105 + xchar2b_ptr->byte2, def, cs); 106 106 xchar2b_ptr++; 107 107 } else { 108 - CI_GET_CHAR_INFO_1D(font, *xchar_ptr, def, cs) 108 + CI_GET_CHAR_INFO_1D(font, *xchar_ptr, def, cs); 109 109 xchar_ptr++; 110 110 } 111 111 if (cs == NULL)
+3 -1
lib/libX11/src/ClDisplay.c
··· 47 47 { 48 48 register _XExtension *ext; 49 49 register int i; 50 + xcb_connection_t *connection; 50 51 51 52 if (!(dpy->flags & XlibDisplayClosing)) 52 53 { ··· 68 69 if (X_DPY_GET_REQUEST(dpy) != X_DPY_GET_LAST_REQUEST_READ(dpy)) 69 70 XSync(dpy, 1); 70 71 } 71 - xcb_disconnect(dpy->xcb->connection); 72 + connection = dpy->xcb->connection; 72 73 _XFreeDisplayStructure (dpy); 74 + xcb_disconnect(connection); 73 75 return 0; 74 76 }
+2 -2
lib/libX11/src/CrGlCur.c
··· 106 106 static XModuleType _XcursorModule; 107 107 static Bool _XcursorModuleTried; 108 108 109 - #define GetFunc(type,name,ret) {\ 109 + #define GetFunc(type,name,ret) do { \ 110 110 static Bool been_here; \ 111 111 static type staticFunc; \ 112 112 \ ··· 124 124 } \ 125 125 ret = staticFunc; \ 126 126 _XUnlockMutex (_Xglobal_lock); \ 127 - } 127 + } while (0) 128 128 129 129 static Cursor 130 130 _XTryShapeCursor (Display *dpy,
+26 -4
lib/libX11/src/KeyBind.c
··· 462 462 else if ( (code >= 0x00e0 && code <= 0x00f6) || 463 463 (code >= 0x00f8 && code <= 0x00fe) ) 464 464 *upper -= 0x20; 465 + /* The following code points do not map within Latin-1 and 466 + * require special handling in XConvertCase 467 + */ 465 468 else if (code == 0x00ff) /* y with diaeresis */ 466 469 *upper = 0x0178; 467 470 else if (code == 0x00b5) /* micro sign */ ··· 655 658 { 656 659 /* Latin 1 keysym */ 657 660 if (sym < 0x100) { 658 - UCSConvertCase(sym, lower, upper); 659 - return; 661 + /* Special cases that do not map within Latin-1 */ 662 + switch (sym) { 663 + case XK_ydiaeresis: 664 + *lower = sym; 665 + *upper = XK_Ydiaeresis; 666 + return; 667 + case XK_mu: 668 + *lower = sym; 669 + *upper = XK_Greek_MU; 670 + return; 671 + case XK_ssharp: 672 + *lower = sym; 673 + *upper = 0x1001e9e; 674 + return; 675 + default: 676 + UCSConvertCase(sym, lower, upper); 677 + return; 678 + } 660 679 } 661 680 662 681 /* Unicode keysym */ 663 682 if ((sym & 0xff000000) == 0x01000000) { 664 683 UCSConvertCase((sym & 0x00ffffff), lower, upper); 665 - *upper |= 0x01000000; 666 - *lower |= 0x01000000; 684 + /* Use the Unicode keysym mask only for non Latin-1 */ 685 + if (*upper >= 0x100) 686 + *upper |= 0x01000000; 687 + if (*lower >= 0x100) 688 + *lower |= 0x01000000; 667 689 return; 668 690 } 669 691
+6 -3
lib/libX11/src/OpenDis.c
··· 709 709 710 710 static void OutOfMemory(Display *dpy) 711 711 { 712 - if(dpy->xcb->connection) 713 - xcb_disconnect(dpy->xcb->connection); 714 - _XFreeDisplayStructure (dpy); 712 + xcb_connection_t *connection = dpy->xcb->connection; 713 + 714 + _XFreeDisplayStructure (dpy); 715 + 716 + if (connection) 717 + xcb_disconnect(connection); 715 718 }
+2 -2
lib/libX11/src/ParseCmd.c
··· 92 92 char **argend; 93 93 94 94 #define PutCommandResource(value_str) \ 95 - { \ 95 + do { \ 96 96 XrmStringToBindingQuarkList( \ 97 97 options[i].specifier, start_bindings, start_quarks); \ 98 98 XrmQPutStringResource(pdb, bindings, quarks, value_str); \ 99 - } /* PutCommandResource */ 99 + } while (0) /* PutCommandResource */ 100 100 101 101 myargc = (*argc); 102 102 argend = argv + myargc;
+1 -1
lib/libX11/src/RdBitF.c
··· 134 134 135 135 /* error cleanup and return macro */ 136 136 #define RETURN(code) \ 137 - { Xfree (bits); fclose (fstream); return code; } 137 + do { Xfree (bits); fclose (fstream); return code; } while (0) 138 138 139 139 while (fgets(line, MAX_SIZE, fstream)) { 140 140 if (strlen(line) == MAX_SIZE-1)
+33 -27
lib/libX11/src/SetFPath.c
··· 38 38 char **directories, 39 39 int ndirs) 40 40 { 41 - register size_t n = 0; 42 - register int i; 43 - register int nbytes; 44 - char *p; 45 41 register xSetFontPathReq *req; 46 42 int retCode; 47 43 48 44 LockDisplay(dpy); 49 45 GetReq (SetFontPath, req); 50 46 req->nFonts = ndirs; 51 - for (i = 0; i < ndirs; i++) { 52 - n = n + (safestrlen (directories[i]) + 1); 53 - if (n >= USHRT_MAX) { 54 - UnlockDisplay(dpy); 55 - SyncHandle(); 56 - return 0; 47 + if (ndirs > 0) { 48 + size_t n = 0; 49 + int nbytes; 50 + char *p; 51 + 52 + for (int i = 0; i < ndirs; i++) { 53 + n = n + (safestrlen (directories[i]) + 1); 54 + if (n >= USHRT_MAX) { 55 + UnlockDisplay(dpy); 56 + SyncHandle(); 57 + return 0; 58 + } 57 59 } 58 - } 59 - nbytes = (n + 3) & ~3; 60 - req->length += nbytes >> 2; 61 - if ((p = Xmalloc (nbytes))) { 62 - /* 63 - * pack into counted strings. 64 - */ 65 - char *tmp = p; 60 + nbytes = (n + 3) & ~3; 61 + req->length += nbytes >> 2; 62 + if ((p = Xmalloc (nbytes))) { 63 + /* 64 + * pack into counted strings. 65 + */ 66 + char *tmp = p; 66 67 67 - for (i = 0; i < ndirs; i++) { 68 - size_t length = safestrlen (directories[i]); 69 - *p = length; 70 - memcpy (p + 1, directories[i], length); 71 - p += length + 1; 68 + for (int i = 0; i < ndirs; i++) { 69 + size_t length = safestrlen (directories[i]); 70 + *p = length; 71 + memcpy (p + 1, directories[i], length); 72 + p += length + 1; 73 + } 74 + Data (dpy, tmp, nbytes); 75 + Xfree (tmp); 76 + retCode = 1; 72 77 } 73 - Data (dpy, tmp, nbytes); 74 - Xfree (tmp); 78 + else 79 + retCode = 0; 80 + } 81 + else if (ndirs == 0) 75 82 retCode = 1; 76 - } 77 - else 83 + else /* ndirs < 0 */ 78 84 retCode = 0; 79 85 80 86 UnlockDisplay(dpy);
+2 -2
lib/libX11/src/TextExt.c
··· 50 50 */ 51 51 52 52 #define CI_GET_ROWZERO_CHAR_INFO_2D(fs,col,def,cs) \ 53 - { \ 53 + do { \ 54 54 cs = def; \ 55 55 if (fs->min_byte1 == 0 && \ 56 56 col >= fs->min_byte2 && col <= fs->max_byte2) { \ ··· 61 61 if (CI_NONEXISTCHAR(cs)) cs = def; \ 62 62 } \ 63 63 } \ 64 - } 64 + } while (0) 65 65 66 66 67 67 /*
+5 -2
lib/libX11/src/XlibInt.c
··· 1793 1793 dpy->last_req = dpy->bufptr; 1794 1794 1795 1795 req = (xReq*)dpy->bufptr; 1796 - req->reqType = type; 1797 - req->length = len / 4; 1796 + *req = (xReq) { 1797 + .reqType = type, 1798 + .data = 0, 1799 + .length = len / 4 1800 + }; 1798 1801 dpy->bufptr += len; 1799 1802 X_DPY_REQUEST_INCREMENT(dpy); 1800 1803 return req;
+2 -2
lib/libX11/src/Xrm.c
··· 1183 1183 if (c == '#') { /* Directive */ 1184 1184 /* remove extra whitespace */ 1185 1185 only_pcs = True; 1186 - while (is_space(bits = next_char(c, str))) {}; 1186 + while (is_space(bits = next_char(c, str))) {} 1187 1187 /* only "include" directive is currently defined */ 1188 1188 if (!strncmp(str, "include", 7)) { 1189 1189 str += (7-1); 1190 1190 /* remove extra whitespace */ 1191 - while (is_space(bits = next_char(c, str))) {}; 1191 + while (is_space(bits = next_char(c, str))) {} 1192 1192 /* must have a starting " */ 1193 1193 if (c == '"') { 1194 1194 _Xconst char *fname = str+1;
+9
lib/libX11/src/config.h.in
··· 21 21 /* Use dlopen to load shared libraries */ 22 22 #undef HAVE_DLOPEN 23 23 24 + /* Define to 1 if you have the `getaddrinfo' function. */ 25 + #undef HAVE_GETADDRINFO 26 + 24 27 /* Define to 1 if you have the `getpagesize' function. */ 25 28 #undef HAVE_GETPAGESIZE 29 + 30 + /* Define to 1 if you have the `inet_ntop' function. */ 31 + #undef HAVE_INET_NTOP 26 32 27 33 /* Define to 1 if you have the <inttypes.h> header file. */ 28 34 #undef HAVE_INTTYPES_H ··· 71 77 72 78 /* Define to 1 if you have the `strtol' function. */ 73 79 #undef HAVE_STRTOL 80 + 81 + /* Define to 1 if the system has the type `struct sockaddr_storage'. */ 82 + #undef HAVE_STRUCT_SOCKADDR_STORAGE 74 83 75 84 /* Define to 1 if you have the <sys/filio.h> header file. */ 76 85 #undef HAVE_SYS_FILIO_H
+8 -8
lib/libX11/src/poly.h
··· 80 80 * If it is moving to the left, then we don't want it to flip until 81 81 * we traverse an entire pixel. 82 82 */ 83 - #define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ 83 + #define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) do { \ 84 84 int dx; /* local storage */ \ 85 85 \ 86 86 /* \ ··· 104 104 d = -2 * m * (dy) + 2 * dx; \ 105 105 } \ 106 106 } \ 107 - } 107 + } while (0) 108 108 109 - #define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ 109 + #define BRESINCRPGON(d, minval, m, m1, incr1, incr2) do { \ 110 110 if (m1 > 0) { \ 111 111 if (d > 0) { \ 112 112 minval += m1; \ ··· 126 126 d += incr2; \ 127 127 } \ 128 128 } \ 129 - } 129 + } while (0) 130 130 131 131 132 132 /* ··· 256 256 * the caller when the edge has been removed so he 257 257 * can reorder the Winding Active Edge Table. 258 258 */ 259 - #define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \ 259 + #define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) do { \ 260 260 if (pAET->ymax == y) { /* leaving this edge */ \ 261 261 pPrevAET->next = pAET->next; \ 262 262 pAET = pPrevAET->next; \ ··· 269 269 pPrevAET = pAET; \ 270 270 pAET = pAET->next; \ 271 271 } \ 272 - } 272 + } while (0) 273 273 274 274 275 275 /* ··· 279 279 * x value to be ready for the next scanline. 280 280 * The even-odd rule is in effect. 281 281 */ 282 - #define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \ 282 + #define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) do { \ 283 283 if (pAET->ymax == y) { /* leaving this edge */ \ 284 284 pPrevAET->next = pAET->next; \ 285 285 pAET = pPrevAET->next; \ ··· 291 291 pPrevAET = pAET; \ 292 292 pAET = pAET->next; \ 293 293 } \ 294 - } 294 + } while (0)
+2 -2
lib/libX11/src/utlist.h
··· 86 86 (head)->prev = (head); \ 87 87 (head)->next = NULL; \ 88 88 } \ 89 - } while (0); 89 + } while (0) 90 90 91 91 #define DL_DELETE(head,del) \ 92 92 do { \ ··· 103 103 (head)->prev = (del)->prev; \ 104 104 } \ 105 105 } \ 106 - } while (0); 106 + } while (0) 107 107 108 108 109 109 #define DL_FOREACH(head,el) \
+6 -6
lib/libX11/src/xcb_io.c
··· 24 24 #include <sys/select.h> 25 25 #endif 26 26 27 - #define xcb_fail_assert(_message, _var) { \ 27 + #define xcb_fail_assert(_message, _var) do { \ 28 28 unsigned int _var = 1; \ 29 29 fprintf(stderr, "[xcb] Aborting, sorry about that.\n"); \ 30 30 assert(!_var); \ 31 - } 31 + } while (0) 32 32 33 - #define throw_thread_fail_assert(_message, _var) { \ 33 + #define throw_thread_fail_assert(_message, _var) do { \ 34 34 fprintf(stderr, "[xcb] " _message "\n"); \ 35 35 if (_Xglobal_lock) { \ 36 36 fprintf(stderr, "[xcb] You called XInitThreads, this is not your fault\n"); \ ··· 39 39 "and XInitThreads has not been called\n"); \ 40 40 } \ 41 41 xcb_fail_assert(_message, _var); \ 42 - } 42 + } while (0) 43 43 44 44 /* XXX: It would probably be most useful if we stored the last-processed 45 45 * request, so we could find the offender from the message. */ 46 - #define throw_extlib_fail_assert(_message, _var) { \ 46 + #define throw_extlib_fail_assert(_message, _var) do { \ 47 47 fprintf(stderr, "[xcb] " _message "\n"); \ 48 48 fprintf(stderr, "[xcb] This is most likely caused by a broken X " \ 49 49 "extension library\n"); \ 50 50 xcb_fail_assert(_message, _var); \ 51 - } 51 + } while (0) 52 52 53 53 static void return_socket(void *closure) 54 54 {
-1
lib/libX11/src/xcms/cmsColNm.c
··· 248 248 /* 249 249 * DESCRIPTION 250 250 * Compares the color names of XcmsColorTuples. 251 - * This routine is public to allow access from qsort???. 252 251 * 253 252 * RETURNS 254 253 * 0 if equal;
+3 -1
lib/libX11/src/xkb/XKBAlloc.c
··· 296 296 XkbFreeIndicatorMaps(xkb); 297 297 if (which & XkbNamesMask) 298 298 XkbFreeNames(xkb, XkbAllNamesMask, True); 299 - if ((which & XkbGeometryMask) && (xkb->geom != NULL)) 299 + if ((which & XkbGeometryMask) && (xkb->geom != NULL)) { 300 300 XkbFreeGeometry(xkb->geom, XkbGeomAllMask, True); 301 + xkb->geom = NULL; 302 + } 301 303 if (which & XkbControlsMask) 302 304 XkbFreeControls(xkb, XkbAllControlsMask, True); 303 305 if (freeAll)
+5 -3
lib/libX11/src/xkb/XKBMAlloc.c
··· 436 436 nResize = 0; 437 437 for (nTotal = 1, i = xkb->min_key_code; i <= xkb->max_key_code; i++) { 438 438 width = XkbKeyGroupsWidth(xkb, i); 439 - if (width < type->num_levels) 439 + if (width < type->num_levels || width >= new_num_lvls) { 440 + nTotal += XkbKeyNumSyms(xkb,i); 440 441 continue; 442 + } 441 443 for (match = 0, g = XkbKeyNumGroups(xkb, i) - 1; 442 444 (g >= 0) && (!match); g--) { 443 445 if (XkbKeyKeyTypeIndex(xkb, i, g) == type_ndx) { ··· 445 447 match = 1; 446 448 } 447 449 } 448 - if ((!match) || (width >= new_num_lvls)) 450 + if (!match) 449 451 nTotal += XkbKeyNumSyms(xkb, i); 450 452 else { 451 453 nTotal += XkbKeyNumGroups(xkb, i) * new_num_lvls; ··· 455 457 if (nResize > 0) { 456 458 int nextMatch; 457 459 458 - xkb->map->size_syms = (nTotal * 12) / 10; 460 + xkb->map->size_syms = (nTotal * 15) / 10; 459 461 newSyms = _XkbTypedCalloc(xkb->map->size_syms, KeySym); 460 462 if (newSyms == NULL) 461 463 return BadAlloc;
+6 -5
lib/libX11/src/xkb/XKBMisc.c
··· 682 682 int width, nOldGroups, oldWidth, newTypes[XkbNumKbdGroups]; 683 683 684 684 if ((!xkb) || (!XkbKeycodeInRange(xkb, key)) || (!xkb->map) || 685 - (!xkb->map->types) || ((groups & XkbAllGroupsMask) == 0) || 686 - (nGroups > XkbNumKbdGroups)) { 685 + (!xkb->map->types) || (!newTypesIn) || 686 + ((groups & XkbAllGroupsMask) == 0) || (nGroups > XkbNumKbdGroups)) { 687 687 return BadMatch; 688 688 } 689 689 if (nGroups == 0) { ··· 694 694 i = XkbSetNumGroups(i, 0); 695 695 xkb->map->key_sym_map[key].group_info = i; 696 696 XkbResizeKeySyms(xkb, key, 0); 697 + XkbResizeKeyActions(xkb, key, 0); 697 698 return Success; 698 699 } 699 700 ··· 804 805 register int i, bit; 805 806 register unsigned mask; 806 807 807 - if (xkb == NULL) 808 + if ((xkb == NULL) || (xkb->server == NULL)) { 809 + *mask_rtrn = 0; 808 810 return False; 811 + } 809 812 if (virtual_mask == 0) { 810 813 *mask_rtrn = 0; 811 814 return True; 812 815 } 813 - if (xkb->server == NULL) 814 - return False; 815 816 for (i = mask = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { 816 817 if (virtual_mask & bit) 817 818 mask |= xkb->server->vmods[i];
+3 -5
lib/libX11/src/xkb/XKBleds.c
··· 72 72 73 73 leds->phys_indicators = rep->realIndicators; 74 74 if (rep->length > 0) { 75 - register int left; 76 - 77 75 if (!_XkbInitReadBuffer(dpy, &buf, (int) rep->length * 4)) 78 76 return BadAlloc; 79 77 if (nread_rtrn) 80 78 *nread_rtrn = (int) rep->length * 4; 81 79 if (rep->which) { 82 - register int i, bit; 80 + unsigned int i, bit, left; 83 81 84 - left = (int) rep->which; 82 + left = rep->which; 85 83 for (i = 0, bit = 1; (i < XkbNumIndicators) && (left); 86 84 i++, bit <<= 1) { 87 85 if (left & bit) { ··· 106 104 } 107 105 } 108 106 } 109 - left = _XkbFreeReadBuffer(&buf); 107 + (void) _XkbFreeReadBuffer(&buf); 110 108 } 111 109 return Success; 112 110 }
+2 -2
lib/libX11/src/xkb/XKBlibint.h
··· 85 85 (((d)->flags&XlibDisplayNoXkb) || \ 86 86 ((!(d)->xkb_info || (!(d)->xkb_info->desc)) && !_XkbLoadDpy(d))) 87 87 88 - #define _XkbCheckPendingRefresh(d,xi) { \ 88 + #define _XkbCheckPendingRefresh(d,xi) do { \ 89 89 if ((xi)->flags&XkbXlibNewKeyboard) \ 90 90 _XkbReloadDpy((d)); \ 91 91 else if ((xi)->flags&XkbMapPending) { \ ··· 95 95 UnlockDisplay((d)); \ 96 96 } \ 97 97 } \ 98 - } 98 + } while (0) 99 99 100 100 #define _XkbNeedModmap(i) ((!(i)->desc->map)||(!(i)->desc->map->modmap)) 101 101
+2 -2
lib/libX11/src/xlibi18n/XDefaultOMIF.c
··· 693 693 bzero((char *) &overall, sizeof(XCharStruct)); 694 694 *num_chars = 0; 695 695 696 - CI_GET_DEFAULT_INFO_1D(font, def) 696 + CI_GET_DEFAULT_INFO_1D(font, def); 697 697 698 698 while (length-- > 0) { 699 - CI_GET_CHAR_INFO_1D(font, *text, def, cs) 699 + CI_GET_CHAR_INFO_1D(font, *text, def, cs); 700 700 text++; 701 701 if (cs == NULL) 702 702 continue;
+2 -2
lib/libX11/src/xlibi18n/XimProto.h
··· 213 213 #define XIM_PAD(length) ((4 - ((length) % 4)) % 4) 214 214 215 215 #define XIM_SET_PAD(ptr, length) \ 216 - { \ 216 + do { \ 217 217 register int Counter = XIM_PAD((int)length); \ 218 218 if (Counter) { \ 219 219 register char *Ptr = (char *)(ptr) + (length); \ ··· 221 221 for (; Counter; --Counter, ++Ptr) \ 222 222 *Ptr = '\0'; \ 223 223 } \ 224 - } 224 + } while (0) 225 225 226 226 #endif /* _XIMPROTO_H */
+3 -3
lib/libX11/src/xlibi18n/XimintP.h
··· 311 311 #define XIM_MAXIMNAMELEN 64 312 312 #define XIM_MAXLCNAMELEN 64 313 313 314 - Bool 314 + _X_HIDDEN Bool 315 315 _XimFabricateSerial( 316 316 Xim im, 317 317 XKeyEvent *event); 318 318 319 - Bool 319 + _X_HIDDEN Bool 320 320 _XimUnfabricateSerial( 321 321 Xim im, 322 322 Xic ic, 323 323 XKeyEvent *event); 324 324 325 - Bool 325 + _X_HIDDEN Bool 326 326 _XimIsFabricatedSerial( 327 327 Xim im, 328 328 XKeyEvent *event);
+3 -2
lib/libX11/src/xlibi18n/lcUtil.c
··· 32 32 33 33 /* Don't use <ctype.h> here because it is locale dependent. */ 34 34 35 - #define set_toupper(ch) \ 35 + #define set_toupper(ch) do { \ 36 36 if (ch >= 'a' && ch <= 'z') \ 37 - ch = (unsigned char) (ch - 'a' + 'A'); 37 + ch = (unsigned char) (ch - 'a' + 'A'); \ 38 + } while (0) 38 39 39 40 /* Compares two ISO 8859-1 strings, ignoring case of ASCII letters. 40 41 Like strcasecmp in an ASCII locale. */
+3 -3
lib/libX11/src/xlibi18n/lcWrap.c
··· 134 134 const char *user_mods, 135 135 const char *prog_mods) 136 136 { 137 - int i; 137 + size_t i; 138 138 char *mods; 139 139 140 140 if (!_XlcValidModSyntax(prog_mods, im_valid)) 141 141 return (char *)NULL; 142 142 if (!_XlcValidModSyntax(user_mods, im_valid)) 143 143 return (char *)NULL; 144 - i = (int) strlen(prog_mods) + 1; 144 + i = strlen(prog_mods) + 1; 145 145 if (user_mods) 146 - i = (int) ((size_t) i + strlen(user_mods)); 146 + i += strlen(user_mods); 147 147 mods = Xmalloc(i); 148 148 if (mods) { 149 149 strcpy(mods, prog_mods);
+1
lib/libX11/x11.pc.in
··· 7 7 8 8 Name: X11 9 9 Description: X Library 10 + URL: https://gitlab.freedesktop.org/xorg/lib/libx11/ 10 11 Version: @PACKAGE_VERSION@ 11 12 Requires: xproto @XKBPROTO_REQUIRES@ 12 13 Requires.private: @X11_EXTRA_DEPS@