Commit 5d2801a9 authored by Jason Madden's avatar Jason Madden

Update libev to 4.31

Fixes #1504
parent a67a39f4
...@@ -14,6 +14,11 @@ Platform and Packaging Updates ...@@ -14,6 +14,11 @@ Platform and Packaging Updates
3.7.6 and 3.8.1. It is also tested with PyPy2 7.3 and PyPy 3.6 3.7.6 and 3.8.1. It is also tested with PyPy2 7.3 and PyPy 3.6
7.3. 7.3.
Library and Dependency Updates
------------------------------
- Upgrade libev from 4.25 to 4.31 and update its embedded
``config.guess`` to the latest.
1.5a3 (2020-01-01) 1.5a3 (2020-01-01)
================== ==================
......
Revision history for libev, a high-performance and full-featured event loop. Revision history for libev, a high-performance and full-featured event loop.
TODO: revisit 59.x timer in the light of modern powersaving
TODO: document EV_TSTAMP_T
4.31 Fri Dec 20 21:58:29 CET 2019
- handle backends with minimum wait time a bit better by not
waiting in the presence of already-expired timers
(behaviour reported by Felipe Gasper).
- new feature: use timerfd to detect timejumps quickly,
can be disabled with the new EVFLAG_NOTIMERFD loop flag.
- document EV_USE_SIGNALFD feature macro.
4.30 (EV only)
- change non-autoconf test for __kernel_rwf_t by testing
LINUX_VERSION_CODE, the most direct test I could find.
- fix a bug in the io_uring backend that polled the wrong
backend fd, causing it to not work in many cases.
4.29 (EV only)
- add io uring autoconf and non-autoconf detection.
- disable io_uring when some header files are too old.
4.28 (EV only)
- linuxaio backend resulted in random memory corruption
when loop is forked.
- linuxaio backend might have tried to cancel an iocb
multiple times (was unable to trigger this).
- linuxaio backend now employs a generation counter to
avoid handling spurious events from cancelled requests.
- io_cancel can return EINTR, deal with it. also, assume
io_submit also returns EINTR.
- fix some other minor bugs in linuxaio backend.
- ev_tstamp type can now be overriden by defining EV_TSTAMP_T.
- cleanup: replace expect_true/false and noinline by their
libecb counterparts.
- move syscall infrastructure from ev_linuxaio.c to ev.c.
- prepare io_uring integration.
- tweak ev_floor.
- epoll, poll, win32 Sleep and other places that use millisecond
reslution now all try to round up times.
- solaris port backend didn't compile.
- abstract time constants into their macros, for more flexibility.
4.27 Thu Jun 27 22:43:44 CEST 2019
- linux aio backend almost completely rewritten to work around its
limitations.
- linux aio backend now requires linux 4.19+.
- epoll backend now mandatory for linux aio backend.
- fail assertions more aggressively on invalid fd's detected
in the event loop, do not just silently fd_kill in case of
user error.
- ev_io_start/ev_io_stop now verify the watcher fd using
a syscall when EV_VERIFY is 2 or higher.
4.26 (EV only)
- update to libecb 0x00010006.
- new experimental linux aio backend (linux 4.18+).
- removed redundant 0-ptr check in ev_once.
- updated/extended ev_set_allocator documentation.
- replaced EMPTY2 macro by array_needsize_noinit.
- minor code cleanups.
- epoll backend now uses epoll_create1 also after fork.
4.25 Fri Dec 21 07:49:20 CET 2018 4.25 Fri Dec 21 07:49:20 CET 2018
- INCOMPATIBLE CHANGE: EV_THROW was renamed to EV_NOEXCEPT - INCOMPATIBLE CHANGE: EV_THROW was renamed to EV_NOEXCEPT
(EV_THROW sitll provided) and now uses noexcept on C++11 or newer. (EV_THROW still provided) and now uses noexcept on C++11 or newer.
- move the darwin select workaround highe rin ev.c, as newer versions of - move the darwin select workaround higher in ev.c, as newer versions of
darwin managed to break their broken select even more. darwin managed to break their broken select even more.
- ANDROID => __ANDROID__ (reported by enh@google.com). - ANDROID => __ANDROID__ (reported by enh@google.com).
- disable epoll_create1 on android because it has broken header files - disable epoll_create1 on android because it has broken header files
......
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -157,7 +157,8 @@ am__v_at_0 = @ ...@@ -157,7 +157,8 @@ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/ev.Plo ./$(DEPDIR)/event.Plo
am__mv = mv -f am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
...@@ -351,7 +352,8 @@ AUTOMAKE_OPTIONS = foreign ...@@ -351,7 +352,8 @@ AUTOMAKE_OPTIONS = foreign
VERSION_INFO = 4:0:0 VERSION_INFO = 4:0:0
EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
ev_vars.h ev_wrap.h \ ev_vars.h ev_wrap.h \
ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_linuxaio.c ev_iouring.c \
ev_win32.c \
ev.3 ev.pod Symbols.ev Symbols.event ev.3 ev.pod Symbols.ev Symbols.event
man_MANS = ev.3 man_MANS = ev.3
...@@ -385,8 +387,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ...@@ -385,8 +387,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \ echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \ $(SHELL) ./config.status;; \
*) \ *) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac; esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
...@@ -457,8 +459,14 @@ mostlyclean-compile: ...@@ -457,8 +459,14 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
...@@ -613,7 +621,10 @@ distclean-tags: ...@@ -613,7 +621,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES) distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)" test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
...@@ -653,7 +664,7 @@ distdir: $(DISTFILES) ...@@ -653,7 +664,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
...@@ -679,7 +690,7 @@ dist-shar: distdir ...@@ -679,7 +690,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \ @echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2 "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
...@@ -697,7 +708,7 @@ dist dist-all: ...@@ -697,7 +708,7 @@ dist dist-all:
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \ *.tar.lz*) \
...@@ -707,7 +718,7 @@ distcheck: dist ...@@ -707,7 +718,7 @@ distcheck: dist
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac
...@@ -820,7 +831,8 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ ...@@ -820,7 +831,8 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
distclean: distclean-am distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR) -rm -f ./$(DEPDIR)/ev.Plo
-rm -f ./$(DEPDIR)/event.Plo
-rm -f Makefile -rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags distclean-hdr distclean-libtool distclean-tags
...@@ -868,7 +880,8 @@ installcheck-am: ...@@ -868,7 +880,8 @@ installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache -rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR) -rm -f ./$(DEPDIR)/ev.Plo
-rm -f ./$(DEPDIR)/event.Plo
-rm -f Makefile -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
...@@ -892,24 +905,24 @@ uninstall-man: uninstall-man3 ...@@ -892,24 +905,24 @@ uninstall-man: uninstall-man3
.MAKE: all install-am install-strip .MAKE: all install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ check-am clean clean-cscope clean-generic clean-libLTLIBRARIES \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
distcheck distclean distclean-compile distclean-generic \ dist-xz dist-zip distcheck distclean distclean-compile \
distclean-hdr distclean-libtool distclean-tags distcleancheck \ distclean-generic distclean-hdr distclean-libtool \
distdir distuninstallcheck dvi dvi-am html html-am info \ distclean-tags distcleancheck distdir distuninstallcheck dvi \
info-am install install-am install-data install-data-am \ dvi-am html html-am info info-am install install-am \
install-dvi install-dvi-am install-exec install-exec-am \ install-data install-data-am install-dvi install-dvi-am \
install-html install-html-am install-includeHEADERS \ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \ install-includeHEADERS install-info install-info-am \
install-man install-man3 install-pdf install-pdf-am install-ps \ install-libLTLIBRARIES install-man install-man3 install-pdf \
install-ps-am install-strip installcheck installcheck-am \ install-pdf-am install-ps install-ps-am install-strip \
installdirs maintainer-clean maintainer-clean-generic \ installcheck installcheck-am installdirs maintainer-clean \
mostlyclean mostlyclean-compile mostlyclean-generic \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
uninstall-man uninstall-man3 uninstall-libLTLIBRARIES uninstall-man uninstall-man3
.PRECIOUS: Makefile .PRECIOUS: Makefile
......
...@@ -18,7 +18,8 @@ ABOUT ...@@ -18,7 +18,8 @@ ABOUT
- extensive and detailed, readable documentation (not doxygen garbage). - extensive and detailed, readable documentation (not doxygen garbage).
- fully supports fork, can detect fork in various ways and automatically - fully supports fork, can detect fork in various ways and automatically
re-arms kernel mechanisms that do not support fork. re-arms kernel mechanisms that do not support fork.
- highly optimised select, poll, epoll, kqueue and event ports backends. - highly optimised select, poll, linux epoll, linux aio, bsd kqueue
and solaris event ports backends.
- filesystem object (path) watching (with optional linux inotify support). - filesystem object (path) watching (with optional linux inotify support).
- wallclock-based times (using absolute time, cron-like). - wallclock-based times (using absolute time, cron-like).
- relative timers/timeouts (handle time jumps). - relative timers/timeouts (handle time jumps).
......
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc. # Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2019-03-04' timestamp='2020-01-01'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
...@@ -50,7 +50,7 @@ version="\ ...@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright 1992-2019 Free Software Foundation, Inc. Copyright 1992-2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -99,6 +99,8 @@ tmp= ...@@ -99,6 +99,8 @@ tmp=
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
set_cc_for_build() { set_cc_for_build() {
# prevent multiple calls if $tmp is already set
test "$tmp" && return 0
: "${TMPDIR=/tmp}" : "${TMPDIR=/tmp}"
# shellcheck disable=SC2039 # shellcheck disable=SC2039
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
...@@ -262,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ...@@ -262,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:SolidBSD:*:*) *:SolidBSD:*:*)
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;; exit ;;
*:OS108:*:*)
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*) macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd"$UNAME_RELEASE" echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;; exit ;;
...@@ -271,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ...@@ -271,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:Sortix:*:*) *:Sortix:*:*)
echo "$UNAME_MACHINE"-unknown-sortix echo "$UNAME_MACHINE"-unknown-sortix
exit ;; exit ;;
*:Twizzler:*:*)
echo "$UNAME_MACHINE"-unknown-twizzler
exit ;;
*:Redox:*:*) *:Redox:*:*)
echo "$UNAME_MACHINE"-unknown-redox echo "$UNAME_MACHINE"-unknown-redox
exit ;; exit ;;
mips:OSF1:*.*) mips:OSF1:*.*)
echo mips-dec-osf1 echo mips-dec-osf1
exit ;; exit ;;
alpha:OSF1:*:*) alpha:OSF1:*:*)
case $UNAME_RELEASE in case $UNAME_RELEASE in
*4.0) *4.0)
...@@ -918,7 +926,7 @@ EOF ...@@ -918,7 +926,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;; exit ;;
alpha:Linux:*:*) alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
EV5) UNAME_MACHINE=alphaev5 ;; EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;; EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;; PCA56) UNAME_MACHINE=alphapca56 ;;
...@@ -1325,38 +1333,39 @@ EOF ...@@ -1325,38 +1333,39 @@ EOF
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;; exit ;;
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p`
set_cc_for_build case $UNAME_PROCESSOR in
if test "$UNAME_PROCESSOR" = unknown ; then unknown) UNAME_PROCESSOR=powerpc ;;
UNAME_PROCESSOR=powerpc esac
if command -v xcode-select > /dev/null 2> /dev/null && \
! xcode-select --print-path > /dev/null 2> /dev/null ; then
# Avoid executing cc if there is no toolchain installed as
# cc will be a stub that puts up a graphical alert
# prompting the user to install developer tools.
CC_FOR_BUILD=no_compiler_found
else
set_cc_for_build
fi fi
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null
grep IS_64BIT_ARCH >/dev/null then
then case $UNAME_PROCESSOR in
case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;;
i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;; esac
esac fi
fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null
grep IS_PPC >/dev/null then
then UNAME_PROCESSOR=powerpc
UNAME_PROCESSOR=powerpc
fi
fi fi
elif test "$UNAME_PROCESSOR" = i386 ; then elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub # uname -m returns i386 or x86_64
# that puts up a graphical alert prompting to install UNAME_PROCESSOR=$UNAME_MACHINE
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi fi
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;; exit ;;
...@@ -1468,6 +1477,14 @@ cat > "$dummy.c" <<EOF ...@@ -1468,6 +1477,14 @@ cat > "$dummy.c" <<EOF
#include <sys/types.h> #include <sys/types.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#endif #endif
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
#include <signal.h>
#if defined(_SIZE_T_) || defined(SIGLOST)
#include <sys/utsname.h>
#endif
#endif
#endif
main () main ()
{ {
#if defined (sony) #if defined (sony)
...@@ -1554,19 +1571,24 @@ main () ...@@ -1554,19 +1571,24 @@ main ()
#else #else
printf ("vax-dec-bsd\n"); exit (0); printf ("vax-dec-bsd\n"); exit (0);
#endif #endif
#else
#if defined(_SIZE_T_) || defined(SIGLOST)
struct utsname un;
uname (&un);
printf ("vax-dec-ultrix%s\n", un.release); exit (0);
#else #else
printf ("vax-dec-ultrix\n"); exit (0); printf ("vax-dec-ultrix\n"); exit (0);
#endif #endif
#endif #endif
#endif
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
#include <signal.h> #if defined(_SIZE_T_) || defined(SIGLOST)
#if defined(_SIZE_T_) /* >= ULTRIX4 */ struct utsname *un;
printf ("mips-dec-ultrix4\n"); exit (0); uname (&un);
printf ("mips-dec-ultrix%s\n", un.release); exit (0);
#else #else
#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST) printf ("mips-dec-ultrix\n"); exit (0);
printf ("mips-dec-ultrix3\n"); exit (0);
#endif
#endif #endif
#endif #endif
#endif #endif
......
...@@ -24,12 +24,21 @@ ...@@ -24,12 +24,21 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if linux/fs.h defined kernel_rwf_t */
#undef HAVE_KERNEL_RWF_T
/* Define to 1 if you have the `kqueue' function. */ /* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE #undef HAVE_KQUEUE
/* Define to 1 if you have the `rt' library (-lrt). */ /* Define to 1 if you have the `rt' library (-lrt). */
#undef HAVE_LIBRT #undef HAVE_LIBRT
/* Define to 1 if you have the <linux/aio_abi.h> header file. */
#undef HAVE_LINUX_AIO_ABI_H
/* Define to 1 if you have the <linux/fs.h> header file. */
#undef HAVE_LINUX_FS_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
...@@ -87,6 +96,9 @@ ...@@ -87,6 +96,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/timerfd.h> header file. */
#undef HAVE_SYS_TIMERFD_H
/* Define to 1 if you have the <sys/types.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #undef HAVE_SYS_TYPES_H
......
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2019 Free Software Foundation, Inc. # Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2019-01-05' timestamp='2020-01-01'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
...@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>." ...@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2019 Free Software Foundation, Inc. Copyright 1992-2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -337,17 +337,14 @@ case $1 in ...@@ -337,17 +337,14 @@ case $1 in
basic_machine=m88k-harris basic_machine=m88k-harris
os=sysv3 os=sysv3
;; ;;
hp300) hp300 | hp300hpux)
basic_machine=m68k-hp basic_machine=m68k-hp
os=hpux
;; ;;
hp300bsd) hp300bsd)
basic_machine=m68k-hp basic_machine=m68k-hp
os=bsd os=bsd
;; ;;
hp300hpux)
basic_machine=m68k-hp
os=hpux
;;
hppaosf) hppaosf)
basic_machine=hppa1.1-hp basic_machine=hppa1.1-hp
os=osf os=osf
...@@ -360,10 +357,6 @@ case $1 in ...@@ -360,10 +357,6 @@ case $1 in
basic_machine=i386-mach basic_machine=i386-mach
os=mach os=mach
;; ;;
vsta)
basic_machine=i386-pc
os=vsta
;;
isi68 | isi) isi68 | isi)
basic_machine=m68k-isi basic_machine=m68k-isi
os=sysv os=sysv
...@@ -612,6 +605,10 @@ case $1 in ...@@ -612,6 +605,10 @@ case $1 in
basic_machine=vax-dec basic_machine=vax-dec
os=vms os=vms
;; ;;
vsta)
basic_machine=i386-pc
os=vsta
;;
vxworks960) vxworks960)
basic_machine=i960-wrs basic_machine=i960-wrs
os=vxworks os=vxworks
...@@ -1172,7 +1169,7 @@ case $cpu-$vendor in ...@@ -1172,7 +1169,7 @@ case $cpu-$vendor in
| asmjs \ | asmjs \
| ba \ | ba \
| be32 | be64 \ | be32 | be64 \
| bfin | bs2000 \ | bfin | bpf | bs2000 \
| c[123]* | c30 | [cjt]90 | c4x \ | c[123]* | c30 | [cjt]90 | c4x \
| c8051 | clipper | craynv | csky | cydra \ | c8051 | clipper | craynv | csky | cydra \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
...@@ -1346,11 +1343,11 @@ case $os in ...@@ -1346,11 +1343,11 @@ case $os in
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \ | sym* | kopensolaris* | plan9* \
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
| aos* | aros* | cloudabi* | sortix* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| knetbsd* | mirbsd* | netbsd* \ | knetbsd* | mirbsd* | netbsd* \
| bitrig* | openbsd* | solidbsd* | libertybsd* \ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
...@@ -1368,7 +1365,8 @@ case $os in ...@@ -1368,7 +1365,8 @@ case $os in
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*) | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
qnx*) qnx*)
...@@ -1452,9 +1450,6 @@ case $os in ...@@ -1452,9 +1450,6 @@ case $os in
ns2) ns2)
os=nextstep2 os=nextstep2
;; ;;
nsk*)
os=nsk
;;
# Preserve the version number of sinix5. # Preserve the version number of sinix5.
sinix5.*) sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'` os=`echo $os | sed -e 's|sinix|sysv|'`
......
This diff is collapsed.
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2018 Free Software Foundation, Inc.
# 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
...@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC ...@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
# 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, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
...@@ -783,9 +783,9 @@ exit 0 ...@@ -783,9 +783,9 @@ exit 0
# Local Variables: # Local Variables:
# mode: shell-script # mode: shell-script
# sh-indentation: 2 # sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:
This diff is collapsed.
This diff is collapsed.
/* /*
* libev native API header * libev native API header
* *
* Copyright (c) 2007-2018 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007-2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -151,7 +151,10 @@ EV_CPP(extern "C" {) ...@@ -151,7 +151,10 @@ EV_CPP(extern "C" {)
/*****************************************************************************/ /*****************************************************************************/
typedef double ev_tstamp; #ifndef EV_TSTAMP_T
# define EV_TSTAMP_T double
#endif
typedef EV_TSTAMP_T ev_tstamp;
#include <string.h> /* for memmove */ #include <string.h> /* for memmove */
...@@ -212,7 +215,7 @@ struct ev_loop; ...@@ -212,7 +215,7 @@ struct ev_loop;
/*****************************************************************************/ /*****************************************************************************/
#define EV_VERSION_MAJOR 4 #define EV_VERSION_MAJOR 4
#define EV_VERSION_MINOR 25 #define EV_VERSION_MINOR 31
/* eventmask, revents, events... */ /* eventmask, revents, events... */
enum { enum {
...@@ -501,29 +504,32 @@ union ev_any_watcher ...@@ -501,29 +504,32 @@ union ev_any_watcher
/* flag bits for ev_default_loop and ev_loop_new */ /* flag bits for ev_default_loop and ev_loop_new */
enum { enum {
/* the default */ /* the default */
EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ EVFLAG_AUTO = 0x00000000U, /* not quite a mask */
/* flag bits */ /* flag bits */
EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */
EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */
/* debugging/feature disable */ /* debugging/feature disable */
EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */
#if EV_COMPAT3 #if EV_COMPAT3
EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */
#endif #endif
EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */
EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ EVFLAG_NOSIGMASK = 0x00400000U, /* avoid modifying the signal mask */
EVFLAG_NOTIMERFD = 0x00800000U /* avoid creating a timerfd */
}; };
/* method bits to be ored together */ /* method bits to be ored together */
enum { enum {
EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */ EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */
EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */ EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */
EVBACKEND_EPOLL = 0x00000004U, /* linux */ EVBACKEND_EPOLL = 0x00000004U, /* linux */
EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */ EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */
EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */
EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ EVBACKEND_PORT = 0x00000020U, /* solaris 10 */
EVBACKEND_ALL = 0x0000003FU, /* all known backends */ EVBACKEND_LINUXAIO = 0x00000040U, /* linuix AIO, 4.19+ */
EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ EVBACKEND_IOURING = 0x00000080U, /* linux io_uring, 5.1+ */
EVBACKEND_ALL = 0x000000FFU, /* all known backends */
EVBACKEND_MASK = 0x0000FFFFU /* all future backends */
}; };
#if EV_PROTOTYPES #if EV_PROTOTYPES
......
This diff is collapsed.
/* /*
* libev epoll fd activity backend * libev epoll fd activity backend
* *
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007,2008,2009,2010,2011,2016,2017,2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -93,10 +93,10 @@ epoll_modify (EV_P_ int fd, int oev, int nev) ...@@ -93,10 +93,10 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
ev.events = (nev & EV_READ ? EPOLLIN : 0) ev.events = (nev & EV_READ ? EPOLLIN : 0)
| (nev & EV_WRITE ? EPOLLOUT : 0); | (nev & EV_WRITE ? EPOLLOUT : 0);
if (expect_true (!epoll_ctl (backend_fd, oev && oldmask != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev))) if (ecb_expect_true (!epoll_ctl (backend_fd, oev && oldmask != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev)))
return; return;
if (expect_true (errno == ENOENT)) if (ecb_expect_true (errno == ENOENT))
{ {
/* if ENOENT then the fd went away, so try to do the right thing */ /* if ENOENT then the fd went away, so try to do the right thing */
if (!nev) if (!nev)
...@@ -105,7 +105,7 @@ epoll_modify (EV_P_ int fd, int oev, int nev) ...@@ -105,7 +105,7 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
if (!epoll_ctl (backend_fd, EPOLL_CTL_ADD, fd, &ev)) if (!epoll_ctl (backend_fd, EPOLL_CTL_ADD, fd, &ev))
return; return;
} }
else if (expect_true (errno == EEXIST)) else if (ecb_expect_true (errno == EEXIST))
{ {
/* EEXIST means we ignored a previous DEL, but the fd is still active */ /* EEXIST means we ignored a previous DEL, but the fd is still active */
/* if the kernel mask is the same as the new mask, we assume it hasn't changed */ /* if the kernel mask is the same as the new mask, we assume it hasn't changed */
...@@ -115,7 +115,7 @@ epoll_modify (EV_P_ int fd, int oev, int nev) ...@@ -115,7 +115,7 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
if (!epoll_ctl (backend_fd, EPOLL_CTL_MOD, fd, &ev)) if (!epoll_ctl (backend_fd, EPOLL_CTL_MOD, fd, &ev))
return; return;
} }
else if (expect_true (errno == EPERM)) else if (ecb_expect_true (errno == EPERM))
{ {
/* EPERM means the fd is always ready, but epoll is too snobbish */ /* EPERM means the fd is always ready, but epoll is too snobbish */
/* to handle it, unlike select or poll. */ /* to handle it, unlike select or poll. */
...@@ -124,12 +124,14 @@ epoll_modify (EV_P_ int fd, int oev, int nev) ...@@ -124,12 +124,14 @@ epoll_modify (EV_P_ int fd, int oev, int nev)
/* add fd to epoll_eperms, if not already inside */ /* add fd to epoll_eperms, if not already inside */
if (!(oldmask & EV_EMASK_EPERM)) if (!(oldmask & EV_EMASK_EPERM))
{ {
array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, EMPTY2); array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, array_needsize_noinit);
epoll_eperms [epoll_epermcnt++] = fd; epoll_eperms [epoll_epermcnt++] = fd;
} }
return; return;
} }
else
assert (("libev: I/O watcher with invalid fd found in epoll_ctl", errno != EBADF && errno != ELOOP && errno != EINVAL));
fd_kill (EV_A_ fd); fd_kill (EV_A_ fd);
...@@ -144,16 +146,16 @@ epoll_poll (EV_P_ ev_tstamp timeout) ...@@ -144,16 +146,16 @@ epoll_poll (EV_P_ ev_tstamp timeout)
int i; int i;
int eventcnt; int eventcnt;
if (expect_false (epoll_epermcnt)) if (ecb_expect_false (epoll_epermcnt))
timeout = 0.; timeout = EV_TS_CONST (0.);
/* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */ /* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
/* the default libev max wait time, however. */ /* the default libev max wait time, however. */
EV_RELEASE_CB; EV_RELEASE_CB;
eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3); eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, EV_TS_TO_MSEC (timeout));
EV_ACQUIRE_CB; EV_ACQUIRE_CB;
if (expect_false (eventcnt < 0)) if (ecb_expect_false (eventcnt < 0))
{ {
if (errno != EINTR) if (errno != EINTR)
ev_syserr ("(libev) epoll_wait"); ev_syserr ("(libev) epoll_wait");
...@@ -176,14 +178,14 @@ epoll_poll (EV_P_ ev_tstamp timeout) ...@@ -176,14 +178,14 @@ epoll_poll (EV_P_ ev_tstamp timeout)
* other spurious notifications will be found by epoll_ctl, below * other spurious notifications will be found by epoll_ctl, below
* we assume that fd is always in range, as we never shrink the anfds array * we assume that fd is always in range, as we never shrink the anfds array
*/ */
if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32))) if (ecb_expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32)))
{ {
/* recreate kernel state */ /* recreate kernel state */
postfork |= 2; postfork |= 2;
continue; continue;
} }
if (expect_false (got & ~want)) if (ecb_expect_false (got & ~want))
{ {
anfds [fd].emask = want; anfds [fd].emask = want;
...@@ -195,6 +197,8 @@ epoll_poll (EV_P_ ev_tstamp timeout) ...@@ -195,6 +197,8 @@ epoll_poll (EV_P_ ev_tstamp timeout)
* above with the gencounter check (== our fd is not the event fd), and * above with the gencounter check (== our fd is not the event fd), and
* partially here, when epoll_ctl returns an error (== a child has the fd * partially here, when epoll_ctl returns an error (== a child has the fd
* but we closed it). * but we closed it).
* note: for events such as POLLHUP, where we can't know whether it refers
* to EV_READ or EV_WRITE, we might issue redundant EPOLL_CTL_MOD calls.
*/ */
ev->events = (want & EV_READ ? EPOLLIN : 0) ev->events = (want & EV_READ ? EPOLLIN : 0)
| (want & EV_WRITE ? EPOLLOUT : 0); | (want & EV_WRITE ? EPOLLOUT : 0);
...@@ -212,7 +216,7 @@ epoll_poll (EV_P_ ev_tstamp timeout) ...@@ -212,7 +216,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
} }
/* if the receive array was full, increase its size */ /* if the receive array was full, increase its size */
if (expect_false (eventcnt == epoll_eventmax)) if (ecb_expect_false (eventcnt == epoll_eventmax))
{ {
ev_free (epoll_events); ev_free (epoll_events);
epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1); epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1);
...@@ -235,23 +239,34 @@ epoll_poll (EV_P_ ev_tstamp timeout) ...@@ -235,23 +239,34 @@ epoll_poll (EV_P_ ev_tstamp timeout)
} }
} }
inline_size static int
int epoll_epoll_create (void)
epoll_init (EV_P_ int flags)
{ {
int fd;
#if defined EPOLL_CLOEXEC && !defined __ANDROID__ #if defined EPOLL_CLOEXEC && !defined __ANDROID__
backend_fd = epoll_create1 (EPOLL_CLOEXEC); fd = epoll_create1 (EPOLL_CLOEXEC);
if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS)) if (fd < 0 && (errno == EINVAL || errno == ENOSYS))
#endif #endif
backend_fd = epoll_create (256); {
fd = epoll_create (256);
if (backend_fd < 0) if (fd >= 0)
return 0; fcntl (fd, F_SETFD, FD_CLOEXEC);
}
return fd;
}
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); inline_size
int
epoll_init (EV_P_ int flags)
{
if ((backend_fd = epoll_epoll_create ()) < 0)
return 0;
backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */ backend_mintime = EV_TS_CONST (1e-3); /* epoll does sometimes return early, this is just to avoid the worst */
backend_modify = epoll_modify; backend_modify = epoll_modify;
backend_poll = epoll_poll; backend_poll = epoll_poll;
...@@ -269,17 +284,15 @@ epoll_destroy (EV_P) ...@@ -269,17 +284,15 @@ epoll_destroy (EV_P)
array_free (epoll_eperm, EMPTY); array_free (epoll_eperm, EMPTY);
} }
inline_size ecb_cold
void static void
epoll_fork (EV_P) epoll_fork (EV_P)
{ {
close (backend_fd); close (backend_fd);
while ((backend_fd = epoll_create (256)) < 0) while ((backend_fd = epoll_epoll_create ()) < 0)
ev_syserr ("(libev) epoll_create"); ev_syserr ("(libev) epoll_create");
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
fd_rearm_all (EV_A); fd_rearm_all (EV_A);
} }
This diff is collapsed.
/* /*
* libev kqueue backend * libev kqueue backend
* *
* Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007,2008,2009,2010,2011,2012,2013,2016,2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -48,7 +48,7 @@ void ...@@ -48,7 +48,7 @@ void
kqueue_change (EV_P_ int fd, int filter, int flags, int fflags) kqueue_change (EV_P_ int fd, int filter, int flags, int fflags)
{ {
++kqueue_changecnt; ++kqueue_changecnt;
array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2); array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, array_needsize_noinit);
EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0); EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0);
} }
...@@ -103,10 +103,10 @@ kqueue_poll (EV_P_ ev_tstamp timeout) ...@@ -103,10 +103,10 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
EV_ACQUIRE_CB; EV_ACQUIRE_CB;
kqueue_changecnt = 0; kqueue_changecnt = 0;
if (expect_false (res < 0)) if (ecb_expect_false (res < 0))
{ {
if (errno != EINTR) if (errno != EINTR)
ev_syserr ("(libev) kevent"); ev_syserr ("(libev) kqueue kevent");
return; return;
} }
...@@ -115,7 +115,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout) ...@@ -115,7 +115,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
{ {
int fd = kqueue_events [i].ident; int fd = kqueue_events [i].ident;
if (expect_false (kqueue_events [i].flags & EV_ERROR)) if (ecb_expect_false (kqueue_events [i].flags & EV_ERROR))
{ {
int err = kqueue_events [i].data; int err = kqueue_events [i].data;
...@@ -129,10 +129,16 @@ kqueue_poll (EV_P_ ev_tstamp timeout) ...@@ -129,10 +129,16 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
if (fd_valid (fd)) if (fd_valid (fd))
kqueue_modify (EV_A_ fd, 0, anfds [fd].events); kqueue_modify (EV_A_ fd, 0, anfds [fd].events);
else else
fd_kill (EV_A_ fd); {
assert (("libev: kqueue found invalid fd", 0));
fd_kill (EV_A_ fd);
}
} }
else /* on all other errors, we error out on the fd */ else /* on all other errors, we error out on the fd */
fd_kill (EV_A_ fd); {
assert (("libev: kqueue found invalid fd", 0));
fd_kill (EV_A_ fd);
}
} }
} }
else else
...@@ -145,7 +151,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout) ...@@ -145,7 +151,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
); );
} }
if (expect_false (res == kqueue_eventmax)) if (ecb_expect_false (res == kqueue_eventmax))
{ {
ev_free (kqueue_events); ev_free (kqueue_events);
kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_eventmax + 1); kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_eventmax + 1);
...@@ -164,7 +170,7 @@ kqueue_init (EV_P_ int flags) ...@@ -164,7 +170,7 @@ kqueue_init (EV_P_ int flags)
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */ backend_mintime = EV_TS_CONST (1e-9); /* apparently, they did the right thing in freebsd */
backend_modify = kqueue_modify; backend_modify = kqueue_modify;
backend_poll = kqueue_poll; backend_poll = kqueue_poll;
......
This diff is collapsed.
/* /*
* libev poll fd activity backend * libev poll fd activity backend
* *
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007,2008,2009,2010,2011,2016,2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -41,10 +41,12 @@ ...@@ -41,10 +41,12 @@
inline_size inline_size
void void
pollidx_init (int *base, int count) array_needsize_pollidx (int *base, int offset, int count)
{ {
/* consider using memset (.., -1, ...), which is practically guaranteed /* using memset (.., -1, ...) is tempting, we we try
* to work on all systems implementing poll */ * to be ultraportable
*/
base += offset;
while (count--) while (count--)
*base++ = -1; *base++ = -1;
} }
...@@ -57,14 +59,14 @@ poll_modify (EV_P_ int fd, int oev, int nev) ...@@ -57,14 +59,14 @@ poll_modify (EV_P_ int fd, int oev, int nev)
if (oev == nev) if (oev == nev)
return; return;
array_needsize (int, pollidxs, pollidxmax, fd + 1, pollidx_init); array_needsize (int, pollidxs, pollidxmax, fd + 1, array_needsize_pollidx);
idx = pollidxs [fd]; idx = pollidxs [fd];
if (idx < 0) /* need to allocate a new pollfd */ if (idx < 0) /* need to allocate a new pollfd */
{ {
pollidxs [fd] = idx = pollcnt++; pollidxs [fd] = idx = pollcnt++;
array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2); array_needsize (struct pollfd, polls, pollmax, pollcnt, array_needsize_noinit);
polls [idx].fd = fd; polls [idx].fd = fd;
} }
...@@ -78,7 +80,7 @@ poll_modify (EV_P_ int fd, int oev, int nev) ...@@ -78,7 +80,7 @@ poll_modify (EV_P_ int fd, int oev, int nev)
{ {
pollidxs [fd] = -1; pollidxs [fd] = -1;
if (expect_true (idx < --pollcnt)) if (ecb_expect_true (idx < --pollcnt))
{ {
polls [idx] = polls [pollcnt]; polls [idx] = polls [pollcnt];
pollidxs [polls [idx].fd] = idx; pollidxs [polls [idx].fd] = idx;
...@@ -93,10 +95,10 @@ poll_poll (EV_P_ ev_tstamp timeout) ...@@ -93,10 +95,10 @@ poll_poll (EV_P_ ev_tstamp timeout)
int res; int res;
EV_RELEASE_CB; EV_RELEASE_CB;
res = poll (polls, pollcnt, timeout * 1e3); res = poll (polls, pollcnt, EV_TS_TO_MSEC (timeout));
EV_ACQUIRE_CB; EV_ACQUIRE_CB;
if (expect_false (res < 0)) if (ecb_expect_false (res < 0))
{ {
if (errno == EBADF) if (errno == EBADF)
fd_ebadf (EV_A); fd_ebadf (EV_A);
...@@ -108,14 +110,17 @@ poll_poll (EV_P_ ev_tstamp timeout) ...@@ -108,14 +110,17 @@ poll_poll (EV_P_ ev_tstamp timeout)
else else
for (p = polls; res; ++p) for (p = polls; res; ++p)
{ {
assert (("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt)); assert (("libev: poll returned illegal result, broken BSD kernel?", p < polls + pollcnt));
if (expect_false (p->revents)) /* this expect is debatable */ if (ecb_expect_false (p->revents)) /* this expect is debatable */
{ {
--res; --res;
if (expect_false (p->revents & POLLNVAL)) if (ecb_expect_false (p->revents & POLLNVAL))
fd_kill (EV_A_ p->fd); {
assert (("libev: poll found invalid fd in poll set", 0));
fd_kill (EV_A_ p->fd);
}
else else
fd_event ( fd_event (
EV_A_ EV_A_
...@@ -131,7 +136,7 @@ inline_size ...@@ -131,7 +136,7 @@ inline_size
int int
poll_init (EV_P_ int flags) poll_init (EV_P_ int flags)
{ {
backend_mintime = 1e-3; backend_mintime = EV_TS_CONST (1e-3);
backend_modify = poll_modify; backend_modify = poll_modify;
backend_poll = poll_poll; backend_poll = poll_poll;
......
/* /*
* libev solaris event port backend * libev solaris event port backend
* *
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007,2008,2009,2010,2011,2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -69,7 +69,10 @@ port_associate_and_check (EV_P_ int fd, int ev) ...@@ -69,7 +69,10 @@ port_associate_and_check (EV_P_ int fd, int ev)
) )
{ {
if (errno == EBADFD) if (errno == EBADFD)
fd_kill (EV_A_ fd); {
assert (("libev: port_associate found invalid fd", errno != EBADFD));
fd_kill (EV_A_ fd);
}
else else
ev_syserr ("(libev) port_associate"); ev_syserr ("(libev) port_associate");
} }
...@@ -129,7 +132,7 @@ port_poll (EV_P_ ev_tstamp timeout) ...@@ -129,7 +132,7 @@ port_poll (EV_P_ ev_tstamp timeout)
} }
} }
if (expect_false (nget == port_eventmax)) if (ecb_expect_false (nget == port_eventmax))
{ {
ev_free (port_events); ev_free (port_events);
port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1); port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1);
...@@ -151,11 +154,11 @@ port_init (EV_P_ int flags) ...@@ -151,11 +154,11 @@ port_init (EV_P_ int flags)
/* if my reading of the opensolaris kernel sources are correct, then /* if my reading of the opensolaris kernel sources are correct, then
* opensolaris does something very stupid: it checks if the time has already * opensolaris does something very stupid: it checks if the time has already
* elapsed and doesn't round up if that is the case,m otherwise it DOES round * elapsed and doesn't round up if that is the case, otherwise it DOES round
* up. Since we can't know what the case is, we need to guess by using a * up. Since we can't know what the case is, we need to guess by using a
* "large enough" timeout. Normally, 1e-9 would be correct. * "large enough" timeout. Normally, 1e-9 would be correct.
*/ */
backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */ backend_mintime = EV_TS_CONST (1e-3); /* needed to compensate for port_getn returning early */
backend_modify = port_modify; backend_modify = port_modify;
backend_poll = port_poll; backend_poll = port_poll;
......
...@@ -108,7 +108,7 @@ select_modify (EV_P_ int fd, int oev, int nev) ...@@ -108,7 +108,7 @@ select_modify (EV_P_ int fd, int oev, int nev)
int word = fd / NFDBITS; int word = fd / NFDBITS;
fd_mask mask = 1UL << (fd % NFDBITS); fd_mask mask = 1UL << (fd % NFDBITS);
if (expect_false (vec_max <= word)) if (ecb_expect_false (vec_max <= word))
{ {
int new_max = word + 1; int new_max = word + 1;
...@@ -171,7 +171,7 @@ select_poll (EV_P_ ev_tstamp timeout) ...@@ -171,7 +171,7 @@ select_poll (EV_P_ ev_tstamp timeout)
#endif #endif
EV_ACQUIRE_CB; EV_ACQUIRE_CB;
if (expect_false (res < 0)) if (ecb_expect_false (res < 0))
{ {
#if EV_SELECT_IS_WINSOCKET #if EV_SELECT_IS_WINSOCKET
errno = WSAGetLastError (); errno = WSAGetLastError ();
...@@ -197,7 +197,7 @@ select_poll (EV_P_ ev_tstamp timeout) ...@@ -197,7 +197,7 @@ select_poll (EV_P_ ev_tstamp timeout)
{ {
if (timeout) if (timeout)
{ {
unsigned long ms = timeout * 1e3; unsigned long ms = EV_TS_TO_MSEC (timeout);
Sleep (ms ? ms : 1); Sleep (ms ? ms : 1);
} }
...@@ -236,7 +236,7 @@ select_poll (EV_P_ ev_tstamp timeout) ...@@ -236,7 +236,7 @@ select_poll (EV_P_ ev_tstamp timeout)
if (FD_ISSET (handle, (fd_set *)vec_eo)) events |= EV_WRITE; if (FD_ISSET (handle, (fd_set *)vec_eo)) events |= EV_WRITE;
#endif #endif
if (expect_true (events)) if (ecb_expect_true (events))
fd_event (EV_A_ fd, events); fd_event (EV_A_ fd, events);
} }
} }
...@@ -262,7 +262,7 @@ select_poll (EV_P_ ev_tstamp timeout) ...@@ -262,7 +262,7 @@ select_poll (EV_P_ ev_tstamp timeout)
events |= word_r & mask ? EV_READ : 0; events |= word_r & mask ? EV_READ : 0;
events |= word_w & mask ? EV_WRITE : 0; events |= word_w & mask ? EV_WRITE : 0;
if (expect_true (events)) if (ecb_expect_true (events))
fd_event (EV_A_ word * NFDBITS + bit, events); fd_event (EV_A_ word * NFDBITS + bit, events);
} }
} }
...@@ -275,7 +275,7 @@ inline_size ...@@ -275,7 +275,7 @@ inline_size
int int
select_init (EV_P_ int flags) select_init (EV_P_ int flags)
{ {
backend_mintime = 1e-6; backend_mintime = EV_TS_CONST (1e-6);
backend_modify = select_modify; backend_modify = select_modify;
backend_poll = select_poll; backend_poll = select_poll;
......
/* /*
* loop member variable declarations * loop member variable declarations
* *
* Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de> * Copyright (c) 2007,2008,2009,2010,2011,2012,2013,2019 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
...@@ -107,6 +107,47 @@ VARx(int, epoll_epermcnt) ...@@ -107,6 +107,47 @@ VARx(int, epoll_epermcnt)
VARx(int, epoll_epermmax) VARx(int, epoll_epermmax)
#endif #endif
#if EV_USE_LINUXAIO || EV_GENWRAP
VARx(aio_context_t, linuxaio_ctx)
VARx(int, linuxaio_iteration)
VARx(struct aniocb **, linuxaio_iocbps)
VARx(int, linuxaio_iocbpmax)
VARx(struct iocb **, linuxaio_submits)
VARx(int, linuxaio_submitcnt)
VARx(int, linuxaio_submitmax)
VARx(ev_io, linuxaio_epoll_w)
#endif
#if EV_USE_IOURING || EV_GENWRAP
VARx(int, iouring_fd)
VARx(unsigned, iouring_to_submit);
VARx(int, iouring_entries)
VARx(int, iouring_max_entries)
VARx(void *, iouring_sq_ring)
VARx(void *, iouring_cq_ring)
VARx(void *, iouring_sqes)
VARx(uint32_t, iouring_sq_ring_size)
VARx(uint32_t, iouring_cq_ring_size)
VARx(uint32_t, iouring_sqes_size)
VARx(uint32_t, iouring_sq_head)
VARx(uint32_t, iouring_sq_tail)
VARx(uint32_t, iouring_sq_ring_mask)
VARx(uint32_t, iouring_sq_ring_entries)
VARx(uint32_t, iouring_sq_flags)
VARx(uint32_t, iouring_sq_dropped)
VARx(uint32_t, iouring_sq_array)
VARx(uint32_t, iouring_cq_head)
VARx(uint32_t, iouring_cq_tail)
VARx(uint32_t, iouring_cq_ring_mask)
VARx(uint32_t, iouring_cq_ring_entries)
VARx(uint32_t, iouring_cq_overflow)
VARx(uint32_t, iouring_cq_cqes)
VARx(ev_tstamp, iouring_tfd_to)
VARx(int, iouring_tfd)
VARx(ev_io, iouring_tfd_w)
VARx(ev_io, iouring_epoll_w)
#endif
#if EV_USE_KQUEUE || EV_GENWRAP #if EV_USE_KQUEUE || EV_GENWRAP
VARx(pid_t, kqueue_fd_pid) VARx(pid_t, kqueue_fd_pid)
VARx(struct kevent *, kqueue_changes) VARx(struct kevent *, kqueue_changes)
...@@ -187,6 +228,11 @@ VARx(ev_io, sigfd_w) ...@@ -187,6 +228,11 @@ VARx(ev_io, sigfd_w)
VARx(sigset_t, sigfd_set) VARx(sigset_t, sigfd_set)
#endif #endif
#if EV_USE_TIMERFD || EV_GENWRAP
VARx(int, timerfd) /* timerfd for time jump detection */
VARx(ev_io, timerfd_w)
#endif
VARx(unsigned int, origflags) /* original loop flags */ VARx(unsigned int, origflags) /* original loop flags */
#if EV_FEATURE_API || EV_GENWRAP #if EV_FEATURE_API || EV_GENWRAP
......
...@@ -154,8 +154,8 @@ ev_time (void) ...@@ -154,8 +154,8 @@ ev_time (void)
ui.u.LowPart = ft.dwLowDateTime; ui.u.LowPart = ft.dwLowDateTime;
ui.u.HighPart = ft.dwHighDateTime; ui.u.HighPart = ft.dwHighDateTime;
/* msvc cannot convert ulonglong to double... yes, it is that sucky */ /* also, msvc cannot convert ulonglong to double... yes, it is that sucky */
return (LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-7; return EV_TS_FROM_USEC (((LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-1));
} }
#endif #endif
......
...@@ -44,12 +44,47 @@ ...@@ -44,12 +44,47 @@
#define invoke_cb ((loop)->invoke_cb) #define invoke_cb ((loop)->invoke_cb)
#define io_blocktime ((loop)->io_blocktime) #define io_blocktime ((loop)->io_blocktime)
#define iocp ((loop)->iocp) #define iocp ((loop)->iocp)
#define iouring_cq_cqes ((loop)->iouring_cq_cqes)
#define iouring_cq_head ((loop)->iouring_cq_head)
#define iouring_cq_overflow ((loop)->iouring_cq_overflow)
#define iouring_cq_ring ((loop)->iouring_cq_ring)
#define iouring_cq_ring_entries ((loop)->iouring_cq_ring_entries)
#define iouring_cq_ring_mask ((loop)->iouring_cq_ring_mask)
#define iouring_cq_ring_size ((loop)->iouring_cq_ring_size)
#define iouring_cq_tail ((loop)->iouring_cq_tail)
#define iouring_entries ((loop)->iouring_entries)
#define iouring_epoll_w ((loop)->iouring_epoll_w)
#define iouring_fd ((loop)->iouring_fd)
#define iouring_max_entries ((loop)->iouring_max_entries)
#define iouring_sq_array ((loop)->iouring_sq_array)
#define iouring_sq_dropped ((loop)->iouring_sq_dropped)
#define iouring_sq_flags ((loop)->iouring_sq_flags)
#define iouring_sq_head ((loop)->iouring_sq_head)
#define iouring_sq_ring ((loop)->iouring_sq_ring)
#define iouring_sq_ring_entries ((loop)->iouring_sq_ring_entries)
#define iouring_sq_ring_mask ((loop)->iouring_sq_ring_mask)
#define iouring_sq_ring_size ((loop)->iouring_sq_ring_size)
#define iouring_sq_tail ((loop)->iouring_sq_tail)
#define iouring_sqes ((loop)->iouring_sqes)
#define iouring_sqes_size ((loop)->iouring_sqes_size)
#define iouring_tfd ((loop)->iouring_tfd)
#define iouring_tfd_to ((loop)->iouring_tfd_to)
#define iouring_tfd_w ((loop)->iouring_tfd_w)
#define iouring_to_submit ((loop)->iouring_to_submit)
#define kqueue_changecnt ((loop)->kqueue_changecnt) #define kqueue_changecnt ((loop)->kqueue_changecnt)
#define kqueue_changemax ((loop)->kqueue_changemax) #define kqueue_changemax ((loop)->kqueue_changemax)
#define kqueue_changes ((loop)->kqueue_changes) #define kqueue_changes ((loop)->kqueue_changes)
#define kqueue_eventmax ((loop)->kqueue_eventmax) #define kqueue_eventmax ((loop)->kqueue_eventmax)
#define kqueue_events ((loop)->kqueue_events) #define kqueue_events ((loop)->kqueue_events)
#define kqueue_fd_pid ((loop)->kqueue_fd_pid) #define kqueue_fd_pid ((loop)->kqueue_fd_pid)
#define linuxaio_ctx ((loop)->linuxaio_ctx)
#define linuxaio_epoll_w ((loop)->linuxaio_epoll_w)
#define linuxaio_iocbpmax ((loop)->linuxaio_iocbpmax)
#define linuxaio_iocbps ((loop)->linuxaio_iocbps)
#define linuxaio_iteration ((loop)->linuxaio_iteration)
#define linuxaio_submitcnt ((loop)->linuxaio_submitcnt)
#define linuxaio_submitmax ((loop)->linuxaio_submitmax)
#define linuxaio_submits ((loop)->linuxaio_submits)
#define loop_count ((loop)->loop_count) #define loop_count ((loop)->loop_count)
#define loop_depth ((loop)->loop_depth) #define loop_depth ((loop)->loop_depth)
#define loop_done ((loop)->loop_done) #define loop_done ((loop)->loop_done)
...@@ -89,6 +124,8 @@ ...@@ -89,6 +124,8 @@
#define sigfd_w ((loop)->sigfd_w) #define sigfd_w ((loop)->sigfd_w)
#define timeout_blocktime ((loop)->timeout_blocktime) #define timeout_blocktime ((loop)->timeout_blocktime)
#define timercnt ((loop)->timercnt) #define timercnt ((loop)->timercnt)
#define timerfd ((loop)->timerfd)
#define timerfd_w ((loop)->timerfd_w)
#define timermax ((loop)->timermax) #define timermax ((loop)->timermax)
#define timers ((loop)->timers) #define timers ((loop)->timers)
#define userdata ((loop)->userdata) #define userdata ((loop)->userdata)
...@@ -143,12 +180,47 @@ ...@@ -143,12 +180,47 @@
#undef invoke_cb #undef invoke_cb
#undef io_blocktime #undef io_blocktime
#undef iocp #undef iocp
#undef iouring_cq_cqes
#undef iouring_cq_head
#undef iouring_cq_overflow
#undef iouring_cq_ring
#undef iouring_cq_ring_entries
#undef iouring_cq_ring_mask
#undef iouring_cq_ring_size
#undef iouring_cq_tail
#undef iouring_entries
#undef iouring_epoll_w
#undef iouring_fd
#undef iouring_max_entries
#undef iouring_sq_array
#undef iouring_sq_dropped
#undef iouring_sq_flags
#undef iouring_sq_head
#undef iouring_sq_ring
#undef iouring_sq_ring_entries
#undef iouring_sq_ring_mask
#undef iouring_sq_ring_size
#undef iouring_sq_tail
#undef iouring_sqes
#undef iouring_sqes_size
#undef iouring_tfd
#undef iouring_tfd_to
#undef iouring_tfd_w
#undef iouring_to_submit
#undef kqueue_changecnt #undef kqueue_changecnt
#undef kqueue_changemax #undef kqueue_changemax
#undef kqueue_changes #undef kqueue_changes
#undef kqueue_eventmax #undef kqueue_eventmax
#undef kqueue_events #undef kqueue_events
#undef kqueue_fd_pid #undef kqueue_fd_pid
#undef linuxaio_ctx
#undef linuxaio_epoll_w
#undef linuxaio_iocbpmax
#undef linuxaio_iocbps
#undef linuxaio_iteration
#undef linuxaio_submitcnt
#undef linuxaio_submitmax
#undef linuxaio_submits
#undef loop_count #undef loop_count
#undef loop_depth #undef loop_depth
#undef loop_done #undef loop_done
...@@ -188,6 +260,8 @@ ...@@ -188,6 +260,8 @@
#undef sigfd_w #undef sigfd_w
#undef timeout_blocktime #undef timeout_blocktime
#undef timercnt #undef timercnt
#undef timerfd
#undef timerfd_w
#undef timermax #undef timermax
#undef timers #undef timers
#undef userdata #undef userdata
......
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2014-09-12.12; # UTC scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
...@@ -271,15 +271,18 @@ do ...@@ -271,15 +271,18 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test "$is_target_a_directory" = never; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
dstdir=`dirname "$dst"` dstdir=`dirname "$dst"`
...@@ -288,6 +291,11 @@ do ...@@ -288,6 +291,11 @@ do
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
...@@ -324,14 +332,16 @@ do ...@@ -324,14 +332,16 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0. # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;; ;;
*) *)
# $RANDOM is not portable (e.g. dash); use it when possible to # Note that $RANDOM variable is not portable (e.g. dash); Use it
# lower collision chance # here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so # Because "mkdir -p" follows existing symlinks and we likely work
# create the $tmpdir first (and fail if unsuccessful) to make sure # directly in world-writeable /tmp, make sure that the '$tmpdir'
# that nobody tries to guess the $tmpdir name. # directory is successfully created first before we actually test
# 'mkdir -p' feature.
if (umask $mkdir_umask && if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" && $mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
...@@ -434,8 +444,8 @@ do ...@@ -434,8 +444,8 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
...@@ -500,9 +510,9 @@ do ...@@ -500,9 +510,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:
This diff is collapsed.
#! /bin/sh #! /bin/sh
# Common wrapper for a few potentially missing GNU programs. # Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
...@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC ...@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
# 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, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
...@@ -101,9 +101,9 @@ else ...@@ -101,9 +101,9 @@ else
exit $st exit $st
fi fi
perl_URL=http://www.perl.org/ perl_URL=https://www.perl.org/
flex_URL=http://flex.sourceforge.net/ flex_URL=https://github.com/westes/flex
gnu_software_URL=http://www.gnu.org/software gnu_software_URL=https://www.gnu.org/software
program_details () program_details ()
{ {
...@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ ...@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st exit $st
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment