Module Name:    xsrc
Committed By:   martin
Date:           Mon Dec 19 13:19:01 UTC 2022

Modified Files:
        xsrc/external/mit/libX11/dist: ChangeLog README.md aclocal.m4 configure
            configure.ac
        xsrc/external/mit/libX11/dist/include/X11: Xlib.h Xlibint.h
        xsrc/external/mit/libX11/dist/man: XInitThreads.man
        xsrc/external/mit/libX11/dist/modules/im/ximcp: imLcPrs.c
        xsrc/external/mit/libX11/dist/nls/en_US.UTF-8: XLC_LOCALE.pre
        xsrc/external/mit/libX11/dist/src: ChkIfEv.c IfEvent.c OpenDis.c
            PeekIfEv.c PutBEvent.c globals.c locking.c
        xsrc/external/mit/libX11/dist/src/xkb: XKBBind.c

Log Message:
Try to revert partial previous commit (ssh connection dropped)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.28 -r1.2 xsrc/external/mit/libX11/dist/ChangeLog \
    xsrc/external/mit/libX11/dist/configure \
    xsrc/external/mit/libX11/dist/configure.ac
cvs rdiff -u -r1.1.1.8 -r1.2 xsrc/external/mit/libX11/dist/README.md
cvs rdiff -u -r1.1.1.24 -r1.2 xsrc/external/mit/libX11/dist/aclocal.m4
cvs rdiff -u -r1.1.1.13 -r1.2 \
    xsrc/external/mit/libX11/dist/include/X11/Xlib.h
cvs rdiff -u -r1.1.1.16 -r1.2 \
    xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
cvs rdiff -u -r1.1.1.5 -r1.2 \
    xsrc/external/mit/libX11/dist/man/XInitThreads.man
cvs rdiff -u -r1.1.1.11 -r1.2 \
    xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c
cvs rdiff -u -r1.1.1.5 -r1.2 \
    xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre
cvs rdiff -u -r1.1.1.6 -r1.2 xsrc/external/mit/libX11/dist/src/ChkIfEv.c \
    xsrc/external/mit/libX11/dist/src/IfEvent.c
cvs rdiff -u -r1.1.1.15 -r1.2 xsrc/external/mit/libX11/dist/src/OpenDis.c
cvs rdiff -u -r1.1.1.5 -r1.2 xsrc/external/mit/libX11/dist/src/PeekIfEv.c
cvs rdiff -u -r1.1.1.7 -r1.2 xsrc/external/mit/libX11/dist/src/PutBEvent.c
cvs rdiff -u -r1.1.1.10 -r1.2 xsrc/external/mit/libX11/dist/src/globals.c \
    xsrc/external/mit/libX11/dist/src/locking.c
