libev-4.22.tar.gz 2015-12-20
parent
e3a384312f
commit
93823e6ca6
135
Changes
135
Changes
|
@ -1,5 +1,134 @@
|
|||
Revision history for libev, a high-performance and full-featured event loop.
|
||||
|
||||
TODO: ev_loop_wakeup
|
||||
TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
|
||||
TODO: faq, process a thing in each iteration
|
||||
TODO: dbeugging tips, ev_verify, ev_init twice
|
||||
TODO: ev_break for immediate exit (EVBREAK_NOW?)
|
||||
TODO: ev_feed_child_event
|
||||
TODO: document the special problem of signals around fork.
|
||||
TODO: store pid for each signal
|
||||
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: document requirements for function pointers and calling conventions.
|
||||
|
||||
4.22 Sun Dec 20 22:11:50 CET 2015
|
||||
- when epoll detects unremovable fds in the fd set, rebuild
|
||||
only the epoll descriptor, not the signal pipe, to avoid
|
||||
SIGPIPE in ev_async_send. This doesn't solve it on fork,
|
||||
so document what needs to be done in ev_loop_fork
|
||||
(analyzed by Benjamin Mahler).
|
||||
- remove superfluous sys/timeb.h include on win32
|
||||
(analyzed by Jason Madden).
|
||||
- updated libecb.
|
||||
|
||||
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,
|
||||
C++ doesn't support typedefs for function pointers fully, so the affected
|
||||
declarations have to spell out the types each time.
|
||||
- when not using autoconf, tighten the check for clock_gettime and related
|
||||
functionality.
|
||||
|
||||
4.18 Fri Sep 5 17:55:26 CEST 2014
|
||||
- events on files were not always generated properly with the
|
||||
epoll backend (testcase by Assaf Inbal).
|
||||
- mark event pipe fd as cloexec after a fork (analyzed by Sami Farin).
|
||||
- (ecb) support m68k, m88k and sh (patch by Miod Vallat).
|
||||
- use a reasonable fallback for EV_NSIG instead of erroring out
|
||||
when we can't detect the signal set size.
|
||||
- in the absence of autoconf, do not use the clock syscall
|
||||
on glibc >= 2.17 (avoids the syscall AND -lrt on systems
|
||||
doing clock_gettime in userspace).
|
||||
- ensure extern "C" function pointers are used for externally-visible
|
||||
loop callbacks (not watcher callbacks yet).
|
||||
- (ecb) work around memory barriers and volatile apparently both being
|
||||
broken in visual studio 2008 and later (analysed and patch by Nicolas Noble).
|
||||
|
||||
4.15 Fri Mar 1 12:04:50 CET 2013
|
||||
- destroying a non-default loop would stop the global waitpid
|
||||
watcher (Denis Bilenko).
|
||||
- queueing pending watchers of higher priority from a watcher now invokes
|
||||
them in a timely fashion (reported by Denis Bilenko).
|
||||
- add throw() to all libev functions that cannot throw exceptions, for
|
||||
further code size decrease when compiling for C++.
|
||||
- add throw () to callbacks that must not throw exceptions (allocator,
|
||||
syserr, loop acquire/release, periodic reschedule cbs).
|
||||
- fix event_base_loop return code, add event_get_callback, event_base_new,
|
||||
event_base_get_method calls to improve libevent 1.x emulation and add
|
||||
some libevent 2.x functionality (based on a patch by Jeff Davey).
|
||||
- add more memory fences to fix a bug reported by Jeff Davey. Better
|
||||
be overfenced than underprotected.
|
||||
- ev_run now returns a boolean status (true meaning watchers are
|
||||
still active).
|
||||
- ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with
|
||||
libev's EV_ERROR (reported by 191919).
|
||||
- (ecb) add memory fence support for xlC (Darin McBride).
|
||||
- (ecb) add memory fence support for gcc-mips (Anton Kirilov).
|
||||
- (ecb) add memory fence support for gcc-alpha (Christian Weisgerber).
|
||||
- work around some kernels losing file descriptors by leaking
|
||||
the kqueue descriptor in the child.
|
||||
- work around linux inotify not reporting IN_ATTRIB changes for directories
|
||||
in many cases.
|
||||
- include sys/syscall.h instead of plain syscall.h.
|
||||
- check for io watcher loops in ev_verify, check for the most
|
||||
common reported usage bug in ev_io_start.
|
||||
- choose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET.
|
||||
- always use WSASend/WSARecv directly on windows, hoping that this
|
||||
works in all cases (unlike read/write/send/recv...).
|
||||
- try to detect signals around a fork faster (test program by
|
||||
Denis Bilenko).
|
||||
- work around recent glibc versions that leak memory in realloc.
|
||||
- rename ev::embed::set to ev::embed::set_embed to avoid clashing
|
||||
the watcher base set (loop) method.
|
||||
- rewrite the async/signal pipe logic to always keep a valid fd, which
|
||||
simplifies (and hopefully correctifies :) the race checking
|
||||
on fork, at the cost of one extra fd.
|
||||
- add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of
|
||||
inotify-supporting filesystems.
|
||||
- move orig_CFLAGS assignment to after AC_INIT, as newer autoconf
|
||||
versions ignore it before
|
||||
(https://bugzilla.redhat.com/show_bug.cgi?id=908096).
|
||||
- add some untested android support.
|
||||
- enum expressions must be of type int (reported by Juan Pablo L).
|
||||
|
||||
4.11 Sat Feb 4 19:52:39 CET 2012
|
||||
- INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
|
||||
was documented already, but not implemented in the repeating case.
|
||||
- new compiletime symbols: EV_NO_SMP and EV_NO_THREADS.
|
||||
- fix a race where the workaround against the epoll fork bugs
|
||||
caused signals to not be handled anymore.
|
||||
- correct backend_fudge for most backends, and implement a windows
|
||||
specific workaround to avoid looping because we call both
|
||||
select and Sleep, both with different time resolutions.
|
||||
- document range and guarantees of ev_sleep.
|
||||
- document reasonable ranges for periodics interval and offset.
|
||||
- rename backend_fudge to backend_mintime to avoid future confusion :)
|
||||
- change the default periodic reschedule function to hopefully be more
|
||||
exact and correct even in corner cases or in the far future.
|
||||
- do not rely on -lm anymore: use it when available but use our
|
||||
own floor () if it is missing. This should make it easier to embed,
|
||||
as no external libraries are required.
|
||||
- strategically import macros from libecb and mark rarely-used functions
|
||||
as cache-cold (saving almost 2k code size on typical amd64 setups).
|
||||
- add Symbols.ev and Symbols.event files, that were missing.
|
||||
- fix backend_mintime value for epoll (was 1/1024, is 1/1000 now).
|
||||
- fix #3 "be smart about timeouts" to not "deadlock" when
|
||||
timeout == now, also improve the section overall.
|
||||
- avoid "AVOIDING FINISHING BEFORE RETURNING" idiom.
|
||||
- support new EV_API_STATIC mode to make all libev symbols
|
||||
static.
|
||||
- supply default CFLAGS of -g -O3 with gcc when original CFLAGS
|
||||
were empty.
|
||||
|
||||
4.04 Wed Feb 16 09:01:51 CET 2011
|
||||
- fix two problems in the native win32 backend, where reuse of fd's
|
||||
with different underlying handles caused handles not to be removed
|
||||
|
@ -94,7 +223,7 @@ Revision history for libev, a high-performance and full-featured event loop.
|
|||
that this is a race condition regardless of EV_SIGNALFD.
|
||||
- backport inotify code to C89.
|
||||
- inotify file descriptors could leak into child processes.
|
||||
- ev_stat watchers could keep an errornous extra ref on the loop,
|
||||
- ev_stat watchers could keep an erroneous extra ref on the loop,
|
||||
preventing exit when unregistering all watchers (testcases
|
||||
provided by ry@tinyclouds.org).
|
||||
- implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
|
||||
|
@ -162,8 +291,8 @@ Revision history for libev, a high-performance and full-featured event loop.
|
|||
Malek Hadj-Ali).
|
||||
- implement ev_suspend and ev_resume.
|
||||
- new EV_CUSTOM revents flag for use by applications.
|
||||
- add documentation section about priorites.
|
||||
- add a glossary to the dcoumentation.
|
||||
- add documentation section about priorities.
|
||||
- add a glossary to the documentation.
|
||||
- extend the ev_fork description slightly.
|
||||
- optimize a jump out of call_pending.
|
||||
|
||||
|
|
3
LICENSE
3
LICENSE
|
@ -1,4 +1,5 @@
|
|||
All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.
|
||||
All files in libev are
|
||||
Copyright (c)2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
|
|
@ -5,7 +5,7 @@ VERSION_INFO = 4:0:0
|
|||
EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
|
||||
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.3 ev.pod
|
||||
ev.3 ev.pod Symbols.ev Symbols.event
|
||||
|
||||
man_MANS = ev.3
|
||||
|
||||
|
@ -16,3 +16,5 @@ lib_LTLIBRARIES = libev.la
|
|||
libev_la_SOURCES = ev.c event.c
|
||||
libev_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||
|
||||
ev.3: ev.pod
|
||||
pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@
|
||||
|
|
424
Makefile.in
424
Makefile.in
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.1 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 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,6 +16,51 @@
|
|||
|
||||
|
||||
VPATH = @srcdir@
|
||||
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 \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
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@
|
||||
|
@ -36,10 +80,11 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(top_srcdir)/configure config.guess \
|
||||
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
|
||||
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)/libev.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
|
@ -72,49 +117,112 @@ am__nobase_list = $(am__nobase_strip_setup); \
|
|||
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)
|
||||
libev_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libev_la_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
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 $@
|
||||
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) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(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_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
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_CCLD_1 =
|
||||
SOURCES = $(libev_la_SOURCES)
|
||||
DIST_SOURCES = $(libev_la_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
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 = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(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@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
@ -128,6 +236,7 @@ CPPFLAGS = @CPPFLAGS@
|
|||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
|
@ -152,6 +261,7 @@ LN_S = @LN_S@
|
|||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
|
@ -177,6 +287,7 @@ abs_builddir = @abs_builddir@
|
|||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
|
@ -209,7 +320,6 @@ libdir = @libdir@
|
|||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
|
@ -230,7 +340,7 @@ VERSION_INFO = 4:0:0
|
|||
EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
|
||||
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.3 ev.pod
|
||||
ev.3 ev.pod Symbols.ev Symbols.event
|
||||
|
||||
man_MANS = ev.3
|
||||
include_HEADERS = ev.h ev++.h event.h
|
||||
|
@ -242,7 +352,7 @@ all: config.h
|
|||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
am--refresh:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
|
@ -278,10 +388,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
@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
|
||||
|
@ -293,9 +401,9 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
|
@ -303,6 +411,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
|||
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)"; \
|
||||
}
|
||||
|
@ -318,14 +428,17 @@ uninstall-libLTLIBRARIES:
|
|||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_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"; \
|
||||
done
|
||||
libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES)
|
||||
$(libev_la_LINK) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS)
|
||||
@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) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
@ -337,25 +450,25 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@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@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@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@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@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@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
@ -367,11 +480,18 @@ distclean-libtool:
|
|||
-rm -f libtool config.lt
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
{ 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'; \
|
||||
@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"; \
|
||||
|
@ -400,13 +520,14 @@ uninstall-man3:
|
|||
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,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@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"; \
|
||||
|
@ -420,30 +541,17 @@ uninstall-includeHEADERS:
|
|||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(includedir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
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
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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; \
|
||||
|
@ -455,15 +563,11 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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
|
||||
|
@ -472,24 +576,33 @@ 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)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically \`make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
|
@ -530,36 +643,42 @@ distdir: $(DISTFILES)
|
|||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__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 -c >$(distdir).tar.xz
|
||||
$(am__remove_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__remove_distdir)
|
||||
$(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__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__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
|
||||
|
@ -570,8 +689,8 @@ distcheck: dist
|
|||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
|
@ -581,17 +700,19 @@ distcheck: dist
|
|||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
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 --srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& ../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
|
@ -614,13 +735,21 @@ distcheck: dist
|
|||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
$(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:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@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)"; \
|
||||
|
@ -653,10 +782,15 @@ install-am: all-am
|
|||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
@ -747,25 +881,29 @@ uninstall-man: uninstall-man3
|
|||
|
||||
.MAKE: all install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzma 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 uninstall uninstall-am uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES uninstall-man uninstall-man3
|
||||
.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
|
||||
pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
16
README
16
README
|
@ -24,23 +24,23 @@ ABOUT
|
|||
- relative timers/timeouts (handle time jumps).
|
||||
- fast intra-thread communication between multiple
|
||||
event loops (with optional fast linux eventfd backend).
|
||||
- extremely easy to embed.
|
||||
- very small codebase, no bloated library.
|
||||
- extremely easy to embed (fully documented, no dependencies,
|
||||
autoconf supported but optional).
|
||||
- very small codebase, no bloated library, simple code.
|
||||
- fully extensible by being able to plug into the event loop,
|
||||
integrate other event loops, integrate other event loop users.
|
||||
- very little memory use (small watchers, small event loop data).
|
||||
- optional C++ interface allowing method and function callbacks
|
||||
at no extra memory or runtime overhead.
|
||||
- optional Perl interface with similar characteristics (capable
|
||||
of running Glib/Gtk2 on libev, interfaces with Net::SNMP and
|
||||
libadns).
|
||||
of running Glib/Gtk2 on libev).
|
||||
- support for other languages (multiple C++ interfaces, D, Ruby,
|
||||
Python) available from third-parties.
|
||||
|
||||
Examples of programs that embed libev: the EV perl module,
|
||||
rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the Deliantra MMORPG
|
||||
server (http://www.deliantra.net/), Rubinius (a next-generation Ruby
|
||||
VM), the Ebb web server, the Rev event toolkit.
|
||||
Examples of programs that embed libev: the EV perl module, node.js,
|
||||
auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
|
||||
Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a
|
||||
next-generation Ruby VM), the Ebb web server, the Rev event toolkit.
|
||||
|
||||
|
||||
CONTRIBUTORS
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
ev_async_send
|
||||
ev_async_start
|
||||
ev_async_stop
|
||||
ev_backend
|
||||
ev_break
|
||||
ev_check_start
|
||||
ev_check_stop
|
||||
ev_child_start
|
||||
ev_child_stop
|
||||
ev_cleanup_start
|
||||
ev_cleanup_stop
|
||||
ev_clear_pending
|
||||
ev_default_loop
|
||||
ev_default_loop_ptr
|
||||
ev_depth
|
||||
ev_embed_start
|
||||
ev_embed_stop
|
||||
ev_embed_sweep
|
||||
ev_embeddable_backends
|
||||
ev_feed_event
|
||||
ev_feed_fd_event
|
||||
ev_feed_signal
|
||||
ev_feed_signal_event
|
||||
ev_fork_start
|
||||
ev_fork_stop
|
||||
ev_idle_start
|
||||
ev_idle_stop
|
||||
ev_invoke
|
||||
ev_invoke_pending
|
||||
ev_io_start
|
||||
ev_io_stop
|
||||
ev_iteration
|
||||
ev_loop_destroy
|
||||
ev_loop_fork
|
||||
ev_loop_new
|
||||
ev_now
|
||||
ev_now_update
|
||||
ev_once
|
||||
ev_pending_count
|
||||
ev_periodic_again
|
||||
ev_periodic_start
|
||||
ev_periodic_stop
|
||||
ev_prepare_start
|
||||
ev_prepare_stop
|
||||
ev_recommended_backends
|
||||
ev_ref
|
||||
ev_resume
|
||||
ev_run
|
||||
ev_set_allocator
|
||||
ev_set_invoke_pending_cb
|
||||
ev_set_io_collect_interval
|
||||
ev_set_loop_release_cb
|
||||
ev_set_syserr_cb
|
||||
ev_set_timeout_collect_interval
|
||||
ev_set_userdata
|
||||
ev_signal_start
|
||||
ev_signal_stop
|
||||
ev_sleep
|
||||
ev_stat_start
|
||||
ev_stat_stat
|
||||
ev_stat_stop
|
||||
ev_supported_backends
|
||||
ev_suspend
|
||||
ev_time
|
||||
ev_timer_again
|
||||
ev_timer_remaining
|
||||
ev_timer_start
|
||||
ev_timer_stop
|
||||
ev_unref
|
||||
ev_userdata
|
||||
ev_verify
|
||||
ev_version_major
|
||||
ev_version_minor
|
|
@ -0,0 +1,24 @@
|
|||
event_active
|
||||
event_add
|
||||
event_base_dispatch
|
||||
event_base_free
|
||||
event_base_get_method
|
||||
event_base_loop
|
||||
event_base_loopexit
|
||||
event_base_new
|
||||
event_base_once
|
||||
event_base_priority_init
|
||||
event_base_set
|
||||
event_del
|
||||
event_dispatch
|
||||
event_get_callback
|
||||
event_get_method
|
||||
event_get_version
|
||||
event_init
|
||||
event_loop
|
||||
event_loopexit
|
||||
event_once
|
||||
event_pending
|
||||
event_priority_init
|
||||
event_priority_set
|
||||
event_set
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
libtoolize --force
|
||||
automake --add-missing --force-missing
|
||||
autoreconf
|
||||
|
||||
autoreconf --install --symlink --force
|
||||
|
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
|||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* "use syscall interface for clock_gettime" */
|
||||
/* Define to 1 to use the syscall interface for clock_gettime */
|
||||
#undef HAVE_CLOCK_SYSCALL
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
|
@ -15,6 +15,9 @@
|
|||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#undef HAVE_EVENTFD
|
||||
|
||||
/* Define to 1 if the floor function is available */
|
||||
#undef HAVE_FLOOR
|
||||
|
||||
/* Define to 1 if you have the `inotify_init' function. */
|
||||
#undef HAVE_INOTIFY_INIT
|
||||
|
||||
|
@ -24,9 +27,6 @@
|
|||
/* Define to 1 if you have the `kqueue' function. */
|
||||
#undef HAVE_KQUEUE
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the `rt' library (-lrt). */
|
||||
#undef HAVE_LIBRT
|
||||
|
||||
|
|
|
@ -1,44 +1,40 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2008-01-16'
|
||||
timestamp='2014-09-11'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# 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
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
|
@ -72,8 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -120,12 +115,18 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
android-linux)
|
||||
os=-linux-android
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
|
@ -148,10 +149,13 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-bluegene*)
|
||||
os=-cnk
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
basic_machine=$1
|
||||
|
@ -166,10 +170,10 @@ case $os in
|
|||
os=-chorusos
|
||||
basic_machine=$1
|
||||
;;
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
-chorusrdb)
|
||||
os=-chorusrdb
|
||||
basic_machine=$1
|
||||
;;
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
|
@ -214,6 +218,12 @@ case $os in
|
|||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*178)
|
||||
os=-lynxos178
|
||||
;;
|
||||
-lynx*5)
|
||||
os=-lynxos5
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
|
@ -238,59 +248,86 @@ case $basic_machine in
|
|||
# Some are omitted here because they have special meanings below.
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| open8 | or1k | or1knd | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| spu \
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| we32k \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
c54x)
|
||||
basic_machine=tic54x-unknown
|
||||
;;
|
||||
c55x)
|
||||
basic_machine=tic55x-unknown
|
||||
;;
|
||||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
|
@ -300,6 +337,21 @@ case $basic_machine in
|
|||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
strongarm | thumb | xscale)
|
||||
basic_machine=arm-unknown
|
||||
;;
|
||||
xgate)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
xscaleeb)
|
||||
basic_machine=armeb-unknown
|
||||
;;
|
||||
|
||||
xscaleel)
|
||||
basic_machine=armel-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
|
@ -314,64 +366,82 @@ case $basic_machine in
|
|||
# Recognize the basic CPU types with company name.
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| k1om-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64octeon-* | mips64octeonel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64r5900-* | mips64r5900el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| or1k*-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
| z8k-* | z80-*)
|
||||
;;
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
|
@ -393,7 +463,7 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
|
@ -439,6 +509,10 @@ case $basic_machine in
|
|||
basic_machine=m68k-apollo
|
||||
os=-bsd
|
||||
;;
|
||||
aros)
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
|
@ -455,10 +529,27 @@ case $basic_machine in
|
|||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
bluegene*)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-cnk
|
||||
;;
|
||||
c54x-*)
|
||||
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c55x-*)
|
||||
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c6x-*)
|
||||
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
|
@ -487,7 +578,7 @@ case $basic_machine in
|
|||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16)
|
||||
cr16 | cr16-*)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
|
@ -526,6 +617,10 @@ case $basic_machine in
|
|||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dicos)
|
||||
basic_machine=i686-pc
|
||||
os=-dicos
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
|
@ -641,7 +736,6 @@ case $basic_machine in
|
|||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
|
@ -699,8 +793,15 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
|
@ -728,6 +829,10 @@ case $basic_machine in
|
|||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
moxiebox)
|
||||
basic_machine=moxie-unknown
|
||||
os=-moxiebox
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
|
@ -735,10 +840,18 @@ case $basic_machine in
|
|||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
nacl)
|
||||
basic_machine=le32-unknown
|
||||
os=-nacl
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
|
@ -803,6 +916,12 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
neo-tandem)
|
||||
basic_machine=neo-tandem
|
||||
;;
|
||||
nse-tandem)
|
||||
basic_machine=nse-tandem
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -885,9 +1004,10 @@ case $basic_machine in
|
|||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
|
@ -912,7 +1032,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
@ -981,6 +1105,9 @@ case $basic_machine in
|
|||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
strongarm-* | thumb-*)
|
||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
|
@ -1037,20 +1164,8 @@ case $basic_machine in
|
|||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
|
@ -1120,6 +1235,9 @@ case $basic_machine in
|
|||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
xscale-* | xscalee[bl]-*)
|
||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
|
@ -1128,6 +1246,10 @@ case $basic_machine in
|
|||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
z80-*-coff)
|
||||
basic_machine=z80-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
|
@ -1166,7 +1288,7 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
|
@ -1213,9 +1335,12 @@ esac
|
|||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
;;
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
|
@ -1236,29 +1361,31 @@ case $os in
|
|||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
@ -1297,7 +1424,7 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
|
@ -1346,7 +1473,7 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
|
@ -1382,12 +1509,14 @@ case $os in
|
|||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
@ -1410,10 +1539,10 @@ else
|
|||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
|
@ -1425,8 +1554,23 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=-coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
|
@ -1446,14 +1590,11 @@ case $basic_machine in
|
|||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
|
@ -1480,7 +1621,7 @@ case $basic_machine in
|
|||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
|
@ -1585,7 +1726,7 @@ case $basic_machine in
|
|||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-aix*)
|
||||
-cnk*|-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-beos*)
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -1,17 +1,26 @@
|
|||
AC_INIT
|
||||
|
||||
orig_CFLAGS="$CFLAGS"
|
||||
|
||||
AC_CONFIG_SRCDIR([ev_epoll.c])
|
||||
|
||||
AM_INIT_AUTOMAKE(libev,4.04) dnl also update ev.h!
|
||||
dnl also update ev.h!
|
||||
AM_INIT_AUTOMAKE(libev,4.22)
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
dnl Supply default CFLAGS, if not specified
|
||||
if test -z "$orig_CFLAGS"; then
|
||||
if test x$GCC = xyes; then
|
||||
CFLAGS="-g -O3"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
if test "x$GCC" = xyes ; then
|
||||
CFLAGS="-O3 $CFLAGS"
|
||||
fi
|
||||
|
||||
m4_include([libev.m4])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
|
525
depcomp
525
depcomp
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
|
@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
@ -40,11 +39,11 @@ as side-effects.
|
|||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
|
@ -57,6 +56,66 @@ EOF
|
|||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
|
@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
|
@ -80,18 +142,32 @@ if test "$depmode" = hp; then
|
|||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
depmode=msvisualcpp
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
|
@ -114,8 +190,7 @@ gcc3)
|
|||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -123,13 +198,17 @@ gcc3)
|
|||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
|
@ -137,31 +216,31 @@ gcc)
|
|||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -179,8 +258,7 @@ sgi)
|
|||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -188,43 +266,41 @@ sgi)
|
|||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
|
@ -237,9 +313,7 @@ aix)
|
|||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -248,44 +322,100 @@ aix)
|
|||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -297,8 +427,8 @@ icc)
|
|||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -309,9 +439,8 @@ hp2)
|
|||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
|
@ -322,8 +451,7 @@ hp2)
|
|||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
@ -333,77 +461,107 @@ hp2)
|
|||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
|
@ -422,7 +580,7 @@ dashmstdout)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -442,18 +600,18 @@ dashmstdout)
|
|||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
@ -503,12 +661,15 @@ makedepend)
|
|||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
|
@ -525,7 +686,7 @@ cpp)
|
|||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
|
@ -544,10 +705,10 @@ cpp)
|
|||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
|
@ -579,23 +740,23 @@ msvisualcpp)
|
|||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
|
18
ev++.h
18
ev++.h
|
@ -286,7 +286,7 @@ namespace ev {
|
|||
template<class K, void (K::*method)(int)>
|
||||
static void method_thunk (int revents, void *arg)
|
||||
{
|
||||
static_cast<K *>(arg)->*method
|
||||
(static_cast<K *>(arg)->*method)
|
||||
(revents);
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ namespace ev {
|
|||
template<class K, void (K::*method)()>
|
||||
static void method_noargs_thunk (int revents, void *arg)
|
||||
{
|
||||
static_cast<K *>(arg)->*method
|
||||
(static_cast<K *>(arg)->*method)
|
||||
();
|
||||
}
|
||||
|
||||
|
@ -513,13 +513,13 @@ namespace ev {
|
|||
|
||||
void feed_event (int revents) throw ()
|
||||
{
|
||||
ev_feed_event (EV_A_ static_cast<const ev_watcher *>(this), revents);
|
||||
ev_feed_event (EV_A_ static_cast<ev_watcher *>(this), revents);
|
||||
}
|
||||
};
|
||||
|
||||
inline tstamp now () throw ()
|
||||
inline tstamp now (EV_P) throw ()
|
||||
{
|
||||
return ev_time ();
|
||||
return ev_now (EV_A);
|
||||
}
|
||||
|
||||
inline void delay (tstamp interval) throw ()
|
||||
|
@ -552,12 +552,12 @@ namespace ev {
|
|||
return ev_embeddable_backends ();
|
||||
}
|
||||
|
||||
inline void set_allocator (void *(*cb)(void *ptr, long size)) throw ()
|
||||
inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw ()
|
||||
{
|
||||
ev_set_allocator (cb);
|
||||
}
|
||||
|
||||
inline void set_syserr_cb (void (*cb)(const char *msg)) throw ()
|
||||
inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw ()
|
||||
{
|
||||
ev_set_syserr_cb (cb);
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ namespace ev {
|
|||
}
|
||||
#endif
|
||||
|
||||
/* using a template here would require quite a bit more lines,
|
||||
/* using a template here would require quite a few more lines,
|
||||
* so a macro solution was chosen */
|
||||
#define EV_BEGIN_WATCHER(cppstem,cstem) \
|
||||
\
|
||||
|
@ -764,7 +764,7 @@ namespace ev {
|
|||
|
||||
#if EV_EMBED_ENABLE
|
||||
EV_BEGIN_WATCHER (embed, embed)
|
||||
void set (struct ev_loop *embedded_loop) throw ()
|
||||
void set_embed (struct ev_loop *embedded_loop) throw ()
|
||||
{
|
||||
int active = is_active ();
|
||||
if (active) stop ();
|
||||
|
|
243
ev.h
243
ev.h
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libev native API header
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010,2011 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,8 +42,14 @@
|
|||
|
||||
#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
|
||||
|
||||
EV_CPP(extern "C" {)
|
||||
|
@ -56,7 +62,11 @@ EV_CPP(extern "C" {)
|
|||
#endif
|
||||
|
||||
#ifndef EV_FEATURES
|
||||
# define EV_FEATURES 0x7f
|
||||
# if defined __OPTIMIZE_SIZE__
|
||||
# define EV_FEATURES 0x7c
|
||||
# else
|
||||
# define EV_FEATURES 0x7f
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define EV_FEATURE_CODE ((EV_FEATURES) & 1)
|
||||
|
@ -142,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
|
||||
|
@ -185,6 +197,12 @@ struct ev_loop;
|
|||
# define EV_INLINE static
|
||||
#endif
|
||||
|
||||
#ifdef EV_API_STATIC
|
||||
# define EV_API_DECL static
|
||||
#else
|
||||
# define EV_API_DECL extern
|
||||
#endif
|
||||
|
||||
/* EV_PROTOTYPES can be used to switch of prototype declarations */
|
||||
#ifndef EV_PROTOTYPES
|
||||
# define EV_PROTOTYPES 1
|
||||
|
@ -193,33 +211,33 @@ struct ev_loop;
|
|||
/*****************************************************************************/
|
||||
|
||||
#define EV_VERSION_MAJOR 4
|
||||
#define EV_VERSION_MINOR 4
|
||||
#define EV_VERSION_MINOR 22
|
||||
|
||||
/* eventmask, revents, events... */
|
||||
enum {
|
||||
EV_UNDEF = 0xFFFFFFFF, /* guaranteed to be invalid */
|
||||
EV_NONE = 0x00, /* no events */
|
||||
EV_READ = 0x01, /* ev_io detected read will not block */
|
||||
EV_WRITE = 0x02, /* ev_io detected write will not block */
|
||||
EV__IOFDSET = 0x80, /* internal use only */
|
||||
EV_IO = EV_READ, /* alias for type-detection */
|
||||
EV_TIMER = 0x00000100, /* timer timed out */
|
||||
EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */
|
||||
EV_NONE = 0x00, /* no events */
|
||||
EV_READ = 0x01, /* ev_io detected read will not block */
|
||||
EV_WRITE = 0x02, /* ev_io detected write will not block */
|
||||
EV__IOFDSET = 0x80, /* internal use only */
|
||||
EV_IO = EV_READ, /* alias for type-detection */
|
||||
EV_TIMER = 0x00000100, /* timer timed out */
|
||||
#if EV_COMPAT3
|
||||
EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */
|
||||
EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */
|
||||
#endif
|
||||
EV_PERIODIC = 0x00000200, /* periodic timer timed out */
|
||||
EV_SIGNAL = 0x00000400, /* signal was received */
|
||||
EV_CHILD = 0x00000800, /* child/pid had status change */
|
||||
EV_STAT = 0x00001000, /* stat data changed */
|
||||
EV_IDLE = 0x00002000, /* event loop is idling */
|
||||
EV_PREPARE = 0x00004000, /* event loop about to poll */
|
||||
EV_CHECK = 0x00008000, /* event loop finished poll */
|
||||
EV_EMBED = 0x00010000, /* embedded event loop needs sweep */
|
||||
EV_FORK = 0x00020000, /* event loop resumed in child */
|
||||
EV_CLEANUP = 0x00040000, /* event loop resumed in child */
|
||||
EV_ASYNC = 0x00080000, /* async intra-loop signal */
|
||||
EV_CUSTOM = 0x01000000, /* for use by user code */
|
||||
EV_ERROR = 0x80000000 /* sent when an error occurs */
|
||||
EV_PERIODIC = 0x00000200, /* periodic timer timed out */
|
||||
EV_SIGNAL = 0x00000400, /* signal was received */
|
||||
EV_CHILD = 0x00000800, /* child/pid had status change */
|
||||
EV_STAT = 0x00001000, /* stat data changed */
|
||||
EV_IDLE = 0x00002000, /* event loop is idling */
|
||||
EV_PREPARE = 0x00004000, /* event loop about to poll */
|
||||
EV_CHECK = 0x00008000, /* event loop finished poll */
|
||||
EV_EMBED = 0x00010000, /* embedded event loop needs sweep */
|
||||
EV_FORK = 0x00020000, /* event loop resumed in child */
|
||||
EV_CLEANUP = 0x00040000, /* event loop resumed in child */
|
||||
EV_ASYNC = 0x00080000, /* async intra-loop signal */
|
||||
EV_CUSTOM = 0x01000000, /* for use by user code */
|
||||
EV_ERROR = (int)0x80000000 /* sent when an error occurs */
|
||||
};
|
||||
|
||||
/* can be used to add custom fields to all watchers, while losing binary compatibility */
|
||||
|
@ -321,7 +339,7 @@ typedef struct ev_periodic
|
|||
|
||||
ev_tstamp offset; /* rw */
|
||||
ev_tstamp interval; /* rw */
|
||||
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now); /* rw */
|
||||
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */
|
||||
} ev_periodic;
|
||||
|
||||
/* invoked when the given signal has been received */
|
||||
|
@ -508,15 +526,15 @@ enum {
|
|||
};
|
||||
|
||||
#if EV_PROTOTYPES
|
||||
int ev_version_major (void);
|
||||
int ev_version_minor (void);
|
||||
EV_API_DECL int ev_version_major (void) EV_THROW;
|
||||
EV_API_DECL int ev_version_minor (void) EV_THROW;
|
||||
|
||||
unsigned int ev_supported_backends (void);
|
||||
unsigned int ev_recommended_backends (void);
|
||||
unsigned int ev_embeddable_backends (void);
|
||||
EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW;
|
||||
EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW;
|
||||
EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW;
|
||||
|
||||
ev_tstamp ev_time (void);
|
||||
void ev_sleep (ev_tstamp delay); /* sleep for a while */
|
||||
EV_API_DECL ev_tstamp ev_time (void) EV_THROW;
|
||||
EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */
|
||||
|
||||
/* Sets the allocation function to use, works like realloc.
|
||||
* It is used to allocate and free memory.
|
||||
|
@ -524,22 +542,26 @@ void ev_sleep (ev_tstamp delay); /* sleep for a while */
|
|||
* or take some potentially destructive action.
|
||||
* The default is your system realloc function.
|
||||
*/
|
||||
void ev_set_allocator (void *(*cb)(void *ptr, long size));
|
||||
EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW;
|
||||
|
||||
/* set the callback function to call on a
|
||||
* retryable syscall error
|
||||
* (such as failed select, poll, epoll_wait)
|
||||
*/
|
||||
void ev_set_syserr_cb (void (*cb)(const char *msg));
|
||||
EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW;
|
||||
|
||||
#if EV_MULTIPLICITY
|
||||
|
||||
/* the default loop is the only one that handles signals and child watchers */
|
||||
/* you can call this as often as you like */
|
||||
struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0));
|
||||
EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW;
|
||||
|
||||
#ifdef EV_API_STATIC
|
||||
EV_API_DECL struct ev_loop *ev_default_loop_ptr;
|
||||
#endif
|
||||
|
||||
EV_INLINE struct ev_loop *
|
||||
ev_default_loop_uc_ (void)
|
||||
ev_default_loop_uc_ (void) EV_THROW
|
||||
{
|
||||
extern struct ev_loop *ev_default_loop_ptr;
|
||||
|
||||
|
@ -547,31 +569,31 @@ ev_default_loop_uc_ (void)
|
|||
}
|
||||
|
||||
EV_INLINE int
|
||||
ev_is_default_loop (EV_P)
|
||||
ev_is_default_loop (EV_P) EV_THROW
|
||||
{
|
||||
return EV_A == EV_DEFAULT_UC;
|
||||
}
|
||||
|
||||
/* create and destroy alternative loops that don't handle signals */
|
||||
struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0));
|
||||
EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW;
|
||||
|
||||
ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
|
||||
EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */
|
||||
|
||||
#else
|
||||
|
||||
int ev_default_loop (unsigned int flags EV_CPP (= 0)); /* returns true when successful */
|
||||
EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */
|
||||
|
||||
EV_API_DECL ev_tstamp ev_rt_now;
|
||||
|
||||
EV_INLINE ev_tstamp
|
||||
ev_now (void)
|
||||
ev_now (void) EV_THROW
|
||||
{
|
||||
extern ev_tstamp ev_rt_now;
|
||||
|
||||
return ev_rt_now;
|
||||
}
|
||||
|
||||
/* looks weird, but ev_is_default_loop (EV_A) still works if this exists */
|
||||
EV_INLINE int
|
||||
ev_is_default_loop (void)
|
||||
ev_is_default_loop (void) EV_THROW
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -579,23 +601,23 @@ ev_is_default_loop (void)
|
|||
#endif /* multiplicity */
|
||||
|
||||
/* destroy event loops, also works for the default loop */
|
||||
void ev_loop_destroy (EV_P);
|
||||
EV_API_DECL void ev_loop_destroy (EV_P);
|
||||
|
||||
/* this needs to be called after fork, to duplicate the loop */
|
||||
/* when you want to re-use it in the child */
|
||||
/* you can call it in either the parent or the child */
|
||||
/* you can actually call it at any time, anywhere :) */
|
||||
void ev_loop_fork (EV_P);
|
||||
EV_API_DECL void ev_loop_fork (EV_P) EV_THROW;
|
||||
|
||||
unsigned int ev_backend (EV_P); /* backend in use by loop */
|
||||
EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */
|
||||
|
||||
void ev_now_update (EV_P); /* update event loop time */
|
||||
EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */
|
||||
|
||||
#if EV_WALK_ENABLE
|
||||
/* walk (almost) all watchers in the loop of a given type, invoking the */
|
||||
/* callback on every such watcher. The callback might stop the watcher, */
|
||||
/* but do nothing else with the loop */
|
||||
void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
|
||||
EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW;
|
||||
#endif
|
||||
|
||||
#endif /* prototypes */
|
||||
|
@ -614,45 +636,47 @@ enum {
|
|||
};
|
||||
|
||||
#if EV_PROTOTYPES
|
||||
void ev_run (EV_P_ int flags EV_CPP (= 0));
|
||||
void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)); /* break out of the loop */
|
||||
EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0));
|
||||
EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */
|
||||
|
||||
/*
|
||||
* ref/unref can be used to add or remove a refcount on the mainloop. every watcher
|
||||
* keeps one reference. if you have a long-running watcher you never unregister that
|
||||
* should not keep ev_loop from running, unref() after starting, and ref() before stopping.
|
||||
*/
|
||||
void ev_ref (EV_P);
|
||||
void ev_unref (EV_P);
|
||||
EV_API_DECL void ev_ref (EV_P) EV_THROW;
|
||||
EV_API_DECL void ev_unref (EV_P) EV_THROW;
|
||||
|
||||
/*
|
||||
* convenience function, wait for a single event, without registering an event watcher
|
||||
* if timeout is < 0, do wait indefinitely
|
||||
*/
|
||||
void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
|
||||
EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW;
|
||||
|
||||
# if EV_FEATURE_API
|
||||
unsigned int ev_iteration (EV_P); /* number of loop iterations */
|
||||
unsigned int ev_depth (EV_P); /* #ev_loop enters - #ev_loop leaves */
|
||||
void ev_verify (EV_P); /* abort if loop data corrupted */
|
||||
EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */
|
||||
EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */
|
||||
EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */
|
||||
|
||||
void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
|
||||
void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
|
||||
EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */
|
||||
EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */
|
||||
|
||||
/* advanced stuff for threading etc. support, see docs */
|
||||
void ev_set_userdata (EV_P_ void *data);
|
||||
void *ev_userdata (EV_P);
|
||||
void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
|
||||
void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
|
||||
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 */
|
||||
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;
|
||||
|
||||
unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
|
||||
void ev_invoke_pending (EV_P); /* invoke all pending watchers */
|
||||
EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */
|
||||
EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */
|
||||
|
||||
/*
|
||||
* stop/start the timer handling.
|
||||
*/
|
||||
void ev_suspend (EV_P);
|
||||
void ev_resume (EV_P);
|
||||
EV_API_DECL void ev_suspend (EV_P) EV_THROW;
|
||||
EV_API_DECL void ev_resume (EV_P) EV_THROW;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -697,7 +721,8 @@ void ev_resume (EV_P);
|
|||
#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)
|
||||
|
@ -710,94 +735,94 @@ void ev_resume (EV_P);
|
|||
#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 */
|
||||
/* stopping (disabling, deleting) a watcher does nothing unless its already running */
|
||||
/* stopping (disabling, deleting) a watcher does nothing unless it's already running */
|
||||
#if EV_PROTOTYPES
|
||||
|
||||
/* feeds an event into a watcher as if the event actually occured */
|
||||
/* feeds an event into a watcher as if the event actually occurred */
|
||||
/* accepts any ev_watcher type */
|
||||
void ev_feed_event (EV_P_ void *w, int revents);
|
||||
void ev_feed_fd_event (EV_P_ int fd, int revents);
|
||||
EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents) EV_THROW;
|
||||
EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW;
|
||||
#if EV_SIGNAL_ENABLE
|
||||
void ev_feed_signal (int signum);
|
||||
void ev_feed_signal_event (EV_P_ int signum);
|
||||
EV_API_DECL void ev_feed_signal (int signum) EV_THROW;
|
||||
EV_API_DECL void ev_feed_signal_event (EV_P_ int signum) EV_THROW;
|
||||
#endif
|
||||
void ev_invoke (EV_P_ void *w, int revents);
|
||||
int ev_clear_pending (EV_P_ void *w);
|
||||
EV_API_DECL void ev_invoke (EV_P_ void *w, int revents);
|
||||
EV_API_DECL int ev_clear_pending (EV_P_ void *w) EV_THROW;
|
||||
|
||||
void ev_io_start (EV_P_ ev_io *w);
|
||||
void ev_io_stop (EV_P_ ev_io *w);
|
||||
EV_API_DECL void ev_io_start (EV_P_ ev_io *w) EV_THROW;
|
||||
EV_API_DECL void ev_io_stop (EV_P_ ev_io *w) EV_THROW;
|
||||
|
||||
void ev_timer_start (EV_P_ ev_timer *w);
|
||||
void ev_timer_stop (EV_P_ ev_timer *w);
|
||||
EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w) EV_THROW;
|
||||
EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w) EV_THROW;
|
||||
/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
|
||||
void ev_timer_again (EV_P_ ev_timer *w);
|
||||
EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w) EV_THROW;
|
||||
/* return remaining time */
|
||||
ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
|
||||
EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW;
|
||||
|
||||
#if EV_PERIODIC_ENABLE
|
||||
void ev_periodic_start (EV_P_ ev_periodic *w);
|
||||
void ev_periodic_stop (EV_P_ ev_periodic *w);
|
||||
void ev_periodic_again (EV_P_ ev_periodic *w);
|
||||
EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW;
|
||||
EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW;
|
||||
EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW;
|
||||
#endif
|
||||
|
||||
/* only supported in the default loop */
|
||||
#if EV_SIGNAL_ENABLE
|
||||
void ev_signal_start (EV_P_ ev_signal *w);
|
||||
void ev_signal_stop (EV_P_ ev_signal *w);
|
||||
EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w) EV_THROW;
|
||||
EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w) EV_THROW;
|
||||
#endif
|
||||
|
||||
/* only supported in the default loop */
|
||||
# if EV_CHILD_ENABLE
|
||||
void ev_child_start (EV_P_ ev_child *w);
|
||||
void ev_child_stop (EV_P_ ev_child *w);
|
||||
EV_API_DECL void ev_child_start (EV_P_ ev_child *w) EV_THROW;
|
||||
EV_API_DECL void ev_child_stop (EV_P_ ev_child *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
# if EV_STAT_ENABLE
|
||||
void ev_stat_start (EV_P_ ev_stat *w);
|
||||
void ev_stat_stop (EV_P_ ev_stat *w);
|
||||
void ev_stat_stat (EV_P_ ev_stat *w);
|
||||
EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w) EV_THROW;
|
||||
EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW;
|
||||
EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
# if EV_IDLE_ENABLE
|
||||
void ev_idle_start (EV_P_ ev_idle *w);
|
||||
void ev_idle_stop (EV_P_ ev_idle *w);
|
||||
EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w) EV_THROW;
|
||||
EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
#if EV_PREPARE_ENABLE
|
||||
void ev_prepare_start (EV_P_ ev_prepare *w);
|
||||
void ev_prepare_stop (EV_P_ ev_prepare *w);
|
||||
EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW;
|
||||
EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW;
|
||||
#endif
|
||||
|
||||
#if EV_CHECK_ENABLE
|
||||
void ev_check_start (EV_P_ ev_check *w);
|
||||
void ev_check_stop (EV_P_ ev_check *w);
|
||||
EV_API_DECL void ev_check_start (EV_P_ ev_check *w) EV_THROW;
|
||||
EV_API_DECL void ev_check_stop (EV_P_ ev_check *w) EV_THROW;
|
||||
#endif
|
||||
|
||||
# if EV_FORK_ENABLE
|
||||
void ev_fork_start (EV_P_ ev_fork *w);
|
||||
void ev_fork_stop (EV_P_ ev_fork *w);
|
||||
EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w) EV_THROW;
|
||||
EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
# if EV_CLEANUP_ENABLE
|
||||
void ev_cleanup_start (EV_P_ ev_cleanup *w);
|
||||
void ev_cleanup_stop (EV_P_ ev_cleanup *w);
|
||||
EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW;
|
||||
EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
# if EV_EMBED_ENABLE
|
||||
/* only supported when loop to be embedded is in fact embeddable */
|
||||
void ev_embed_start (EV_P_ ev_embed *w);
|
||||
void ev_embed_stop (EV_P_ ev_embed *w);
|
||||
void ev_embed_sweep (EV_P_ ev_embed *w);
|
||||
EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w) EV_THROW;
|
||||
EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW;
|
||||
EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
# if EV_ASYNC_ENABLE
|
||||
void ev_async_start (EV_P_ ev_async *w);
|
||||
void ev_async_stop (EV_P_ ev_async *w);
|
||||
void ev_async_send (EV_P_ ev_async *w);
|
||||
EV_API_DECL void ev_async_start (EV_P_ ev_async *w) EV_THROW;
|
||||
EV_API_DECL void ev_async_stop (EV_P_ ev_async *w) EV_THROW;
|
||||
EV_API_DECL void ev_async_send (EV_P_ ev_async *w) EV_THROW;
|
||||
# endif
|
||||
|
||||
#if EV_COMPAT3
|
||||
|
|
42
ev_epoll.c
42
ev_epoll.c
|
@ -144,11 +144,13 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
int i;
|
||||
int eventcnt;
|
||||
|
||||
if (expect_false (epoll_epermcnt))
|
||||
timeout = 0.;
|
||||
|
||||
/* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
|
||||
/* the default libev max wait time, however. */
|
||||
EV_RELEASE_CB;
|
||||
eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax,
|
||||
epoll_epermcnt ? 0 : ev_timeout_to_ms (timeout));
|
||||
eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3);
|
||||
EV_ACQUIRE_CB;
|
||||
|
||||
if (expect_false (eventcnt < 0))
|
||||
|
@ -168,12 +170,16 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
int got = (ev->events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
|
||||
| (ev->events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0);
|
||||
|
||||
/* check for spurious notification */
|
||||
/* we assume that fd is always in range, as we never shrink the anfds array */
|
||||
/*
|
||||
* check for spurious notification.
|
||||
* this only finds spurious notifications on egen updates
|
||||
* 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
|
||||
*/
|
||||
if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32)))
|
||||
{
|
||||
/* recreate kernel state */
|
||||
postfork = 1;
|
||||
postfork |= 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -181,8 +187,15 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
{
|
||||
anfds [fd].emask = want;
|
||||
|
||||
/* we received an event but are not interested in it, try mod or del */
|
||||
/* I don't think we ever need MOD, but let's handle it anyways */
|
||||
/*
|
||||
* we received an event but are not interested in it, try mod or del
|
||||
* this often happens because we optimistically do not unregister fds
|
||||
* when we are no longer interested in them, but also when we get spurious
|
||||
* notifications for fds from another process. this is partially handled
|
||||
* 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
|
||||
* but we closed it).
|
||||
*/
|
||||
ev->events = (want & EV_READ ? EPOLLIN : 0)
|
||||
| (want & EV_WRITE ? EPOLLOUT : 0);
|
||||
|
||||
|
@ -190,7 +203,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
/* which is fortunately easy to do for us. */
|
||||
if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev))
|
||||
{
|
||||
postfork = 1; /* an error occurred, recreate kernel state */
|
||||
postfork |= 2; /* an error occurred, recreate kernel state */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +228,10 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
if (anfds [fd].emask & EV_EMASK_EPERM && events)
|
||||
fd_event (EV_A_ fd, events);
|
||||
else
|
||||
epoll_eperms [i] = epoll_eperms [--epoll_epermcnt];
|
||||
{
|
||||
epoll_eperms [i] = epoll_eperms [--epoll_epermcnt];
|
||||
anfds [fd].emask = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,7 +241,7 @@ epoll_init (EV_P_ int flags)
|
|||
#ifdef EPOLL_CLOEXEC
|
||||
backend_fd = epoll_create1 (EPOLL_CLOEXEC);
|
||||
|
||||
if (backend_fd <= 0)
|
||||
if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS))
|
||||
#endif
|
||||
backend_fd = epoll_create (256);
|
||||
|
||||
|
@ -234,9 +250,9 @@ epoll_init (EV_P_ int flags)
|
|||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
backend_fudge = 0.; /* kernel sources seem to indicate this to be zero */
|
||||
backend_modify = epoll_modify;
|
||||
backend_poll = epoll_poll;
|
||||
backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */
|
||||
backend_modify = epoll_modify;
|
||||
backend_poll = epoll_poll;
|
||||
|
||||
epoll_eventmax = 64; /* initial number of events receivable per poll */
|
||||
epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax);
|
||||
|
|
28
ev_kqueue.c
28
ev_kqueue.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libev kqueue backend
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -155,15 +155,16 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
|
|||
int inline_size
|
||||
kqueue_init (EV_P_ int flags)
|
||||
{
|
||||
/* Initialize the kernel queue */
|
||||
/* initialize the kernel queue */
|
||||
kqueue_fd_pid = getpid ();
|
||||
if ((backend_fd = kqueue ()) < 0)
|
||||
return 0;
|
||||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
|
||||
|
||||
backend_fudge = 0.;
|
||||
backend_modify = kqueue_modify;
|
||||
backend_poll = kqueue_poll;
|
||||
backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */
|
||||
backend_modify = kqueue_modify;
|
||||
backend_poll = kqueue_poll;
|
||||
|
||||
kqueue_eventmax = 64; /* initial number of events receivable per poll */
|
||||
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
|
||||
|
@ -185,8 +186,20 @@ kqueue_destroy (EV_P)
|
|||
void inline_size
|
||||
kqueue_fork (EV_P)
|
||||
{
|
||||
close (backend_fd);
|
||||
/* some BSD kernels don't just destroy the kqueue itself,
|
||||
* but also close the fd, which isn't documented, and
|
||||
* impossible to support properly.
|
||||
* we remember the pid of the kqueue call and only close
|
||||
* the fd if the pid is still the same.
|
||||
* this leaks fds on sane kernels, but BSD interfaces are
|
||||
* notoriously buggy and rarely get fixed.
|
||||
*/
|
||||
pid_t newpid = getpid ();
|
||||
|
||||
if (newpid == kqueue_fd_pid)
|
||||
close (backend_fd);
|
||||
|
||||
kqueue_fd_pid = newpid;
|
||||
while ((backend_fd = kqueue ()) < 0)
|
||||
ev_syserr ("(libev) kqueue");
|
||||
|
||||
|
@ -196,3 +209,6 @@ kqueue_fork (EV_P)
|
|||
fd_rearm_all (EV_A);
|
||||
}
|
||||
|
||||
/* sys/event.h defines EV_ERROR */
|
||||
#undef EV_ERROR
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ poll_poll (EV_P_ ev_tstamp timeout)
|
|||
int res;
|
||||
|
||||
EV_RELEASE_CB;
|
||||
res = poll (polls, pollcnt, ev_timeout_to_ms (timeout));
|
||||
res = poll (polls, pollcnt, timeout * 1e3);
|
||||
EV_ACQUIRE_CB;
|
||||
|
||||
if (expect_false (res < 0))
|
||||
|
@ -129,9 +129,9 @@ poll_poll (EV_P_ ev_tstamp timeout)
|
|||
int inline_size
|
||||
poll_init (EV_P_ int flags)
|
||||
{
|
||||
backend_fudge = 0.; /* posix says this is zero */
|
||||
backend_modify = poll_modify;
|
||||
backend_poll = poll_poll;
|
||||
backend_mintime = 1e-3;
|
||||
backend_modify = poll_modify;
|
||||
backend_poll = poll_poll;
|
||||
|
||||
pollidxs = 0; pollidxmax = 0;
|
||||
polls = 0; pollmax = 0; pollcnt = 0;
|
||||
|
|
12
ev_port.c
12
ev_port.c
|
@ -147,9 +147,15 @@ port_init (EV_P_ int flags)
|
|||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */
|
||||
|
||||
backend_fudge = 1e-3; /* needed to compensate for port_getn returning early */
|
||||
backend_modify = port_modify;
|
||||
backend_poll = port_poll;
|
||||
/* if my reading of the opensolaris kernel sources are correct, then
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */
|
||||
backend_modify = port_modify;
|
||||
backend_poll = port_poll;
|
||||
|
||||
port_eventmax = 64; /* initial number of events receivable per poll */
|
||||
port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
|
||||
|
|
16
ev_select.c
16
ev_select.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libev select fd activity backend
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -195,7 +195,12 @@ select_poll (EV_P_ ev_tstamp timeout)
|
|||
*/
|
||||
if (errno == EINVAL)
|
||||
{
|
||||
ev_sleep (timeout);
|
||||
if (timeout)
|
||||
{
|
||||
unsigned long ms = timeout * 1e3;
|
||||
Sleep (ms ? ms : 1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -269,9 +274,9 @@ select_poll (EV_P_ ev_tstamp timeout)
|
|||
int inline_size
|
||||
select_init (EV_P_ int flags)
|
||||
{
|
||||
backend_fudge = 0.; /* posix says this is zero */
|
||||
backend_modify = select_modify;
|
||||
backend_poll = select_poll;
|
||||
backend_mintime = 1e-6;
|
||||
backend_modify = select_modify;
|
||||
backend_poll = select_poll;
|
||||
|
||||
#if EV_SELECT_USE_FD_SET
|
||||
vec_ri = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_ri);
|
||||
|
@ -307,4 +312,3 @@ select_destroy (EV_P)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
39
ev_vars.h
39
ev_vars.h
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* loop member variable declarations
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012,2013 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -43,6 +43,17 @@ VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */
|
|||
VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
|
||||
VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
|
||||
|
||||
/* for reverse feeding of events */
|
||||
VARx(W *, rfeeds)
|
||||
VARx(int, rfeedmax)
|
||||
VARx(int, rfeedcnt)
|
||||
|
||||
VAR (pendings, ANPENDING *pendings [NUMPRI])
|
||||
VAR (pendingmax, int pendingmax [NUMPRI])
|
||||
VAR (pendingcnt, int pendingcnt [NUMPRI])
|
||||
VARx(int, pendingpri) /* highest priority currently pending */
|
||||
VARx(ev_prepare, pending_w) /* dummy pending watcher */
|
||||
|
||||
VARx(ev_tstamp, io_blocktime)
|
||||
VARx(ev_tstamp, timeout_blocktime)
|
||||
|
||||
|
@ -51,28 +62,17 @@ VARx(int, activecnt) /* total number of active events ("refcount") */
|
|||
VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */
|
||||
|
||||
VARx(int, backend_fd)
|
||||
VARx(ev_tstamp, backend_fudge) /* assumed typical timer resolution */
|
||||
VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */
|
||||
VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev))
|
||||
VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout))
|
||||
|
||||
VARx(ANFD *, anfds)
|
||||
VARx(int, anfdmax)
|
||||
|
||||
VAR (pendings, ANPENDING *pendings [NUMPRI])
|
||||
VAR (pendingmax, int pendingmax [NUMPRI])
|
||||
VAR (pendingcnt, int pendingcnt [NUMPRI])
|
||||
VARx(ev_prepare, pending_w) /* dummy pending watcher */
|
||||
|
||||
/* for reverse feeding of events */
|
||||
VARx(W *, rfeeds)
|
||||
VARx(int, rfeedmax)
|
||||
VARx(int, rfeedcnt)
|
||||
|
||||
#if EV_USE_EVENTFD || EV_GENWRAP
|
||||
VARx(int, evfd)
|
||||
#endif
|
||||
VAR (evpipe, int evpipe [2])
|
||||
VARx(ev_io, pipe_w)
|
||||
VARx(EV_ATOMIC_T, pipe_write_wanted)
|
||||
VARx(EV_ATOMIC_T, pipe_write_skipped)
|
||||
|
||||
#if !defined(_WIN32) || EV_GENWRAP
|
||||
VARx(pid_t, curpid)
|
||||
|
@ -108,6 +108,7 @@ VARx(int, epoll_epermmax)
|
|||
#endif
|
||||
|
||||
#if EV_USE_KQUEUE || EV_GENWRAP
|
||||
VARx(pid_t, kqueue_fd_pid)
|
||||
VARx(struct kevent *, kqueue_changes)
|
||||
VARx(int, kqueue_changemax)
|
||||
VARx(int, kqueue_changecnt)
|
||||
|
@ -180,7 +181,6 @@ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE])
|
|||
#endif
|
||||
|
||||
VARx(EV_ATOMIC_T, sig_pending)
|
||||
VARx(int, nosigmask)
|
||||
#if EV_USE_SIGNALFD || EV_GENWRAP
|
||||
VARx(int, sigfd)
|
||||
VARx(ev_io, sigfd_w)
|
||||
|
@ -194,9 +194,10 @@ VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
|
|||
VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
|
||||
|
||||
VARx(void *, userdata)
|
||||
VAR (release_cb, void (*release_cb)(EV_P))
|
||||
VAR (acquire_cb, void (*acquire_cb)(EV_P))
|
||||
VAR (invoke_cb , void (*invoke_cb) (EV_P))
|
||||
/* C++ doesn't support the ev_loop_callback typedef here. stinks. */
|
||||
VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
|
||||
VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
|
||||
VAR (invoke_cb , ev_loop_callback invoke_cb)
|
||||
#endif
|
||||
|
||||
#undef VARx
|
||||
|
|
21
ev_win32.c
21
ev_win32.c
|
@ -39,15 +39,22 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
|
||||
/* timeb.h is actually xsi legacy functionality */
|
||||
#include <sys/timeb.h>
|
||||
|
||||
/* note: the comment below could not be substantiated, but what would I care */
|
||||
/* MSDN says this is required to handle SIGFPE */
|
||||
/* my wild guess would be that using something floating-pointy is required */
|
||||
/* for the crt to do something about it */
|
||||
volatile double SIGFPE_REQ = 0.0f;
|
||||
|
||||
static SOCKET
|
||||
ev_tcp_socket (void)
|
||||
{
|
||||
#if EV_USE_WSASOCKET
|
||||
return WSASocket (AF_INET, SOCK_STREAM, 0, 0, 0, 0);
|
||||
#else
|
||||
return socket (AF_INET, SOCK_STREAM, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* oh, the humanity! */
|
||||
static int
|
||||
ev_pipe (int filedes [2])
|
||||
|
@ -59,7 +66,7 @@ ev_pipe (int filedes [2])
|
|||
SOCKET listener;
|
||||
SOCKET sock [2] = { -1, -1 };
|
||||
|
||||
if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
|
||||
if ((listener = ev_tcp_socket ()) == INVALID_SOCKET)
|
||||
return -1;
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
|
@ -75,12 +82,14 @@ ev_pipe (int filedes [2])
|
|||
if (listen (listener, 1))
|
||||
goto fail;
|
||||
|
||||
if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
|
||||
if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET)
|
||||
goto fail;
|
||||
|
||||
if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
|
||||
goto fail;
|
||||
|
||||
/* TODO: returns INVALID_SOCKET on winsock accept, not < 0. fix it */
|
||||
/* when convenient, probably by just removing error checking altogether? */
|
||||
if ((sock [1] = accept (listener, 0, 0)) < 0)
|
||||
goto fail;
|
||||
|
||||
|
@ -133,7 +142,7 @@ fail:
|
|||
|
||||
#undef pipe
|
||||
#define pipe(filedes) ev_pipe (filedes)
|
||||
|
||||
|
||||
#define EV_HAVE_EV_TIME 1
|
||||
ev_tstamp
|
||||
ev_time (void)
|
||||
|
|
344
ev_wrap.h
344
ev_wrap.h
|
@ -1,196 +1,200 @@
|
|||
/* DO NOT EDIT, automatically generated by update_ev_wrap */
|
||||
#ifndef EV_WRAP_H
|
||||
#define EV_WRAP_H
|
||||
#define now_floor ((loop)->now_floor)
|
||||
#define mn_now ((loop)->mn_now)
|
||||
#define rtmn_diff ((loop)->rtmn_diff)
|
||||
#define io_blocktime ((loop)->io_blocktime)
|
||||
#define timeout_blocktime ((loop)->timeout_blocktime)
|
||||
#define backend ((loop)->backend)
|
||||
#define acquire_cb ((loop)->acquire_cb)
|
||||
#define activecnt ((loop)->activecnt)
|
||||
#define loop_done ((loop)->loop_done)
|
||||
#define anfdmax ((loop)->anfdmax)
|
||||
#define anfds ((loop)->anfds)
|
||||
#define async_pending ((loop)->async_pending)
|
||||
#define asynccnt ((loop)->asynccnt)
|
||||
#define asyncmax ((loop)->asyncmax)
|
||||
#define asyncs ((loop)->asyncs)
|
||||
#define backend ((loop)->backend)
|
||||
#define backend_fd ((loop)->backend_fd)
|
||||
#define backend_fudge ((loop)->backend_fudge)
|
||||
#define backend_mintime ((loop)->backend_mintime)
|
||||
#define backend_modify ((loop)->backend_modify)
|
||||
#define backend_poll ((loop)->backend_poll)
|
||||
#define anfds ((loop)->anfds)
|
||||
#define anfdmax ((loop)->anfdmax)
|
||||
#define pendings ((loop)->pendings)
|
||||
#define pendingmax ((loop)->pendingmax)
|
||||
#define pendingcnt ((loop)->pendingcnt)
|
||||
#define pending_w ((loop)->pending_w)
|
||||
#define rfeeds ((loop)->rfeeds)
|
||||
#define rfeedmax ((loop)->rfeedmax)
|
||||
#define rfeedcnt ((loop)->rfeedcnt)
|
||||
#define evfd ((loop)->evfd)
|
||||
#define evpipe ((loop)->evpipe)
|
||||
#define pipe_w ((loop)->pipe_w)
|
||||
#define checkcnt ((loop)->checkcnt)
|
||||
#define checkmax ((loop)->checkmax)
|
||||
#define checks ((loop)->checks)
|
||||
#define cleanupcnt ((loop)->cleanupcnt)
|
||||
#define cleanupmax ((loop)->cleanupmax)
|
||||
#define cleanups ((loop)->cleanups)
|
||||
#define curpid ((loop)->curpid)
|
||||
#define epoll_epermcnt ((loop)->epoll_epermcnt)
|
||||
#define epoll_epermmax ((loop)->epoll_epermmax)
|
||||
#define epoll_eperms ((loop)->epoll_eperms)
|
||||
#define epoll_eventmax ((loop)->epoll_eventmax)
|
||||
#define epoll_events ((loop)->epoll_events)
|
||||
#define evpipe ((loop)->evpipe)
|
||||
#define fdchangecnt ((loop)->fdchangecnt)
|
||||
#define fdchangemax ((loop)->fdchangemax)
|
||||
#define fdchanges ((loop)->fdchanges)
|
||||
#define forkcnt ((loop)->forkcnt)
|
||||
#define forkmax ((loop)->forkmax)
|
||||
#define forks ((loop)->forks)
|
||||
#define fs_2625 ((loop)->fs_2625)
|
||||
#define fs_fd ((loop)->fs_fd)
|
||||
#define fs_hash ((loop)->fs_hash)
|
||||
#define fs_w ((loop)->fs_w)
|
||||
#define idleall ((loop)->idleall)
|
||||
#define idlecnt ((loop)->idlecnt)
|
||||
#define idlemax ((loop)->idlemax)
|
||||
#define idles ((loop)->idles)
|
||||
#define invoke_cb ((loop)->invoke_cb)
|
||||
#define io_blocktime ((loop)->io_blocktime)
|
||||
#define iocp ((loop)->iocp)
|
||||
#define kqueue_changecnt ((loop)->kqueue_changecnt)
|
||||
#define kqueue_changemax ((loop)->kqueue_changemax)
|
||||
#define kqueue_changes ((loop)->kqueue_changes)
|
||||
#define kqueue_eventmax ((loop)->kqueue_eventmax)
|
||||
#define kqueue_events ((loop)->kqueue_events)
|
||||
#define kqueue_fd_pid ((loop)->kqueue_fd_pid)
|
||||
#define loop_count ((loop)->loop_count)
|
||||
#define loop_depth ((loop)->loop_depth)
|
||||
#define loop_done ((loop)->loop_done)
|
||||
#define mn_now ((loop)->mn_now)
|
||||
#define now_floor ((loop)->now_floor)
|
||||
#define origflags ((loop)->origflags)
|
||||
#define pending_w ((loop)->pending_w)
|
||||
#define pendingcnt ((loop)->pendingcnt)
|
||||
#define pendingmax ((loop)->pendingmax)
|
||||
#define pendingpri ((loop)->pendingpri)
|
||||
#define pendings ((loop)->pendings)
|
||||
#define periodiccnt ((loop)->periodiccnt)
|
||||
#define periodicmax ((loop)->periodicmax)
|
||||
#define periodics ((loop)->periodics)
|
||||
#define pipe_w ((loop)->pipe_w)
|
||||
#define pipe_write_skipped ((loop)->pipe_write_skipped)
|
||||
#define pipe_write_wanted ((loop)->pipe_write_wanted)
|
||||
#define pollcnt ((loop)->pollcnt)
|
||||
#define pollidxmax ((loop)->pollidxmax)
|
||||
#define pollidxs ((loop)->pollidxs)
|
||||
#define pollmax ((loop)->pollmax)
|
||||
#define polls ((loop)->polls)
|
||||
#define port_eventmax ((loop)->port_eventmax)
|
||||
#define port_events ((loop)->port_events)
|
||||
#define postfork ((loop)->postfork)
|
||||
#define preparecnt ((loop)->preparecnt)
|
||||
#define preparemax ((loop)->preparemax)
|
||||
#define prepares ((loop)->prepares)
|
||||
#define release_cb ((loop)->release_cb)
|
||||
#define rfeedcnt ((loop)->rfeedcnt)
|
||||
#define rfeedmax ((loop)->rfeedmax)
|
||||
#define rfeeds ((loop)->rfeeds)
|
||||
#define rtmn_diff ((loop)->rtmn_diff)
|
||||
#define sig_pending ((loop)->sig_pending)
|
||||
#define sigfd ((loop)->sigfd)
|
||||
#define sigfd_set ((loop)->sigfd_set)
|
||||
#define sigfd_w ((loop)->sigfd_w)
|
||||
#define timeout_blocktime ((loop)->timeout_blocktime)
|
||||
#define timercnt ((loop)->timercnt)
|
||||
#define timermax ((loop)->timermax)
|
||||
#define timers ((loop)->timers)
|
||||
#define userdata ((loop)->userdata)
|
||||
#define vec_eo ((loop)->vec_eo)
|
||||
#define vec_max ((loop)->vec_max)
|
||||
#define vec_ri ((loop)->vec_ri)
|
||||
#define vec_ro ((loop)->vec_ro)
|
||||
#define vec_wi ((loop)->vec_wi)
|
||||
#define vec_wo ((loop)->vec_wo)
|
||||
#define vec_eo ((loop)->vec_eo)
|
||||
#define vec_max ((loop)->vec_max)
|
||||
#define polls ((loop)->polls)
|
||||
#define pollmax ((loop)->pollmax)
|
||||
#define pollcnt ((loop)->pollcnt)
|
||||
#define pollidxs ((loop)->pollidxs)
|
||||
#define pollidxmax ((loop)->pollidxmax)
|
||||
#define epoll_events ((loop)->epoll_events)
|
||||
#define epoll_eventmax ((loop)->epoll_eventmax)
|
||||
#define epoll_eperms ((loop)->epoll_eperms)
|
||||
#define epoll_epermcnt ((loop)->epoll_epermcnt)
|
||||
#define epoll_epermmax ((loop)->epoll_epermmax)
|
||||
#define kqueue_changes ((loop)->kqueue_changes)
|
||||
#define kqueue_changemax ((loop)->kqueue_changemax)
|
||||
#define kqueue_changecnt ((loop)->kqueue_changecnt)
|
||||
#define kqueue_events ((loop)->kqueue_events)
|
||||
#define kqueue_eventmax ((loop)->kqueue_eventmax)
|
||||
#define port_events ((loop)->port_events)
|
||||
#define port_eventmax ((loop)->port_eventmax)
|
||||
#define iocp ((loop)->iocp)
|
||||
#define fdchanges ((loop)->fdchanges)
|
||||
#define fdchangemax ((loop)->fdchangemax)
|
||||
#define fdchangecnt ((loop)->fdchangecnt)
|
||||
#define timers ((loop)->timers)
|
||||
#define timermax ((loop)->timermax)
|
||||
#define timercnt ((loop)->timercnt)
|
||||
#define periodics ((loop)->periodics)
|
||||
#define periodicmax ((loop)->periodicmax)
|
||||
#define periodiccnt ((loop)->periodiccnt)
|
||||
#define idles ((loop)->idles)
|
||||
#define idlemax ((loop)->idlemax)
|
||||
#define idlecnt ((loop)->idlecnt)
|
||||
#define idleall ((loop)->idleall)
|
||||
#define prepares ((loop)->prepares)
|
||||
#define preparemax ((loop)->preparemax)
|
||||
#define preparecnt ((loop)->preparecnt)
|
||||
#define checks ((loop)->checks)
|
||||
#define checkmax ((loop)->checkmax)
|
||||
#define checkcnt ((loop)->checkcnt)
|
||||
#define forks ((loop)->forks)
|
||||
#define forkmax ((loop)->forkmax)
|
||||
#define forkcnt ((loop)->forkcnt)
|
||||
#define cleanups ((loop)->cleanups)
|
||||
#define cleanupmax ((loop)->cleanupmax)
|
||||
#define cleanupcnt ((loop)->cleanupcnt)
|
||||
#define async_pending ((loop)->async_pending)
|
||||
#define asyncs ((loop)->asyncs)
|
||||
#define asyncmax ((loop)->asyncmax)
|
||||
#define asynccnt ((loop)->asynccnt)
|
||||
#define fs_fd ((loop)->fs_fd)
|
||||
#define fs_w ((loop)->fs_w)
|
||||
#define fs_2625 ((loop)->fs_2625)
|
||||
#define fs_hash ((loop)->fs_hash)
|
||||
#define sig_pending ((loop)->sig_pending)
|
||||
#define nosigmask ((loop)->nosigmask)
|
||||
#define sigfd ((loop)->sigfd)
|
||||
#define sigfd_w ((loop)->sigfd_w)
|
||||
#define sigfd_set ((loop)->sigfd_set)
|
||||
#define origflags ((loop)->origflags)
|
||||
#define loop_count ((loop)->loop_count)
|
||||
#define loop_depth ((loop)->loop_depth)
|
||||
#define userdata ((loop)->userdata)
|
||||
#define release_cb ((loop)->release_cb)
|
||||
#define acquire_cb ((loop)->acquire_cb)
|
||||
#define invoke_cb ((loop)->invoke_cb)
|
||||
#else
|
||||
#undef EV_WRAP_H
|
||||
#undef now_floor
|
||||
#undef mn_now
|
||||
#undef rtmn_diff
|
||||
#undef io_blocktime
|
||||
#undef timeout_blocktime
|
||||
#undef backend
|
||||
#undef acquire_cb
|
||||
#undef activecnt
|
||||
#undef loop_done
|
||||
#undef anfdmax
|
||||
#undef anfds
|
||||
#undef async_pending
|
||||
#undef asynccnt
|
||||
#undef asyncmax
|
||||
#undef asyncs
|
||||
#undef backend
|
||||
#undef backend_fd
|
||||
#undef backend_fudge
|
||||
#undef backend_mintime
|
||||
#undef backend_modify
|
||||
#undef backend_poll
|
||||
#undef anfds
|
||||
#undef anfdmax
|
||||
#undef pendings
|
||||
#undef pendingmax
|
||||
#undef pendingcnt
|
||||
#undef pending_w
|
||||
#undef rfeeds
|
||||
#undef rfeedmax
|
||||
#undef rfeedcnt
|
||||
#undef evfd
|
||||
#undef evpipe
|
||||
#undef pipe_w
|
||||
#undef checkcnt
|
||||
#undef checkmax
|
||||
#undef checks
|
||||
#undef cleanupcnt
|
||||
#undef cleanupmax
|
||||
#undef cleanups
|
||||
#undef curpid
|
||||
#undef epoll_epermcnt
|
||||
#undef epoll_epermmax
|
||||
#undef epoll_eperms
|
||||
#undef epoll_eventmax
|
||||
#undef epoll_events
|
||||
#undef evpipe
|
||||
#undef fdchangecnt
|
||||
#undef fdchangemax
|
||||
#undef fdchanges
|
||||
#undef forkcnt
|
||||
#undef forkmax
|
||||
#undef forks
|
||||
#undef fs_2625
|
||||
#undef fs_fd
|
||||
#undef fs_hash
|
||||
#undef fs_w
|
||||
#undef idleall
|
||||
#undef idlecnt
|
||||
#undef idlemax
|
||||
#undef idles
|
||||
#undef invoke_cb
|
||||
#undef io_blocktime
|
||||
#undef iocp
|
||||
#undef kqueue_changecnt
|
||||
#undef kqueue_changemax
|
||||
#undef kqueue_changes
|
||||
#undef kqueue_eventmax
|
||||
#undef kqueue_events
|
||||
#undef kqueue_fd_pid
|
||||
#undef loop_count
|
||||
#undef loop_depth
|
||||
#undef loop_done
|
||||
#undef mn_now
|
||||
#undef now_floor
|
||||
#undef origflags
|
||||
#undef pending_w
|
||||
#undef pendingcnt
|
||||
#undef pendingmax
|
||||
#undef pendingpri
|
||||
#undef pendings
|
||||
#undef periodiccnt
|
||||
#undef periodicmax
|
||||
#undef periodics
|
||||
#undef pipe_w
|
||||
#undef pipe_write_skipped
|
||||
#undef pipe_write_wanted
|
||||
#undef pollcnt
|
||||
#undef pollidxmax
|
||||
#undef pollidxs
|
||||
#undef pollmax
|
||||
#undef polls
|
||||
#undef port_eventmax
|
||||
#undef port_events
|
||||
#undef postfork
|
||||
#undef preparecnt
|
||||
#undef preparemax
|
||||
#undef prepares
|
||||
#undef release_cb
|
||||
#undef rfeedcnt
|
||||
#undef rfeedmax
|
||||
#undef rfeeds
|
||||
#undef rtmn_diff
|
||||
#undef sig_pending
|
||||
#undef sigfd
|
||||
#undef sigfd_set
|
||||
#undef sigfd_w
|
||||
#undef timeout_blocktime
|
||||
#undef timercnt
|
||||
#undef timermax
|
||||
#undef timers
|
||||
#undef userdata
|
||||
#undef vec_eo
|
||||
#undef vec_max
|
||||
#undef vec_ri
|
||||
#undef vec_ro
|
||||
#undef vec_wi
|
||||
#undef vec_wo
|
||||
#undef vec_eo
|
||||
#undef vec_max
|
||||
#undef polls
|
||||
#undef pollmax
|
||||
#undef pollcnt
|
||||
#undef pollidxs
|
||||
#undef pollidxmax
|
||||
#undef epoll_events
|
||||
#undef epoll_eventmax
|
||||
#undef epoll_eperms
|
||||
#undef epoll_epermcnt
|
||||
#undef epoll_epermmax
|
||||
#undef kqueue_changes
|
||||
#undef kqueue_changemax
|
||||
#undef kqueue_changecnt
|
||||
#undef kqueue_events
|
||||
#undef kqueue_eventmax
|
||||
#undef port_events
|
||||
#undef port_eventmax
|
||||
#undef iocp
|
||||
#undef fdchanges
|
||||
#undef fdchangemax
|
||||
#undef fdchangecnt
|
||||
#undef timers
|
||||
#undef timermax
|
||||
#undef timercnt
|
||||
#undef periodics
|
||||
#undef periodicmax
|
||||
#undef periodiccnt
|
||||
#undef idles
|
||||
#undef idlemax
|
||||
#undef idlecnt
|
||||
#undef idleall
|
||||
#undef prepares
|
||||
#undef preparemax
|
||||
#undef preparecnt
|
||||
#undef checks
|
||||
#undef checkmax
|
||||
#undef checkcnt
|
||||
#undef forks
|
||||
#undef forkmax
|
||||
#undef forkcnt
|
||||
#undef cleanups
|
||||
#undef cleanupmax
|
||||
#undef cleanupcnt
|
||||
#undef async_pending
|
||||
#undef asyncs
|
||||
#undef asyncmax
|
||||
#undef asynccnt
|
||||
#undef fs_fd
|
||||
#undef fs_w
|
||||
#undef fs_2625
|
||||
#undef fs_hash
|
||||
#undef sig_pending
|
||||
#undef nosigmask
|
||||
#undef sigfd
|
||||
#undef sigfd_w
|
||||
#undef sigfd_set
|
||||
#undef origflags
|
||||
#undef loop_count
|
||||
#undef loop_depth
|
||||
#undef userdata
|
||||
#undef release_cb
|
||||
#undef acquire_cb
|
||||
#undef invoke_cb
|
||||
#endif
|
||||
|
|
35
event.c
35
event.c
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libevent compatibility layer
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -78,13 +78,15 @@ ev_tv_get (struct timeval *tv)
|
|||
#define EVENT_STRINGIFY(s) # s
|
||||
#define EVENT_VERSION(a,b) EVENT_STRINGIFY (a) "." EVENT_STRINGIFY (b)
|
||||
|
||||
const char *event_get_version (void)
|
||||
const char *
|
||||
event_get_version (void)
|
||||
{
|
||||
/* returns ABI, not API or library, version */
|
||||
return EVENT_VERSION (EV_VERSION_MAJOR, EV_VERSION_MINOR);
|
||||
}
|
||||
|
||||
const char *event_get_method (void)
|
||||
const char *
|
||||
event_get_method (void)
|
||||
{
|
||||
return "libev";
|
||||
}
|
||||
|
@ -105,6 +107,23 @@ void *event_init (void)
|
|||
return ev_x_cur;
|
||||
}
|
||||
|
||||
const char *
|
||||
event_base_get_method (const struct event_base *base)
|
||||
{
|
||||
return "libev";
|
||||
}
|
||||
|
||||
struct event_base *
|
||||
event_base_new (void)
|
||||
{
|
||||
#if EV_MULTIPLICITY
|
||||
return (struct event_base *)ev_loop_new (EVFLAG_AUTO);
|
||||
#else
|
||||
assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY"));
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void event_base_free (struct event_base *base)
|
||||
{
|
||||
dLOOPbase;
|
||||
|
@ -137,6 +156,12 @@ int event_loopexit (struct timeval *tv)
|
|||
return event_base_loopexit (ev_x_cur, tv);
|
||||
}
|
||||
|
||||
event_callback_fn event_get_callback
|
||||
(const struct event *ev)
|
||||
{
|
||||
return ev->ev_callback;
|
||||
}
|
||||
|
||||
static void
|
||||
ev_x_cb (struct event *ev, int revents)
|
||||
{
|
||||
|
@ -332,9 +357,7 @@ int event_base_loop (struct event_base *base, int flags)
|
|||
{
|
||||
dLOOPbase;
|
||||
|
||||
ev_run (EV_A_ flags);
|
||||
|
||||
return 0;
|
||||
return !ev_run (EV_A_ flags);
|
||||
}
|
||||
|
||||
int event_base_dispatch (struct event_base *base)
|
||||
|
|
11
event.h
11
event.h
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libevent compatibility header, only core events supported
|
||||
*
|
||||
* Copyright (c) 2007,2008,2010 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2010,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -75,6 +75,8 @@ struct event_base;
|
|||
#define EVLIST_INTERNAL 0x10
|
||||
#define EVLIST_INIT 0x80
|
||||
|
||||
typedef void (*event_callback_fn)(int, short, void *);
|
||||
|
||||
struct event
|
||||
{
|
||||
/* libev watchers we map onto */
|
||||
|
@ -86,7 +88,7 @@ struct event
|
|||
|
||||
/* compatibility slots */
|
||||
struct event_base *ev_base;
|
||||
void (*ev_callback)(int, short, void *arg);
|
||||
event_callback_fn ev_callback;
|
||||
void *ev_arg;
|
||||
int ev_fd;
|
||||
int ev_pri;
|
||||
|
@ -95,9 +97,12 @@ struct event
|
|||
short ev_events;
|
||||
};
|
||||
|
||||
event_callback_fn event_get_callback (const struct event *ev);
|
||||
|
||||
#define EV_READ EV_READ
|
||||
#define EV_WRITE EV_WRITE
|
||||
#define EV_PERSIST 0x10
|
||||
#define EV_ET 0x20 /* nop */
|
||||
|
||||
#define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd)
|
||||
#define EVENT_FD(ev) ((int) (ev)->ev_fd)
|
||||
|
@ -152,6 +157,8 @@ int event_pending (struct event *ev, short, struct timeval *tv);
|
|||
int event_priority_init (int npri);
|
||||
int event_priority_set (struct event *ev, int pri);
|
||||
|
||||
struct event_base *event_base_new (void);
|
||||
const char *event_base_get_method (const struct event_base *);
|
||||
int event_base_set (struct event_base *base, struct event *ev);
|
||||
int event_base_loop (struct event_base *base, int);
|
||||
int event_base_loopexit (struct event_base *base, struct timeval *tv);
|
||||
|
|
665
install-sh
665
install-sh
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
|
@ -34,261 +35,493 @@
|
|||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
stripcmd=
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
:
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
pathcomp=''
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
19
libev.m4
19
libev.m4
|
@ -1,12 +1,12 @@
|
|||
dnl this file is part of libev, do not make local modifications
|
||||
dnl http://software.schmorp.de/pkg/libev
|
||||
|
||||
dnl libev support
|
||||
AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h)
|
||||
dnl libev support
|
||||
AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h)
|
||||
|
||||
AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd)
|
||||
|
||||
AC_CHECK_FUNCS(clock_gettime, [], [
|
||||
AC_CHECK_FUNCS(clock_gettime, [], [
|
||||
dnl on linux, try syscall wrapper first
|
||||
if test $(uname) = Linux; then
|
||||
AC_MSG_CHECKING(for clock_gettime syscall)
|
||||
|
@ -16,24 +16,27 @@ AC_CHECK_FUNCS(clock_gettime, [], [
|
|||
#include <time.h>],
|
||||
[struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])],
|
||||
[ac_have_clock_syscall=1
|
||||
AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, "use syscall interface for clock_gettime")
|
||||
AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime)
|
||||
AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(no)])
|
||||
fi
|
||||
if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
|
||||
AC_CHECK_LIB(rt, clock_gettime)
|
||||
AC_CHECK_LIB(rt, clock_gettime)
|
||||
unset ac_cv_func_clock_gettime
|
||||
AC_CHECK_FUNCS(clock_gettime)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(nanosleep, [], [
|
||||
AC_CHECK_FUNCS(nanosleep, [], [
|
||||
if test -z "$LIBEV_M4_AVOID_LIBRT"; then
|
||||
AC_CHECK_LIB(rt, nanosleep)
|
||||
AC_CHECK_LIB(rt, nanosleep)
|
||||
unset ac_cv_func_nanosleep
|
||||
AC_CHECK_FUNCS(nanosleep)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_LIB(m, ceil)
|
||||
if test -z "$LIBEV_M4_AVOID_LIBM"; then
|
||||
LIBM=m
|
||||
fi
|
||||
AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)])
|
||||
|
||||
|
|
457
missing
457
missing
|
@ -1,7 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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
|
||||
|
@ -14,9 +17,7 @@
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -24,313 +25,191 @@
|
|||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
case $1 in
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
@ -1,21 +1,36 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
|
@ -23,6 +38,10 @@ while test $# -gt 0 ; do
|
|||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
|
@ -50,30 +69,58 @@ case $# in
|
|||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
@ -84,21 +131,21 @@ do
|
|||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
|
@ -107,5 +154,9 @@ exit $errstatus
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
|
Loading…
Reference in New Issue