Module Name: xsrc
Committed By: mrg
Date: Sun Mar 9 08:09:32 UTC 2025
Modified Files:
xsrc/external/mit/xauth/dist: process.c
xsrc/external/mit/xdm/dist: compile
xsrc/external/mit/xdm/dist/m4: libtool.m4 ltoptions.m4 ltsugar.m4
ltversion.m4 lt~obsolete.m4
xsrc/external/mit/xinit/dist: compile startx.cpp xinit.c xinitrc.cpp
xsrc/external/mit/xinit/dist/man: startx.man
xsrc/external/mit/xtrans/dist: Xtrans.c Xtranssock.c
Log Message:
merge xauth-1.1.4, xdm-1.1.17, xinit-1.4.3, and xtrans-1.6.0.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xauth/dist/process.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xdm/dist/compile
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xdm/dist/m4/libtool.m4 \
xsrc/external/mit/xdm/dist/m4/ltoptions.m4 \
xsrc/external/mit/xdm/dist/m4/ltsugar.m4 \
xsrc/external/mit/xdm/dist/m4/ltversion.m4 \
xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xinit/dist/compile
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xinit/dist/startx.cpp
cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/xinit/dist/xinit.c
cvs rdiff -u -r1.22 -r1.23 xsrc/external/mit/xinit/dist/xinitrc.cpp
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xinit/dist/man/startx.man
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xtrans/dist/Xtrans.c
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xtrans/dist/Xtranssock.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/xauth/dist/process.c
diff -u xsrc/external/mit/xauth/dist/process.c:1.10 xsrc/external/mit/xauth/dist/process.c:1.11
--- xsrc/external/mit/xauth/dist/process.c:1.10 Thu Jul 4 08:46:43 2024
+++ xsrc/external/mit/xauth/dist/process.c Sun Mar 9 08:09:32 2025
@@ -521,7 +521,7 @@ get_displayname_auth(const char *display
unsigned short dpylen;
buf[0] = '\0';
- sprintf (buf, "%d", dpynum);
+ snprintf (buf, sizeof(buf), "%d", dpynum);
dpylen = strlen (buf);
if (dpylen > 0) {
for (addrlist_cur = addrlist_head; addrlist_cur != NULL;
@@ -714,9 +714,14 @@ auth_initialize(const char *authfilename
FILE *authfp;
Bool exists;
+ /*
+ * XauLockAuth in libXau limits file names to 1022 characters so it
+ * has room to append two characters in its 1025 character buffers.
+ */
if (strlen(authfilename) > 1022) {
fprintf (stderr, "%s: authority file name \"%s\" too long\n",
ProgramName, authfilename);
+ exit (1);
}
xauth_filename = authfilename; /* used in cleanup, prevent race with
signals */
@@ -822,17 +827,19 @@ auth_initialize(const char *authfilename
}
static int
-write_auth_file(char *tmp_nam)
+write_auth_file(char *tmp_nam, size_t tmp_nam_size)
{
FILE *fp = NULL;
int fd;
- /*
- * xdm and auth spec assumes auth file is 12 or fewer characters
- */
- strcpy (tmp_nam, xauth_filename);
- strcat (tmp_nam, "-n"); /* for new */
- (void) unlink (tmp_nam);
+ /* Append "-n" for "new" */
+ int ret = snprintf(tmp_nam, tmp_nam_size, "%s-n", xauth_filename);
+ if (ret < 0 || ret >= tmp_nam_size) {
+ fprintf(stderr, "Error constructing filename: %s\n",
+ (ret < 0) ? "snprintf failed" : "buffer size is too small");
+ return -1;
+ }
+ (void) remove (tmp_nam);
/* CPhipps 2000/02/12 - fix file unlink/fopen race */
fd = open(tmp_nam, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (fd != -1) fp = fdopen (fd, "wb");
@@ -907,7 +914,7 @@ auth_finalize(void)
"Writing", xauth_filename);
}
temp_name[0] = '\0';
- if (write_auth_file (temp_name) == -1) {
+ if (write_auth_file (temp_name, sizeof(temp_name)) == -1) {
fprintf (stderr,
"%s: unable to write authority file %s\n",
ProgramName, temp_name);
@@ -916,7 +923,7 @@ auth_finalize(void)
fprintf (stderr,
"%s: unable to rename authority file %s, use %s\n",
ProgramName, xauth_filename, temp_name);
- unlink(temp_name);
+ remove(temp_name);
}
}
}
@@ -1013,7 +1020,7 @@ dump_entry(const char *inputfilename, in
fprintf (fp, "/unix");
break;
case FamilyInternet:
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
case FamilyInternet6:
#endif
case FamilyDECnet:
Index: xsrc/external/mit/xdm/dist/compile
diff -u xsrc/external/mit/xdm/dist/compile:1.4 xsrc/external/mit/xdm/dist/compile:1.5
--- xsrc/external/mit/xdm/dist/compile:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/compile Sun Mar 9 08:09:32 2025
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2024-06-19.01; # UTC
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
@@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
- *.o | *.[oO][bB][jJ])
+ *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
@@ -248,14 +248,17 @@ If you are trying to build a whole packa
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <[email protected]>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "compile $scriptversion"
+ echo "compile (GNU Automake) $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
Index: xsrc/external/mit/xdm/dist/m4/libtool.m4
diff -u xsrc/external/mit/xdm/dist/m4/libtool.m4:1.4 xsrc/external/mit/xdm/dist/m4/libtool.m4:1.5
--- xsrc/external/mit/xdm/dist/m4/libtool.m4:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/m4/libtool.m4 Sun Mar 9 08:09:32 2025
@@ -1,6 +1,6 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
@@ -9,13 +9,13 @@
# modifications, as long as this notice is preserved.
m4_define([_LT_COPYING], [dnl
-# Copyright (C) 2014 Free Software Foundation, Inc.
+# Copyright (C) 2024 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# GNU Libtool is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License, if you
@@ -32,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 59 LT_INIT
+# serial 63 LT_INIT
# LT_PREREQ(VERSION)
@@ -60,7 +60,7 @@ esac
# LT_INIT([OPTIONS])
# ------------------
AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_BEFORE([$0], [LT_LANG])dnl
AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -616,7 +616,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_
# LT_OUTPUT
# ---------
# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
+# AC_OUTPUT is called), in case it is used in configure for compilation
# tests.
AC_DEFUN([LT_OUTPUT],
[: ${CONFIG_LT=./config.lt}
@@ -651,9 +651,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
configured by $[0], generated by m4_PACKAGE_STRING.
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) 2024 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
+gives unlimited permission to copy, distribute and modify it."
while test 0 != $[#]
do
@@ -730,7 +730,6 @@ _LT_CONFIG_SAVE_COMMANDS([
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services.
@@ -975,6 +974,7 @@ _lt_linker_boilerplate=`cat conftest.err
$RM -r conftest*
])# _LT_LINKER_BOILERPLATE
+
# _LT_REQUIRED_DARWIN_CHECKS
# -------------------------
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
@@ -1025,6 +1025,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK
rm -f conftest.*
fi])
+ # Feature test to disable chained fixups since it is not
+ # compatible with '-undefined dynamic_lookup'
+ AC_CACHE_CHECK([for -no_fixup_chains linker flag],
+ [lt_cv_support_no_fixup_chains],
+ [ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([],[])],
+ lt_cv_support_no_fixup_chains=yes,
+ lt_cv_support_no_fixup_chains=no
+ )
+ LDFLAGS=$save_LDFLAGS
+ ]
+ )
+
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
[lt_cv_ld_exported_symbols_list],
[lt_cv_ld_exported_symbols_list=no
@@ -1049,7 +1064,7 @@ _LT_EOF
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
-int main() { return 0;}
+int main(void) { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
@@ -1074,13 +1089,32 @@ _LT_EOF
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+ if test yes = "$lt_cv_support_no_fixup_chains"; then
+ AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains'])
+ fi
+ ;;
esac
;;
esac
if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
+ _lt_dar_needs_single_mod=no
+ case $host_os in
+ rhapsody* | darwin1.*)
+ _lt_dar_needs_single_mod=yes ;;
+ darwin*)
+ # When targeting Mac OS X 10.4 (darwin 8) or later,
+ # -single_module is the default and -multi_module is unsupported.
+ # The toolchain on macOS 10.14 (darwin 18) and later cannot
+ # target any OS version that needs -single_module.
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*)
+ _lt_dar_needs_single_mod=yes ;;
+ esac
+ ;;
+ esac
if test yes = "$lt_cv_ld_exported_symbols_list"; then
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
@@ -1126,7 +1160,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
_LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
-[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
@@ -1256,7 +1290,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
@@ -1368,7 +1404,7 @@ mips64*-*linux*)
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
# Find out what ABI is being produced by ac_compile, and set linker
# options accordingly. Note that the listed cases only cover the
# situations where additional linker options are needed (such as when
@@ -1383,7 +1419,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
@@ -1412,7 +1448,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_x86_64_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
LD="${LD-ld} -m elf_x86_64"
;;
powerpcle-*linux*)
@@ -1495,7 +1531,7 @@ _LT_DECL([], [AR], [1], [The archiver])
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
+# higher priority because that's what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
@@ -1545,7 +1581,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
test -z "$STRIP" && STRIP=:
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_REQUIRE([AC_PROG_RANLIB])
test -z "$RANLIB" && RANLIB=:
_LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])
@@ -1556,15 +1592,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -1696,14 +1725,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
+ gnu* | ironclad*)
+ # Under GNU Hurd and Ironclad, this test is not required because there
+ # is no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1725,7 +1754,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
+ darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1885,11 +1914,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -1946,7 +1975,7 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32* | cegcc*)
+ mingw* | windows* | pw32* | cegcc*)
lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
@@ -2314,7 +2343,7 @@ if test yes = "$GCC"; then
*) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
*) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
@@ -2372,7 +2401,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
@@ -2447,7 +2476,7 @@ aix[[4-9]]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -2541,7 +2570,7 @@ bsdi[[45]]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -2552,15 +2581,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -2573,7 +2616,7 @@ cygwin* | mingw* | pw32* | cegcc*)
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
@@ -2592,7 +2635,7 @@ m4_if([$1], [],[
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -2699,7 +2742,21 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
- shlibpath_var=LD_LIBRARY_PATH
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[int test_pointer_size[sizeof (void *) - 5];
+ ]])],
+ [shlibpath_var=LD_LIBRARY_PATH],
+ [shlibpath_var=LD_32_LIBRARY_PATH])
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -2729,8 +2786,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -2840,7 +2898,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -2852,8 +2910,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -2887,7 +2946,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -2907,6 +2966,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu
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
@@ -2925,6 +2996,18 @@ netbsd*)
hardcode_into_libs=yes
;;
+*-mlibc)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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'
+ dynamic_linker='mlibc ld.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2944,7 +3027,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -3004,6 +3087,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -3101,6 +3195,21 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ _LT_COMPILER_PIC($1)='-fPIC'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ ;;
+
*)
dynamic_linker=no
;;
@@ -3276,7 +3385,7 @@ if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by $CC])
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -3385,7 +3494,7 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -3457,7 +3566,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure
@@ -3484,7 +3592,7 @@ cygwin*)
lt_cv_file_magic_cmd='func_win32_libid'
;;
-mingw* | pw32*)
+mingw* | windows* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
@@ -3493,7 +3601,7 @@ mingw* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
@@ -3566,7 +3674,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+*-mlibc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+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
@@ -3584,7 +3696,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
+openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
@@ -3600,6 +3712,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3648,7 +3764,7 @@ file_magic_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
- mingw* | pw32*)
+ mingw* | windows* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
@@ -3700,7 +3816,7 @@ else
# Tru64's nm complains that /dev/null is an invalid object file
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
+ mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
@@ -3791,7 +3907,7 @@ lt_cv_sharedlib_from_linklib_cmd,
[lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -3823,16 +3939,16 @@ _LT_DECL([], [sharedlib_from_linklib_cmd
m4_defun([_LT_PATH_MANIFEST_TOOL],
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
- [lt_cv_path_mainfest_tool=no
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
+ [lt_cv_path_manifest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&AS_MESSAGE_LOG_FD
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
+ lt_cv_path_manifest_tool=yes
fi
rm -f conftest*])
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test yes != "$lt_cv_path_manifest_tool"; then
MANIFEST_TOOL=:
fi
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
@@ -3861,7 +3977,7 @@ AC_DEFUN([LT_LIB_M],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3936,7 +4052,7 @@ case $host_os in
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -3951,7 +4067,7 @@ osf*)
symcode='[[BCDEGQRST]]'
;;
solaris*)
- symcode='[[BDRT]]'
+ symcode='[[BCDRT]]'
;;
sco3.2v5*)
symcode='[[DT]]'
@@ -4015,7 +4131,7 @@ $lt_c_name_lib_hook\
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
-mingw*)
+mingw* | windows*)
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
@@ -4066,13 +4182,14 @@ void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
+int main(void){nm_test_var='a';nm_test_func();return(0);}
_LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -4242,7 +4359,7 @@ m4_if([$1], [CXX], [
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4318,7 +4435,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4444,7 +4561,9 @@ m4_if([$1], [CXX], [
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *-mlibc)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4474,6 +4593,8 @@ m4_if([$1], [CXX], [
;;
psos*)
;;
+ serenity*)
+ ;;
solaris*)
case $cc_basename in
CC* | sunCC*)
@@ -4566,7 +4687,7 @@ m4_if([$1], [CXX], [
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4670,7 +4791,7 @@ m4_if([$1], [CXX], [
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4712,6 +4833,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@@ -4794,6 +4921,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
+ *-mlibc)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+
*nto* | *qnx*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
# it will coredump.
@@ -4810,6 +4943,9 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4945,7 +5081,7 @@ m4_if([$1], [CXX], [
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
case $cc_basename in
cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -5003,7 +5139,7 @@ dnl Note also adjust exclude_expsyms for
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
@@ -5015,9 +5151,6 @@ dnl Note also adjust exclude_expsyms for
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5118,7 +5251,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5128,6 +5261,7 @@ _LT_EOF
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5147,7 +5281,7 @@ _LT_EOF
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
os2*)
@@ -5174,7 +5308,7 @@ _LT_EOF
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -5253,6 +5387,7 @@ _LT_EOF
case $cc_basename in
tcc*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@@ -5273,7 +5408,12 @@ _LT_EOF
fi
;;
- netbsd*)
+ *-mlibc)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+
+ 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=
@@ -5575,7 +5715,7 @@ _LT_EOF
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -5592,14 +5732,14 @@ _LT_EOF
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cp "$export_symbols" "$output_objdir/$soname.def";
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
else
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
@@ -5811,11 +5951,15 @@ _LT_EOF
# Fabrice Bellard et al's Tiny C Compiler
_LT_TAGVAR(ld_shlibs, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
esac
;;
- netbsd*)
+ *-mlibc)
+ ;;
+
+ 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
@@ -5837,7 +5981,7 @@ _LT_EOF
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -5880,7 +6024,7 @@ _LT_EOF
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -5916,6 +6060,9 @@ _LT_EOF
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
if test yes = "$GCC"; then
@@ -6174,7 +6321,7 @@ _LT_TAGDECL([], [hardcode_direct], [0],
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
[Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting $shlibpath_var if the
+ "absolute", i.e. impossible to change by setting $shlibpath_var if the
library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -6232,7 +6379,7 @@ _LT_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
+lt_simple_link_test_code='int main(void){return(0);}'
_LT_TAG_COMPILER
# Save the default compiler, since it gets overwritten when the other
@@ -6421,8 +6568,7 @@ if test yes != "$_lt_caught_CXX_error";
wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
_LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
@@ -6442,7 +6588,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
GXX=no
@@ -6651,7 +6797,7 @@ if test yes != "$_lt_caught_CXX_error";
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl* | ,icl* | no,icl*)
# Native MSVC or ICC
@@ -6704,6 +6850,7 @@ if test yes != "$_lt_caught_CXX_error";
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -6750,7 +6897,7 @@ if test yes != "$_lt_caught_CXX_error";
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -6791,7 +6938,7 @@ if test yes != "$_lt_caught_CXX_error";
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
hpux9*)
@@ -6818,7 +6965,7 @@ if test yes != "$_lt_caught_CXX_error";
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -6883,7 +7030,7 @@ if test yes != "$_lt_caught_CXX_error";
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -7115,6 +7262,10 @@ if test yes != "$_lt_caught_CXX_error";
esac
;;
+ *-mlibc)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
@@ -7131,7 +7282,7 @@ if test yes != "$_lt_caught_CXX_error";
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7222,7 +7373,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
# FIXME: insert proper C++ library support
@@ -7237,6 +7388,9 @@ if test yes != "$_lt_caught_CXX_error";
_LT_TAGVAR(ld_shlibs, $1)=no
;;
+ serenity*)
+ ;;
+
sunos4*)
case $cc_basename in
CC*)
@@ -7306,7 +7460,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
@@ -7317,7 +7471,7 @@ if test yes != "$_lt_caught_CXX_error";
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
@@ -7555,10 +7709,11 @@ if AC_TRY_EVAL(ac_compile); then
case $prev$p in
-L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
+ # Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test x-L = x"$p" ||
+ test x-R = x"$p" ||
+ test x-l = x"$p"; then
prev=$p
continue
fi
@@ -8216,7 +8371,7 @@ AC_SUBST([DLLTOOL])
# ----------------
# Check for a file(cmd) program that can be used to detect file type and magic
m4_defun([_LT_DECL_FILECMD],
-[AC_CHECK_TOOL([FILECMD], [file], [:])
+[AC_CHECK_PROG([FILECMD], [file], [file], [:])
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
])# _LD_DECL_FILECMD
@@ -8232,73 +8387,6 @@ _LT_DECL([], [SED], [1], [A sed program
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f "$lt_ac_sed" && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test 10 -lt "$lt_ac_count" && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test "$lt_ac_count" -gt "$lt_ac_max"; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([LT_AC_PROG_SED], [])
@@ -8345,7 +8433,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
[case $host in
*-*-mingw* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
@@ -8358,7 +8446,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
;;
*-*-cygwin* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
@@ -8384,9 +8472,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
[#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
- *-*-mingw* )
+ *-*-mingw* | *-*-windows* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
Index: xsrc/external/mit/xdm/dist/m4/ltoptions.m4
diff -u xsrc/external/mit/xdm/dist/m4/ltoptions.m4:1.4 xsrc/external/mit/xdm/dist/m4/ltoptions.m4:1.5
--- xsrc/external/mit/xdm/dist/m4/ltoptions.m4:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/m4/ltoptions.m4 Sun Mar 9 08:09:32 2025
@@ -1,6 +1,6 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
@@ -8,7 +8,7 @@
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 8 ltoptions.m4
+# serial 10 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -323,29 +323,39 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL],
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
-# implement the --with-aix-soname flag, and support the `aix-soname=aix'
-# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
-# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+# implement the --enable-aix-soname configure option, and support the
+# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options.
+# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
- AC_ARG_WITH([aix-soname],
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ AC_ARG_ENABLE([aix-soname],
+ [AS_HELP_STRING([--enable-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
- [case $withval in
- aix|svr4|both)
- ;;
- *)
- AC_MSG_ERROR([Unknown argument to --with-aix-soname])
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname],
- [AC_CACHE_VAL([lt_cv_with_aix_soname],
- [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
- with_aix_soname=$lt_cv_with_aix_soname])
+ [case $enableval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --enable-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$enable_aix_soname],
+ [_AC_ENABLE_IF([with], [aix-soname],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)])
+ enable_aix_soname=$lt_cv_with_aix_soname])
+ with_aix_soname=$enable_aix_soname
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
@@ -376,30 +386,50 @@ LT_OPTION_DEFINE([LT_INIT], [aix-soname=
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+[AC_ARG_ENABLE([pic],
+ [AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
- case $withval in
- yes|no) pic_mode=$withval ;;
- *)
- pic_mode=default
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
- for lt_pkg in $withval; do
- IFS=$lt_save_ifs
- if test "X$lt_pkg" = "X$lt_p"; then
- pic_mode=yes
- fi
- done
- IFS=$lt_save_ifs
- ;;
- esac],
- [pic_mode=m4_default([$1], [default])])
+ case $enableval in
+ yes|no) pic_mode=$enableval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [dnl Continue to support --with-pic and --without-pic, for backward
+ dnl compatibility.
+ _AC_ENABLE_IF([with], [pic],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])]
+ )
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
Index: xsrc/external/mit/xdm/dist/m4/ltsugar.m4
diff -u xsrc/external/mit/xdm/dist/m4/ltsugar.m4:1.4 xsrc/external/mit/xdm/dist/m4/ltsugar.m4:1.5
--- xsrc/external/mit/xdm/dist/m4/ltsugar.m4:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/m4/ltsugar.m4 Sun Mar 9 08:09:32 2025
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
Index: xsrc/external/mit/xdm/dist/m4/ltversion.m4
diff -u xsrc/external/mit/xdm/dist/m4/ltversion.m4:1.4 xsrc/external/mit/xdm/dist/m4/ltversion.m4:1.5
--- xsrc/external/mit/xdm/dist/m4/ltversion.m4:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/m4/ltversion.m4 Sun Mar 9 08:09:32 2025
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+# Copyright (C) 2004, 2011-2019, 2021-2024 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
@@ -10,15 +10,15 @@
# @configure_input@
-# serial 4245 ltversion.m4
+# serial 4441 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.7])
-m4_define([LT_PACKAGE_REVISION], [2.4.7])
+m4_define([LT_PACKAGE_VERSION], [2.5.4])
+m4_define([LT_PACKAGE_REVISION], [2.5.4])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.7'
-macro_revision='2.4.7'
+[macro_version='2.5.4'
+macro_revision='2.5.4'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
Index: xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4
diff -u xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4:1.4 xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4:1.5
--- xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4:1.4 Mon Jul 11 09:13:31 2022
+++ xsrc/external/mit/xdm/dist/m4/lt~obsolete.m4 Sun Mar 9 08:09:32 2025
@@ -1,6 +1,6 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
Index: xsrc/external/mit/xinit/dist/compile
diff -u xsrc/external/mit/xinit/dist/compile:1.5 xsrc/external/mit/xinit/dist/compile:1.6
--- xsrc/external/mit/xinit/dist/compile:1.5 Sun Jan 8 09:59:51 2023
+++ xsrc/external/mit/xinit/dist/compile Sun Mar 9 08:09:32 2025
@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
Index: xsrc/external/mit/xinit/dist/startx.cpp
diff -u xsrc/external/mit/xinit/dist/startx.cpp:1.10 xsrc/external/mit/xinit/dist/startx.cpp:1.11
--- xsrc/external/mit/xinit/dist/startx.cpp:1.10 Sun Jan 8 09:59:51 2023
+++ xsrc/external/mit/xinit/dist/startx.cpp Sun Mar 9 08:09:32 2025
@@ -12,50 +12,58 @@ XCOMM
XCOMM Site administrators are STRONGLY urged to write nicer versions.
XCOMM
+xinitdir=XINITDIR
+xterm=XTERM
+xserver=XSERVER
+xinit=XINIT
+bundle_id_prefix=BUNDLE_ID_PREFIX
+xauth=XAUTH
+bindir=__bindir__
+libexecdir=__libexecdir__
+mk_cookie=MK_COOKIE
+has_cookie_maker=HAS_COOKIE_MAKER
+
unset SESSION_MANAGER
-#ifdef __APPLE__
+if [ "$(uname -s)" = "Darwin" ] ; then
-XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them.
-XCOMM This allows startx to be placed in a place like /usr/bin or /usr/local/bin
-XCOMM and people may use X without changing their PATH.
-XCOMM Note that we put our own bin directory at the front of the path, and
-XCOMM the standard system path at the back, since if you are using the Xorg
-XCOMM server there's a pretty good chance you want to bias the Xorg clients
-XCOMM over the old system's clients.
+ XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them.
+ XCOMM This allows startx to be placed in a place like /usr/bin or /usr/local/bin
+ XCOMM and people may use X without changing their PATH.
+ XCOMM Note that we put our own bin directory at the front of the path, and
+ XCOMM the standard system path at the back, since if you are using the Xorg
+ XCOMM server there's a pretty good chance you want to bias the Xorg clients
+ XCOMM over the old system's clients.
-XCOMM First our compiled path
-bindir=__bindir__
+ case $PATH in
+ *:$bindir | *:$bindir:* | $bindir:*) ;;
+ *) PATH=$bindir:$PATH ;;
+ esac
-case $PATH in
- *:$bindir | *:$bindir:* | $bindir:*) ;;
- *) PATH=$bindir:$PATH ;;
-esac
+ XCOMM Now the "old" compiled path
+ oldbindir=/usr/X11R6/bin
-XCOMM Now the "old" compiled path
-oldbindir=/usr/X11R6/bin
+ if [ -d "$oldbindir" ] ; then
+ case $PATH in
+ *:$oldbindir | *:$oldbindir:* | $oldbindir:*) ;;
+ *) PATH=$PATH:$oldbindir ;;
+ esac
+ fi
-if [ -d "$oldbindir" ] ; then
- case $PATH in
- *:$oldbindir | *:$oldbindir:* | $oldbindir:*) ;;
- *) PATH=$PATH:$oldbindir ;;
- esac
+ XCOMM Bourne shell does not automatically export modified environment variables
+ XCOMM so export the new PATH just in case the user changes the shell
+ export PATH
fi
-XCOMM Bourne shell does not automatically export modified environment variables
-XCOMM so export the new PATH just in case the user changes the shell
-export PATH
-#endif
-
userclientrc=$HOME/.xinitrc
[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
sysclientrc=XINITDIR/xinitrc
userserverrc=$HOME/.xserverrc
-[ -f "${XSERVERRC}" ] && userclientrc="${XSERVERRC}"
-sysserverrc=XINITDIR/xserverrc
-defaultclient=XTERM
-defaultserver=XSERVER
+[ -f "${XSERVERRC}" ] && userserverrc="${XSERVERRC}"
+sysserverrc=$xinitdir/xserverrc
+defaultclient=$xterm
+defaultserver=$xserver
defaultclientargs=""
defaultserverargs="-noretro"
defaultdisplay=""
@@ -63,73 +71,74 @@ clientargs=""
serverargs=""
vtarg=""
-#ifdef __APPLE__
-if [ "x$X11_PREFS_DOMAIN" = x ] ; then
- export X11_PREFS_DOMAIN=BUNDLE_ID_PREFIX".X11"
-fi
+if [ "$(uname -s)" = "Darwin" ] ; then
-XCOMM Initialize defaults (this will cut down on "safe" error messages)
-if ! defaults read $X11_PREFS_DOMAIN cache_fonts > /dev/null 2>&1 ; then
- defaults write $X11_PREFS_DOMAIN cache_fonts -bool true
-fi
+ if [ "$X11_PREFS_DOMAIN" = "" ] ; then
+ export X11_PREFS_DOMAIN=$bundle_id_prefix".X11"
+ fi
-if ! defaults read $X11_PREFS_DOMAIN no_auth > /dev/null 2>&1 ; then
- defaults write $X11_PREFS_DOMAIN no_auth -bool false
-fi
+ XCOMM Initialize defaults (this will cut down on "safe" error messages)
+ if ! defaults read $X11_PREFS_DOMAIN cache_fonts > /dev/null 2>&1 ; then
+ defaults write $X11_PREFS_DOMAIN cache_fonts -bool true
+ fi
-if ! defaults read $X11_PREFS_DOMAIN nolisten_tcp > /dev/null 2>&1 ; then
- defaults write $X11_PREFS_DOMAIN nolisten_tcp -bool true
-fi
+ if ! defaults read $X11_PREFS_DOMAIN no_auth > /dev/null 2>&1 ; then
+ defaults write $X11_PREFS_DOMAIN no_auth -bool false
+ fi
-if ! defaults read $X11_PREFS_DOMAIN enable_iglx > /dev/null 2>&1 ; then
- defaults write $X11_PREFS_DOMAIN enable_iglx -bool false
-fi
+ if ! defaults read $X11_PREFS_DOMAIN nolisten_tcp > /dev/null 2>&1 ; then
+ defaults write $X11_PREFS_DOMAIN nolisten_tcp -bool true
+ fi
-XCOMM First, start caching fonts
-if [ x`defaults read $X11_PREFS_DOMAIN cache_fonts` = x1 ] ; then
- if [ -x $bindir/font_cache ] ; then
- $bindir/font_cache
- elif [ -x $bindir/font_cache.sh ] ; then
- $bindir/font_cache.sh
- elif [ -x $bindir/fc-cache ] ; then
- $bindir/fc-cache
+ if ! defaults read $X11_PREFS_DOMAIN enable_iglx > /dev/null 2>&1 ; then
+ defaults write $X11_PREFS_DOMAIN enable_iglx -bool false
+ fi
+
+ XCOMM First, start caching fonts
+ if [ "$(defaults read $X11_PREFS_DOMAIN cache_fonts)" = 1 ] ; then
+ if [ -x $bindir/font_cache ] ; then
+ $bindir/font_cache
+ elif [ -x $bindir/font_cache.sh ] ; then
+ $bindir/font_cache.sh
+ elif [ -x $bindir/fc-cache ] ; then
+ $bindir/fc-cache
+ fi
fi
-fi
-if [ -x __libexecdir__/privileged_startx ] ; then
+ if [ -x $libexecdir/privileged_startx ] ; then
XCOMM Don't push this into the background because it can cause
XCOMM a race to create /tmp/.X11-unix
- __libexecdir__/privileged_startx
-fi
+ $libexecdir/privileged_startx
+ fi
-if [ x`defaults read $X11_PREFS_DOMAIN no_auth` = x0 ] ; then
- enable_xauth=1
-else
- enable_xauth=0
-fi
+ if [ "$(defaults read $X11_PREFS_DOMAIN no_auth)" = 0 ] ; then
+ enable_xauth=1
+ else
+ enable_xauth=0
+ fi
-if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then
- defaultserverargs="$defaultserverargs -nolisten tcp"
-else
- defaultserverargs="$defaultserverargs -listen tcp"
-fi
+ if [ "$(defaults read $X11_PREFS_DOMAIN nolisten_tcp)" = 1 ] ; then
+ defaultserverargs="$defaultserverargs -nolisten tcp"
+ else
+ defaultserverargs="$defaultserverargs -listen tcp"
+ fi
-if [ x`defaults read $X11_PREFS_DOMAIN enable_iglx` = x1 ] ; then
- defaultserverargs="$defaultserverargs +iglx +extension GLX"
-else
- defaultserverargs="$defaultserverargs -iglx"
-fi
+ if [ "$(defaults read $X11_PREFS_DOMAIN enable_iglx)" = 1 ] ; then
+ defaultserverargs="$defaultserverargs +iglx +extension GLX"
+ else
+ defaultserverargs="$defaultserverargs -iglx"
+ fi
-XCOMM The second check is the real one. The first is to hopefully avoid
-XCOMM needless syslog spamming.
-if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q 'dpi' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
- defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`"
-fi
+ XCOMM The second check is the real one. The first is to hopefully avoid
+ XCOMM needless syslog spamming.
+ if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q 'dpi' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
+ defaultserverargs="$defaultserverargs -dpi $(defaults read $X11_PREFS_DOMAIN dpi)"
+ fi
-#else
-enable_xauth=1
-#endif
+else
+ enable_xauth=1
+fi
XCOMM Automatically determine an unused $DISPLAY
d=0
@@ -141,18 +150,18 @@ defaultdisplay=":$d"
unset d
whoseargs="client"
-while [ x"$1" != x ]; do
+while [ "$1" != "" ]; do
case "$1" in
XCOMM '' required to prevent cpp from treating "/*" as a C comment.
/''*|\./''*)
if [ "$whoseargs" = "client" ]; then
- if [ x"$client" = x ] && [ x"$clientargs" = x ]; then
+ if [ "$client" = "" ] && [ "$clientargs" = "" ]; then
client="$1"
else
clientargs="$clientargs $1"
fi
else
- if [ x"$server" = x ] && [ x"$serverargs" = x ]; then
+ if [ "$server" = "" ] && [ "$serverargs" = "" ]; then
server="$1"
else
serverargs="$serverargs $1"
@@ -167,7 +176,7 @@ while [ x"$1" != x ]; do
clientargs="$clientargs $1"
else
XCOMM display must be the FIRST server argument
- if [ x"$serverargs" = x ] && @@
+ if [ "$serverargs" = "" ] && @@
expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then
display="$1"
else
@@ -180,11 +189,11 @@ while [ x"$1" != x ]; do
done
XCOMM process client arguments
-if [ x"$client" = x ]; then
+if [ "$client" = "" ]; then
client=$defaultclient
XCOMM For compatibility reasons, only use startxrc if there were no client command line arguments
- if [ x"$clientargs" = x ]; then
+ if [ "$clientargs" = "" ]; then
if [ -f "$userclientrc" ]; then
client=$userclientrc
elif [ -f "$sysclientrc" ]; then
@@ -194,15 +203,15 @@ if [ x"$client" = x ]; then
fi
XCOMM if no client arguments, use defaults
-if [ x"$clientargs" = x ]; then
+if [ "$clientargs" = "" ]; then
clientargs=$defaultclientargs
fi
XCOMM process server arguments
-if [ x"$server" = x ]; then
+if [ "$server" = "" ]; then
server=$defaultserver
-#ifdef __linux__
+if [ "$(uname -s)" = "Linux" ] ; then
XCOMM When starting the defaultserver start X on the current tty to avoid
XCOMM the startx session being seen as inactive:
XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
@@ -211,10 +220,10 @@ if [ x"$server" = x ]; then
tty_num=${tty#/dev/tty}
vtarg="vt$tty_num -keeptty"
fi
-#endif
+fi
XCOMM For compatibility reasons, only use xserverrc if there were no server command line arguments
- if [ x"$serverargs" = x -a x"$display" = x ]; then
+ if [ "$serverargs" = "" ] && [ "$display" = "" ]; then
if [ -f "$userserverrc" ]; then
server=$userserverrc
elif [ -f "$sysserverrc" ]; then
@@ -224,7 +233,7 @@ if [ x"$server" = x ]; then
fi
XCOMM if no server arguments, use defaults
-if [ x"$serverargs" = x ]; then
+if [ "$serverargs" = "" ]; then
serverargs=$defaultserverargs
fi
@@ -240,12 +249,12 @@ if [ "$have_vtarg" = "no" ]; then
fi
XCOMM if no display, use default
-if [ x"$display" = x ]; then
+if [ "$display" = "" ]; then
display=$defaultdisplay
fi
-if [ x"$enable_xauth" = x1 ] ; then
- if [ x"$XAUTHORITY" = x ]; then
+if [ "$enable_xauth" = 1 ] ; then
+ if [ "$XAUTHORITY" = "" ]; then
XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY
fi
@@ -253,19 +262,19 @@ if [ x"$enable_xauth" = x1 ] ; then
removelist=
XCOMM set up default Xauth info for this machine
- hostname=`uname -n`
+ hostname="$(uname -n)"
authdisplay=${display:-:0}
-#if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE)
- mcookie=`MK_COOKIE`
-#else
- if [ -r /dev/urandom ]; then
- mcookie=`dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"`
+ if [ -n "$has_cookie_maker" ] && [ -n "$mk_cookie" ] ; then
+ mcookie=$($mk_cookie)
else
- mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"`
+ if [ -r /dev/urandom ]; then
+ mcookie=$(dd if=dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\")
+ else
+ mcookie=$(dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\")
+ fi
fi
-#endif
- if test x"$mcookie" = x; then
+ if [ "$mcookie" = "" ]; then
echo "Couldn't create cookie"
exit 1
fi
@@ -277,61 +286,65 @@ if [ x"$enable_xauth" = x1 ] ; then
xauth -q -f "$xserverauthfile" << EOF
add :$dummy . $mcookie
EOF
-#if defined(__APPLE__) || defined(__CYGWIN__)
- xserverauthfilequoted=$(echo ${xserverauthfile} | sed "s/'/'\\\\''/g")
- serverargs=${serverargs}" -auth '"${xserverauthfilequoted}"'"
-#else
- serverargs=${serverargs}" -auth "${xserverauthfile}
-#endif
+
+ case "$(uname -s)" in
+ CYGWIN*|Darwin)
+ xserverauthfilequoted=$(echo ${xserverauthfile} | sed "s/'/'\\\\''/g")
+ serverargs=${serverargs}" -auth '"${xserverauthfilequoted}"'"
+ ;;
+ *)
+ serverargs=${serverargs}" -auth "${xserverauthfile}
+ ;;
+ esac
XCOMM now add the same credentials to the client authority file
XCOMM if '$displayname' already exists do not overwrite it as another
XCOMM server may need it. Add them to the '$xserverauthfile' instead.
for displayname in $authdisplay $hostname$authdisplay; do
- authcookie=`XAUTH list "$displayname" @@
- | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
+ authcookie=$(xauth list "$displayname" @@
+ | sed -n 's/.*'"$displayname"'[[:space:]*].*[[:space:]*]//p' 2>/dev/null);
if [ "z${authcookie}" = "z" ] ; then
- XAUTH -q << EOF
+ $xauth -q << EOF
add $displayname . $mcookie
EOF
removelist="$displayname $removelist"
else
dummy=$(($dummy+1));
- XAUTH -q -f "$xserverauthfile" << EOF
+ $xauth -q -f "$xserverauthfile" << EOF
add :$dummy . $authcookie
EOF
fi
done
fi
-#if defined(__APPLE__) || defined(__CYGWIN__)
-eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs
-#else
-XINIT "$client" $clientargs -- "$server" $display $serverargs
-#endif
+case "$(uname -s)" in
+CYGWIN_NT*|Darwin)
+ eval $xinit \"$client\" $clientargs -- \"$server\" $display $serverargs
+ ;;
+*)
+ $xinit "$client" $clientargs -- "$server" $display $serverargs
+ ;;
+esac
retval=$?
-if [ x"$enable_xauth" = x1 ] ; then
- if [ x"$removelist" != x ]; then
- XAUTH remove $removelist
+if [ "$enable_xauth" = 1 ] ; then
+ if [ "$removelist" != "" ]; then
+ $xauth remove $removelist
fi
- if [ x"$xserverauthfile" != x ]; then
+ if [ "$xserverauthfile" != "" ]; then
rm -f "$xserverauthfile"
fi
fi
-/*
- * various machines need special cleaning up
- */
-#ifdef __linux__
-if command -v deallocvt > /dev/null 2>&1; then
- deallocvt
-fi
-#endif
-
-#if defined(sun)
-kbd_mode -a
-#endif
+XCOMM various machines need special cleaning up
+if [ "$(uname -s)" = "Linux" ]; then
+ if command -v deallocvt > /dev/null 2>&1; then
+ deallocvt
+ fi
+fi
+
+if [ "$(uname -s)" = "SunOS" ]; then
+ kbd_mode -a
+fi
exit $retval
-
Index: xsrc/external/mit/xinit/dist/xinit.c
diff -u xsrc/external/mit/xinit/dist/xinit.c:1.9 xsrc/external/mit/xinit/dist/xinit.c:1.10
--- xsrc/external/mit/xinit/dist/xinit.c:1.9 Sun Jan 8 09:59:51 2023
+++ xsrc/external/mit/xinit/dist/xinit.c Sun Mar 9 08:09:32 2025
@@ -31,8 +31,10 @@ in this Software without prior written a
#include <X11/Xlib.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
+#include <X11/Xfuncproto.h>
#include <stdio.h>
#include <ctype.h>
+#include <stddef.h>
#include <stdint.h>
#include <signal.h>
@@ -58,8 +60,8 @@ in this Software without prior written a
#define SHELL "sh"
#endif
-const char *bindir = BINDIR;
-const char * const server_names[] = {
+static const char *bindir = BINDIR;
+static const char * const server_names[] = {
#ifdef __APPLE__
"Xquartz Mac OSX Quartz displays.",
#else
@@ -74,18 +76,17 @@ const char * const server_names[] = {
"Xnest X server nested in a window on another X server",
"Xephyr kdrive-based nested X server",
"Xvnc X server accessed over VNC's RFB protocol",
- "Xdmx Distributed Multi-head X server",
NULL};
#ifndef XINITRC
#define XINITRC ".xinitrc"
#endif
-char xinitrcbuf[256];
+static char xinitrcbuf[256];
#ifndef XSERVERRC
#define XSERVERRC ".xserverrc"
#endif
-char xserverrcbuf[256];
+static char xserverrcbuf[256];
#define TRUE 1
#define FALSE 0
@@ -100,10 +101,10 @@ static char **client = clientargv + 2;
static char *displayNum = NULL;
static char *program = NULL;
static Display *xd = NULL; /* server connection */
-int status;
-pid_t serverpid = -1;
-pid_t clientpid = -1;
-volatile int gotSignal = 0;
+static int status;
+static pid_t serverpid = -1;
+static pid_t clientpid = -1;
+static volatile int gotSignal = 0;
static void Execute(char **vec);
static Bool waitforserver(void);
@@ -127,7 +128,7 @@ sigCatch(int sig)
}
static void
-sigIgnore(int sig)
+sigIgnore(_X_UNUSED int sig)
{
}
@@ -151,7 +152,7 @@ main(int argc, char *argv[])
register char **ptr;
pid_t pid;
int client_given = 0, server_given = 0;
- int start_of_client_args, start_of_server_args;
+ ptrdiff_t start_of_client_args, start_of_server_args;
struct sigaction sa, si;
#ifdef __APPLE__
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
@@ -314,11 +315,6 @@ main(int argc, char *argv[])
shutdown();
- if (gotSignal != 0) {
- Errorx("unexpected signal %d", gotSignal);
- exit(EXIT_FAILURE);
- }
-
if (serverpid < 0)
Fatalx("server error");
if (clientpid < 0)
@@ -488,9 +484,12 @@ setWindowPath(void)
const char *windowpath;
char *newwindowpath;
unsigned long num;
+#ifndef HAVE_ASPRINTF
char nums[10];
int numn;
size_t len;
+#endif
+
prop = XInternAtom(xd, "XFree86_VT", False);
if (prop == None) {
Errorx("Unable to intern XFree86_VT atom");
@@ -534,6 +533,15 @@ setWindowPath(void)
}
XFree(buf);
windowpath = getenv("WINDOWPATH");
+#ifdef HAVE_ASPRINTF
+ if (!windowpath) {
+ if (asprintf(&newwindowpath, "%lu", num) < 0)
+ return;
+ } else {
+ if (asprintf(&newwindowpath, "%s:%lu", windowpath, num) < 0)
+ return;
+ }
+#else
numn = snprintf(nums, sizeof(nums), "%lu", num);
if (!windowpath) {
len = numn + 1;
@@ -549,6 +557,7 @@ setWindowPath(void)
snprintf(newwindowpath, len, "%s:%s",
windowpath, nums);
}
+#endif /* HAVE_ASPRINTF */
if (setenv("WINDOWPATH", newwindowpath, TRUE) == -1)
Error("unable to set WINDOWPATH");
@@ -584,7 +593,7 @@ startClient(char *client_argv[])
static jmp_buf close_env;
static int
-ignorexio(Display *dpy)
+ignorexio(_X_UNUSED Display *dpy)
{
Errorx("connection to X server lost");
longjmp(close_env, 1);
Index: xsrc/external/mit/xinit/dist/xinitrc.cpp
diff -u xsrc/external/mit/xinit/dist/xinitrc.cpp:1.22 xsrc/external/mit/xinit/dist/xinitrc.cpp:1.23
--- xsrc/external/mit/xinit/dist/xinitrc.cpp:1.22 Sun May 29 12:40:36 2022
+++ xsrc/external/mit/xinit/dist/xinitrc.cpp Sun Mar 9 08:09:32 2025
@@ -1,27 +1,33 @@
XCOMM!SHELL_CMD
-XHASH $NetBSD: xinitrc.cpp,v 1.22 2022/05/29 12:40:36 nia Exp $
+XHASH $NetBSD: xinitrc.cpp,v 1.23 2025/03/09 08:09:32 mrg Exp $
+
+xrdb=XRDB
+xinitdir=XINITDIR
+xclock=XCLOCK
+xterm=XTERM
+uxterm=UXTERM
+twm=TWM
+xmodmap=XMODMAP
+ctwm=CTWM
+xsetroot=XSETROOT
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
-sysresources=XINITDIR/.Xresources
-sysmodmap=XINITDIR/.Xmodmap
+sysresources=$xinitdir/.Xresources
+sysmodmap=$xinitdir/.Xmodmap
XCOMM merge in defaults and keymaps
if [ -f $sysresources ]; then
-#ifdef __APPLE__
if [ -x /usr/bin/cpp ] ; then
- XRDB -merge $sysresources
+ $xrdb -merge $sysresources
else
- XRDB -nocpp -merge $sysresources
+ $xrdb -nocpp -merge $sysresources
fi
-#else
- XRDB -merge $sysresources
-#endif
fi
if [ -f $sysmodmap ]; then
- XMODMAP $sysmodmap
+ $xmodmap $sysmodmap
fi
fontsize=$(/usr/X11R7/libexec/ctwm_font_size)
@@ -30,17 +36,13 @@ if ! [ -n "$fontsize" ]; then
fi
if [ -f "$userresources" ]; then
-#ifdef __APPLE__
if [ -x /usr/bin/cpp ] ; then
- XRDB -merge "$userresources"
+ $xrdb -merge "$userresources"
else
- XRDB -nocpp -merge "$userresources"
+ $xrdb -nocpp -merge "$userresources"
fi
-#else
- XRDB -merge "$userresources"
-#endif
else
- XRDB -merge - <<EOF
+ $xrdb -merge - <<EOF
XHASH ifdef COLOR
*customization: -color
XHASH endif
@@ -101,21 +103,21 @@ fi
fi
if [ -f "$usermodmap" ]; then
- XMODMAP "$usermodmap"
+ $xmodmap "$usermodmap"
fi
XCOMM start some nice programs
-if [ -d XINITDIR/xinitrc.d ] ; then
- for f in XINITDIR/xinitrc.d/?*.sh ; do
+if [ -d $xinitdir/xinitrc.d ] ; then
+ for f in "$xinitdir/xinitrc.d"/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
-XSETROOT -cursor_name left_ptr
-XSETROOT -solid 'rgb:00/22/44'
-XCLOCK -digital -strftime '%a %Y-%m-%d %H:%M' \
+$xsetroot -cursor_name left_ptr
+$xsetroot -solid 'rgb:00/22/44'
+$xclock -digital -strftime '%a %Y-%m-%d %H:%M' \
-face "spleen:pixelsize=$fontsize" -g +0+0 &
-UXTERM &
-exec CTWM -W
+$uxterm &
+exec $ctwm -W
Index: xsrc/external/mit/xinit/dist/man/startx.man
diff -u xsrc/external/mit/xinit/dist/man/startx.man:1.3 xsrc/external/mit/xinit/dist/man/startx.man:1.4
--- xsrc/external/mit/xinit/dist/man/startx.man:1.3 Sun Jan 8 09:59:51 2023
+++ xsrc/external/mit/xinit/dist/man/startx.man Sun Mar 9 08:09:32 2025
@@ -179,7 +179,7 @@ will be used.
.TP 25
XSERVERRC
This variable should contain the location of an xserver file. If unset,
-.I $(HOME)/.xinitrc
+.I $(HOME)/.xserverrc
or
.I __xinitdir__/xserverrc
will be used.
Index: xsrc/external/mit/xtrans/dist/Xtrans.c
diff -u xsrc/external/mit/xtrans/dist/Xtrans.c:1.3 xsrc/external/mit/xtrans/dist/Xtrans.c:1.4
--- xsrc/external/mit/xtrans/dist/Xtrans.c:1.3 Sat Nov 16 08:49:09 2024
+++ xsrc/external/mit/xtrans/dist/Xtrans.c Sun Mar 9 08:09:32 2025
@@ -82,12 +82,15 @@ from The Open Group.
#define TRANS_SOCKET_INET6_INDEX 14
#define TRANS_LOCAL_PIPE_INDEX 15
+#if defined(IPv6) && !defined(AF_INET6)
+#error "Cannot build IPv6 support without AF_INET6"
+#endif
static
Xtransport_table Xtransports[] = {
#if defined(TCPCONN)
{ &TRANS(SocketTCPFuncs), TRANS_SOCKET_TCP_INDEX },
-#if defined(IPv6) && defined(AF_INET6)
+#if defined(IPv6)
{ &TRANS(SocketINET6Funcs), TRANS_SOCKET_INET6_INDEX },
#endif /* IPv6 */
{ &TRANS(SocketINETFuncs), TRANS_SOCKET_INET_INDEX },
@@ -126,7 +129,7 @@ void
TRANS(FreeConnInfo) (XtransConnInfo ciptr)
{
- prmsg (3,"FreeConnInfo(%p)\n", ciptr);
+ prmsg (3,"FreeConnInfo(%p)\n", (void *) ciptr);
if (ciptr->addr)
free (ciptr->addr);
@@ -313,7 +316,7 @@ TRANS(ParseAddress) (const char *address
TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
_host = hostnamebuf;
}
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
/* hostname in IPv6 [numeric_addr]:0 form? */
else if ( (_host_len > 3) &&
((strcmp(_protocol, "tcp") == 0) || (strcmp(_protocol, "inet6") == 0))
@@ -901,7 +904,7 @@ TRANS(Read) (XtransConnInfo ciptr, char
}
int
-TRANS(Write) (XtransConnInfo ciptr, char *buf, int size)
+TRANS(Write) (XtransConnInfo ciptr, const char *buf, int size)
{
return ciptr->transptr->Write (ciptr, buf, size);
@@ -1088,7 +1091,7 @@ receive_listening_fds(const char* port,
ti = TRANS_SOCKET_INET_INDEX;
tn = "inet";
break;
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
case AF_INET6:
ti = TRANS_SOCKET_INET6_INDEX;
tn = "inet6";
@@ -1130,11 +1133,11 @@ TRANS(MakeAllCOTSServerListeners) (const
XtransConnInfo ciptr, temp_ciptrs[NUMTRANS] = { NULL };
int status, j;
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
int ipv6_succ = 0;
#endif
prmsg (2,"MakeAllCOTSServerListeners(%s,%p)\n",
- port ? port : "NULL", ciptrs_ret);
+ port ? port : "NULL", (void *) ciptrs_ret);
*count_ret = 0;
@@ -1177,7 +1180,7 @@ TRANS(MakeAllCOTSServerListeners) (const
trans->TransName);
continue;
}
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
if ((Xtransports[i].transport_id == TRANS_SOCKET_INET_INDEX
&& ipv6_succ))
flags |= ADDR_IN_USE_ALLOWED;
@@ -1218,7 +1221,7 @@ TRANS(MakeAllCOTSServerListeners) (const
}
}
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
if (Xtransports[i].transport_id == TRANS_SOCKET_INET6_INDEX)
ipv6_succ = 1;
#endif
Index: xsrc/external/mit/xtrans/dist/Xtranssock.c
diff -u xsrc/external/mit/xtrans/dist/Xtranssock.c:1.5 xsrc/external/mit/xtrans/dist/Xtranssock.c:1.6
--- xsrc/external/mit/xtrans/dist/Xtranssock.c:1.5 Sat Nov 16 08:49:09 2024
+++ xsrc/external/mit/xtrans/dist/Xtranssock.c Sun Mar 9 08:09:32 2025
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates.
+ * Copyright (c) 2002, 2025, Oracle and/or its affiliates.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -155,6 +155,16 @@ from the copyright holders.
#define BACKLOG MIN_BACKLOG
#endif
+#if defined(IPv6) && !defined(AF_INET6)
+#error "Cannot build IPv6 support without AF_INET6"
+#endif
+
+/* Temporary workaround for consumers whose configure scripts were
+ generated with pre-1.6 versions of xtrans.m4 */
+#if defined(IPv6) && !defined(HAVE_GETADDRINFO)
+#define HAVE_GETADDRINFO
+#endif
+
/*
* This is the Socket implementation of the X Transport service layer
*
@@ -171,10 +181,17 @@ typedef struct _Sockettrans2dev {
int protocol;
} Sockettrans2dev;
+/* As documented in the X(7) man page:
+ * tcp TCP over IPv4 or IPv6
+ * inet TCP over IPv4 only
+ * inet6 TCP over IPv6 only
+ * unix UNIX Domain Sockets (same host only)
+ * local Platform preferred local connection method
+ */
static Sockettrans2dev Sockettrans2devtab[] = {
#ifdef TCPCONN
{"inet",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
-#if !defined(IPv6) || !defined(AF_INET6)
+#ifndef IPv6
{"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0},
#else /* IPv6 */
{"tcp",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0},
@@ -196,8 +213,9 @@ static Sockettrans2dev Sockettrans2devta
static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#endif
-#if (defined(TCPCONN) && defined(TRANS_SERVER)) || defined(TRANS_REOPEN) || \
- !defined(IPv6)
+#if (defined(TCPCONN) && \
+ (defined(TRANS_SERVER) || defined(X11_t) || !defined(HAVE_GETADDRINFO))) \
+ || defined(TRANS_REOPEN)
static int
is_numeric (const char *str)
{
@@ -240,7 +258,7 @@ is_numeric (const char *str)
#define MAXHOSTNAMELEN 255
#endif
-#if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6))
+#if defined(HAVE_SOCKLEN_T) || defined(IPv6)
# define SOCKLEN_T socklen_t
#elif defined(SVR4) || defined(__SVR4)
# define SOCKLEN_T size_t
@@ -279,23 +297,15 @@ static int
TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
{
-#if defined(IPv6) && defined(AF_INET6)
- struct sockaddr_storage socknamev6;
+#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
+ struct sockaddr_storage sockname;
#else
- struct sockaddr_in socknamev4;
+ struct sockaddr_in sockname;
#endif
- void *socknamePtr;
- SOCKLEN_T namelen;
-
- prmsg (3,"SocketINETGetAddr(%p)\n", ciptr);
+ void *socknamePtr = &sockname;
+ SOCKLEN_T namelen = sizeof(sockname);
-#if defined(IPv6) && defined(AF_INET6)
- namelen = sizeof(socknamev6);
- socknamePtr = &socknamev6;
-#else
- namelen = sizeof(socknamev4);
- socknamePtr = &socknamev4;
-#endif
+ prmsg (3,"SocketINETGetAddr(%p)\n", (void *) ciptr);
bzero(socknamePtr, namelen);
@@ -321,11 +331,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo
return -1;
}
-#if defined(IPv6) && defined(AF_INET6)
ciptr->family = ((struct sockaddr *)socknamePtr)->sa_family;
-#else
- ciptr->family = socknamev4.sin_family;
-#endif
ciptr->addrlen = namelen;
memcpy (ciptr->addr, socknamePtr, ciptr->addrlen);
@@ -342,29 +348,17 @@ static int
TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr)
{
-#if defined(IPv6) && defined(AF_INET6)
- struct sockaddr_storage socknamev6;
-#endif
- struct sockaddr_in socknamev4;
- void *socknamePtr;
- SOCKLEN_T namelen;
-
-#if defined(IPv6) && defined(AF_INET6)
- if (ciptr->family == AF_INET6)
- {
- namelen = sizeof(socknamev6);
- socknamePtr = &socknamev6;
- }
- else
+#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
+ struct sockaddr_storage sockname;
+#else
+ struct sockaddr_in sockname;
#endif
- {
- namelen = sizeof(socknamev4);
- socknamePtr = &socknamev4;
- }
+ void *socknamePtr = &sockname;
+ SOCKLEN_T namelen = sizeof(sockname);
bzero(socknamePtr, namelen);
- prmsg (3,"SocketINETGetPeerAddr(%p)\n", ciptr);
+ prmsg (3,"SocketINETGetPeerAddr(%p)\n", (void *) ciptr);
if (getpeername (ciptr->fd, (struct sockaddr *) socknamePtr,
(void *)&namelen) < 0)
@@ -437,7 +431,7 @@ TRANS(SocketOpen) (int i, int type)
#ifdef TCP_NODELAY
if (Sockettrans2devtab[i].family == AF_INET
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
|| Sockettrans2devtab[i].family == AF_INET6
#endif
)
@@ -572,7 +566,7 @@ static XtransConnInfo
TRANS(SocketOpenCOTSClientBase) (const char *transname, const char *protocol,
const char *host, const char *port, int previndex)
{
- XtransConnInfo ciptr;
+ XtransConnInfo ciptr = NULL;
int i = previndex;
prmsg (2, "SocketOpenCOTSClient(%s,%s,%s)\n",
@@ -621,7 +615,7 @@ TRANS(SocketOpenCOTSServer) (Xtransport
const char *host, const char *port)
{
- XtransConnInfo ciptr;
+ XtransConnInfo ciptr = NULL;
int i = -1;
prmsg (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
@@ -661,7 +655,7 @@ TRANS(SocketOpenCOTSServer) (Xtransport
*/
if (Sockettrans2devtab[i].family == AF_INET
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
|| Sockettrans2devtab[i].family == AF_INET6
#endif
)
@@ -776,10 +770,10 @@ TRANS(SocketCreateListener) (XtransConnI
int fd = ciptr->fd;
int retry;
- prmsg (3, "SocketCreateListener(%p,%d)\n", ciptr, fd);
+ prmsg (3, "SocketCreateListener(%p,%d)\n", (void *) ciptr, fd);
if (Sockettrans2devtab[ciptr->index].family == AF_INET
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
|| Sockettrans2devtab[ciptr->index].family == AF_INET6
#endif
)
@@ -809,7 +803,7 @@ TRANS(SocketCreateListener) (XtransConnI
}
if (Sockettrans2devtab[ciptr->index].family == AF_INET
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
|| Sockettrans2devtab[ciptr->index].family == AF_INET6
#endif
) {
@@ -846,7 +840,7 @@ TRANS(SocketINETCreateListener) (XtransC
unsigned int flags)
{
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage sockname;
#else
struct sockaddr_in sockname;
@@ -920,7 +914,6 @@ TRANS(SocketINETCreateListener) (XtransC
sport = 0;
bzero(&sockname, sizeof(sockname));
-#if defined(IPv6) && defined(AF_INET6)
if (Sockettrans2devtab[ciptr->index].family == AF_INET) {
namelen = sizeof (struct sockaddr_in);
#ifdef BSD44SOCKETS
@@ -930,6 +923,7 @@ TRANS(SocketINETCreateListener) (XtransC
((struct sockaddr_in *)&sockname)->sin_port = htons(sport);
((struct sockaddr_in *)&sockname)->sin_addr.s_addr = htonl(INADDR_ANY);
} else {
+#ifdef IPv6
namelen = sizeof (struct sockaddr_in6);
#ifdef SIN6_LEN
((struct sockaddr_in6 *)&sockname)->sin6_len = sizeof(sockname);
@@ -937,15 +931,13 @@ TRANS(SocketINETCreateListener) (XtransC
((struct sockaddr_in6 *)&sockname)->sin6_family = AF_INET6;
((struct sockaddr_in6 *)&sockname)->sin6_port = htons(sport);
((struct sockaddr_in6 *)&sockname)->sin6_addr = in6addr_any;
- }
#else
-#ifdef BSD44SOCKETS
- sockname.sin_len = sizeof (sockname);
-#endif
- sockname.sin_family = AF_INET;
- sockname.sin_port = htons (sport);
- sockname.sin_addr.s_addr = htonl (INADDR_ANY);
+ prmsg (1,
+ "SocketINETCreateListener: unsupported address family %d\n",
+ Sockettrans2devtab[ciptr->index].family);
+ return TRANS_CREATE_LISTENER_FAILED;
#endif
+ }
if ((status = TRANS(SocketCreateListener) (ciptr,
(struct sockaddr *) &sockname, namelen, flags)) < 0)
@@ -1093,7 +1085,7 @@ TRANS(SocketUNIXResetListener) (XtransCo
abstract = ciptr->transptr->flags & TRANS_ABSTRACT;
#endif
- prmsg (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (3, "SocketUNIXResetListener(%p,%d)\n", (void *) ciptr, ciptr->fd);
if (!abstract && (
stat (unsock->sun_path, &statb) == -1 ||
@@ -1167,7 +1159,7 @@ TRANS(SocketINETAccept) (XtransConnInfo
struct sockaddr_in sockname;
SOCKLEN_T namelen = sizeof(sockname);
- prmsg (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (2, "SocketINETAccept(%p,%d)\n", (void *) ciptr, ciptr->fd);
if ((newciptr = calloc (1, sizeof(struct _XtransConnInfo))) == NULL)
{
@@ -1243,7 +1235,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo
struct sockaddr_un sockname;
SOCKLEN_T namelen = sizeof sockname;
- prmsg (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (2, "SocketUNIXAccept(%p,%d)\n", (void *) ciptr, ciptr->fd);
if ((newciptr = calloc (1, sizeof(struct _XtransConnInfo))) == NULL)
{
@@ -1315,7 +1307,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo
#ifdef TCPCONN
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
struct addrlist {
struct addrinfo * addr;
struct addrinfo * firstaddr;
@@ -1334,7 +1326,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
struct sockaddr * socketaddr = NULL;
int socketaddrlen = 0;
int res;
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
struct addrinfo hints;
char ntopbuf[INET6_ADDRSTRLEN];
int resetonce = 0;
@@ -1381,7 +1373,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
}
#endif
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
{
if (addrlist != NULL) {
if (strcmp(host,addrlist->host) || strcmp(port,addrlist->port)) {
@@ -1406,6 +1398,12 @@ TRANS(SocketINETConnect) (XtransConnInfo
addrlist->host[sizeof(addrlist->host) - 1] = '\0';
bzero(&hints,sizeof(hints));
+#ifdef IPv6
+ if (strcmp(Sockettrans2devtab[ciptr->index].transname, "tcp") == 0)
+ hints.ai_family = AF_UNSPEC;
+ else
+#endif
+ hints.ai_family = Sockettrans2devtab[ciptr->index].family;
hints.ai_socktype = Sockettrans2devtab[ciptr->index].devcotsname;
res = getaddrinfo(host,port,&hints,&addrlist->firstaddr);
@@ -1451,6 +1449,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
prmsg (4,"SocketINETConnect() sockname.sin_port = %d\n",
ntohs(sin->sin_port));
+#ifdef IPv6
if (Sockettrans2devtab[ciptr->index].family == AF_INET6) {
if (strcmp(Sockettrans2devtab[ciptr->index].transname,
"tcp") == 0) {
@@ -1519,6 +1518,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
prmsg (4,"SocketINETConnect() Skipping IPv6 address\n");
}
}
+#endif /* IPv6 */
} else {
socketaddr = NULL; /* Unsupported address type */
}
@@ -1527,7 +1527,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
}
}
}
-#else
+#else /* !HAVE_GETADDRINFO */
{
/*
* Build the socket name.
@@ -1651,7 +1651,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
*/
if (olderrno == ECONNREFUSED || olderrno == EINTR
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
|| (((addrlist->addr->ai_next != NULL) ||
(addrlist->addr != addrlist->firstaddr)) &&
(olderrno == ENETUNREACH || olderrno == EAFNOSUPPORT ||
@@ -1695,7 +1695,7 @@ TRANS(SocketINETConnect) (XtransConnInfo
}
}
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
if (res != 0) {
addrlist->addr = addrlist->addr->ai_next;
}
@@ -1726,7 +1726,7 @@ UnixHostReallyLocal (const char *host)
{
return (1);
} else {
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef HAVE_GETADDRINFO
struct addrinfo *localhostaddr;
struct addrinfo *otherhostaddr;
struct addrinfo *i, *j;
@@ -1753,6 +1753,7 @@ UnixHostReallyLocal (const char *host)
if (memcmp(A,B,sizeof(struct in_addr)) == 0) {
equiv = 1;
}
+#ifdef IPv6
} else if (i->ai_family == AF_INET6) {
struct sockaddr_in6 *sinA
= (struct sockaddr_in6 *) i->ai_addr;
@@ -1764,6 +1765,7 @@ UnixHostReallyLocal (const char *host)
if (memcmp(A,B,sizeof(struct in6_addr)) == 0) {
equiv = 1;
}
+#endif /* IPv6 */
}
}
}
@@ -1772,7 +1774,7 @@ UnixHostReallyLocal (const char *host)
freeaddrinfo(localhostaddr);
freeaddrinfo(otherhostaddr);
return equiv;
-#else
+#else /* !HAVE_GETADDRINFO */
/*
* A host may have more than one network address. If any of the
* network addresses of 'host' (specified to the connect call)
@@ -1978,7 +1980,7 @@ TRANS(SocketBytesReadable) (XtransConnIn
{
prmsg (2,"SocketBytesReadable(%p,%d,%p)\n",
- ciptr, ciptr->fd, pend);
+ (void *) ciptr, ciptr->fd, (void *) pend);
#ifdef WIN32
{
int ret = ioctlsocket ((SOCKET) ciptr->fd, FIONREAD, (u_long *) pend);
@@ -2101,7 +2103,7 @@ static int
TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size)
{
- prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, buf, size);
+ prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, (void *) buf, size);
#if defined(WIN32)
{
@@ -2155,7 +2157,7 @@ static int
TRANS(SocketReadv) (XtransConnInfo ciptr, struct iovec *buf, int size)
{
- prmsg (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, buf, size);
+ prmsg (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, (void *) buf, size);
#if XTRANS_SEND_FDS
{
@@ -2196,7 +2198,7 @@ static int
TRANS(SocketWritev) (XtransConnInfo ciptr, struct iovec *buf, int size)
{
- prmsg (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, buf, size);
+ prmsg (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, (void *) buf, size);
#if XTRANS_SEND_FDS
if (ciptr->send_fds)
@@ -2238,10 +2240,10 @@ TRANS(SocketWritev) (XtransConnInfo cipt
static int
-TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size)
+TRANS(SocketWrite) (XtransConnInfo ciptr, const char *buf, int size)
{
- prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, buf, size);
+ prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, (const void *) buf, size);
#if defined(WIN32)
{
@@ -2257,7 +2259,7 @@ TRANS(SocketWrite) (XtransConnInfo ciptr
{
struct iovec iov;
- iov.iov_base = buf;
+ iov.iov_base = (void *) buf;
iov.iov_len = size;
return TRANS(SocketWritev)(ciptr, &iov, 1);
}
@@ -2270,7 +2272,7 @@ static int
TRANS(SocketDisconnect) (XtransConnInfo ciptr)
{
- prmsg (2,"SocketDisconnect(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (2,"SocketDisconnect(%p,%d)\n", (void *) ciptr, ciptr->fd);
#ifdef WIN32
{
@@ -2289,7 +2291,7 @@ static int
TRANS(SocketINETClose) (XtransConnInfo ciptr)
{
- prmsg (2,"SocketINETClose(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (2,"SocketINETClose(%p,%d)\n", (void *) ciptr, ciptr->fd);
#ifdef WIN32
{
@@ -2317,7 +2319,7 @@ TRANS(SocketUNIXClose) (XtransConnInfo c
struct sockaddr_un *sockname = (struct sockaddr_un *) ciptr->addr;
int ret;
- prmsg (2,"SocketUNIXClose(%p,%d)\n", ciptr, ciptr->fd);
+ prmsg (2,"SocketUNIXClose(%p,%d)\n", (void *) ciptr, ciptr->fd);
#if XTRANS_SEND_FDS
cleanupFds(ciptr);
@@ -2348,7 +2350,7 @@ TRANS(SocketUNIXCloseForCloning) (Xtrans
int ret;
prmsg (2,"SocketUNIXCloseForCloning(%p,%d)\n",
- ciptr, ciptr->fd);
+ (void *) ciptr, ciptr->fd);
#if XTRANS_SEND_FDS
cleanupFds(ciptr);
@@ -2365,14 +2367,14 @@ TRANS(SocketUNIXCloseForCloning) (Xtrans
# ifdef TRANS_SERVER
static const char* tcp_nolisten[] = {
"inet",
-#if defined(IPv6) && defined(AF_INET6)
+#ifdef IPv6
"inet6",
#endif
NULL
};
# endif
-Xtransport TRANS(SocketTCPFuncs) = {
+static Xtransport TRANS(SocketTCPFuncs) = {
/* Socket Interface */
"tcp",
TRANS_ALIAS,
@@ -2409,7 +2411,7 @@ Xtransport TRANS(SocketTCPFuncs) = {
TRANS(SocketINETClose),
};
-Xtransport TRANS(SocketINETFuncs) = {
+static Xtransport TRANS(SocketINETFuncs) = {
/* Socket Interface */
"inet",
0,
@@ -2446,8 +2448,8 @@ Xtransport TRANS(SocketINETFuncs) = {
TRANS(SocketINETClose),
};
-#if defined(IPv6) && defined(AF_INET6)
-Xtransport TRANS(SocketINET6Funcs) = {
+#ifdef IPv6
+static Xtransport TRANS(SocketINET6Funcs) = {
/* Socket Interface */
"inet6",
0,
@@ -2488,7 +2490,7 @@ Xtransport TRANS(SocketINET6Funcs) =
#ifdef UNIXCONN
#if !defined(LOCALCONN)
-Xtransport TRANS(SocketLocalFuncs) = {
+static Xtransport TRANS(SocketLocalFuncs) = {
/* Socket Interface */
"local",
#ifdef HAVE_ABSTRACT_SOCKETS
@@ -2535,7 +2537,7 @@ static const char* unix_nolisten[] = { "
# endif
# endif
-Xtransport TRANS(SocketUNIXFuncs) = {
+static Xtransport TRANS(SocketUNIXFuncs) = {
/* Socket Interface */
"unix",
#if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS)