Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/libX11/dist merge libX11 1.6.6.
details: https://anonhg.NetBSD.org/xsrc/rev/85cdf3212a41
branches: trunk
changeset: 9984:85cdf3212a41
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Aug 28 05:52:12 2018 +0000
description:
merge libX11 1.6.6.
diffstat:
external/mit/libX11/dist/m4/libtool.m4 | 42 +++++++++++--------
external/mit/libX11/dist/modules/im/ximcp/imLcLkup.c | 6 +-
external/mit/libX11/dist/src/FontNames.c | 16 +-----
external/mit/libX11/dist/src/GetFPath.c | 13 ++++-
external/mit/libX11/dist/src/ListExt.c | 21 +++++----
external/mit/libX11/dist/src/ModMap.c | 4 +-
external/mit/libX11/dist/src/XlibInt.c | 14 +++++-
7 files changed, 65 insertions(+), 51 deletions(-)
diffs (truncated from 307 to 300 lines):
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/m4/libtool.m4
--- a/external/mit/libX11/dist/m4/libtool.m4 Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/m4/libtool.m4 Tue Aug 28 05:52:12 2018 +0000
@@ -2666,14 +2666,7 @@
*) objformat=elf ;;
esac
fi
- # Handle Gentoo/FreeBSD as it was Linux
- case $host_vendor in
- gentoo)
- version_type=linux ;;
- *)
- version_type=freebsd-$objformat ;;
- esac
-
+ version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2685,12 +2678,6 @@
library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
- linux)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- need_lib_prefix=no
- need_version=no
- ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -2900,6 +2887,18 @@
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -3559,7 +3558,7 @@
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@@ -4437,7 +4436,7 @@
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4949,6 +4948,9 @@
;;
esac
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -5011,6 +5013,9 @@
openbsd* | bitrig*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5265,7 +5270,7 @@
fi
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -5786,6 +5791,7 @@
if test yes = "$lt_cv_irix_exported_symbol"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"`
$wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
else
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry
$output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry
$output_objdir/so_locations -exports_file $export_symbols -o $lib'
@@ -5807,7 +5813,7 @@
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/modules/im/ximcp/imLcLkup.c
--- a/external/mit/libX11/dist/modules/im/ximcp/imLcLkup.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/modules/im/ximcp/imLcLkup.c Tue Aug 28 05:52:12 2018 +0000
@@ -61,8 +61,8 @@
||(ic->private.local.brl_committed != 0))) {
if (ic->private.local.brl_committed != 0) { /* Braille Event */
unsigned char pattern = ic->private.local.brl_committed;
- char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
- ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern);
+ char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
+ ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern);
if(ret > bytes) {
if(status) *status = XBufferOverflow;
return(ret);
@@ -74,7 +74,7 @@
} else {
if(status) *status = XLookupChars;
}
- memcpy(buffer, mb, ret);
+ memcpy(buffer, mb2, ret);
} else {
if(keysym) {
if(status) *status = XLookupKeySym;
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/src/FontNames.c
--- a/external/mit/libX11/dist/src/FontNames.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/src/FontNames.c Tue Aug 28 05:52:12 2018 +0000
@@ -88,24 +88,16 @@
* unpack into null terminated strings.
*/
chstart = ch;
- chend = ch + (rlen + 1);
+ chend = ch + rlen;
length = *(unsigned char *)ch;
*ch = 1; /* make sure it is non-zero for XFreeFontNames */
for (i = 0; i < rep.nFonts; i++) {
if (ch + length < chend) {
flist[i] = ch + 1; /* skip over length */
ch += length + 1; /* find next length ... */
- if (ch <= chend) {
- length = *(unsigned char *)ch;
- *ch = '\0'; /* and replace with null-termination */
- count++;
- } else {
- Xfree(chstart);
- Xfree(flist);
- flist = NULL;
- count = 0;
- break;
- }
+ length = *(unsigned char *)ch;
+ *ch = '\0'; /* and replace with null-termination */
+ count++;
} else {
Xfree(chstart);
Xfree(flist);
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/src/GetFPath.c
--- a/external/mit/libX11/dist/src/GetFPath.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/src/GetFPath.c Tue Aug 28 05:52:12 2018 +0000
@@ -42,7 +42,7 @@
int count = 0;
register unsigned i;
register int length;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq (GetFontPath, req);
@@ -69,15 +69,20 @@
/*
* unpack into null terminated strings.
*/
- chend = ch + (nbytes + 1);
- length = *ch;
+ chend = ch + nbytes;
+ length = *(unsigned char *)ch;
for (i = 0; i < rep.nPaths; i++) {
if (ch + length < chend) {
flist[i] = ch+1; /* skip over length */
ch += length + 1; /* find next length ... */
- length = *ch;
+ length = *(unsigned char *)ch;
*ch = '\0'; /* and replace with null-termination */
count++;
+ } else if (i == 0) {
+ Xfree(flist);
+ Xfree(ch);
+ flist = NULL;
+ break;
} else
flist[i] = NULL;
}
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/src/ListExt.c
--- a/external/mit/libX11/dist/src/ListExt.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/src/ListExt.c Tue Aug 28 05:52:12 2018 +0000
@@ -41,7 +41,7 @@
int count = 0;
register unsigned i;
register int length;
- register xReq *req;
+ _X_UNUSED register xReq *req;
unsigned long rlen = 0;
LockDisplay(dpy);
@@ -74,19 +74,20 @@
/*
* unpack into null terminated strings.
*/
- chend = ch + (rlen + 1);
- length = *ch;
+ chend = ch + rlen;
+ length = *(unsigned char *)ch;
for (i = 0; i < rep.nExtensions; i++) {
if (ch + length < chend) {
list[i] = ch+1; /* skip over length */
ch += length + 1; /* find next length ... */
- if (ch <= chend) {
- length = *ch;
- *ch = '\0'; /* and replace with null-termination */
- count++;
- } else {
- list[i] = NULL;
- }
+ length = *(unsigned char *)ch;
+ *ch = '\0'; /* and replace with null-termination */
+ count++;
+ } else if (i == 0) {
+ Xfree(list);
+ Xfree(ch);
+ list = NULL;
+ break;
} else
list[i] = NULL;
}
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/src/ModMap.c
--- a/external/mit/libX11/dist/src/ModMap.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/src/ModMap.c Tue Aug 28 05:52:12 2018 +0000
@@ -34,7 +34,7 @@
XGetModifierMapping(register Display *dpy)
{
xGetModifierMappingReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
unsigned long nbytes;
XModifierKeymap *res;
@@ -84,7 +84,7 @@
req->length += mapSize >> 2;
req->numKeyPerModifier = modifier_map->max_keypermod;
- Data(dpy, (char *)modifier_map->modifiermap, mapSize);
+ Data(dpy, (const char *)modifier_map->modifiermap, mapSize);
(void) _XReply(dpy, (xReply *) & rep,
(SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue);
diff -r 96bbecf640f2 -r 85cdf3212a41 external/mit/libX11/dist/src/XlibInt.c
--- a/external/mit/libX11/dist/src/XlibInt.c Tue Aug 28 05:50:41 2018 +0000
+++ b/external/mit/libX11/dist/src/XlibInt.c Tue Aug 28 05:52:12 2018 +0000
@@ -196,7 +196,7 @@
register Display *dpy)
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
GetEmptyReq(GetInputFocus, req);
@@ -1238,7 +1238,7 @@
* _XDefaultIOError - Default fatal system error reporting routine. Called
* when an X internal system error is encountered.
*/
-int _XDefaultIOError(
+_X_NORETURN int _XDefaultIOError(
Display *dpy)
{
if (ECHECK(EPIPE)) {
@@ -1382,6 +1382,16 @@
XErrorEvent *event)
{
if (_XPrintDefaultError (dpy, event, stderr) == 0) return 0;
+
+ /*
+ * Store in dpy flags that the client is exiting on an unhandled XError
+ * (pretend it is an IOError, since the application is dying anyway it
+ * does not make a difference).
+ * This is useful for _XReply not to hang if the application makes Xlib
Home |
Main Index |
Thread Index |
Old Index