sync code with last improvements from OpenBSD
This commit is contained in:
parent
010ec4e74c
commit
2a511f7966
2
gnu/share/config.guess
vendored
2
gnu/share/config.guess
vendored
@ -858,7 +858,7 @@ EOF
|
|||||||
;;
|
;;
|
||||||
a.out-i386-linux)
|
a.out-i386-linux)
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
coff-i386)
|
coff-i386)
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
@ -55,9 +55,9 @@ then
|
|||||||
then
|
then
|
||||||
dummy=if$$
|
dummy=if$$
|
||||||
cat >$dummy.c <<EOF
|
cat >$dummy.c <<EOF
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
printf("%d\n", __GLIBC_MINOR__);
|
printf("%d\n", __GLIBC_MINOR__);
|
||||||
|
22
gnu/share/configure
vendored
22
gnu/share/configure
vendored
@ -10,12 +10,12 @@
|
|||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
@ -27,7 +27,7 @@
|
|||||||
# preparation for compilation.
|
# preparation for compilation.
|
||||||
#
|
#
|
||||||
# If configure succeeds, it leaves its status in config.status.
|
# If configure succeeds, it leaves its status in config.status.
|
||||||
# If configure fails after disturbing the status quo,
|
# If configure fails after disturbing the status quo,
|
||||||
# config.status is removed.
|
# config.status is removed.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ do
|
|||||||
--*) ;;
|
--*) ;;
|
||||||
-*) option=-$option ;;
|
-*) option=-$option ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Split out the argument for options that take them
|
# Split out the argument for options that take them
|
||||||
case $option in
|
case $option in
|
||||||
--*=*)
|
--*=*)
|
||||||
@ -790,7 +790,7 @@ tooldir='$(exec_prefix)'/${target_alias}
|
|||||||
|
|
||||||
if [ "${host_alias}" != "${target_alias}" ] ; then
|
if [ "${host_alias}" != "${target_alias}" ] ; then
|
||||||
if [ "${program_prefixoption}" = "" ] ; then
|
if [ "${program_prefixoption}" = "" ] ; then
|
||||||
if [ "${program_suffixoption}" = "" ] ; then
|
if [ "${program_suffixoption}" = "" ] ; then
|
||||||
if [ "${program_transform_nameoption}" = "" ] ; then
|
if [ "${program_transform_nameoption}" = "" ] ; then
|
||||||
program_prefix=${target_alias}- ;
|
program_prefix=${target_alias}- ;
|
||||||
fi
|
fi
|
||||||
@ -1144,7 +1144,7 @@ for subdir in . ${subdirs} ; do
|
|||||||
|
|
||||||
if [ ! -r ${srcdir}/${file} ] ; then
|
if [ ! -r ${srcdir}/${file} ] ; then
|
||||||
if [ ! -r ${file} ] ; then
|
if [ ! -r ${file} ] ; then
|
||||||
|
|
||||||
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
|
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
|
||||||
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
|
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -1160,7 +1160,7 @@ for subdir in . ${subdirs} ; do
|
|||||||
if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
|
if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
# We need to re-remove the file because Lynx leaves a
|
# We need to re-remove the file because Lynx leaves a
|
||||||
# very strange directory there when it fails an NFS symlink.
|
# very strange directory there when it fails an NFS symlink.
|
||||||
${remove} -r -f ${link}
|
${remove} -r -f ${link}
|
||||||
${hard_link} ${srcfile} ${link}
|
${hard_link} ${srcfile} ${link}
|
||||||
@ -1198,7 +1198,7 @@ EOF
|
|||||||
# code is order so as to try to sed the smallest input files we know.
|
# code is order so as to try to sed the smallest input files we know.
|
||||||
# so do these separately because I don't trust the order of sed -e expressions.
|
# so do these separately because I don't trust the order of sed -e expressions.
|
||||||
|
|
||||||
# the five makefile fragments MUST end up in the resulting Makefile in this order:
|
# the five makefile fragments MUST end up in the resulting Makefile in this order:
|
||||||
# package macros, target, host, site, and package rules.
|
# package macros, target, host, site, and package rules.
|
||||||
|
|
||||||
if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
|
if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
|
||||||
@ -1422,7 +1422,7 @@ EOF
|
|||||||
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
|
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
|
||||||
-e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
|
-e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
|
||||||
${subdir}/Makefile.tem >> ${Makefile}
|
${subdir}/Makefile.tem >> ${Makefile}
|
||||||
|
|
||||||
sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
|
sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
|
||||||
mv -f ${Makefile}.tem ${Makefile}
|
mv -f ${Makefile}.tem ${Makefile}
|
||||||
|
|
||||||
@ -1507,7 +1507,7 @@ ${progname}" ${arguments} "
|
|||||||
done
|
done
|
||||||
|
|
||||||
# If there are subdirectories, then recur.
|
# If there are subdirectories, then recur.
|
||||||
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
|
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
|
||||||
for configdir in ${configdirs} ${extraconfigdirs} ; do
|
for configdir in ${configdirs} ${extraconfigdirs} ; do
|
||||||
|
|
||||||
# If configdir contains ',' it is
|
# If configdir contains ',' it is
|
||||||
@ -1541,7 +1541,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
POPDIR=${PWD=`pwd`}
|
POPDIR=${PWD=`pwd`}
|
||||||
cd ${bld_dir}
|
cd ${bld_dir}
|
||||||
|
|
||||||
### figure out what to do with srcdir
|
### figure out what to do with srcdir
|
||||||
case "${srcdir}" in
|
case "${srcdir}" in
|
||||||
|
@ -115,7 +115,7 @@ fi
|
|||||||
if [ x"$dir_arg" != x ]; then
|
if [ x"$dir_arg" != x ]; then
|
||||||
dst=$src
|
dst=$src
|
||||||
src=""
|
src=""
|
||||||
|
|
||||||
if [ -d $dst ]; then
|
if [ -d $dst ]; then
|
||||||
instcmd=:
|
instcmd=:
|
||||||
chmodcmd=""
|
chmodcmd=""
|
||||||
@ -125,7 +125,7 @@ if [ x"$dir_arg" != x ]; then
|
|||||||
else
|
else
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
# might cause directories to be created, which would be especially bad
|
# might cause directories to be created, which would be especially bad
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
if [ -f $src -o -d $src ]
|
if [ -f $src -o -d $src ]
|
||||||
@ -135,7 +135,7 @@ else
|
|||||||
echo "install: $src does not exist"
|
echo "install: $src does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x"$dst" = x ]
|
if [ x"$dst" = x ]
|
||||||
then
|
then
|
||||||
echo "install: no destination specified"
|
echo "install: no destination specified"
|
||||||
@ -202,17 +202,17 @@ else
|
|||||||
|
|
||||||
# If we're going to rename the final executable, determine the name now.
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
|
||||||
if [ x"$transformarg" = x ]
|
if [ x"$transformarg" = x ]
|
||||||
then
|
then
|
||||||
dstfile=`basename $dst`
|
dstfile=`basename $dst`
|
||||||
else
|
else
|
||||||
dstfile=`basename $dst $transformbasename |
|
dstfile=`basename $dst $transformbasename |
|
||||||
sed $transformarg`$transformbasename
|
sed $transformarg`$transformbasename
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# don't allow the sed command to completely eliminate the filename
|
# don't allow the sed command to completely eliminate the filename
|
||||||
|
|
||||||
if [ x"$dstfile" = x ]
|
if [ x"$dstfile" = x ]
|
||||||
then
|
then
|
||||||
dstfile=`basename $dst`
|
dstfile=`basename $dst`
|
||||||
else
|
else
|
||||||
@ -243,7 +243,7 @@ else
|
|||||||
# Now rename the file to the real destination.
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||||
|
|
||||||
fi &&
|
fi &&
|
||||||
|
|
||||||
|
@ -777,7 +777,7 @@ if test -n "$pic_flag"; then
|
|||||||
if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
|
if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
|
||||||
# Append any warnings to the config.log.
|
# Append any warnings to the config.log.
|
||||||
cat conftest.err 1>&5
|
cat conftest.err 1>&5
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
hpux9* | hpux10* | hpux11*)
|
hpux9* | hpux10* | hpux11*)
|
||||||
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
|
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
|
||||||
@ -937,7 +937,7 @@ if test "$with_gcc" = yes; then
|
|||||||
else
|
else
|
||||||
no_builtin_flag=' -fno-builtin'
|
no_builtin_flag=' -fno-builtin'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for any special shared library compilation flags.
|
# Check for any special shared library compilation flags.
|
||||||
@ -1183,7 +1183,7 @@ EOF
|
|||||||
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
|
||||||
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
|
||||||
|
|
||||||
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
|
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
netbsd*)
|
netbsd*)
|
||||||
@ -1215,7 +1215,7 @@ EOF
|
|||||||
else
|
else
|
||||||
ld_shlibs=no
|
ld_shlibs=no
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sunos4*)
|
sunos4*)
|
||||||
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
|
||||||
@ -1469,8 +1469,8 @@ else
|
|||||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||||
runpath_var='LD_RUN_PATH'
|
runpath_var='LD_RUN_PATH'
|
||||||
hardcode_shlibpath_var=no
|
hardcode_shlibpath_var=no
|
||||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sysv4.3*)
|
sysv4.3*)
|
||||||
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
|
||||||
@ -1867,7 +1867,7 @@ cygwin* | mingw*)
|
|||||||
freebsd1*)
|
freebsd1*)
|
||||||
dynamic_linker=no
|
dynamic_linker=no
|
||||||
;;
|
;;
|
||||||
|
|
||||||
freebsd*)
|
freebsd*)
|
||||||
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
|
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
|
||||||
version_type=freebsd-$objformat
|
version_type=freebsd-$objformat
|
||||||
@ -2429,10 +2429,10 @@ fi
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -2538,7 +2538,7 @@ else
|
|||||||
fnord() { int i=42;}
|
fnord() { int i=42;}
|
||||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
||||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||||
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
@ -2611,7 +2611,7 @@ else
|
|||||||
fnord() { int i=42;}
|
fnord() { int i=42;}
|
||||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
||||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||||
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
|
@ -696,29 +696,29 @@ compiler."
|
|||||||
# starting and closing comments
|
# starting and closing comments
|
||||||
# /* impgen.c starts here */
|
# /* impgen.c starts here */
|
||||||
# /* Copyright (C) 1999 Free Software Foundation, Inc.
|
# /* Copyright (C) 1999 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is part of GNU libtool.
|
# This file is part of GNU libtool.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
# */
|
# */
|
||||||
#
|
#
|
||||||
# #include <stdio.h> /* for printf() */
|
# #include <stdio.h> /* for printf() */
|
||||||
# #include <unistd.h> /* for open(), lseek(), read() */
|
# #include <unistd.h> /* for open(), lseek(), read() */
|
||||||
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
|
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
|
||||||
# #include <string.h> /* for strdup() */
|
# #include <string.h> /* for strdup() */
|
||||||
#
|
#
|
||||||
# static unsigned int
|
# static unsigned int
|
||||||
# pe_get16 (fd, offset)
|
# pe_get16 (fd, offset)
|
||||||
# int fd;
|
# int fd;
|
||||||
@ -729,7 +729,7 @@ compiler."
|
|||||||
# read (fd, b, 2);
|
# read (fd, b, 2);
|
||||||
# return b[0] + (b[1]<<8);
|
# return b[0] + (b[1]<<8);
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# static unsigned int
|
# static unsigned int
|
||||||
# pe_get32 (fd, offset)
|
# pe_get32 (fd, offset)
|
||||||
# int fd;
|
# int fd;
|
||||||
@ -740,7 +740,7 @@ compiler."
|
|||||||
# read (fd, b, 4);
|
# read (fd, b, 4);
|
||||||
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# static unsigned int
|
# static unsigned int
|
||||||
# pe_as32 (ptr)
|
# pe_as32 (ptr)
|
||||||
# void *ptr;
|
# void *ptr;
|
||||||
@ -748,7 +748,7 @@ compiler."
|
|||||||
# unsigned char *b = ptr;
|
# unsigned char *b = ptr;
|
||||||
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
|
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# int
|
# int
|
||||||
# main (argc, argv)
|
# main (argc, argv)
|
||||||
# int argc;
|
# int argc;
|
||||||
@ -760,32 +760,32 @@ compiler."
|
|||||||
# unsigned long name_rvas, nexp;
|
# unsigned long name_rvas, nexp;
|
||||||
# unsigned char *expdata, *erva;
|
# unsigned char *expdata, *erva;
|
||||||
# char *filename, *dll_name;
|
# char *filename, *dll_name;
|
||||||
#
|
#
|
||||||
# filename = argv[1];
|
# filename = argv[1];
|
||||||
#
|
#
|
||||||
# dll = open(filename, O_RDONLY|O_BINARY);
|
# dll = open(filename, O_RDONLY|O_BINARY);
|
||||||
# if (!dll)
|
# if (!dll)
|
||||||
# return 1;
|
# return 1;
|
||||||
#
|
#
|
||||||
# dll_name = filename;
|
# dll_name = filename;
|
||||||
#
|
#
|
||||||
# for (i=0; filename[i]; i++)
|
# for (i=0; filename[i]; i++)
|
||||||
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
|
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
|
||||||
# dll_name = filename + i +1;
|
# dll_name = filename + i +1;
|
||||||
#
|
#
|
||||||
# pe_header_offset = pe_get32 (dll, 0x3c);
|
# pe_header_offset = pe_get32 (dll, 0x3c);
|
||||||
# opthdr_ofs = pe_header_offset + 4 + 20;
|
# opthdr_ofs = pe_header_offset + 4 + 20;
|
||||||
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
|
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
|
||||||
#
|
#
|
||||||
# if (num_entries < 1) /* no exports */
|
# if (num_entries < 1) /* no exports */
|
||||||
# return 1;
|
# return 1;
|
||||||
#
|
#
|
||||||
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
|
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
|
||||||
# export_size = pe_get32 (dll, opthdr_ofs + 100);
|
# export_size = pe_get32 (dll, opthdr_ofs + 100);
|
||||||
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
|
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
|
||||||
# secptr = (pe_header_offset + 4 + 20 +
|
# secptr = (pe_header_offset + 4 + 20 +
|
||||||
# pe_get16 (dll, pe_header_offset + 4 + 16));
|
# pe_get16 (dll, pe_header_offset + 4 + 16));
|
||||||
#
|
#
|
||||||
# expptr = 0;
|
# expptr = 0;
|
||||||
# for (i = 0; i < nsections; i++)
|
# for (i = 0; i < nsections; i++)
|
||||||
# {
|
# {
|
||||||
@ -804,22 +804,22 @@ compiler."
|
|||||||
# break;
|
# break;
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# expdata = (unsigned char*)malloc(export_size);
|
# expdata = (unsigned char*)malloc(export_size);
|
||||||
# lseek (dll, expptr, SEEK_SET);
|
# lseek (dll, expptr, SEEK_SET);
|
||||||
# read (dll, expdata, export_size);
|
# read (dll, expdata, export_size);
|
||||||
# erva = expdata - export_rva;
|
# erva = expdata - export_rva;
|
||||||
#
|
#
|
||||||
# nexp = pe_as32 (expdata+24);
|
# nexp = pe_as32 (expdata+24);
|
||||||
# name_rvas = pe_as32 (expdata+32);
|
# name_rvas = pe_as32 (expdata+32);
|
||||||
#
|
#
|
||||||
# printf ("EXPORTS\n");
|
# printf ("EXPORTS\n");
|
||||||
# for (i = 0; i<nexp; i++)
|
# for (i = 0; i<nexp; i++)
|
||||||
# {
|
# {
|
||||||
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
|
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
|
||||||
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
|
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# return 0;
|
# return 0;
|
||||||
# }
|
# }
|
||||||
# /* impgen.c ends here */
|
# /* impgen.c ends here */
|
||||||
@ -849,7 +849,7 @@ compiler."
|
|||||||
# now prepend the system-specific ones
|
# now prepend the system-specific ones
|
||||||
eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
|
eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
|
||||||
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
|
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
|
||||||
|
|
||||||
avoid_version=no
|
avoid_version=no
|
||||||
dlfiles=
|
dlfiles=
|
||||||
dlprefiles=
|
dlprefiles=
|
||||||
@ -1351,7 +1351,7 @@ compiler."
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# This is the magic to use -rpath.
|
# This is the magic to use -rpath.
|
||||||
# Skip directories that are in the system default run-time
|
# Skip directories that are in the system default run-time
|
||||||
# search path, unless they have been requested with -R.
|
# search path, unless they have been requested with -R.
|
||||||
@ -1360,7 +1360,7 @@ compiler."
|
|||||||
*)
|
*)
|
||||||
case "$compile_rpath " in
|
case "$compile_rpath " in
|
||||||
*" $absdir "*) ;;
|
*" $absdir "*) ;;
|
||||||
*) compile_rpath="$compile_rpath $absdir"
|
*) compile_rpath="$compile_rpath $absdir"
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -1797,7 +1797,7 @@ compiler."
|
|||||||
versuffix=
|
versuffix=
|
||||||
verstring=""
|
verstring=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check to see if the archive will have undefined symbols.
|
# Check to see if the archive will have undefined symbols.
|
||||||
if test "$allow_undefined" = yes; then
|
if test "$allow_undefined" = yes; then
|
||||||
if test "$allow_undefined_flag" = unsupported; then
|
if test "$allow_undefined_flag" = unsupported; then
|
||||||
@ -1956,7 +1956,7 @@ EOF
|
|||||||
# Follow soft links.
|
# Follow soft links.
|
||||||
if ls -lLd "$potent_lib" 2>/dev/null \
|
if ls -lLd "$potent_lib" 2>/dev/null \
|
||||||
| grep " -> " >/dev/null; then
|
| grep " -> " >/dev/null; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# The statement above tries to avoid entering an
|
# The statement above tries to avoid entering an
|
||||||
# endless loop below, in case of cyclic links.
|
# endless loop below, in case of cyclic links.
|
||||||
@ -2051,7 +2051,7 @@ EOF
|
|||||||
library_names=
|
library_names=
|
||||||
old_library=
|
old_library=
|
||||||
dlname=
|
dlname=
|
||||||
|
|
||||||
# Test again, we may have decided not to build it any more
|
# Test again, we may have decided not to build it any more
|
||||||
if test "$build_libtool_libs" = yes; then
|
if test "$build_libtool_libs" = yes; then
|
||||||
# Get the real and link names of the library.
|
# Get the real and link names of the library.
|
||||||
@ -2250,7 +2250,7 @@ EOF
|
|||||||
gentop=
|
gentop=
|
||||||
# reload_cmds runs $LD directly, so let us get rid of
|
# reload_cmds runs $LD directly, so let us get rid of
|
||||||
# -Wl from whole_archive_flag_spec
|
# -Wl from whole_archive_flag_spec
|
||||||
wl=
|
wl=
|
||||||
|
|
||||||
if test -n "$convenience"; then
|
if test -n "$convenience"; then
|
||||||
if test -n "$whole_archive_flag_spec"; then
|
if test -n "$whole_archive_flag_spec"; then
|
||||||
@ -2378,9 +2378,9 @@ EOF
|
|||||||
if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
|
if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
|
||||||
test "$dlopen_self_static" = unknown; then
|
test "$dlopen_self_static" = unknown; then
|
||||||
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
|
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$rpath$xrpath"; then
|
if test -n "$rpath$xrpath"; then
|
||||||
# If the user specified any rpath flags, then add them.
|
# If the user specified any rpath flags, then add them.
|
||||||
for libdir in $rpath $xrpath; do
|
for libdir in $rpath $xrpath; do
|
||||||
@ -2544,7 +2544,7 @@ extern \"C\" {
|
|||||||
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
|
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
|
||||||
$run eval '$mv "$nlist"T "$nlist"'
|
$run eval '$mv "$nlist"T "$nlist"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$export_symbols_regex"; then
|
if test -n "$export_symbols_regex"; then
|
||||||
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
|
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
|
||||||
$run eval '$mv "$nlist"T "$nlist"'
|
$run eval '$mv "$nlist"T "$nlist"'
|
||||||
@ -2687,7 +2687,7 @@ static const void *lt_preloaded_setup() {
|
|||||||
$show "$link_command"
|
$show "$link_command"
|
||||||
$run eval "$link_command"
|
$run eval "$link_command"
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
# Delete the generated files.
|
# Delete the generated files.
|
||||||
if test -n "$dlsyms"; then
|
if test -n "$dlsyms"; then
|
||||||
$show "$rm $output_objdir/${outputname}S.${objext}"
|
$show "$rm $output_objdir/${outputname}S.${objext}"
|
||||||
@ -2747,7 +2747,7 @@ static const void *lt_preloaded_setup() {
|
|||||||
# Fast installation is not supported
|
# Fast installation is not supported
|
||||||
link_command="$compile_var$compile_command$compile_rpath"
|
link_command="$compile_var$compile_command$compile_rpath"
|
||||||
relink_command="$finalize_var$finalize_command$finalize_rpath"
|
relink_command="$finalize_var$finalize_command$finalize_rpath"
|
||||||
|
|
||||||
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
|
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
|
||||||
$echo "$modename: \`$output' will be relinked during installation" 1>&2
|
$echo "$modename: \`$output' will be relinked during installation" 1>&2
|
||||||
else
|
else
|
||||||
@ -2767,7 +2767,7 @@ static const void *lt_preloaded_setup() {
|
|||||||
|
|
||||||
# Replace the output file specification.
|
# Replace the output file specification.
|
||||||
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
|
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
|
||||||
|
|
||||||
# Delete the old output files.
|
# Delete the old output files.
|
||||||
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
|
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
|
||||||
|
|
||||||
@ -2880,7 +2880,7 @@ else
|
|||||||
echo >> $output "\
|
echo >> $output "\
|
||||||
program=lt-'$outputname'
|
program=lt-'$outputname'
|
||||||
progdir=\"\$thisdir/$objdir\"
|
progdir=\"\$thisdir/$objdir\"
|
||||||
|
|
||||||
if test ! -f \"\$progdir/\$program\" || \\
|
if test ! -f \"\$progdir/\$program\" || \\
|
||||||
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
|
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
|
||||||
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
|
||||||
@ -3011,7 +3011,7 @@ fi\
|
|||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
generated="$generated $gentop"
|
generated="$generated $gentop"
|
||||||
|
|
||||||
# Add in members from convenience archives.
|
# Add in members from convenience archives.
|
||||||
for xlib in $addlibs; do
|
for xlib in $addlibs; do
|
||||||
# Extract the objects.
|
# Extract the objects.
|
||||||
|
@ -4100,7 +4100,7 @@ while test "$type"; do
|
|||||||
for fp in $gfpth; do
|
for fp in $gfpth; do
|
||||||
if test "X$fp" = X.; then
|
if test "X$fp" = X.; then
|
||||||
pf="$ansexp"
|
pf="$ansexp"
|
||||||
else
|
else
|
||||||
pf="$fp/$ansexp"
|
pf="$fp/$ansexp"
|
||||||
fi
|
fi
|
||||||
if test -f "$pf"; then
|
if test -f "$pf"; then
|
||||||
@ -4121,7 +4121,7 @@ while test "$type"; do
|
|||||||
if test "X$fp" = X.; then
|
if test "X$fp" = X.; then
|
||||||
dir="$ans"
|
dir="$ans"
|
||||||
direxp="$ansexp"
|
direxp="$ansexp"
|
||||||
else
|
else
|
||||||
dir="$fp/$ansexp"
|
dir="$fp/$ansexp"
|
||||||
direxp="$fp/$ansexp"
|
direxp="$fp/$ansexp"
|
||||||
fi
|
fi
|
||||||
@ -15773,7 +15773,7 @@ set gettimeofday d_gettimeod
|
|||||||
eval $inlibc
|
eval $inlibc
|
||||||
case "$d_gettimeod" in
|
case "$d_gettimeod" in
|
||||||
"$undef")
|
"$undef")
|
||||||
set ftime d_ftime
|
set ftime d_ftime
|
||||||
eval $inlibc
|
eval $inlibc
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cms_sd.c,v 1.26 2023/07/08 08:26:26 beck Exp $ */
|
/* $OpenBSD: cms_sd.c,v 1.28 2023/09/11 09:29:30 tb Exp $ */
|
||||||
/*
|
/*
|
||||||
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||||
* project.
|
* project.
|
||||||
@ -256,16 +256,16 @@ static int
|
|||||||
cms_sd_asn1_ctrl(CMS_SignerInfo *si, int cmd)
|
cms_sd_asn1_ctrl(CMS_SignerInfo *si, int cmd)
|
||||||
{
|
{
|
||||||
EVP_PKEY *pkey = si->pkey;
|
EVP_PKEY *pkey = si->pkey;
|
||||||
int i;
|
int ret;
|
||||||
|
|
||||||
if (!pkey->ameth || !pkey->ameth->pkey_ctrl)
|
if (pkey->ameth == NULL || pkey->ameth->pkey_ctrl == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
i = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_CMS_SIGN, cmd, si);
|
ret = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_CMS_SIGN, cmd, si);
|
||||||
if (i == -2) {
|
if (ret == -2) {
|
||||||
CMSerror(CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE);
|
CMSerror(CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (i <= 0) {
|
if (ret <= 0) {
|
||||||
CMSerror(CMS_R_CTRL_FAILURE);
|
CMSerror(CMS_R_CTRL_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -721,119 +721,113 @@ cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain)
|
|||||||
int
|
int
|
||||||
CMS_SignerInfo_sign(CMS_SignerInfo *si)
|
CMS_SignerInfo_sign(CMS_SignerInfo *si)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX *mctx = si->mctx;
|
const EVP_MD *md;
|
||||||
EVP_PKEY_CTX *pctx = NULL;
|
unsigned char *buf = NULL, *sig = NULL;
|
||||||
unsigned char *abuf = NULL;
|
int buf_len = 0;
|
||||||
int alen;
|
size_t sig_len = 0;
|
||||||
size_t siglen;
|
int ret = 0;
|
||||||
const EVP_MD *md = NULL;
|
|
||||||
|
|
||||||
md = EVP_get_digestbyobj(si->digestAlgorithm->algorithm);
|
if ((md = EVP_get_digestbyobj(si->digestAlgorithm->algorithm)) == NULL)
|
||||||
if (md == NULL)
|
goto err;
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (CMS_signed_get_attr_by_NID(si, NID_pkcs9_signingTime, -1) < 0) {
|
if (CMS_signed_get_attr_by_NID(si, NID_pkcs9_signingTime, -1) < 0) {
|
||||||
if (!cms_add1_signingTime(si, NULL))
|
if (!cms_add1_signingTime(si, NULL))
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (si->pctx)
|
if (si->pctx == NULL) {
|
||||||
pctx = si->pctx;
|
EVP_MD_CTX_reset(si->mctx);
|
||||||
else {
|
if (!EVP_DigestSignInit(si->mctx, &si->pctx, md, NULL, si->pkey))
|
||||||
EVP_MD_CTX_reset(mctx);
|
|
||||||
if (EVP_DigestSignInit(mctx, &pctx, md, NULL, si->pkey) <= 0)
|
|
||||||
goto err;
|
goto err;
|
||||||
si->pctx = pctx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_SIGN,
|
if (EVP_PKEY_CTX_ctrl(si->pctx, -1, EVP_PKEY_OP_SIGN,
|
||||||
EVP_PKEY_CTRL_CMS_SIGN, 0, si) <= 0) {
|
EVP_PKEY_CTRL_CMS_SIGN, 0, si) <= 0) {
|
||||||
CMSerror(CMS_R_CTRL_ERROR);
|
CMSerror(CMS_R_CTRL_ERROR);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf,
|
if ((buf_len = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &buf,
|
||||||
&CMS_Attributes_Sign_it);
|
&CMS_Attributes_Sign_it)) <= 0) {
|
||||||
if (!abuf)
|
buf_len = 0;
|
||||||
goto err;
|
goto err;
|
||||||
if (EVP_DigestSignUpdate(mctx, abuf, alen) <= 0)
|
}
|
||||||
|
if (!EVP_DigestSign(si->mctx, NULL, &sig_len, buf, buf_len))
|
||||||
goto err;
|
goto err;
|
||||||
if (EVP_DigestSignFinal(mctx, NULL, &siglen) <= 0)
|
if ((sig = calloc(1, sig_len)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
free(abuf);
|
if (!EVP_DigestSign(si->mctx, sig, &sig_len, buf, buf_len))
|
||||||
abuf = malloc(siglen);
|
|
||||||
if (abuf == NULL)
|
|
||||||
goto err;
|
|
||||||
if (EVP_DigestSignFinal(mctx, abuf, &siglen) <= 0)
|
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_SIGN,
|
if (EVP_PKEY_CTX_ctrl(si->pctx, -1, EVP_PKEY_OP_SIGN,
|
||||||
EVP_PKEY_CTRL_CMS_SIGN, 1, si) <= 0) {
|
EVP_PKEY_CTRL_CMS_SIGN, 1, si) <= 0) {
|
||||||
CMSerror(CMS_R_CTRL_ERROR);
|
CMSerror(CMS_R_CTRL_ERROR);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
EVP_MD_CTX_reset(mctx);
|
ASN1_STRING_set0(si->signature, sig, sig_len);
|
||||||
|
sig = NULL;
|
||||||
|
|
||||||
ASN1_STRING_set0(si->signature, abuf, siglen);
|
ret = 1;
|
||||||
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
err:
|
err:
|
||||||
free(abuf);
|
if (si->mctx != NULL)
|
||||||
EVP_MD_CTX_reset(mctx);
|
EVP_MD_CTX_reset(si->mctx);
|
||||||
|
freezero(buf, buf_len);
|
||||||
|
freezero(sig, sig_len);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
LCRYPTO_ALIAS(CMS_SignerInfo_sign);
|
LCRYPTO_ALIAS(CMS_SignerInfo_sign);
|
||||||
|
|
||||||
int
|
int
|
||||||
CMS_SignerInfo_verify(CMS_SignerInfo *si)
|
CMS_SignerInfo_verify(CMS_SignerInfo *si)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX *mctx = NULL;
|
const EVP_MD *md;
|
||||||
unsigned char *abuf = NULL;
|
unsigned char *buf = NULL;
|
||||||
int alen, r = -1;
|
int buf_len = 0;
|
||||||
const EVP_MD *md = NULL;
|
int ret = -1;
|
||||||
|
|
||||||
if (!si->pkey) {
|
if ((md = EVP_get_digestbyobj(si->digestAlgorithm->algorithm)) == NULL)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
if (si->pkey == NULL) {
|
||||||
CMSerror(CMS_R_NO_PUBLIC_KEY);
|
CMSerror(CMS_R_NO_PUBLIC_KEY);
|
||||||
return -1;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
md = EVP_get_digestbyobj(si->digestAlgorithm->algorithm);
|
if (si->mctx == NULL)
|
||||||
if (md == NULL)
|
si->mctx = EVP_MD_CTX_new();
|
||||||
return -1;
|
if (si->mctx == NULL) {
|
||||||
if (si->mctx == NULL && (si->mctx = EVP_MD_CTX_new()) == NULL) {
|
|
||||||
CMSerror(ERR_R_MALLOC_FAILURE);
|
CMSerror(ERR_R_MALLOC_FAILURE);
|
||||||
return -1;
|
goto err;
|
||||||
}
|
}
|
||||||
mctx = si->mctx;
|
|
||||||
if (EVP_DigestVerifyInit(mctx, &si->pctx, md, NULL, si->pkey) <= 0)
|
if (EVP_DigestVerifyInit(si->mctx, &si->pctx, md, NULL, si->pkey) <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (!cms_sd_asn1_ctrl(si, 1))
|
if (!cms_sd_asn1_ctrl(si, 1))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf,
|
if ((buf_len = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &buf,
|
||||||
&CMS_Attributes_Verify_it);
|
&CMS_Attributes_Verify_it)) <= 0) {
|
||||||
if (!abuf)
|
buf_len = 0;
|
||||||
goto err;
|
|
||||||
r = EVP_DigestVerifyUpdate(mctx, abuf, alen);
|
|
||||||
free(abuf);
|
|
||||||
if (r <= 0) {
|
|
||||||
r = -1;
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = EVP_DigestVerifyFinal(mctx, si->signature->data,
|
ret = EVP_DigestVerify(si->mctx, si->signature->data, si->signature->length,
|
||||||
si->signature->length);
|
buf, buf_len);
|
||||||
if (r <= 0)
|
if (ret <= 0) {
|
||||||
CMSerror(CMS_R_VERIFICATION_FAILURE);
|
CMSerror(CMS_R_VERIFICATION_FAILURE);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
err:
|
err:
|
||||||
EVP_MD_CTX_reset(mctx);
|
if (si->mctx != NULL)
|
||||||
|
EVP_MD_CTX_reset(si->mctx);
|
||||||
|
freezero(buf, buf_len);
|
||||||
|
|
||||||
return r;
|
return ret;
|
||||||
}
|
}
|
||||||
LCRYPTO_ALIAS(CMS_SignerInfo_verify);
|
LCRYPTO_ALIAS(CMS_SignerInfo_verify);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: evp_enc.c,v 1.52 2023/07/07 19:37:53 beck Exp $ */
|
/* $OpenBSD: evp_enc.c,v 1.53 2023/09/10 16:53:56 tb Exp $ */
|
||||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -78,8 +78,8 @@ int
|
|||||||
EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
|
EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
|
||||||
const unsigned char *key, const unsigned char *iv, int enc)
|
const unsigned char *key, const unsigned char *iv, int enc)
|
||||||
{
|
{
|
||||||
if (cipher)
|
if (cipher != NULL)
|
||||||
EVP_CIPHER_CTX_init(ctx);
|
EVP_CIPHER_CTX_cleanup(ctx);
|
||||||
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
|
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: p_lib.c,v 1.36 2023/09/02 04:15:39 tb Exp $ */
|
/* $OpenBSD: p_lib.c,v 1.37 2023/09/10 17:32:17 tb Exp $ */
|
||||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -449,13 +449,14 @@ EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
|
|||||||
RSA *
|
RSA *
|
||||||
EVP_PKEY_get1_RSA(EVP_PKEY *pkey)
|
EVP_PKEY_get1_RSA(EVP_PKEY *pkey)
|
||||||
{
|
{
|
||||||
if (pkey->type == EVP_PKEY_RSA || pkey->type == EVP_PKEY_RSA_PSS) {
|
RSA *rsa;
|
||||||
RSA_up_ref(pkey->pkey.rsa);
|
|
||||||
return pkey->pkey.rsa;
|
|
||||||
}
|
|
||||||
|
|
||||||
EVPerror(EVP_R_EXPECTING_AN_RSA_KEY);
|
if ((rsa = EVP_PKEY_get0_RSA(pkey)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
RSA_up_ref(rsa);
|
||||||
|
|
||||||
|
return rsa;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -482,12 +483,14 @@ EVP_PKEY_get0_DSA(EVP_PKEY *pkey)
|
|||||||
DSA *
|
DSA *
|
||||||
EVP_PKEY_get1_DSA(EVP_PKEY *pkey)
|
EVP_PKEY_get1_DSA(EVP_PKEY *pkey)
|
||||||
{
|
{
|
||||||
if (pkey->type != EVP_PKEY_DSA) {
|
DSA *dsa;
|
||||||
EVPerror(EVP_R_EXPECTING_A_DSA_KEY);
|
|
||||||
|
if ((dsa = EVP_PKEY_get0_DSA(pkey)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
DSA_up_ref(pkey->pkey.dsa);
|
DSA_up_ref(dsa);
|
||||||
return pkey->pkey.dsa;
|
|
||||||
|
return dsa;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -514,12 +517,14 @@ EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
|
|||||||
EC_KEY *
|
EC_KEY *
|
||||||
EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey)
|
EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey)
|
||||||
{
|
{
|
||||||
if (pkey->type != EVP_PKEY_EC) {
|
EC_KEY *key;
|
||||||
EVPerror(EVP_R_EXPECTING_A_EC_KEY);
|
|
||||||
|
if ((key = EVP_PKEY_get0_EC_KEY(pkey)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
EC_KEY_up_ref(pkey->pkey.ec);
|
EC_KEY_up_ref(key);
|
||||||
return pkey->pkey.ec;
|
|
||||||
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -547,12 +552,14 @@ EVP_PKEY_get0_DH(EVP_PKEY *pkey)
|
|||||||
DH *
|
DH *
|
||||||
EVP_PKEY_get1_DH(EVP_PKEY *pkey)
|
EVP_PKEY_get1_DH(EVP_PKEY *pkey)
|
||||||
{
|
{
|
||||||
if (pkey->type != EVP_PKEY_DH) {
|
DH *dh;
|
||||||
EVPerror(EVP_R_EXPECTING_A_DH_KEY);
|
|
||||||
|
if ((dh = EVP_PKEY_get0_DH(pkey)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
DH_up_ref(pkey->pkey.dh);
|
DH_up_ref(dh);
|
||||||
return pkey->pkey.dh;
|
|
||||||
|
return dh;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: BIO_f_base64.3,v 1.14 2023/09/10 11:20:52 schwarze Exp $
|
.\" $OpenBSD: BIO_f_base64.3,v 1.15 2023/09/11 04:00:40 jsg Exp $
|
||||||
.\" OpenSSL fc1d88f0 Wed Jul 2 22:42:40 2014 -0400
|
.\" OpenSSL fc1d88f0 Wed Jul 2 22:42:40 2014 -0400
|
||||||
.\"
|
.\"
|
||||||
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
|
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
|
||||||
@ -49,14 +49,14 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: September 10 2023 $
|
.Dd $Mdocdate: September 11 2023 $
|
||||||
.Dt BIO_F_BASE64 3
|
.Dt BIO_F_BASE64 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm BIO_f_base64
|
.Nm BIO_f_base64
|
||||||
.\" .Nm EVP_ENCODE_LENGTH and
|
.\" .Nm EVP_ENCODE_LENGTH and
|
||||||
.\" .Nm EVP_DECODE_LENGTH are intentionally undocumented
|
.\" .Nm EVP_DECODE_LENGTH are intentionally undocumented
|
||||||
.\" because they are internal implemention details of BIO_f_base64(3)
|
.\" because they are internal implementation details of BIO_f_base64(3)
|
||||||
.\" and practically unused outside evp/bio_b64.c.
|
.\" and practically unused outside evp/bio_b64.c.
|
||||||
.Nd base64 BIO filter
|
.Nd base64 BIO filter
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: x509_addr.c,v 1.88 2023/09/06 15:53:07 job Exp $ */
|
/* $OpenBSD: x509_addr.c,v 1.89 2023/09/11 00:50:47 job Exp $ */
|
||||||
/*
|
/*
|
||||||
* Contributed to the OpenSSL Project by the American Registry for
|
* Contributed to the OpenSSL Project by the American Registry for
|
||||||
* Internet Numbers ("ARIN").
|
* Internet Numbers ("ARIN").
|
||||||
@ -676,10 +676,9 @@ i2r_IPAddrBlocks(const X509V3_EXT_METHOD *method, void *ext, BIO *out,
|
|||||||
{
|
{
|
||||||
const IPAddrBlocks *addr = ext;
|
const IPAddrBlocks *addr = ext;
|
||||||
IPAddressFamily *af;
|
IPAddressFamily *af;
|
||||||
uint16_t afi = 0;
|
uint16_t afi;
|
||||||
uint8_t safi = 0;
|
uint8_t safi;
|
||||||
int safi_is_set = 0;
|
int i, safi_is_set;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < sk_IPAddressFamily_num(addr); i++) {
|
for (i = 0; i < sk_IPAddressFamily_num(addr); i++) {
|
||||||
af = sk_IPAddressFamily_value(addr, i);
|
af = sk_IPAddressFamily_value(addr, i);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: resolver.c,v 1.160 2023/04/18 09:57:51 florian Exp $ */
|
/* $OpenBSD: resolver.c,v 1.161 2023/09/11 06:00:23 florian Exp $ */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -920,6 +920,8 @@ resolve_done(struct uw_resolver *res, void *arg, int rcode,
|
|||||||
uint8_t *p, *data;
|
uint8_t *p, *data;
|
||||||
uint8_t answer_imsg[MAX_IMSGSIZE - IMSG_HEADER_SIZE];
|
uint8_t answer_imsg[MAX_IMSGSIZE - IMSG_HEADER_SIZE];
|
||||||
|
|
||||||
|
log_debug("%s: %d", __func__, rcode);
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &tp);
|
clock_gettime(CLOCK_MONOTONIC, &tp);
|
||||||
|
|
||||||
query_imsg = (struct query_imsg *)arg;
|
query_imsg = (struct query_imsg *)arg;
|
||||||
@ -1074,14 +1076,17 @@ resolve_done(struct uw_resolver *res, void *arg, int rcode,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
servfail:
|
servfail:
|
||||||
|
log_debug("%s: foo: 1", __func__);
|
||||||
/* try_next_resolver() might free rq */
|
/* try_next_resolver() might free rq */
|
||||||
if (try_next_resolver(rq) != 0 && running_res == 0) {
|
if (try_next_resolver(rq) != 0 && running_res == 0) {
|
||||||
/* we are the last one, send SERVFAIL */
|
/* we are the last one, send SERVFAIL */
|
||||||
answer_header->srvfail = 1;
|
answer_header->srvfail = 1;
|
||||||
|
log_debug("%s: foo: 2", __func__);
|
||||||
resolver_imsg_compose_frontend(IMSG_ANSWER, 0,
|
resolver_imsg_compose_frontend(IMSG_ANSWER, 0,
|
||||||
answer_imsg, sizeof(*answer_header));
|
answer_imsg, sizeof(*answer_header));
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
|
log_debug("%s: foo: 3", __func__);
|
||||||
free(query_imsg);
|
free(query_imsg);
|
||||||
sldns_buffer_free(buf);
|
sldns_buffer_free(buf);
|
||||||
regional_destroy(region);
|
regional_destroy(region);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: aplns.4,v 1.1 2021/05/28 04:49:44 dlg Exp $
|
.\" $OpenBSD: aplns.4,v 1.2 2023/09/11 04:21:30 jsg Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2021 David Gwynne <dlg@openbsd.org>
|
.\" Copyright (c) 2021 David Gwynne <dlg@openbsd.org>
|
||||||
.\"
|
.\"
|
||||||
@ -14,19 +14,19 @@
|
|||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: May 28 2021 $
|
.Dd $Mdocdate: September 11 2023 $
|
||||||
.Dt APLNS 4 arm64
|
.Dt APLNS 4 arm64
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm aplns
|
.Nm aplns
|
||||||
.Nd Apple NVME Storage controller
|
.Nd Apple NVMe Storage controller
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Cd "aplns* at fdt?"
|
.Cd "aplns* at fdt?"
|
||||||
.Cd "nvme* at aplns?"
|
.Cd "nvme* at aplns?"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
driver provides support for the NVME Storage controller found on
|
driver provides support for the NVMe Storage controller found on
|
||||||
various Apple SoCs.
|
various Apple SoCs.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr intro 4 ,
|
.Xr intro 4 ,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: ie.4,v 1.16 2008/09/07 06:55:35 jmc Exp $
|
.\" $OpenBSD: ie.4,v 1.17 2023/09/11 04:56:31 jsg Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1994 James A. Jegers
|
.\" Copyright (c) 1994 James A. Jegers
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
@ -22,7 +22,7 @@
|
|||||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: September 7 2008 $
|
.Dd $Mdocdate: September 11 2023 $
|
||||||
.Dt IE 4 i386
|
.Dt IE 4 i386
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -41,7 +41,7 @@ This includes the following network adapters:
|
|||||||
.It 3Com 3C507
|
.It 3Com 3C507
|
||||||
.It AT&T StarLAN 10
|
.It AT&T StarLAN 10
|
||||||
.It AT&T EN100
|
.It AT&T EN100
|
||||||
.It AT&T StarLan Fiber
|
.It AT&T StarLAN Fiber
|
||||||
.It Intel EtherExpress 16
|
.It Intel EtherExpress 16
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: neo.4,v 1.13 2007/05/31 19:19:51 jmc Exp $
|
.\" $OpenBSD: neo.4,v 1.14 2023/09/11 05:07:34 jsg Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1998 Constantine Paul Sapuntzakis
|
.\" Copyright (c) 1998 Constantine Paul Sapuntzakis
|
||||||
.\" All rights reserved
|
.\" All rights reserved
|
||||||
@ -29,7 +29,7 @@
|
|||||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: May 31 2007 $
|
.Dd $Mdocdate: September 11 2023 $
|
||||||
.Dt NEO 4
|
.Dt NEO 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -61,7 +61,7 @@ The
|
|||||||
device driver appeared in
|
device driver appeared in
|
||||||
.Ox 2.7 .
|
.Ox 2.7 .
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
This driver has some bugs because Neomagic refuses to provide documentation,
|
This driver has some bugs because NeoMagic refuses to provide documentation,
|
||||||
even though they are discontinuing their products.
|
even though they are discontinuing their products.
|
||||||
At the time of contact, all persons working at the company were hiding
|
At the time of contact, all persons working at the company were hiding
|
||||||
behind their receptionist as if in a stage of siege.
|
behind their receptionist as if in a stage of siege.
|
||||||
|
@ -36,7 +36,7 @@ umask 007
|
|||||||
|
|
||||||
if [ ! -r version -o ! -s version ]
|
if [ ! -r version -o ! -s version ]
|
||||||
then
|
then
|
||||||
echo 1337 > version
|
echo 0 > version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch version
|
touch version
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ep_eisa.c,v 1.28 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ep_eisa.c,v 1.29 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ep_eisa.c,v 1.13 1997/04/18 00:50:33 cgd Exp $ */
|
/* $NetBSD: if_ep_eisa.c,v 1.13 1997/04/18 00:50:33 cgd Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -41,7 +41,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: rkdrm.c,v 1.16 2023/09/10 06:25:09 jsg Exp $ */
|
/* $OpenBSD: rkdrm.c,v 1.17 2023/09/11 04:51:24 jsg Exp $ */
|
||||||
/* $NetBSD: rk_drm.c,v 1.3 2019/12/15 01:00:58 mrg Exp $ */
|
/* $NetBSD: rk_drm.c,v 1.3 2019/12/15 01:00:58 mrg Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
||||||
@ -47,9 +47,6 @@
|
|||||||
#define RK_DRM_MAX_WIDTH 3840
|
#define RK_DRM_MAX_WIDTH 3840
|
||||||
#define RK_DRM_MAX_HEIGHT 2160
|
#define RK_DRM_MAX_HEIGHT 2160
|
||||||
|
|
||||||
TAILQ_HEAD(, rkdrm_ports) rkdrm_ports =
|
|
||||||
TAILQ_HEAD_INITIALIZER(rkdrm_ports);
|
|
||||||
|
|
||||||
int rkdrm_match(struct device *, void *, void *);
|
int rkdrm_match(struct device *, void *, void *);
|
||||||
void rkdrm_attach(struct device *, struct device *, void *);
|
void rkdrm_attach(struct device *, struct device *, void *);
|
||||||
void rkdrm_attachhook(struct device *);
|
void rkdrm_attachhook(struct device *);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: rkdrm.h,v 1.3 2023/01/01 01:34:33 jsg Exp $ */
|
/* $OpenBSD: rkdrm.h,v 1.4 2023/09/11 04:51:24 jsg Exp $ */
|
||||||
/* $NetBSD: rk_drm.h,v 1.1 2019/11/09 23:30:14 jmcneill Exp $ */
|
/* $NetBSD: rk_drm.h,v 1.1 2019/11/09 23:30:14 jmcneill Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
* Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca>
|
||||||
@ -86,12 +86,6 @@ struct rkdrm_framebuffer {
|
|||||||
struct drm_gem_dma_object *obj;
|
struct drm_gem_dma_object *obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rkdrm_ports {
|
|
||||||
int phandle;
|
|
||||||
struct drm_device *ddev;
|
|
||||||
TAILQ_ENTRY(rkdrm_ports) entries;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct rkdrm_fbdev {
|
struct rkdrm_fbdev {
|
||||||
struct drm_fb_helper helper;
|
struct drm_fb_helper helper;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: aac.c,v 1.95 2023/07/13 07:31:12 jsg Exp $ */
|
/* $OpenBSD: aac.c,v 1.96 2023/09/11 12:10:47 mvs Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000 Michael Smith
|
* Copyright (c) 2000 Michael Smith
|
||||||
@ -53,7 +53,6 @@
|
|||||||
#include <sys/kthread.h>
|
#include <sys/kthread.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/rwlock.h>
|
#include <sys/rwlock.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: aacvar.h,v 1.17 2023/07/13 07:31:12 jsg Exp $ */
|
/* $OpenBSD: aacvar.h,v 1.18 2023/09/11 08:40:25 mvs Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000 Michael Smith
|
* Copyright (c) 2000 Michael Smith
|
||||||
@ -395,7 +395,6 @@ struct aac_softc
|
|||||||
struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
|
struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
|
||||||
int aac_aifq_head;
|
int aac_aifq_head;
|
||||||
int aac_aifq_tail;
|
int aac_aifq_tail;
|
||||||
struct selinfo aac_select;
|
|
||||||
struct proc *aifthread;
|
struct proc *aifthread;
|
||||||
int aifflags;
|
int aifflags;
|
||||||
#define AAC_AIFFLAGS_RUNNING (1 << 0)
|
#define AAC_AIFFLAGS_RUNNING (1 << 0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: com.c,v 1.177 2023/05/23 16:39:29 denis Exp $ */
|
/* $OpenBSD: com.c,v 1.178 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
|
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -65,7 +65,6 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/tty.h>
|
#include <sys/tty.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cy.c,v 1.41 2021/09/01 16:10:39 jan Exp $ */
|
/* $OpenBSD: cy.c,v 1.42 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996 Timo Rossi.
|
* Copyright (c) 1996 Timo Rossi.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -56,7 +56,6 @@
|
|||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/tty.h>
|
#include <sys/tty.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: elink3.c,v 1.99 2023/04/11 00:45:08 jsg Exp $ */
|
/* $OpenBSD: elink3.c,v 1.100 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
|
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -41,7 +41,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ef_isapnp.c,v 1.41 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ef_isapnp.c,v 1.42 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
|
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
|
||||||
@ -35,7 +35,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_eg.c,v 1.51 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_eg.c,v 1.52 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
|
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -47,7 +47,6 @@
|
|||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ep_isa.c,v 1.32 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ep_isa.c,v 1.33 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ep_isa.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
|
/* $NetBSD: if_ep_isa.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -45,7 +45,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ep_isapnp.c,v 1.17 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ep_isapnp.c,v 1.18 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ep_isapnp.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
|
/* $NetBSD: if_ep_isapnp.c,v 1.5 1996/05/12 23:52:36 mycroft Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -45,7 +45,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_lc_isa.c,v 1.14 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_lc_isa.c,v 1.15 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_lc_isa.c,v 1.10 2001/06/13 10:46:03 wiz Exp $ */
|
/* $NetBSD: if_lc_isa.c,v 1.10 2001/06/13 10:46:03 wiz Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -42,7 +42,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ne_isa.c,v 1.18 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ne_isa.c,v 1.19 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ne_isa.c,v 1.6 1998/07/05 06:49:13 jonathan Exp $ */
|
/* $NetBSD: if_ne_isa.c,v 1.6 1998/07/05 06:49:13 jonathan Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -40,7 +40,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ne_isapnp.c,v 1.17 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_ne_isapnp.c,v 1.18 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ne_isapnp.c,v 1.7 1998/07/23 19:30:45 christos Exp $ */
|
/* $NetBSD: if_ne_isapnp.c,v 1.7 1998/07/23 19:30:45 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -40,7 +40,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_sm_isa.c,v 1.16 2022/04/06 18:59:28 naddy Exp $ */
|
/* $OpenBSD: if_sm_isa.c,v 1.17 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_sm_isa.c,v 1.4 1998/07/05 06:49:14 jonathan Exp $ */
|
/* $NetBSD: if_sm_isa.c,v 1.4 1998/07/05 06:49:14 jonathan Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -40,7 +40,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: aac_pci.c,v 1.27 2023/07/13 07:31:12 jsg Exp $ */
|
/* $OpenBSD: aac_pci.c,v 1.28 2023/09/11 08:40:25 mvs Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000 Michael Smith
|
* Copyright (c) 2000 Michael Smith
|
||||||
@ -44,7 +44,6 @@
|
|||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/rwlock.h>
|
#include <sys/rwlock.h>
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auixp.c,v 1.51 2022/10/26 20:19:08 kn Exp $ */
|
/* $OpenBSD: auixp.c,v 1.52 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
|
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -50,7 +50,6 @@
|
|||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/exec.h>
|
#include <sys/exec.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/audioio.h>
|
#include <sys/audioio.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: com_pci.c,v 1.2 2022/04/06 18:59:29 naddy Exp $ */
|
/* $OpenBSD: com_pci.c,v 1.3 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
|
* Copyright (c) 2020 Patrick Wildt <patrick@blueri.se>
|
||||||
*
|
*
|
||||||
@ -18,7 +18,6 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/tty.h>
|
#include <sys/tty.h>
|
||||||
|
|
||||||
#include <dev/pci/pcidevs.h>
|
#include <dev/pci/pcidevs.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: esa.c,v 1.41 2022/10/26 20:19:08 kn Exp $ */
|
/* $OpenBSD: esa.c,v 1.42 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
|
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -50,7 +50,6 @@
|
|||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/exec.h>
|
#include <sys/exec.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/audioio.h>
|
#include <sys/audioio.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ep_pci.c,v 1.36 2022/03/11 18:00:45 mpi Exp $ */
|
/* $OpenBSD: if_ep_pci.c,v 1.37 2023/09/11 08:41:26 mvs Exp $ */
|
||||||
/* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */
|
/* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -41,7 +41,6 @@
|
|||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: aic_pcmcia.c,v 1.19 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: aic_pcmcia.c,v 1.20 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: aic_pcmcia.c,v 1.6 1998/07/19 17:28:15 christos Exp $ */
|
/* $NetBSD: aic_pcmcia.c,v 1.6 1998/07/19 17:28:15 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: com_pcmcia.c,v 1.59 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: com_pcmcia.c,v 1.60 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */
|
/* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -91,7 +91,6 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/tty.h>
|
#include <sys/tty.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ep_pcmcia.c,v 1.50 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: if_ep_pcmcia.c,v 1.51 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: if_ep_pcmcia.c,v 1.16 1998/08/17 23:20:40 thorpej Exp $ */
|
/* $NetBSD: if_ep_pcmcia.c,v 1.16 1998/08/17 23:20:40 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -69,7 +69,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_ne_pcmcia.c,v 1.101 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: if_ne_pcmcia.c,v 1.102 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: if_ne_pcmcia.c,v 1.17 1998/08/15 19:00:04 thorpej Exp $ */
|
/* $NetBSD: if_ne_pcmcia.c,v 1.17 1998/08/15 19:00:04 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: if_sm_pcmcia.c,v 1.39 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: if_sm_pcmcia.c,v 1.40 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */
|
/* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -40,7 +40,6 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/timeout.h>
|
#include <sys/timeout.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: com_puc.c,v 1.27 2022/04/06 18:59:30 naddy Exp $ */
|
/* $OpenBSD: com_puc.c,v 1.28 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997 - 1999, Jason Downs. All rights reserved.
|
* Copyright (c) 1997 - 1999, Jason Downs. All rights reserved.
|
||||||
@ -31,7 +31,6 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/tty.h>
|
#include <sys/tty.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: usb_subr.c,v 1.158 2022/02/16 06:23:42 anton Exp $ */
|
/* $OpenBSD: usb_subr.c,v 1.159 2023/09/11 08:41:27 mvs Exp $ */
|
||||||
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
|
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
|
||||||
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
|
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
|
||||||
|
|
||||||
@ -37,7 +37,6 @@
|
|||||||
#include <sys/kernel.h>
|
#include <sys/kernel.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/selinfo.h>
|
|
||||||
#include <sys/rwlock.h>
|
#include <sys/rwlock.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: scp.c,v 1.258 2023/09/08 05:56:13 djm Exp $ */
|
/* $OpenBSD: scp.c,v 1.259 2023/09/10 23:12:32 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* scp - secure remote copy. This is basically patched BSD rcp which
|
* scp - secure remote copy. This is basically patched BSD rcp which
|
||||||
* uses ssh to do the data transfer (instead of using rcmd).
|
* uses ssh to do the data transfer (instead of using rcmd).
|
||||||
@ -158,7 +158,7 @@ size_t sftp_nrequests;
|
|||||||
/* Needed for sftp */
|
/* Needed for sftp */
|
||||||
volatile sig_atomic_t interrupted = 0;
|
volatile sig_atomic_t interrupted = 0;
|
||||||
|
|
||||||
int remote_glob(struct sftp_conn *, const char *, int,
|
int sftp_glob(struct sftp_conn *, const char *, int,
|
||||||
int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */
|
int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1507,7 +1507,7 @@ sink_sftp(int argc, char *dst, const char *src, struct sftp_conn *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
debug3_f("copying remote %s to local %s", abs_src, dst);
|
debug3_f("copying remote %s to local %s", abs_src, dst);
|
||||||
if ((r = remote_glob(conn, abs_src, GLOB_NOCHECK|GLOB_MARK,
|
if ((r = sftp_glob(conn, abs_src, GLOB_NOCHECK|GLOB_MARK,
|
||||||
NULL, &g)) != 0) {
|
NULL, &g)) != 0) {
|
||||||
if (r == GLOB_NOSPACE)
|
if (r == GLOB_NOSPACE)
|
||||||
error("%s: too many glob matches", src);
|
error("%s: too many glob matches", src);
|
||||||
@ -1932,7 +1932,7 @@ throughlocal_sftp(struct sftp_conn *from, struct sftp_conn *to,
|
|||||||
}
|
}
|
||||||
|
|
||||||
debug3_f("copying remote %s to remote %s", abs_src, target);
|
debug3_f("copying remote %s to remote %s", abs_src, target);
|
||||||
if ((r = remote_glob(from, abs_src, GLOB_NOCHECK|GLOB_MARK,
|
if ((r = sftp_glob(from, abs_src, GLOB_NOCHECK|GLOB_MARK,
|
||||||
NULL, &g)) != 0) {
|
NULL, &g)) != 0) {
|
||||||
if (r == GLOB_NOSPACE)
|
if (r == GLOB_NOSPACE)
|
||||||
error("%s: too many glob matches", src);
|
error("%s: too many glob matches", src);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sftp-glob.c,v 1.32 2023/09/08 05:56:13 djm Exp $ */
|
/* $OpenBSD: sftp-glob.c,v 1.33 2023/09/10 23:12:32 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -29,7 +29,7 @@
|
|||||||
#include "sftp-common.h"
|
#include "sftp-common.h"
|
||||||
#include "sftp-client.h"
|
#include "sftp-client.h"
|
||||||
|
|
||||||
int remote_glob(struct sftp_conn *, const char *, int,
|
int sftp_glob(struct sftp_conn *, const char *, int,
|
||||||
int (*)(const char *, int), glob_t *);
|
int (*)(const char *, int), glob_t *);
|
||||||
|
|
||||||
struct SFTP_OPENDIR {
|
struct SFTP_OPENDIR {
|
||||||
@ -107,7 +107,7 @@ fudge_stat(const char *path, struct stat *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
remote_glob(struct sftp_conn *conn, const char *pattern, int flags,
|
sftp_glob(struct sftp_conn *conn, const char *pattern, int flags,
|
||||||
int (*errfunc)(const char *, int), glob_t *pglob)
|
int (*errfunc)(const char *, int), glob_t *pglob)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sftp.c,v 1.235 2023/09/08 05:56:13 djm Exp $ */
|
/* $OpenBSD: sftp.c,v 1.236 2023/09/10 23:12:32 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -91,7 +91,7 @@ struct complete_ctx {
|
|||||||
char **remote_pathp;
|
char **remote_pathp;
|
||||||
};
|
};
|
||||||
|
|
||||||
int remote_glob(struct sftp_conn *, const char *, int,
|
int sftp_glob(struct sftp_conn *, const char *, int,
|
||||||
int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */
|
int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */
|
||||||
|
|
||||||
/* Separators for interactive commands */
|
/* Separators for interactive commands */
|
||||||
@ -634,7 +634,7 @@ process_get(struct sftp_conn *conn, const char *src, const char *dst,
|
|||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
|
|
||||||
debug3("Looking up %s", abs_src);
|
debug3("Looking up %s", abs_src);
|
||||||
if ((r = remote_glob(conn, abs_src, GLOB_MARK, NULL, &g)) != 0) {
|
if ((r = sftp_glob(conn, abs_src, GLOB_MARK, NULL, &g)) != 0) {
|
||||||
if (r == GLOB_NOSPACE) {
|
if (r == GLOB_NOSPACE) {
|
||||||
error("Too many matches for \"%s\".", abs_src);
|
error("Too many matches for \"%s\".", abs_src);
|
||||||
} else {
|
} else {
|
||||||
@ -950,7 +950,7 @@ do_globbed_ls(struct sftp_conn *conn, const char *path,
|
|||||||
|
|
||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
|
|
||||||
if ((r = remote_glob(conn, path,
|
if ((r = sftp_glob(conn, path,
|
||||||
GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT|GLOB_NOSORT,
|
GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT|GLOB_NOSORT,
|
||||||
NULL, &g)) != 0 ||
|
NULL, &g)) != 0 ||
|
||||||
(g.gl_pathc && !g.gl_matchc)) {
|
(g.gl_pathc && !g.gl_matchc)) {
|
||||||
@ -1591,7 +1591,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
|
|||||||
break;
|
break;
|
||||||
case I_RM:
|
case I_RM:
|
||||||
path1 = make_absolute_pwd_glob(path1, *pwd);
|
path1 = make_absolute_pwd_glob(path1, *pwd);
|
||||||
remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
sftp_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
||||||
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
mprintf("Removing %s\n", g.gl_pathv[i]);
|
mprintf("Removing %s\n", g.gl_pathv[i]);
|
||||||
@ -1695,7 +1695,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
|
|||||||
attrib_clear(&a);
|
attrib_clear(&a);
|
||||||
a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS;
|
a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS;
|
||||||
a.perm = n_arg;
|
a.perm = n_arg;
|
||||||
remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
sftp_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
||||||
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
mprintf("Changing mode on %s\n",
|
mprintf("Changing mode on %s\n",
|
||||||
@ -1709,7 +1709,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
|
|||||||
case I_CHOWN:
|
case I_CHOWN:
|
||||||
case I_CHGRP:
|
case I_CHGRP:
|
||||||
path1 = make_absolute_pwd_glob(path1, *pwd);
|
path1 = make_absolute_pwd_glob(path1, *pwd);
|
||||||
remote_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
sftp_glob(conn, path1, GLOB_NOCHECK, NULL, &g);
|
||||||
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
|
||||||
if ((hflag ? sftp_lstat : sftp_stat)(conn,
|
if ((hflag ? sftp_lstat : sftp_stat)(conn,
|
||||||
g.gl_pathv[i], 0, &aa) != 0) {
|
g.gl_pathv[i], 0, &aa) != 0) {
|
||||||
@ -1989,7 +1989,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
|
|||||||
memset(&g, 0, sizeof(g));
|
memset(&g, 0, sizeof(g));
|
||||||
if (remote != LOCAL) {
|
if (remote != LOCAL) {
|
||||||
tmp = make_absolute_pwd_glob(tmp, remote_path);
|
tmp = make_absolute_pwd_glob(tmp, remote_path);
|
||||||
remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
|
sftp_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
|
||||||
} else
|
} else
|
||||||
(void)glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
|
(void)glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: l2tp_subr.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */
|
/* $OpenBSD: l2tp_subr.c,v 1.5 2023/09/11 07:33:07 yasuoka Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2009 Internet Initiative Japan Inc.
|
* Copyright (c) 2009 Internet Initiative Japan Inc.
|
||||||
@ -25,7 +25,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* $Id: l2tp_subr.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */
|
/* $Id: l2tp_subr.c,v 1.5 2023/09/11 07:33:07 yasuoka Exp $ */
|
||||||
/**@file L2TP related sub-routines */
|
/**@file L2TP related sub-routines */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -80,10 +80,10 @@ avp_enum(struct l2tp_avp *avp, const u_char *pkt, int pktlen, int filldata)
|
|||||||
avp->attr_type |= *(pkt + 1);
|
avp->attr_type |= *(pkt + 1);
|
||||||
pkt += 2;
|
pkt += 2;
|
||||||
|
|
||||||
if (avp->length > pktlen)
|
if (avp->length < 6 || avp->length > pktlen)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (filldata != 0)
|
if (avp->length > 6 && filldata != 0)
|
||||||
memcpy(avp->attr_value, pkt, avp->length - 6);
|
memcpy(avp->attr_value, pkt, avp->length - 6);
|
||||||
|
|
||||||
return avp->length;
|
return avp->length;
|
||||||
@ -285,9 +285,8 @@ avp_find(struct l2tp_avp *avp, const u_char *pkt, int pktlen,
|
|||||||
|
|
||||||
while (pktlen >= 6 &&
|
while (pktlen >= 6 &&
|
||||||
(avpsz = avp_enum(avp, pkt, pktlen, fill_data)) > 0) {
|
(avpsz = avp_enum(avp, pkt, pktlen, fill_data)) > 0) {
|
||||||
|
L2TP_SUBR_ASSERT(avpsz >= 6);
|
||||||
if (avp->vendor_id != vendor_id || avp->attr_type != attr_type) {
|
if (avp->vendor_id != vendor_id || avp->attr_type != attr_type) {
|
||||||
if (avpsz < 6)
|
|
||||||
return NULL;
|
|
||||||
pkt += avpsz;
|
pkt += avpsz;
|
||||||
pktlen -= avpsz;
|
pktlen -= avpsz;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
8 September 2023: Wouter
|
||||||
|
- Fix send of udp retries when ENOBUFS is returned. It stops looping
|
||||||
|
and also waits for the condition to go away. Reported by Florian
|
||||||
|
Obser.
|
||||||
|
|
||||||
25 August 2023: Wouter
|
25 August 2023: Wouter
|
||||||
- Fix compile error on NetBSD in util/netevent.h.
|
- Fix compile error on NetBSD in util/netevent.h.
|
||||||
|
|
||||||
|
@ -116,6 +116,8 @@
|
|||||||
|
|
||||||
/** timeout in millisec to wait for write to unblock, packets dropped after.*/
|
/** timeout in millisec to wait for write to unblock, packets dropped after.*/
|
||||||
#define SEND_BLOCKED_WAIT_TIMEOUT 200
|
#define SEND_BLOCKED_WAIT_TIMEOUT 200
|
||||||
|
/** max number of times to wait for write to unblock, packets dropped after.*/
|
||||||
|
#define SEND_BLOCKED_MAX_RETRY 5
|
||||||
|
|
||||||
/** Let's make timestamping code cleaner and redefine SO_TIMESTAMP* */
|
/** Let's make timestamping code cleaner and redefine SO_TIMESTAMP* */
|
||||||
#ifndef SO_TIMESTAMP
|
#ifndef SO_TIMESTAMP
|
||||||
@ -402,9 +404,10 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
|
|||||||
WSAGetLastError() == WSAENOBUFS ||
|
WSAGetLastError() == WSAENOBUFS ||
|
||||||
WSAGetLastError() == WSAEWOULDBLOCK) {
|
WSAGetLastError() == WSAEWOULDBLOCK) {
|
||||||
#endif
|
#endif
|
||||||
|
int retries = 0;
|
||||||
/* if we set the fd blocking, other threads suddenly
|
/* if we set the fd blocking, other threads suddenly
|
||||||
* have a blocking fd that they operate on */
|
* have a blocking fd that they operate on */
|
||||||
while(sent == -1 && (
|
while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && (
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
errno == EAGAIN || errno == EINTR ||
|
errno == EAGAIN || errno == EINTR ||
|
||||||
# ifdef EWOULDBLOCK
|
# ifdef EWOULDBLOCK
|
||||||
@ -419,6 +422,13 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
|
|||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
#if defined(HAVE_POLL) || defined(USE_WINSOCK)
|
#if defined(HAVE_POLL) || defined(USE_WINSOCK)
|
||||||
|
int send_nobufs = (
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno == ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() == WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
);
|
||||||
struct pollfd p;
|
struct pollfd p;
|
||||||
int pret;
|
int pret;
|
||||||
memset(&p, 0, sizeof(p));
|
memset(&p, 0, sizeof(p));
|
||||||
@ -457,8 +467,48 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
|
|||||||
log_err("poll udp out failed: %s",
|
log_err("poll udp out failed: %s",
|
||||||
sock_strerror(errno));
|
sock_strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if((pret < 0 &&
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno == ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() == WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
) || (send_nobufs && retries > 0)) {
|
||||||
|
/* ENOBUFS, and poll returned without
|
||||||
|
* a timeout. Or the retried send call
|
||||||
|
* returned ENOBUFS. It is good to
|
||||||
|
* wait a bit for the error to clear. */
|
||||||
|
/* The timeout is 20*(2^(retries+1)),
|
||||||
|
* it increases exponentially, starting
|
||||||
|
* at 40 msec. After 5 tries, 1240 msec
|
||||||
|
* have passed in total, when poll
|
||||||
|
* returned the error, and 1200 msec
|
||||||
|
* when send returned the errors. */
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
|
||||||
|
#else
|
||||||
|
pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
|
||||||
|
#endif
|
||||||
|
if(pret < 0 &&
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno != EAGAIN && errno != EINTR &&
|
||||||
|
# ifdef EWOULDBLOCK
|
||||||
|
errno != EWOULDBLOCK &&
|
||||||
|
# endif
|
||||||
|
errno != ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() != WSAEINPROGRESS &&
|
||||||
|
WSAGetLastError() != WSAEINTR &&
|
||||||
|
WSAGetLastError() != WSAENOBUFS &&
|
||||||
|
WSAGetLastError() != WSAEWOULDBLOCK
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
log_err("poll udp out timer failed: %s",
|
||||||
|
sock_strerror(errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */
|
#endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */
|
||||||
|
retries++;
|
||||||
if (!is_connected) {
|
if (!is_connected) {
|
||||||
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
|
sent = sendto(c->fd, (void*)sldns_buffer_begin(packet),
|
||||||
sldns_buffer_remaining(packet), 0,
|
sldns_buffer_remaining(packet), 0,
|
||||||
@ -665,7 +715,8 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
|
|||||||
WSAGetLastError() == WSAENOBUFS ||
|
WSAGetLastError() == WSAENOBUFS ||
|
||||||
WSAGetLastError() == WSAEWOULDBLOCK) {
|
WSAGetLastError() == WSAEWOULDBLOCK) {
|
||||||
#endif
|
#endif
|
||||||
while(sent == -1 && (
|
int retries = 0;
|
||||||
|
while(sent == -1 && retries < SEND_BLOCKED_MAX_RETRY && (
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
errno == EAGAIN || errno == EINTR ||
|
errno == EAGAIN || errno == EINTR ||
|
||||||
# ifdef EWOULDBLOCK
|
# ifdef EWOULDBLOCK
|
||||||
@ -680,6 +731,13 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
|
|||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
#if defined(HAVE_POLL) || defined(USE_WINSOCK)
|
#if defined(HAVE_POLL) || defined(USE_WINSOCK)
|
||||||
|
int send_nobufs = (
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno == ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() == WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
);
|
||||||
struct pollfd p;
|
struct pollfd p;
|
||||||
int pret;
|
int pret;
|
||||||
memset(&p, 0, sizeof(p));
|
memset(&p, 0, sizeof(p));
|
||||||
@ -718,8 +776,48 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
|
|||||||
log_err("poll udp out failed: %s",
|
log_err("poll udp out failed: %s",
|
||||||
sock_strerror(errno));
|
sock_strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if((pret < 0 &&
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno == ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() == WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
) || (send_nobufs && retries > 0)) {
|
||||||
|
/* ENOBUFS, and poll returned without
|
||||||
|
* a timeout. Or the retried send call
|
||||||
|
* returned ENOBUFS. It is good to
|
||||||
|
* wait a bit for the error to clear. */
|
||||||
|
/* The timeout is 20*(2^(retries+1)),
|
||||||
|
* it increases exponentially, starting
|
||||||
|
* at 40 msec. After 5 tries, 1240 msec
|
||||||
|
* have passed in total, when poll
|
||||||
|
* returned the error, and 1200 msec
|
||||||
|
* when send returned the errors. */
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
pret = poll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
|
||||||
|
#else
|
||||||
|
pret = WSAPoll(NULL, 0, (SEND_BLOCKED_WAIT_TIMEOUT/10)<<(retries+1));
|
||||||
|
#endif
|
||||||
|
if(pret < 0 &&
|
||||||
|
#ifndef USE_WINSOCK
|
||||||
|
errno != EAGAIN && errno != EINTR &&
|
||||||
|
# ifdef EWOULDBLOCK
|
||||||
|
errno != EWOULDBLOCK &&
|
||||||
|
# endif
|
||||||
|
errno != ENOBUFS
|
||||||
|
#else
|
||||||
|
WSAGetLastError() != WSAEINPROGRESS &&
|
||||||
|
WSAGetLastError() != WSAEINTR &&
|
||||||
|
WSAGetLastError() != WSAENOBUFS &&
|
||||||
|
WSAGetLastError() != WSAEWOULDBLOCK
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
log_err("poll udp out timer failed: %s",
|
||||||
|
sock_strerror(errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */
|
#endif /* defined(HAVE_POLL) || defined(USE_WINSOCK) */
|
||||||
|
retries++;
|
||||||
sent = sendmsg(c->fd, &msg, 0);
|
sent = sendmsg(c->fd, &msg, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user