mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-25 02:03:42 +00:00
fix #357
This commit is contained in:
+6
-1
@@ -12,9 +12,14 @@ TODO: document file descriptor usage per loop
|
||||
TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
|
||||
TODO: embed watchers need updating when fd changes
|
||||
TODO: document portability requirements for atomic pointer access
|
||||
TODO: possible cb aliasing?
|
||||
TODO: document requirements for function pointers and calling conventions.
|
||||
|
||||
4.20 Sat Jun 20 13:01:43 CEST 2015
|
||||
- prefer noexcept over throw () with C++ 11.
|
||||
- update ecb.h due to incompatibilities with c11.
|
||||
- fix a potential aliasing issue when reading and writing
|
||||
watcher callbacks.
|
||||
|
||||
4.19 Thu Sep 25 08:18:25 CEST 2014
|
||||
- ev.h wasn't valid C++ anymore, which tripped compilers other than
|
||||
clang, msvc or gcc (analyzed by Raphael 'kena' Poss). Unfortunately,
|
||||
|
||||
+488
-124
@@ -1,9 +1,8 @@
|
||||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -17,23 +16,51 @@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -52,35 +79,77 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = libev
|
||||
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
subdir = .
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in mkinstalldirs depcomp $(include_HEADERS) \
|
||||
README compile config.guess config.sub install-sh missing \
|
||||
ltmain.sh
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
|
||||
$(top_srcdir)/m4/ax_tls.m4 $(top_srcdir)/m4/inet_ntop.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/openssl.m4 \
|
||||
$(top_srcdir)/m4/polarssl.m4 $(top_srcdir)/libev/libev.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/libev.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libev_la_LIBADD =
|
||||
am_libev_la_OBJECTS = ev.lo event.lo
|
||||
libev_la_OBJECTS = $(am_libev_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
libev_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libev_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/auto/depcomp
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
@@ -91,20 +160,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libev_la_SOURCES)
|
||||
DIST_SOURCES = $(libev_la_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
@@ -112,10 +177,49 @@ am__can_run_installinfo = \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
man3dir = $(mandir)/man3
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
HEADERS = $(include_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
AM_RECURSIVE_TARGETS = cscope
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
@@ -142,7 +246,6 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INET_NTOP_LIB = @INET_NTOP_LIB@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -174,9 +277,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@@ -190,7 +290,6 @@ abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
acx_pthread_config = @acx_pthread_config@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
@@ -231,7 +330,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
@@ -244,56 +342,103 @@ EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
|
||||
ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \
|
||||
ev.3 ev.pod Symbols.ev Symbols.event
|
||||
|
||||
noinst_MANS = ev.3
|
||||
noinst_HEADERS = ev.h ev++.h event.h
|
||||
noinst_LTLIBRARIES = libev.la
|
||||
man_MANS = ev.3
|
||||
include_HEADERS = ev.h ev++.h event.h
|
||||
lib_LTLIBRARIES = libev.la
|
||||
libev_la_SOURCES = ev.c event.c
|
||||
libev_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||
all: all-am
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libev/Makefile'; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign libev/Makefile
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES) $(EXTRA_libev_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libev_la_LINK) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(libev_la_LINK) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -305,25 +450,22 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
@@ -334,26 +476,82 @@ mostlyclean-libtool:
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man3dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.3[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
@@ -365,15 +563,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
@@ -382,11 +576,35 @@ GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
@@ -416,10 +634,144 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
@@ -452,14 +804,15 @@ maintainer-clean-generic:
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
@@ -473,13 +826,13 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
install-data-am: install-includeHEADERS install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
@@ -489,7 +842,7 @@ install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
install-man: install-man3
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
@@ -502,6 +855,8 @@ install-ps-am:
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
@@ -519,22 +874,31 @@ ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-man
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
uninstall-man: uninstall-man3
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
.MAKE: all install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
|
||||
clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-includeHEADERS \
|
||||
install-info install-info-am install-libLTLIBRARIES \
|
||||
install-man install-man3 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-man uninstall-man3
|
||||
|
||||
|
||||
ev.3: ev.pod
|
||||
|
||||
Vendored
+22
-9
@@ -1326,7 +1326,7 @@ ia64-*-hpux*)
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
@@ -1338,9 +1338,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
powerpc64le-*)
|
||||
LD="${LD-ld} -m elf32lppclinux"
|
||||
;;
|
||||
powerpc64-*)
|
||||
LD="${LD-ld} -m elf32ppclinux"
|
||||
;;
|
||||
s390x-*linux*)
|
||||
@@ -1359,7 +1369,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpcle-*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc-*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
@@ -1702,7 +1715,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
;;
|
||||
*)
|
||||
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
||||
if test -n "$lt_cv_sys_max_cmd_len"; then
|
||||
if test -n "$lt_cv_sys_max_cmd_len" && \
|
||||
test undefined != "$lt_cv_sys_max_cmd_len"; then
|
||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||
else
|
||||
@@ -8691,10 +8705,9 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ orig_CFLAGS="$CFLAGS"
|
||||
|
||||
AC_CONFIG_SRCDIR([ev_epoll.c])
|
||||
|
||||
AM_INIT_AUTOMAKE(libev,4.19) dnl also update ev.h!
|
||||
dnl also update ev.h!
|
||||
AM_INIT_AUTOMAKE(libev,4.20)
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
||||
+2
-2
@@ -133,7 +133,7 @@
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "LIBEV 3"
|
||||
.TH LIBEV 3 "2014-09-05" "libev-4.15" "libev - high performance full featured event loop"
|
||||
.TH LIBEV 3 "2015-05-01" "libev-4.19" "libev - high performance full featured event loop"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -4054,7 +4054,7 @@ files, \fImy_ev.h\fR and \fImy_ev.c\fR that include the respective libev files:
|
||||
.Vb 4
|
||||
\& // my_ev.h
|
||||
\& #define EV_CB_DECLARE(type) struct my_coro *cb;
|
||||
\& #define EV_CB_INVOKE(watcher) switch_to ((watcher)\->cb);
|
||||
\& #define EV_CB_INVOKE(watcher) switch_to ((watcher)\->cb)
|
||||
\& #include "../libev/ev.h"
|
||||
\&
|
||||
\& // my_ev.c
|
||||
|
||||
+175
-110
@@ -493,7 +493,7 @@ struct signalfd_siginfo
|
||||
/*
|
||||
* libecb - http://software.schmorp.de/pkg/libecb
|
||||
*
|
||||
* Copyright (©) 2009-2014 Marc Alexander Lehmann <libecb@schmorp.de>
|
||||
* Copyright (©) 2009-2015 Marc Alexander Lehmann <libecb@schmorp.de>
|
||||
* Copyright (©) 2011 Emanuele Giaquinta
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -534,7 +534,7 @@ struct signalfd_siginfo
|
||||
#define ECB_H
|
||||
|
||||
/* 16 bits major, 16 bits minor */
|
||||
#define ECB_VERSION 0x00010003
|
||||
#define ECB_VERSION 0x00010004
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef signed char int8_t;
|
||||
@@ -568,8 +568,11 @@ struct signalfd_siginfo
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
|
||||
#define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64)
|
||||
|
||||
/* work around x32 idiocy by defining proper macros */
|
||||
#if __amd64 || __x86_64 || _M_AMD64 || _M_X64
|
||||
#if ECB_GCC_AMD64 || ECB_MSVC_AMD64
|
||||
#if _ILP32
|
||||
#define ECB_AMD64_X32 1
|
||||
#else
|
||||
@@ -584,12 +587,24 @@ struct signalfd_siginfo
|
||||
* we try to detect these and simply assume they are not gcc - if they have
|
||||
* an issue with that they should have done it right in the first place.
|
||||
*/
|
||||
#ifndef ECB_GCC_VERSION
|
||||
#if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
|
||||
#define ECB_GCC_VERSION(major,minor) 0
|
||||
#else
|
||||
#define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
|
||||
#endif
|
||||
#if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
|
||||
#define ECB_GCC_VERSION(major,minor) 0
|
||||
#else
|
||||
#define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
|
||||
#endif
|
||||
|
||||
#define ECB_CLANG_VERSION(major,minor) (__clang_major__ > (major) || (__clang_major__ == (major) && __clang_minor__ >= (minor)))
|
||||
|
||||
#if __clang__ && defined __has_builtin
|
||||
#define ECB_CLANG_BUILTIN(x) __has_builtin (x)
|
||||
#else
|
||||
#define ECB_CLANG_BUILTIN(x) 0
|
||||
#endif
|
||||
|
||||
#if __clang__ && defined __has_extension
|
||||
#define ECB_CLANG_EXTENSION(x) __has_extension (x)
|
||||
#else
|
||||
#define ECB_CLANG_EXTENSION(x) 0
|
||||
#endif
|
||||
|
||||
#define ECB_CPP (__cplusplus+0)
|
||||
@@ -629,13 +644,18 @@ struct signalfd_siginfo
|
||||
#define ECB_MEMORY_FENCE do { } while (0)
|
||||
#endif
|
||||
|
||||
/* http://www-01.ibm.com/support/knowledgecenter/SSGH3R_13.1.0/com.ibm.xlcpp131.aix.doc/compiler_ref/compiler_builtins.html */
|
||||
#if __xlC__ && ECB_CPP
|
||||
#include <builtins.h>
|
||||
#endif
|
||||
|
||||
#ifndef ECB_MEMORY_FENCE
|
||||
#if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
|
||||
#if __i386 || __i386__
|
||||
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
|
||||
#define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
|
||||
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
|
||||
#elif __amd64 || __amd64__ || __x86_64 || __x86_64__
|
||||
#elif ECB_GCC_AMD64
|
||||
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory")
|
||||
#define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
|
||||
#define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
|
||||
@@ -683,16 +703,11 @@ struct signalfd_siginfo
|
||||
#define ECB_MEMORY_FENCE_ACQUIRE __atomic_thread_fence (__ATOMIC_ACQUIRE)
|
||||
#define ECB_MEMORY_FENCE_RELEASE __atomic_thread_fence (__ATOMIC_RELEASE)
|
||||
|
||||
/* The __has_feature syntax from clang is so misdesigned that we cannot use it
|
||||
* without risking compile time errors with other compilers. We *could*
|
||||
* define our own ecb_clang_has_feature, but I just can't be bothered to work
|
||||
* around this shit time and again.
|
||||
* #elif defined __clang && __has_feature (cxx_atomic)
|
||||
* // see comment below (stdatomic.h) about the C11 memory model.
|
||||
* #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
|
||||
* #define ECB_MEMORY_FENCE_ACQUIRE __c11_atomic_thread_fence (__ATOMIC_ACQUIRE)
|
||||
* #define ECB_MEMORY_FENCE_RELEASE __c11_atomic_thread_fence (__ATOMIC_RELEASE)
|
||||
*/
|
||||
#elif ECB_CLANG_EXTENSION(c_atomic)
|
||||
/* see comment below (stdatomic.h) about the C11 memory model. */
|
||||
#define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
|
||||
#define ECB_MEMORY_FENCE_ACQUIRE __c11_atomic_thread_fence (__ATOMIC_ACQUIRE)
|
||||
#define ECB_MEMORY_FENCE_RELEASE __c11_atomic_thread_fence (__ATOMIC_RELEASE)
|
||||
|
||||
#elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
|
||||
#define ECB_MEMORY_FENCE __sync_synchronize ()
|
||||
@@ -765,7 +780,7 @@ struct signalfd_siginfo
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if __cplusplus
|
||||
#if ECB_CPP
|
||||
#define ecb_inline static inline
|
||||
#elif ECB_GCC_VERSION(2,5)
|
||||
#define ecb_inline static __inline__
|
||||
@@ -789,47 +804,79 @@ typedef int ecb_bool;
|
||||
#define ECB_CONCAT(a, b) ECB_CONCAT_(a, b)
|
||||
#define ECB_STRINGIFY_(a) # a
|
||||
#define ECB_STRINGIFY(a) ECB_STRINGIFY_(a)
|
||||
#define ECB_STRINGIFY_EXPR(expr) ((expr), ECB_STRINGIFY_ (expr))
|
||||
|
||||
#define ecb_function_ ecb_inline
|
||||
|
||||
#if ECB_GCC_VERSION(3,1)
|
||||
#define ecb_attribute(attrlist) __attribute__(attrlist)
|
||||
#define ecb_is_constant(expr) __builtin_constant_p (expr)
|
||||
#define ecb_expect(expr,value) __builtin_expect ((expr),(value))
|
||||
#define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality)
|
||||
#if ECB_GCC_VERSION(3,1) || ECB_CLANG_VERSION(2,8)
|
||||
#define ecb_attribute(attrlist) __attribute__ (attrlist)
|
||||
#else
|
||||
#define ecb_attribute(attrlist)
|
||||
#endif
|
||||
|
||||
#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_constant_p)
|
||||
#define ecb_is_constant(expr) __builtin_constant_p (expr)
|
||||
#else
|
||||
/* possible C11 impl for integral types
|
||||
typedef struct ecb_is_constant_struct ecb_is_constant_struct;
|
||||
#define ecb_is_constant(expr) _Generic ((1 ? (struct ecb_is_constant_struct *)0 : (void *)((expr) - (expr)), ecb_is_constant_struct *: 0, default: 1)) */
|
||||
|
||||
#define ecb_is_constant(expr) 0
|
||||
#endif
|
||||
|
||||
#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_expect)
|
||||
#define ecb_expect(expr,value) __builtin_expect ((expr),(value))
|
||||
#else
|
||||
#define ecb_expect(expr,value) (expr)
|
||||
#endif
|
||||
|
||||
#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_prefetch)
|
||||
#define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality)
|
||||
#else
|
||||
#define ecb_prefetch(addr,rw,locality)
|
||||
#endif
|
||||
|
||||
/* no emulation for ecb_decltype */
|
||||
#if ECB_GCC_VERSION(4,5)
|
||||
#define ecb_decltype(x) __decltype(x)
|
||||
#elif ECB_GCC_VERSION(3,0)
|
||||
#define ecb_decltype(x) __typeof(x)
|
||||
#if ECB_CPP11
|
||||
// older implementations might have problems with decltype(x)::type, work around it
|
||||
template<class T> struct ecb_decltype_t { typedef T type; };
|
||||
#define ecb_decltype(x) ecb_decltype_t<decltype (x)>::type
|
||||
#elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8)
|
||||
#define ecb_decltype(x) __typeof__ (x)
|
||||
#endif
|
||||
|
||||
#if _MSC_VER >= 1300
|
||||
#define ecb_deprecated __declspec(deprecated)
|
||||
#define ecb_deprecated __declspec (deprecated)
|
||||
#else
|
||||
#define ecb_deprecated ecb_attribute ((__deprecated__))
|
||||
#endif
|
||||
|
||||
#define ecb_noinline ecb_attribute ((__noinline__))
|
||||
#if _MSC_VER >= 1500
|
||||
#define ecb_deprecated_message(msg) __declspec (deprecated (msg))
|
||||
#elif ECB_GCC_VERSION(4,5)
|
||||
#define ecb_deprecated_message(msg) ecb_attribute ((__deprecated__ (msg))
|
||||
#else
|
||||
#define ecb_deprecated_message(msg) ecb_deprecated
|
||||
#endif
|
||||
|
||||
#if _MSC_VER >= 1400
|
||||
#define ecb_noinline __declspec (noinline)
|
||||
#else
|
||||
#define ecb_noinline ecb_attribute ((__noinline__))
|
||||
#endif
|
||||
|
||||
#define ecb_unused ecb_attribute ((__unused__))
|
||||
#define ecb_const ecb_attribute ((__const__))
|
||||
#define ecb_pure ecb_attribute ((__pure__))
|
||||
|
||||
/* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx __declspec(noreturn) */
|
||||
#if ECB_C11
|
||||
#if ECB_C11 || __IBMC_NORETURN
|
||||
/* http://www-01.ibm.com/support/knowledgecenter/SSGH3R_13.1.0/com.ibm.xlcpp131.aix.doc/language_ref/noreturn.html */
|
||||
#define ecb_noreturn _Noreturn
|
||||
#elif ECB_CPP11
|
||||
#define ecb_noreturn [[noreturn]]
|
||||
#elif _MSC_VER >= 1200
|
||||
/* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx */
|
||||
#define ecb_noreturn __declspec (noreturn)
|
||||
#else
|
||||
#define ecb_noreturn ecb_attribute ((__noreturn__))
|
||||
#endif
|
||||
@@ -854,7 +901,10 @@ typedef int ecb_bool;
|
||||
#define ecb_unlikely(expr) ecb_expect_false (expr)
|
||||
|
||||
/* count trailing zero bits and count # of one bits */
|
||||
#if ECB_GCC_VERSION(3,4)
|
||||
#if ECB_GCC_VERSION(3,4) \
|
||||
|| (ECB_CLANG_BUILTIN(__builtin_clz) && ECB_CLANG_BUILTIN(__builtin_clzll) \
|
||||
&& ECB_CLANG_BUILTIN(__builtin_ctz) && ECB_CLANG_BUILTIN(__builtin_ctzll) \
|
||||
&& ECB_CLANG_BUILTIN(__builtin_popcount))
|
||||
/* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */
|
||||
#define ecb_ld32(x) (__builtin_clz (x) ^ 31)
|
||||
#define ecb_ld64(x) (__builtin_clzll (x) ^ 63)
|
||||
@@ -863,8 +913,8 @@ typedef int ecb_bool;
|
||||
#define ecb_popcount32(x) __builtin_popcount (x)
|
||||
/* no popcountll */
|
||||
#else
|
||||
ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const;
|
||||
ecb_function_ int
|
||||
ecb_function_ ecb_const int ecb_ctz32 (uint32_t x);
|
||||
ecb_function_ ecb_const int
|
||||
ecb_ctz32 (uint32_t x)
|
||||
{
|
||||
int r = 0;
|
||||
@@ -888,16 +938,16 @@ typedef int ecb_bool;
|
||||
return r;
|
||||
}
|
||||
|
||||
ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const;
|
||||
ecb_function_ int
|
||||
ecb_function_ ecb_const int ecb_ctz64 (uint64_t x);
|
||||
ecb_function_ ecb_const int
|
||||
ecb_ctz64 (uint64_t x)
|
||||
{
|
||||
int shift = x & 0xffffffffU ? 0 : 32;
|
||||
return ecb_ctz32 (x >> shift) + shift;
|
||||
}
|
||||
|
||||
ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const;
|
||||
ecb_function_ int
|
||||
ecb_function_ ecb_const int ecb_popcount32 (uint32_t x);
|
||||
ecb_function_ ecb_const int
|
||||
ecb_popcount32 (uint32_t x)
|
||||
{
|
||||
x -= (x >> 1) & 0x55555555;
|
||||
@@ -908,8 +958,8 @@ typedef int ecb_bool;
|
||||
return x >> 24;
|
||||
}
|
||||
|
||||
ecb_function_ int ecb_ld32 (uint32_t x) ecb_const;
|
||||
ecb_function_ int ecb_ld32 (uint32_t x)
|
||||
ecb_function_ ecb_const int ecb_ld32 (uint32_t x);
|
||||
ecb_function_ ecb_const int ecb_ld32 (uint32_t x)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
@@ -922,8 +972,8 @@ typedef int ecb_bool;
|
||||
return r;
|
||||
}
|
||||
|
||||
ecb_function_ int ecb_ld64 (uint64_t x) ecb_const;
|
||||
ecb_function_ int ecb_ld64 (uint64_t x)
|
||||
ecb_function_ ecb_const int ecb_ld64 (uint64_t x);
|
||||
ecb_function_ ecb_const int ecb_ld64 (uint64_t x)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
@@ -933,20 +983,20 @@ typedef int ecb_bool;
|
||||
}
|
||||
#endif
|
||||
|
||||
ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const;
|
||||
ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
|
||||
ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const;
|
||||
ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
|
||||
ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x);
|
||||
ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
|
||||
ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x);
|
||||
ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
|
||||
|
||||
ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const;
|
||||
ecb_function_ uint8_t ecb_bitrev8 (uint8_t x)
|
||||
ecb_function_ ecb_const uint8_t ecb_bitrev8 (uint8_t x);
|
||||
ecb_function_ ecb_const uint8_t ecb_bitrev8 (uint8_t x)
|
||||
{
|
||||
return ( (x * 0x0802U & 0x22110U)
|
||||
| (x * 0x8020U & 0x88440U)) * 0x10101U >> 16;
|
||||
| (x * 0x8020U & 0x88440U)) * 0x10101U >> 16;
|
||||
}
|
||||
|
||||
ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const;
|
||||
ecb_function_ uint16_t ecb_bitrev16 (uint16_t x)
|
||||
ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x);
|
||||
ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x)
|
||||
{
|
||||
x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1);
|
||||
x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2);
|
||||
@@ -956,8 +1006,8 @@ ecb_function_ uint16_t ecb_bitrev16 (uint16_t x)
|
||||
return x;
|
||||
}
|
||||
|
||||
ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const;
|
||||
ecb_function_ uint32_t ecb_bitrev32 (uint32_t x)
|
||||
ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x);
|
||||
ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x)
|
||||
{
|
||||
x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1);
|
||||
x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2);
|
||||
@@ -970,71 +1020,80 @@ ecb_function_ uint32_t ecb_bitrev32 (uint32_t x)
|
||||
|
||||
/* popcount64 is only available on 64 bit cpus as gcc builtin */
|
||||
/* so for this version we are lazy */
|
||||
ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const;
|
||||
ecb_function_ int
|
||||
ecb_function_ ecb_const int ecb_popcount64 (uint64_t x);
|
||||
ecb_function_ ecb_const int
|
||||
ecb_popcount64 (uint64_t x)
|
||||
{
|
||||
return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
|
||||
}
|
||||
|
||||
ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const;
|
||||
ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const;
|
||||
ecb_inline ecb_const uint8_t ecb_rotl8 (uint8_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint8_t ecb_rotr8 (uint8_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count);
|
||||
ecb_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count);
|
||||
|
||||
ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
|
||||
ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
|
||||
ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
|
||||
ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
|
||||
ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
|
||||
ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
|
||||
ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
|
||||
ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
|
||||
ecb_inline ecb_const uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
|
||||
ecb_inline ecb_const uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
|
||||
ecb_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
|
||||
ecb_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
|
||||
ecb_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
|
||||
ecb_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
|
||||
ecb_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
|
||||
ecb_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
|
||||
|
||||
#if ECB_GCC_VERSION(4,3)
|
||||
#if ECB_GCC_VERSION(4,3) || (ECB_CLANG_BUILTIN(__builtin_bswap32) && ECB_CLANG_BUILTIN(__builtin_bswap64))
|
||||
#if ECB_GCC_VERSION(4,8) || ECB_CLANG_BUILTIN(__builtin_bswap16)
|
||||
#define ecb_bswap16(x) __builtin_bswap16 (x)
|
||||
#else
|
||||
#define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16)
|
||||
#endif
|
||||
#define ecb_bswap32(x) __builtin_bswap32 (x)
|
||||
#define ecb_bswap64(x) __builtin_bswap64 (x)
|
||||
#elif _MSC_VER
|
||||
#include <stdlib.h>
|
||||
#define ecb_bswap16(x) ((uint16_t)_byteswap_ushort ((uint16_t)(x)))
|
||||
#define ecb_bswap32(x) ((uint32_t)_byteswap_ulong ((uint32_t)(x)))
|
||||
#define ecb_bswap64(x) ((uint64_t)_byteswap_uint64 ((uint64_t)(x)))
|
||||
#else
|
||||
ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const;
|
||||
ecb_function_ uint16_t
|
||||
ecb_function_ ecb_const uint16_t ecb_bswap16 (uint16_t x);
|
||||
ecb_function_ ecb_const uint16_t
|
||||
ecb_bswap16 (uint16_t x)
|
||||
{
|
||||
return ecb_rotl16 (x, 8);
|
||||
}
|
||||
|
||||
ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const;
|
||||
ecb_function_ uint32_t
|
||||
ecb_function_ ecb_const uint32_t ecb_bswap32 (uint32_t x);
|
||||
ecb_function_ ecb_const uint32_t
|
||||
ecb_bswap32 (uint32_t x)
|
||||
{
|
||||
return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16);
|
||||
}
|
||||
|
||||
ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const;
|
||||
ecb_function_ uint64_t
|
||||
ecb_function_ ecb_const uint64_t ecb_bswap64 (uint64_t x);
|
||||
ecb_function_ ecb_const uint64_t
|
||||
ecb_bswap64 (uint64_t x)
|
||||
{
|
||||
return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ECB_GCC_VERSION(4,5)
|
||||
#if ECB_GCC_VERSION(4,5) || ECB_CLANG_BUILTIN(__builtin_unreachable)
|
||||
#define ecb_unreachable() __builtin_unreachable ()
|
||||
#else
|
||||
/* this seems to work fine, but gcc always emits a warning for it :/ */
|
||||
ecb_inline void ecb_unreachable (void) ecb_noreturn;
|
||||
ecb_inline void ecb_unreachable (void) { }
|
||||
ecb_inline ecb_noreturn void ecb_unreachable (void);
|
||||
ecb_inline ecb_noreturn void ecb_unreachable (void) { }
|
||||
#endif
|
||||
|
||||
/* try to tell the compiler that some condition is definitely true */
|
||||
#define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0
|
||||
|
||||
ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const;
|
||||
ecb_inline unsigned char
|
||||
ecb_inline ecb_const unsigned char ecb_byteorder_helper (void);
|
||||
ecb_inline ecb_const unsigned char
|
||||
ecb_byteorder_helper (void)
|
||||
{
|
||||
/* the union code still generates code under pressure in gcc, */
|
||||
@@ -1043,7 +1102,7 @@ ecb_byteorder_helper (void)
|
||||
/* the reason why we have this horrible preprocessor mess */
|
||||
/* is to avoid it in all cases, at least on common architectures */
|
||||
/* or when using a recent enough gcc version (>= 4.6) */
|
||||
#if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64
|
||||
#if ((__i386 || __i386__) && !__VOS__) || _M_IX86 || ECB_GCC_AMD64 || ECB_MSVC_AMD64
|
||||
return 0x44;
|
||||
#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
return 0x44;
|
||||
@@ -1059,10 +1118,10 @@ ecb_byteorder_helper (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
ecb_inline ecb_bool ecb_big_endian (void) ecb_const;
|
||||
ecb_inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; }
|
||||
ecb_inline ecb_bool ecb_little_endian (void) ecb_const;
|
||||
ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; }
|
||||
ecb_inline ecb_const ecb_bool ecb_big_endian (void);
|
||||
ecb_inline ecb_const ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; }
|
||||
ecb_inline ecb_const ecb_bool ecb_little_endian (void);
|
||||
ecb_inline ecb_const ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; }
|
||||
|
||||
#if ECB_GCC_VERSION(3,0) || ECB_C99
|
||||
#define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0))
|
||||
@@ -1070,7 +1129,7 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
#define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n)))
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
#if ECB_CPP
|
||||
template<typename T>
|
||||
static inline T ecb_div_rd (T val, T div)
|
||||
{
|
||||
@@ -1104,7 +1163,7 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
/* the only noteworthy exception is ancient armle, which uses order 43218765 */
|
||||
#if 0 \
|
||||
|| __i386 || __i386__ \
|
||||
|| __amd64 || __amd64__ || __x86_64 || __x86_64__ \
|
||||
|| ECB_GCC_AMD64 \
|
||||
|| __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
|
||||
|| defined __s390__ || defined __s390x__ \
|
||||
|| defined __mips__ \
|
||||
@@ -1114,7 +1173,7 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
|| defined __m68k__ \
|
||||
|| defined __m88k__ \
|
||||
|| defined __sh__ \
|
||||
|| defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 \
|
||||
|| defined _M_IX86 || defined ECB_MSVC_AMD64 || defined _M_IA64 \
|
||||
|| (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) \
|
||||
|| defined __aarch64__
|
||||
#define ECB_STDFP 1
|
||||
@@ -1140,17 +1199,25 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
#define ECB_NAN ECB_INFINITY
|
||||
#endif
|
||||
|
||||
#if ECB_C99 || _XOPEN_VERSION >= 600 || _POSIX_VERSION >= 200112L
|
||||
#define ecb_ldexpf(x,e) ldexpf ((x), (e))
|
||||
#define ecb_frexpf(x,e) frexpf ((x), (e))
|
||||
#else
|
||||
#define ecb_ldexpf(x,e) (float) ldexp ((double) (x), (e))
|
||||
#define ecb_frexpf(x,e) (float) frexp ((double) (x), (e))
|
||||
#endif
|
||||
|
||||
/* converts an ieee half/binary16 to a float */
|
||||
ecb_function_ float ecb_binary16_to_float (uint16_t x) ecb_const;
|
||||
ecb_function_ float
|
||||
ecb_function_ ecb_const float ecb_binary16_to_float (uint16_t x);
|
||||
ecb_function_ ecb_const float
|
||||
ecb_binary16_to_float (uint16_t x)
|
||||
{
|
||||
int e = (x >> 10) & 0x1f;
|
||||
int m = x & 0x3ff;
|
||||
float r;
|
||||
|
||||
if (!e ) r = ldexpf (m , -24);
|
||||
else if (e != 31) r = ldexpf (m + 0x400, e - 25);
|
||||
if (!e ) r = ecb_ldexpf (m , -24);
|
||||
else if (e != 31) r = ecb_ldexpf (m + 0x400, e - 25);
|
||||
else if (m ) r = ECB_NAN;
|
||||
else r = ECB_INFINITY;
|
||||
|
||||
@@ -1158,8 +1225,8 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
}
|
||||
|
||||
/* convert a float to ieee single/binary32 */
|
||||
ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const;
|
||||
ecb_function_ uint32_t
|
||||
ecb_function_ ecb_const uint32_t ecb_float_to_binary32 (float x);
|
||||
ecb_function_ ecb_const uint32_t
|
||||
ecb_float_to_binary32 (float x)
|
||||
{
|
||||
uint32_t r;
|
||||
@@ -1176,7 +1243,7 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
if (x < -3.40282346638528860e+38f) return 0xff800000U;
|
||||
if (x != x ) return 0x7fbfffffU;
|
||||
|
||||
m = frexpf (x, &e) * 0x1000000U;
|
||||
m = ecb_frexpf (x, &e) * 0x1000000U;
|
||||
|
||||
r = m & 0x80000000U;
|
||||
|
||||
@@ -1198,8 +1265,8 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
}
|
||||
|
||||
/* converts an ieee single/binary32 to a float */
|
||||
ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const;
|
||||
ecb_function_ float
|
||||
ecb_function_ ecb_const float ecb_binary32_to_float (uint32_t x);
|
||||
ecb_function_ ecb_const float
|
||||
ecb_binary32_to_float (uint32_t x)
|
||||
{
|
||||
float r;
|
||||
@@ -1219,7 +1286,7 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
e = 1;
|
||||
|
||||
/* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */
|
||||
r = ldexpf (x * (0.5f / 0x800000U), e - 126);
|
||||
r = ecb_ldexpf (x * (0.5f / 0x800000U), e - 126);
|
||||
|
||||
r = neg ? -r : r;
|
||||
#endif
|
||||
@@ -1228,8 +1295,8 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
}
|
||||
|
||||
/* convert a double to ieee double/binary64 */
|
||||
ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const;
|
||||
ecb_function_ uint64_t
|
||||
ecb_function_ ecb_const uint64_t ecb_double_to_binary64 (double x);
|
||||
ecb_function_ ecb_const uint64_t
|
||||
ecb_double_to_binary64 (double x)
|
||||
{
|
||||
uint64_t r;
|
||||
@@ -1268,8 +1335,8 @@ ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () ==
|
||||
}
|
||||
|
||||
/* converts an ieee double/binary64 to a double */
|
||||
ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const;
|
||||
ecb_function_ double
|
||||
ecb_function_ ecb_const double ecb_binary64_to_double (uint64_t x);
|
||||
ecb_function_ ecb_const double
|
||||
ecb_binary64_to_double (uint64_t x)
|
||||
{
|
||||
double r;
|
||||
@@ -2537,12 +2604,10 @@ ev_recommended_backends (void) EV_THROW
|
||||
unsigned int flags = ev_supported_backends ();
|
||||
|
||||
#ifndef __NetBSD__
|
||||
#ifndef __FreeBSD__
|
||||
/* kqueue is borked on everything but netbsd apparently */
|
||||
/* it usually doesn't work correctly on anything but sockets and pipes */
|
||||
flags &= ~EVBACKEND_KQUEUE;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
/* only select works correctly on that "unix-certified" platform */
|
||||
flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */
|
||||
|
||||
+14
-7
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libev native API header
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012,2015 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
@@ -42,12 +42,16 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define EV_CPP(x) x
|
||||
# if __cplusplus >= 201103L
|
||||
# define EV_THROW noexcept
|
||||
# else
|
||||
# define EV_THROW throw ()
|
||||
# endif
|
||||
#else
|
||||
# define EV_CPP(x)
|
||||
# define EV_THROW
|
||||
#endif
|
||||
|
||||
#define EV_THROW EV_CPP(throw())
|
||||
|
||||
EV_CPP(extern "C" {)
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -148,6 +152,8 @@ EV_CPP(extern "C" {)
|
||||
|
||||
typedef double ev_tstamp;
|
||||
|
||||
#include <string.h> /* for memmove */
|
||||
|
||||
#ifndef EV_ATOMIC_T
|
||||
# include <signal.h>
|
||||
# define EV_ATOMIC_T sig_atomic_t volatile
|
||||
@@ -205,7 +211,7 @@ struct ev_loop;
|
||||
/*****************************************************************************/
|
||||
|
||||
#define EV_VERSION_MAJOR 4
|
||||
#define EV_VERSION_MINOR 19
|
||||
#define EV_VERSION_MINOR 20
|
||||
|
||||
/* eventmask, revents, events... */
|
||||
enum {
|
||||
@@ -660,7 +666,7 @@ EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW;
|
||||
EV_API_DECL void *ev_userdata (EV_P) EV_THROW;
|
||||
typedef void (*ev_loop_callback)(EV_P);
|
||||
EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW;
|
||||
/* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out*/
|
||||
/* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out */
|
||||
EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW;
|
||||
|
||||
EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */
|
||||
@@ -715,7 +721,8 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
|
||||
#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
|
||||
#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */
|
||||
|
||||
#define ev_cb(ev) (ev)->cb /* rw */
|
||||
#define ev_cb_(ev) (ev)->cb /* rw */
|
||||
#define ev_cb(ev) (memmove (&ev_cb_ (ev), &((ev_watcher *)(ev))->cb, sizeof (ev_cb_ (ev))), (ev)->cb)
|
||||
|
||||
#if EV_MINPRI == EV_MAXPRI
|
||||
# define ev_priority(ev) ((ev), EV_MINPRI)
|
||||
@@ -728,7 +735,7 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
|
||||
#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
|
||||
|
||||
#ifndef ev_set_cb
|
||||
# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
|
||||
# define ev_set_cb(ev,cb_) (ev_cb_ (ev) = (cb_), memmove (&((ev_watcher *)(ev))->cb, &ev_cb_ (ev), sizeof (ev_cb_ (ev))))
|
||||
#endif
|
||||
|
||||
/* stopping (enabling, adding) a watcher does nothing if it is already running */
|
||||
|
||||
+1
-1
@@ -3902,7 +3902,7 @@ files, F<my_ev.h> and F<my_ev.c> that include the respective libev files:
|
||||
|
||||
// my_ev.h
|
||||
#define EV_CB_DECLARE(type) struct my_coro *cb;
|
||||
#define EV_CB_INVOKE(watcher) switch_to ((watcher)->cb);
|
||||
#define EV_CB_INVOKE(watcher) switch_to ((watcher)->cb)
|
||||
#include "../libev/ev.h"
|
||||
|
||||
// my_ev.c
|
||||
|
||||
Reference in New Issue
Block a user