cvs rdiff -u -r1.1.1.12 -r1.2 xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libX11/dist/ChangeLog
diff -u xsrc/external/mit/libX11/dist/ChangeLog:1.1.1.28 xsrc/external/mit/libX11/dist/ChangeLog:1.2
--- xsrc/external/mit/libX11/dist/ChangeLog:1.1.1.28	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/ChangeLog	Mon Dec 19 13:19:00 2022
@@ -1,125 +1,3 @@
-commit 48487c4b9028e9eec5371742f51e1d64c2e17296
-Author: Alan Coopersmith <alan.coopersm...@oracle.com>
-Date:   Thu Dec 15 14:52:20 2022 -0800
-
-    libX11 1.8.3
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
-
-commit d6d6cba90215d323567fef13d6565756c9956f60
-Author: Keith Packard <kei...@keithp.com>
-Date:   Sun Dec 11 10:32:26 2022 -0800
-
-    Update XPutBackEvent() to support clients that put back unpadded events
-    
-    It seems to be common practice of some X11 clients to pass specific event
-    types into APIs that take XEvent*.  For example, freeglut does:
-    
-       XConfigureEvent fakeEvent = {0};
-       ...
-       XPutBackEvent(fgDisplay.Display, (XEvent*)&fakeEvent);
-    
-    This can result in reads overflowing the input event when libX11 does:
-    
-       XEvent store = *event;
-    
-    =================================================================
-    ==75304==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016ee4a8e8 at pc 0x000101c54d14 bp 0x00016ee4a0d0 sp 0x00016ee49888
-    READ of size 192 at 0x00016ee4a8e8 thread T0
-        #0 0x101c54d10 in __asan_memcpy+0x1a4 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3cd10)
-        #1 0x102848a18 in _XPutBackEvent PutBEvent.c:41
-        #2 0x1028490a4 in XPutBackEvent PutBEvent.c:84
-        #3 0x1013295c8 in fgOpenWindow freeglut_window.c:1178
-        #4 0x101321984 in fgCreateWindow freeglut_structure.c:108
-        #5 0x10132b138 in glutCreateWindow freeglut_window.c:1551
-        #6 0x100fb7d94 in main+0x78 (checkeredTriangles:arm64+0x100003d94)
-        #7 0x197de3e4c  (<unknown module>)
-    
-    Address 0x00016ee4a8e8 is located in stack of thread T0 at offset 840 in frame
-        #0 0x1013282f8 in fgOpenWindow freeglut_window.c:1063
-    
-      This frame has 8 object(s):
-        [32, 40) 'title.addr'
-        [64, 176) 'winAttr' (line 1066)
-        [208, 240) 'textProperty' (line 1067)
-        [272, 352) 'sizeHints' (line 1068)
-        [384, 440) 'wmHints' (line 1069)
-        [480, 672) 'eventReturnBuffer' (line 1070)
-        [736, 740) 'num_FBConfigs' (line 1072)
-        [752, 840) 'fakeEvent' (line 1074) <== Memory access at offset 840 overflows this variable
-    
-    This change allows XPutBackEvent() to support such clients without
-    risk of memory read overflow.
-    
-    Reviewed-by: Jeremy Huddleston Sequoia <jerem...@apple.com>
-    Tested-by: Jeremy Huddleston Sequoia <jerem...@apple.com>
-
-commit 496d9bfeedda89a2211ec665f9214c2693c022f4
-Author: Jeremy Huddleston Sequoia <jerem...@apple.com>
-Date:   Sat Dec 3 16:26:47 2022 -0800
-
-    ximcp: Address warning found by UBSan when growing an empty tree
-    
-    imLcPrs.c:681:52: runtime error: applying zero offset to null pointer
-    
-    Signed-off-by: Jeremy Huddleston Sequoia <jerem...@apple.com>
-
-commit 7f7bcd7b6f569e9f70e3ddd134924f178e2596b1
-Author: Takao Fujiwara <tfuji...@redhat.com>
-Date:   Tue Dec 6 16:59:56 2022 +0000
-
-    nls: consecutive cs number in en_US.UTF-8/XLC_LOCALE
-
-commit ba095967349dff583bd0989d0ba78aa334e9bedf
-Author: Ulrich Sibiller <ul...@gmx.de>
-Date:   Wed Nov 30 23:47:29 2022 +0100
-
-    ChkIfEv.c: fix wrong handling of dpy->in_ifevent
-    
-    Is no longer a bool but a counter.
-    
-    Signed-off-by: Ulrich Sibiller <ul...@gmx.de>
-
-commit 70eaf1174e2809d1a6c43868d53f8cd844ef636a
-Author: Ulrich Sibiller <ul...@gmx.de>
-Date:   Wed Nov 30 23:42:02 2022 +0100
-
-    Indentation fixes around recent dpy->in_ifevent changes
-    
-    Use the same indentation as the surrounding code.
-    
-    Signed-off-by: Ulrich Sibiller <ul...@gmx.de>
-    Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com>
-
-commit a9e845809bcaae22496bc8aa3ca252b410d5f39b
-Author: Matthieu Herrb <matth...@herrb.eu>
-Date:   Fri Nov 11 18:55:23 2022 +0100
-
-    Fix 797755 Allow X*IfEvent() to reenter libX11
-    
-    - the activation logic is reversed
-    - there is also _XInternalLockDisplay() that needs protection
-    - I've found cases (in fvwm2) where the callback calls XCheckIfEvent()
-      recursively. So the flag needs to be a counter.
-    
-    Reviewed-by: Adam Jackson <a...@redhat.com>
-
-commit bccd787a565d3a88673bfc06574c1939f98d8d72
-Author: Nia Alarie <n...@netbsd.org>
-Date:   Thu Nov 10 22:31:47 2022 +0100
-
-    Don't use pragma inside a function, it breaks compiling with older GCCs.
-    
-    XKBBind.c:230: error: #pragma GCC diagnostic not allowed inside functions
-    
-    Signed-off-by: Thomas Klausner <w...@gatalith.at>
-
-commit 696d19d5db7bcb1c1f582c2b1846520e7e0870cb
-Author: Oliver <halt...@riseup.net>
-Date:   Fri Nov 11 17:04:00 2022 +0000
-
-    Add XFreeThreads function.
-
 commit b4f24b272c6ef888b6fcfcf80670c196b2e8f755
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Thu Nov 10 12:18:17 2022 -0800
Index: xsrc/external/mit/libX11/dist/configure
diff -u xsrc/external/mit/libX11/dist/configure:1.1.1.28 xsrc/external/mit/libX11/dist/configure:1.2
--- xsrc/external/mit/libX11/dist/configure:1.1.1.28	Mon Dec 19 00:57:14 2022
+++ xsrc/external/mit/libX11/dist/configure	Mon Dec 19 13:19:00 2022
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libX11 1.8.3.
+# Generated by GNU Autoconf 2.71 for libX11 1.8.2.
 #
 # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues>.
 #
@@ -682,8 +682,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libX11'
 PACKAGE_TARNAME='libX11'
-PACKAGE_VERSION='1.8.3'
-PACKAGE_STRING='libX11 1.8.3'
+PACKAGE_VERSION='1.8.2'
+PACKAGE_STRING='libX11 1.8.2'
 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues'
 PACKAGE_URL=''
 
@@ -1551,7 +1551,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libX11 1.8.3 to adapt to many kinds of systems.
+\`configure' configures libX11 1.8.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1622,7 +1622,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libX11 1.8.3:";;
+     short | recursive ) echo "Configuration of libX11 1.8.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1794,7 +1794,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libX11 configure 1.8.3
+libX11 configure 1.8.2
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2262,7 +2262,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libX11 $as_me 1.8.3, which was
+It was created by libX11 $as_me 1.8.2, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -4910,7 +4910,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libX11'
- VERSION='1.8.3'
+ VERSION='1.8.2'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -15908,7 +15908,7 @@ printf "%s\n" "$supported" >&6; }
 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
-# Turn some warnings into errors, so we don't accidentally get successful builds
+# Turn some warnings into errors, so we don't accidently get successful builds
 # when there are problems that should be fixed.
 
 if test "x$SELECTIVE_WERROR" = "xyes" ; then
@@ -23674,7 +23674,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libX11 $as_me 1.8.3, which was
+This file was extended by libX11 $as_me 1.8.2, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23742,7 +23742,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-libX11 config.status 1.8.3
+libX11 config.status 1.8.2
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
Index: xsrc/external/mit/libX11/dist/configure.ac
diff -u xsrc/external/mit/libX11/dist/configure.ac:1.1.1.28 xsrc/external/mit/libX11/dist/configure.ac:1.2
--- xsrc/external/mit/libX11/dist/configure.ac:1.1.1.28	Mon Dec 19 00:57:14 2022
+++ xsrc/external/mit/libX11/dist/configure.ac	Mon Dec 19 13:19:00 2022
@@ -1,7 +1,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libX11], [1.8.3],
+AC_INIT([libX11], [1.8.2],
         [https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues], [libX11])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h])

Index: xsrc/external/mit/libX11/dist/README.md
diff -u xsrc/external/mit/libX11/dist/README.md:1.1.1.8 xsrc/external/mit/libX11/dist/README.md:1.2
--- xsrc/external/mit/libX11/dist/README.md:1.1.1.8	Mon Dec 19 00:57:14 2022
+++ xsrc/external/mit/libX11/dist/README.md	Mon Dec 19 13:19:00 2022
@@ -31,15 +31,6 @@ For patch submission instructions, see:
 
   https://www.x.org/wiki/Development/Documentation/SubmittingPatches
 
-## Release 1.8.3
-
- * Improved handling of reentering libX11 via X*IfEvent() calls (!171, !173)
- * Fix loading of en_US.UTF-8/XLC_LOCALE (#167, !174)
- * Add XFreeThreads() and automatic call from a destructor function when
-   thread-safety-constructor is enabled (!167).
- * Address issues found by UBSan and AddressSanitizer
- * Fix build with older gcc versions (!169)
-
 ## Release 1.8.2
 
  * Allow X*IfEvent() to reenter libX11 to avoid deadlock from unsafe

Index: xsrc/external/mit/libX11/dist/aclocal.m4
diff -u xsrc/external/mit/libX11/dist/aclocal.m4:1.1.1.24 xsrc/external/mit/libX11/dist/aclocal.m4:1.2
--- xsrc/external/mit/libX11/dist/aclocal.m4:1.1.1.24	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/aclocal.m4	Mon Dec 19 13:19:00 2022
@@ -1793,7 +1793,7 @@ AC_SUBST(MAKE_HTML)
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-xmlto option, it allows maximum flexibility in making decisions
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
 # as whether or not to use the xmlto package. When DEFAULT is not specified,
 # --with-xmlto assumes 'auto'.
 #
@@ -2007,7 +2007,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-asciidoc option, it allows maximum flexibility in making decisions
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
 # --with-asciidoc assumes 'auto'.
 #
@@ -2077,7 +2077,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-doxygen option, it allows maximum flexibility in making decisions
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
 # as whether or not to use the doxygen package. When DEFAULT is not specified,
 # --with-doxygen assumes 'auto'.
 #
@@ -2161,7 +2161,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$h
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-groff option, it allows maximum flexibility in making decisions
+# the --with-groff option, it allows maximum flexibilty in making decisions
 # as whether or not to use the groff package. When DEFAULT is not specified,
 # --with-groff assumes 'auto'.
 #
@@ -2269,7 +2269,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test 
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-fop option, it allows maximum flexibility in making decisions
+# the --with-fop option, it allows maximum flexibilty in making decisions
 # as whether or not to use the fop package. When DEFAULT is not specified,
 # --with-fop assumes 'auto'.
 #
@@ -2363,7 +2363,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
 # Documentation tools are not always available on all platforms and sometimes
 # not at the appropriate level. This macro enables a module to test for the
 # presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-ps2pdf option, it allows maximum flexibility in making decisions
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
 # --with-ps2pdf assumes 'auto'.
 #
@@ -2418,7 +2418,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$ha
 # not at the appropriate level. This macro enables a builder to skip all
 # documentation targets except traditional man pages.
 # Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibility in controlling documentation building.
+# maximum flexibilty in controlling documentation building.
 # Refer to:
 # XORG_WITH_XMLTO         --with-xmlto
 # XORG_WITH_ASCIIDOC      --with-asciidoc
@@ -2451,7 +2451,7 @@ AC_MSG_RESULT([$build_docs])
 #
 # This macro enables a builder to skip all developer documentation.
 # Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibility in controlling documentation building.
+# maximum flexibilty in controlling documentation building.
 # Refer to:
 # XORG_WITH_XMLTO         --with-xmlto
 # XORG_WITH_ASCIIDOC      --with-asciidoc
@@ -2484,7 +2484,7 @@ AC_MSG_RESULT([$build_devel_docs])
 #
 # This macro enables a builder to skip all functional specification targets.
 # Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibility in controlling documentation building.
+# maximum flexibilty in controlling documentation building.
 # Refer to:
 # XORG_WITH_XMLTO         --with-xmlto
 # XORG_WITH_ASCIIDOC      --with-asciidoc
@@ -2975,7 +2975,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"
 # Minimum version: 1.16.0
 #
 # Test if the compiler works when passed the given flag as a command line argument.
-# If it succeeds, the flag is appended to the given variable.  If not, it tries the
+# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
 # next flag in the list until there are no more options.
 #
 # Note that this does not guarantee that the compiler supports the flag as some
@@ -3132,7 +3132,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]
 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
-# Turn some warnings into errors, so we don't accidentally get successful builds
+# Turn some warnings into errors, so we don't accidently get successful builds
 # when there are problems that should be fixed.
 
 if test "x$SELECTIVE_WERROR" = "xyes" ; then

Index: xsrc/external/mit/libX11/dist/include/X11/Xlib.h
diff -u xsrc/external/mit/libX11/dist/include/X11/Xlib.h:1.1.1.13 xsrc/external/mit/libX11/dist/include/X11/Xlib.h:1.2
--- xsrc/external/mit/libX11/dist/include/X11/Xlib.h:1.1.1.13	Mon Dec 19 00:57:19 2022
+++ xsrc/external/mit/libX11/dist/include/X11/Xlib.h	Mon Dec 19 13:19:00 2022
@@ -1735,10 +1735,6 @@ extern Status XInitThreads(
     void
 );
 
-extern Status XFreeThreads(
-    void
-);
-
 extern void XLockDisplay(
     Display*		/* display */
 );

Index: xsrc/external/mit/libX11/dist/include/X11/Xlibint.h
diff -u xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.16 xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.2
--- xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.16	Mon Dec 19 00:57:19 2022
+++ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	Mon Dec 19 13:19:00 2022
@@ -207,7 +207,7 @@ struct _XDisplay
 
 	XIOErrorExitHandler exit_handler;
 	void *exit_handler_data;
-        CARD32 in_ifevent;
+        Bool in_ifevent;
 };
 
 #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)

Index: xsrc/external/mit/libX11/dist/man/XInitThreads.man
diff -u xsrc/external/mit/libX11/dist/man/XInitThreads.man:1.1.1.5 xsrc/external/mit/libX11/dist/man/XInitThreads.man:1.2
--- xsrc/external/mit/libX11/dist/man/XInitThreads.man:1.1.1.5	Mon Dec 19 00:57:18 2022
+++ xsrc/external/mit/libX11/dist/man/XInitThreads.man	Mon Dec 19 13:19:00 2022
@@ -52,8 +52,6 @@ XInitThreads, XLockDisplay, XUnlockDispl
 .HP
 Status XInitThreads\^(void);
 .HP
-Status XFreeThreads\^(void);
-.HP
 void XLockDisplay\^(\^Display *\fIdisplay\fP\^);
 .HP
 void XUnlockDisplay\^(\^Display *\fIdisplay\fP\^);
@@ -78,11 +76,7 @@ are protected by some other access mecha
 a mutual exclusion lock in a toolkit or through explicit client
 programming), Xlib thread initialization is not required.
 It is recommended that single-threaded programs not call this function.
-.LP
-The
-.B XFreeThreads
-function frees the memory allocated by
-.BR XInitThreads .
+
 .LP
 The
 .B XLockDisplay

Index: xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c
diff -u xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c:1.1.1.11 xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c:1.2
--- xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c:1.1.1.11	Mon Dec 19 00:57:18 2022
+++ xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c	Mon Dec 19 13:19:00 2022
@@ -678,7 +678,7 @@ parseline(
 		b->treesize = newsize;
 		/* Re-derive top after realloc() to avoid undefined behaviour
 		   (and crashes on architectures that track pointer bounds). */
-		if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize])
+		if (top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize])
 		    top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old));
 	    }
 	    p = &b->tree[b->treeused];

Index: xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre
diff -u xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre:1.1.1.5 xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre:1.2
--- xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre:1.1.1.5	Mon Dec 19 00:57:18 2022
+++ xsrc/external/mit/libX11/dist/nls/en_US.UTF-8/XLC_LOCALE.pre	Mon Dec 19 13:19:00 2022
@@ -219,73 +219,73 @@ cs5     {
         ct_encoding     ISO8859-5:GR
 }
  
-XCOMM	cs6 class
-cs6     {
+XCOMM	cs7 class
+cs7     {
         side            GR
         length          1
         ct_encoding     ISO8859-7:GR
 }
  
-XCOMM	cs7 class
-cs7     {
+XCOMM	cs8 class
+cs8     {
         side            GR
         length          1
         ct_encoding     ISO8859-9:GR
 }
  
-XCOMM	cs8 class
-cs8     {
+XCOMM	cs9 class
+cs9     {
         side            GR
         length          1
         ct_encoding     ISO8859-13:GR
 }
  
-XCOMM	cs9 class
-cs9     {
+XCOMM	cs10 class
+cs10     {
         side            GR
         length          1
         ct_encoding     ISO8859-14:GR
 }
  
-XCOMM	cs10 class
-cs10    {
+XCOMM	cs11 class
+cs11     {
         side            GR
         length          1
         ct_encoding     ISO8859-15:GR
 }
  
-XCOMM	cs11 class
-cs11	{
+XCOMM	cs12 class
+cs12	{
 	side		GR
 	length		2
 	ct_encoding	JISX0208.1983-0:GL; JISX0208.1983-0:GR;\
 			JISX0208.1983-1:GL; JISX0208.1983-1:GR
 }
 
-XCOMM	cs12 class
-cs12    {
+XCOMM	cs13 class
+cs13     {
         side            GL
         length          2
         ct_encoding     KSC5601.1987-0:GL; KSC5601.1987-0:GR;\
                         KSC5601.1987-1:GL; KSC5601.1987-1:GR
 }
  
-XCOMM	cs13 class
-cs13    {
+XCOMM	cs14 class
+cs14     {
         side            GR
         length          2
         ct_encoding     GB2312.1980-0:GL; GB2312.1980-0:GR
 }
  
-XCOMM	cs14 class
-cs14	{
+XCOMM	cs15 class
+cs15	{
 	side		GR
 	length		1
 	ct_encoding	JISX0201.1976-0:GR
 }
  
-XCOMM	cs15 class
-cs15	{
+XCOMM	cs16 class
+cs16	{
 	side		none
 	ct_encoding	ISO10646-1
 }

Index: xsrc/external/mit/libX11/dist/src/ChkIfEv.c
diff -u xsrc/external/mit/libX11/dist/src/ChkIfEv.c:1.1.1.6 xsrc/external/mit/libX11/dist/src/ChkIfEv.c:1.2
--- xsrc/external/mit/libX11/dist/src/ChkIfEv.c:1.1.1.6	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/ChkIfEv.c	Mon Dec 19 13:19:01 2022
@@ -49,8 +49,8 @@ Bool XCheckIfEvent (
 	unsigned long qe_serial = 0;
 	int n;			/* time through count */
 
-	dpy->in_ifevent++;
-	LockDisplay(dpy);
+        LockDisplay(dpy);
+        dpy->in_ifevent = True;
 	prev = NULL;
 	for (n = 3; --n >= 0;) {
 	    for (qelt = prev ? prev->next : dpy->head;
@@ -61,7 +61,7 @@ Bool XCheckIfEvent (
 		    *event = qelt->event;
 		    _XDeq(dpy, prev, qelt);
 		    _XStoreEventCookie(dpy, event);
-		    dpy->in_ifevent--;
+                    dpy->in_ifevent = False;
 		    UnlockDisplay(dpy);
 		    return True;
 		}
@@ -80,7 +80,7 @@ Bool XCheckIfEvent (
 		/* another thread has snatched this event */
 		prev = NULL;
 	}
-	dpy->in_ifevent--;
+        dpy->in_ifevent = False;
 	UnlockDisplay(dpy);
 	return False;
 }
Index: xsrc/external/mit/libX11/dist/src/IfEvent.c
diff -u xsrc/external/mit/libX11/dist/src/IfEvent.c:1.1.1.6 xsrc/external/mit/libX11/dist/src/IfEvent.c:1.2
--- xsrc/external/mit/libX11/dist/src/IfEvent.c:1.1.1.6	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/IfEvent.c	Mon Dec 19 13:19:01 2022
@@ -48,8 +48,8 @@ XIfEvent (
 	register _XQEvent *qelt, *prev;
 	unsigned long qe_serial = 0;
 
-	dpy->in_ifevent++;
-	LockDisplay(dpy);
+        LockDisplay(dpy);
+        dpy->in_ifevent = True;
 	prev = NULL;
 	while (1) {
 	    for (qelt = prev ? prev->next : dpy->head;
@@ -60,7 +60,7 @@ XIfEvent (
 		    *event = qelt->event;
 		    _XDeq(dpy, prev, qelt);
 		    _XStoreEventCookie(dpy, event);
-		    dpy->in_ifevent--;
+                    dpy->in_ifevent = False;
 		    UnlockDisplay(dpy);
 		    return 0;
 		}

Index: xsrc/external/mit/libX11/dist/src/OpenDis.c
diff -u xsrc/external/mit/libX11/dist/src/OpenDis.c:1.1.1.15 xsrc/external/mit/libX11/dist/src/OpenDis.c:1.2
--- xsrc/external/mit/libX11/dist/src/OpenDis.c:1.1.1.15	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/OpenDis.c	Mon Dec 19 13:19:01 2022
@@ -189,7 +189,7 @@ XOpenDisplay (
 	dpy->xcmisc_opcode	= 0;
 	dpy->xkb_info		= NULL;
 	dpy->exit_handler_data	= NULL;
-	dpy->in_ifevent         = 0;
+        dpy->in_ifevent         = False;
 
 /*
  * Setup other information in this display structure.

Index: xsrc/external/mit/libX11/dist/src/PeekIfEv.c
diff -u xsrc/external/mit/libX11/dist/src/PeekIfEv.c:1.1.1.5 xsrc/external/mit/libX11/dist/src/PeekIfEv.c:1.2
--- xsrc/external/mit/libX11/dist/src/PeekIfEv.c:1.1.1.5	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/PeekIfEv.c	Mon Dec 19 13:19:01 2022
@@ -49,8 +49,8 @@ XPeekIfEvent (
 	register _XQEvent *prev, *qelt;
 	unsigned long qe_serial = 0;
 
-	dpy->in_ifevent++;
 	LockDisplay(dpy);
+        dpy->in_ifevent = True;
 	prev = NULL;
 	while (1) {
 	    for (qelt = prev ? prev->next : dpy->head;
@@ -64,7 +64,7 @@ XPeekIfEvent (
 			_XStoreEventCookie(dpy, &copy);
 			*event = copy;
 		    }
-		    dpy->in_ifevent--;
+                    dpy->in_ifevent = False;
 		    UnlockDisplay(dpy);
 		    return 0;
 		}

Index: xsrc/external/mit/libX11/dist/src/PutBEvent.c
diff -u xsrc/external/mit/libX11/dist/src/PutBEvent.c:1.1.1.7 xsrc/external/mit/libX11/dist/src/PutBEvent.c:1.2
--- xsrc/external/mit/libX11/dist/src/PutBEvent.c:1.1.1.7	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/PutBEvent.c	Mon Dec 19 13:19:01 2022
@@ -79,22 +79,9 @@ XPutBackEvent (
     register XEvent *event)
 	{
 	int ret;
-	xEvent wire = {0};
-	XEvent lib = {0};
-	Status (*fp)(Display *, XEvent *, xEvent *);
-	int type = event->type & 0177;
 
 	LockDisplay(dpy);
-	fp = dpy->wire_vec[type];
-	if (fp == NULL)
-		fp = _XEventToWire;
-	ret = (*fp)(dpy, event, &wire);
-	if (ret)
-	{
-		ret = (*dpy->event_vec[type])(dpy, &lib, &wire);
-		if (ret)
-			ret = _XPutBackEvent(dpy, &lib);
-	}
+	ret = _XPutBackEvent(dpy, event);
 	UnlockDisplay(dpy);
 	return ret;
 	}

Index: xsrc/external/mit/libX11/dist/src/globals.c
diff -u xsrc/external/mit/libX11/dist/src/globals.c:1.1.1.10 xsrc/external/mit/libX11/dist/src/globals.c:1.2
--- xsrc/external/mit/libX11/dist/src/globals.c:1.1.1.10	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/globals.c	Mon Dec 19 13:19:01 2022
@@ -105,10 +105,4 @@ xlib_ctor(void)
 {
     XInitThreads();
 }
-
-__attribute__((destructor)) static void
-xlib_dtor(void)
-{
-    XFreeThreads();
-}
 #endif
Index: xsrc/external/mit/libX11/dist/src/locking.c
diff -u xsrc/external/mit/libX11/dist/src/locking.c:1.1.1.10 xsrc/external/mit/libX11/dist/src/locking.c:1.2
--- xsrc/external/mit/libX11/dist/src/locking.c:1.1.1.10	Mon Dec 19 00:57:16 2022
+++ xsrc/external/mit/libX11/dist/src/locking.c	Mon Dec 19 13:19:01 2022
@@ -465,33 +465,17 @@ static void _XIfEventLockDisplay(
     /* assert(dpy->in_ifevent); */
 }
 
-static void _XInternalLockDisplay(
-    Display *dpy,
-    Bool wskip
-    XTHREADS_FILE_LINE_ARGS
-    );
-
-static void _XIfEventInternalLockDisplay(
-    Display *dpy,
-    Bool wskip
-    XTHREADS_FILE_LINE_ARGS
-    )
-{
-    /* assert(dpy->in_ifevent); */
-}
-
 static void _XIfEventUnlockDisplay(
     Display *dpy
     XTHREADS_FILE_LINE_ARGS
     )
 {
-    if (dpy->in_ifevent == 0) {
-	dpy->lock_fns->lock_display = _XLockDisplay;
-	dpy->lock_fns->unlock_display = _XUnlockDisplay;
-	dpy->lock->internal_lock_display = _XInternalLockDisplay;
-	UnlockDisplay(dpy);
-    } else
-	return;
+    if (dpy->in_ifevent)
+        return;
+
+    dpy->lock_fns->lock_display = _XLockDisplay;
+    dpy->lock_fns->unlock_display = _XUnlockDisplay;
+    UnlockDisplay(dpy);
 }
 
 static void _XLockDisplay(
@@ -521,9 +505,8 @@ static void _XLockDisplay(
     _XIDHandler(dpy);
     _XSeqSyncFunction(dpy);
     if (dpy->in_ifevent) {
-	dpy->lock_fns->lock_display = _XIfEventLockDisplay;
-	dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
-	dpy->lock->internal_lock_display = _XIfEventInternalLockDisplay;
+        dpy->lock_fns->lock_display = _XIfEventLockDisplay;
+        dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
     }
 }
 
@@ -690,32 +673,9 @@ Status XInitThreads(void)
     return 1;
 }
 
-Status XFreeThreads(void)
-{
-    if (global_lock.lock != NULL) {
-	xmutex_free(global_lock.lock);
-	global_lock.lock = NULL;
-    }
-    if (i18n_lock.lock != NULL) {
-	xmutex_free(i18n_lock.lock);
-	i18n_lock.lock = NULL;
-    }
-    if (conv_lock.lock != NULL) {
-	xmutex_free(conv_lock.lock);
-	conv_lock.lock = NULL;
-    }
-
-    return 1;
-}
-
 #else /* XTHREADS */
 Status XInitThreads(void)
 {
     return 0;
 }
-
-Status XFreeThreads(void)
-{
-    return 0;
-}
 #endif /* XTHREADS */

Index: xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c
diff -u xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c:1.1.1.12 xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c:1.2
--- xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c:1.1.1.12	Mon Dec 19 00:57:18 2022
+++ xsrc/external/mit/libX11/dist/src/xkb/XKBBind.c	Mon Dec 19 13:19:01 2022
@@ -202,14 +202,6 @@ XkbKeysymToModifiers(Display *dpy, KeySy
     return mods;
 }
 
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#elif defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
 KeySym
 XLookupKeysym(register XKeyEvent * event, int col)
 {
@@ -219,15 +211,22 @@ XLookupKeysym(register XKeyEvent * event
         return _XLookupKeysym(event, col);
     _XkbCheckPendingRefresh(dpy, dpy->xkb_info);
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#elif defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     return XKeycodeToKeysym(dpy, event->keycode, col);
-}
-
 #ifdef __clang__
 #pragma clang diagnostic pop
 #elif defined(__GNUC__)
 #pragma GCC diagnostic pop
 #endif
 
+}
+
    /*
     * Not a public entry point -- XkbTranslateKey is an obsolete name
     * that is preserved here so that functions linked against the old

Reply via email to