Skip to content
Browse files

Update libuv versioto node-v0.8

  • Loading branch information...
1 parent 59913d7 commit 074dea392d58453ea64b65a8c5f0b6931e7261d0 @nikhilm committed
Showing with 748 additions and 56,206 deletions.
  1. +0 −9 libuv/.travis.yml
  2. +2 −2 libuv/Makefile
  3. +12 −5 libuv/README.md
  4. +230 −0 libuv/checksparse.sh
  5. +15 −8 libuv/config-unix.mk
  6. +13 −1 libuv/gyp_uv
  7. +0 −838 libuv/include/uv-private/ev.h
  8. +7 −3 libuv/include/uv-private/uv-sunos.h
  9. +27 −17 libuv/include/uv.h
  10. +5 −5 libuv/src/fs-poll.c
  11. +1 −1 libuv/src/unix/aix.c
  12. +2 −2 libuv/src/unix/async.c
  13. +36 −36 libuv/src/unix/core.c
  14. +3 −2 libuv/src/unix/cygwin.c
  15. +1 −1 libuv/src/unix/darwin.c
  16. +0 −388 libuv/src/unix/ev/Changes
  17. +0 −36 libuv/src/unix/ev/LICENSE
  18. +0 −18 libuv/src/unix/ev/Makefile.am
  19. +0 −771 libuv/src/unix/ev/Makefile.in
  20. +0 −58 libuv/src/unix/ev/README
  21. +0 −8,957 libuv/src/unix/ev/aclocal.m4
  22. +0 −6 libuv/src/unix/ev/autogen.sh
  23. +0 −1,526 libuv/src/unix/ev/config.guess
  24. +0 −125 libuv/src/unix/ev/config.h.in
  25. +0 −1,658 libuv/src/unix/ev/config.sub
  26. +0 −122 libuv/src/unix/ev/config_aix.h
  27. +0 −123 libuv/src/unix/ev/config_cygwin.h
  28. +0 −122 libuv/src/unix/ev/config_darwin.h
  29. +0 −120 libuv/src/unix/ev/config_freebsd.h
  30. +0 −141 libuv/src/unix/ev/config_linux.h
  31. +0 −120 libuv/src/unix/ev/config_netbsd.h
  32. +0 −126 libuv/src/unix/ev/config_openbsd.h
  33. +0 −122 libuv/src/unix/ev/config_sunos.h
  34. +0 −13,037 libuv/src/unix/ev/configure
  35. +0 −18 libuv/src/unix/ev/configure.ac
  36. +0 −630 libuv/src/unix/ev/depcomp
  37. +0 −816 libuv/src/unix/ev/ev++.h
  38. +0 −5,311 libuv/src/unix/ev/ev.3
  39. +0 −3,925 libuv/src/unix/ev/ev.c
  40. +0 −5,243 libuv/src/unix/ev/ev.pod
  41. +0 −266 libuv/src/unix/ev/ev_epoll.c
  42. +0 −235 libuv/src/unix/ev/ev_kqueue.c
  43. +0 −148 libuv/src/unix/ev/ev_poll.c
  44. +0 −179 libuv/src/unix/ev/ev_port.c
  45. +0 −310 libuv/src/unix/ev/ev_select.c
  46. +0 −203 libuv/src/unix/ev/ev_vars.h
  47. +0 −153 libuv/src/unix/ev/ev_win32.c
  48. +0 −196 libuv/src/unix/ev/ev_wrap.h
  49. +0 −402 libuv/src/unix/ev/event.c
  50. +0 −170 libuv/src/unix/ev/event.h
  51. +0 −294 libuv/src/unix/ev/install-sh
  52. +0 −39 libuv/src/unix/ev/libev.m4
  53. +0 −8,413 libuv/src/unix/ev/ltmain.sh
  54. +0 −336 libuv/src/unix/ev/missing
  55. +0 −111 libuv/src/unix/ev/mkinstalldirs
  56. +1 −1 libuv/src/unix/freebsd.c
  57. +46 −1 libuv/src/unix/fs.c
  58. +3 −3 libuv/src/unix/getaddrinfo.c
  59. +16 −15 libuv/src/unix/internal.h
  60. +7 −4 libuv/src/unix/kqueue.c
  61. +31 −6 libuv/src/unix/linux/linux-core.c
  62. +70 −70 libuv/src/unix/linux/syscalls.c
  63. +16 −9 libuv/src/unix/linux/syscalls.h
  64. +3 −1 libuv/src/unix/loop-watcher.c
  65. +1 −1 libuv/src/unix/loop.c
  66. +1 −1 libuv/src/unix/netbsd.c
  67. +1 −1 libuv/src/unix/openbsd.c
  68. +46 −62 libuv/src/unix/process.c
  69. +4 −4 libuv/src/unix/signal.c
  70. +118 −95 libuv/src/unix/stream.c
  71. +20 −18 libuv/src/unix/sunos.c
  72. +1 −1 libuv/src/unix/thread.c
  73. +2 −1 libuv/src/unix/threadpool.c
  74. +1 −1 libuv/src/unix/tty.c
  75. +2 −3 libuv/src/unix/udp.c
  76. +4 −4 libuv/src/uv-common.c
Sorry, we could not display the entire diff because it was too big.
View
9 libuv/.travis.yml
@@ -1,9 +0,0 @@
-language: node_js
-
-script:
- - "make test"
-
-notifications:
- email: false
- irc:
- - "irc.freenode.net#libuv"
View
4 libuv/Makefile
@@ -62,7 +62,7 @@ bench: test/run-benchmarks$(E)
$<
clean: clean-platform
- $(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E)
+ $(RM) -f *.a *.so test/run-tests$(E) test/run-benchmarks$(E)
distclean: distclean-platform
- $(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E)
+ $(RM) -f *.a *.so test/run-tests$(E) test/run-benchmarks$(E)
View
17 libuv/README.md
@@ -1,4 +1,4 @@
-# libuv [![Build Status](https://secure.travis-ci.org/joyent/libuv.png)](http://travis-ci.org/joyent/libuv)
+# libuv
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
Windows and epoll/kqueue/event ports/etc. on Unix systems. We intend to
@@ -56,7 +56,7 @@ http://nodejs.org/
For GCC (including MinGW) there are two methods building: via normal
makefiles or via GYP. GYP is a meta-build system which can generate MSVS,
Makefile, and XCode backends. It is best used for integration into other
-projects. The old (more stable) system is using Makefiles.
+projects. The old system is using plain GNU Makefiles.
To build via Makefile simply execute:
@@ -69,15 +69,22 @@ related files.
Windows users can also build from cmd-line using msbuild. This is
done by running vcbuild.bat from Visual Studio command prompt.
-To have GYP generate build script for another system you will need to
-checkout GYP into the project tree manually:
+To have GYP generate build script for another system, make sure that
+you have Python 2.6 or 2.7 installed, then checkout GYP into the
+project tree manually:
+ mkdir -p build
svn co http://gyp.googlecode.com/svn/trunk build/gyp
+Or:
+
+ mkdir -p build
+ git clone https://git.chromium.org/external/gyp.git build/gyp
+
Unix users run
./gyp_uv -f make
- make
+ make -C out
Macintosh users run
View
230 libuv/checksparse.sh
@@ -0,0 +1,230 @@
+#!/bin/sh
+
+# Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+SPARSE=${SPARSE:-sparse}
+
+SPARSE_FLAGS=${SPARSE_FLAGS:-"
+-D__POSIX__
+-Wsparse-all
+-Wno-do-while
+-Wno-transparent-union
+-Iinclude
+-Iinclude/uv-private
+-Isrc
+"}
+
+SOURCES="
+include/uv-private/ngx-queue.h
+include/uv-private/tree.h
+include/uv-private/uv-unix.h
+include/uv.h
+src/fs-poll.c
+src/inet.c
+src/unix/async.c
+src/unix/core.c
+src/unix/dl.c
+src/unix/error.c
+src/unix/fs.c
+src/unix/getaddrinfo.c
+src/unix/internal.h
+src/unix/loop-watcher.c
+src/unix/loop.c
+src/unix/pipe.c
+src/unix/poll.c
+src/unix/process.c
+src/unix/signal.c
+src/unix/stream.c
+src/unix/tcp.c
+src/unix/thread.c
+src/unix/threadpool.c
+src/unix/timer.c
+src/unix/tty.c
+src/unix/udp.c
+src/uv-common.c
+src/uv-common.h
+"
+
+TESTS="
+test/benchmark-async-pummel.c
+test/benchmark-async.c
+test/benchmark-fs-stat.c
+test/benchmark-getaddrinfo.c
+test/benchmark-loop-count.c
+test/benchmark-million-async.c
+test/benchmark-million-timers.c
+test/benchmark-multi-accept.c
+test/benchmark-ping-pongs.c
+test/benchmark-pound.c
+test/benchmark-pump.c
+test/benchmark-sizes.c
+test/benchmark-spawn.c
+test/benchmark-tcp-write-batch.c
+test/benchmark-thread.c
+test/benchmark-udp-pummel.c
+test/blackhole-server.c
+test/dns-server.c
+test/echo-server.c
+test/run-benchmarks.c
+test/run-tests.c
+test/runner-unix.c
+test/runner-unix.h
+test/runner.c
+test/runner.h
+test/task.h
+test/test-active.c
+test/test-async.c
+test/test-barrier.c
+test/test-callback-order.c
+test/test-callback-stack.c
+test/test-condvar.c
+test/test-connection-fail.c
+test/test-cwd-and-chdir.c
+test/test-delayed-accept.c
+test/test-dlerror.c
+test/test-embed.c
+test/test-error.c
+test/test-fail-always.c
+test/test-fs-event.c
+test/test-fs-poll.c
+test/test-fs.c
+test/test-get-currentexe.c
+test/test-get-loadavg.c
+test/test-get-memory.c
+test/test-getaddrinfo.c
+test/test-getsockname.c
+test/test-hrtime.c
+test/test-idle.c
+test/test-ipc-send-recv.c
+test/test-ipc.c
+test/test-loop-handles.c
+test/test-multiple-listen.c
+test/test-mutexes.c
+test/test-pass-always.c
+test/test-ping-pong.c
+test/test-pipe-bind-error.c
+test/test-pipe-connect-error.c
+test/test-platform-output.c
+test/test-poll-close.c
+test/test-poll.c
+test/test-process-title.c
+test/test-ref.c
+test/test-run-nowait.c
+test/test-run-once.c
+test/test-semaphore.c
+test/test-shutdown-close.c
+test/test-shutdown-eof.c
+test/test-signal-multiple-loops.c
+test/test-signal.c
+test/test-spawn.c
+test/test-stdio-over-pipes.c
+test/test-tcp-bind-error.c
+test/test-tcp-bind6-error.c
+test/test-tcp-close-while-connecting.c
+test/test-tcp-close.c
+test/test-tcp-connect-error-after-write.c
+test/test-tcp-connect-error.c
+test/test-tcp-connect-timeout.c
+test/test-tcp-connect6-error.c
+test/test-tcp-flags.c
+test/test-tcp-open.c
+test/test-tcp-read-stop.c
+test/test-tcp-shutdown-after-write.c
+test/test-tcp-unexpected-read.c
+test/test-tcp-write-error.c
+test/test-tcp-write-to-half-open-connection.c
+test/test-tcp-writealot.c
+test/test-thread.c
+test/test-threadpool-cancel.c
+test/test-threadpool.c
+test/test-timer-again.c
+test/test-timer.c
+test/test-tty.c
+test/test-udp-dgram-too-big.c
+test/test-udp-ipv6.c
+test/test-udp-multicast-join.c
+test/test-udp-multicast-ttl.c
+test/test-udp-open.c
+test/test-udp-options.c
+test/test-udp-send-and-recv.c
+test/test-util.c
+test/test-walk-handles.c
+"
+
+case `uname -s` in
+AIX)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1"
+ SOURCES="$SOURCES
+ src/unix/aix.c"
+ ;;
+Darwin)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-bsd.h
+ src/unix/darwin.c
+ src/unix/kqueue.c
+ src/unix/fsevents.c"
+ ;;
+DragonFly)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-bsd.h
+ src/unix/kqueue.c
+ src/unix/freebsd.c"
+ ;;
+FreeBSD)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-bsd.h
+ src/unix/kqueue.c
+ src/unix/freebsd.c"
+ ;;
+Linux)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-linux.h
+ src/unix/linux/inotify.c
+ src/unix/linux/linux-core.c
+ src/unix/linux/syscalls.c
+ src/unix/linux/syscalls.h"
+ ;;
+NetBSD)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-bsd.h
+ src/unix/kqueue.c
+ src/unix/netbsd.c"
+ ;;
+OpenBSD)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-bsd.h
+ src/unix/kqueue.c
+ src/unix/openbsd.c"
+ ;;
+SunOS)
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
+ SOURCES="$SOURCES
+ include/uv-private/uv-sunos.h
+ src/unix/sunos.c"
+ ;;
+esac
+
+for ARCH in __i386__ __x86_64__ __arm__; do
+ $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES
+done
+
+# Tests are architecture independent.
+$SPARSE $SPARSE_FLAGS -Itest $TESTS
View
23 libuv/config-unix.mk
@@ -123,6 +123,13 @@ else
RUNNER_LDFLAGS += -pthread
endif
+OBJDIR := out
+ifeq ($(MAKECMDGOALS), test)
+ OBJDIR := $(OBJDIR)/test
+endif
+
+OBJS := $(addprefix $(OBJDIR)/,$(OBJS))
+
libuv.a: $(OBJS)
$(AR) rcs $@ $^
@@ -130,18 +137,18 @@ libuv.$(SOEXT): override CFLAGS += -fPIC
libuv.$(SOEXT): $(OBJS)
$(CC) -shared -o $@ $^ $(LDFLAGS)
-src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
+$(OBJDIR)/src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h
+ @mkdir -p $(dir $@)
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
-src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h
+$(OBJDIR)/src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
+ @mkdir -p $(dir $@)
$(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean-platform:
- -rm -f src/unix/*.o
- -rm -f src/unix/linux/*.o
- -rm -rf test/run-tests.dSYM run-benchmarks.dSYM
+ -rm -rf $(OBJDIR)
+ -rm -f libuv.a libuv.$(SOEXT) test/run-{tests,benchmarks}.dSYM
distclean-platform:
- -rm -f src/unix/*.o
- -rm -f src/unix/linux/*.o
- -rm -rf test/run-tests.dSYM run-benchmarks.dSYM
+ -rm -rf $(OBJDIR)
+ -rm -f libuv.a libuv.$(SOEXT) test/run-{tests,benchmarks}.dSYM
View
14 libuv/gyp_uv
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import glob
+import platform
import os
import subprocess
import sys
@@ -18,6 +19,14 @@ except ImportError:
sys.exit(42)
+def host_arch():
+ machine = platform.machine()
+ if machine == 'i386': return 'ia32'
+ if machine == 'x86_64': return 'x64'
+ if machine.startswith('arm'): return 'arm'
+ return machine # Return as-is and hope for the best.
+
+
def compiler_version():
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
@@ -72,8 +81,11 @@ if __name__ == '__main__':
args.append('-Dgcc_version=%d' % (10 * major + minor))
args.append('-Dclang=%d' % int(is_clang))
+ if not any(a.startswith('-Dhost_arch=') for a in args):
+ args.append('-Dhost_arch=%s' % host_arch())
+
if not any(a.startswith('-Dtarget_arch=') for a in args):
- args.append('-Dtarget_arch=ia32')
+ args.append('-Dtarget_arch=%s' % host_arch())
if not any(a.startswith('-Dlibrary=') for a in args):
args.append('-Dlibrary=static_library')
View
838 libuv/include/uv-private/ev.h
@@ -1,838 +0,0 @@
-/*
- * libev native API header
- *
- * 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-
- * tion, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * the GNU General Public License ("GPL") version 2 or any later version,
- * in which case the provisions of the GPL are applicable instead of
- * the above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the BSD license, indicate your decision
- * by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file under
- * either the BSD or the GPL.
- */
-
-#ifndef EV_H_
-#define EV_H_
-
-#ifdef __cplusplus
-# define EV_CPP(x) x
-#else
-# define EV_CPP(x)
-#endif
-
-EV_CPP(extern "C" {)
-
-#ifdef __GNUC__
-# define EV_MAYBE_UNUSED __attribute__ ((unused))
-#else
-# define EV_MAYBE_UNUSED
-#endif
-
-/*****************************************************************************/
-
-/* pre-4.0 compatibility */
-#ifndef EV_COMPAT3
-# define EV_COMPAT3 1
-#endif
-
-#ifndef EV_FEATURES
-# define EV_FEATURES 0x7f
-#endif
-
-#define EV_FEATURE_CODE ((EV_FEATURES) & 1)
-#define EV_FEATURE_DATA ((EV_FEATURES) & 2)
-#define EV_FEATURE_CONFIG ((EV_FEATURES) & 4)
-#define EV_FEATURE_API ((EV_FEATURES) & 8)
-#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16)
-#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32)
-#define EV_FEATURE_OS ((EV_FEATURES) & 64)
-
-/* these priorities are inclusive, higher priorities will be invoked earlier */
-#ifndef EV_MINPRI
-# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0)
-#endif
-#ifndef EV_MAXPRI
-# define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0)
-#endif
-
-#ifndef EV_MULTIPLICITY
-# define EV_MULTIPLICITY EV_FEATURE_CONFIG
-#endif
-
-#ifndef EV_PERIODIC_ENABLE
-# define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_STAT_ENABLE
-# define EV_STAT_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_PREPARE_ENABLE
-# define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_CHECK_ENABLE
-# define EV_CHECK_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_IDLE_ENABLE
-# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_FORK_ENABLE
-# define EV_FORK_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_CLEANUP_ENABLE
-# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_SIGNAL_ENABLE
-# define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_CHILD_ENABLE
-# ifdef _WIN32
-# define EV_CHILD_ENABLE 0
-# else
-# define EV_CHILD_ENABLE EV_FEATURE_WATCHERS
-#endif
-#endif
-
-#ifndef EV_ASYNC_ENABLE
-# define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_EMBED_ENABLE
-# define EV_EMBED_ENABLE EV_FEATURE_WATCHERS
-#endif
-
-#ifndef EV_WALK_ENABLE
-# define EV_WALK_ENABLE 0 /* not yet */
-#endif
-
-/*****************************************************************************/
-
-#if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE
-# undef EV_SIGNAL_ENABLE
-# define EV_SIGNAL_ENABLE 1
-#endif
-
-/*****************************************************************************/
-
-typedef double ev_tstamp;
-
-#ifndef EV_ATOMIC_T
-# include <signal.h>
-# define EV_ATOMIC_T sig_atomic_t volatile
-#endif
-
-#if EV_STAT_ENABLE
-# ifdef _WIN32
-# include <time.h>
-# include <sys/types.h>
-# endif
-# include <sys/stat.h>
-#endif
-
-/* support multiple event loops? */
-#if EV_MULTIPLICITY
-struct ev_loop;
-# define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */
-# define EV_P_ EV_P, /* a loop as first of multiple parameters */
-# define EV_A loop /* a loop as sole argument to a function call */
-# define EV_A_ EV_A, /* a loop as first of multiple arguments */
-# define EV_DEFAULT_UC ev_default_loop_uc_ () /* the default loop, if initialised, as sole arg */
-# define EV_DEFAULT_UC_ EV_DEFAULT_UC, /* the default loop as first of multiple arguments */
-# define EV_DEFAULT ev_default_loop (0) /* the default loop as sole arg */
-# define EV_DEFAULT_ EV_DEFAULT, /* the default loop as first of multiple arguments */
-#else
-# define EV_P void
-# define EV_P_
-# define EV_A
-# define EV_A_
-# define EV_DEFAULT
-# define EV_DEFAULT_
-# define EV_DEFAULT_UC
-# define EV_DEFAULT_UC_
-# undef EV_EMBED_ENABLE
-#endif
-
-/* EV_INLINE is used for functions in header files */
-#if __STDC_VERSION__ >= 199901L && __GNUC__ >= 3
-# define EV_INLINE static inline
-#else
-# define EV_INLINE static
-#endif
-
-/* EV_PROTOTYPES can be used to switch of prototype declarations */
-#ifndef EV_PROTOTYPES
-# define EV_PROTOTYPES 1
-#endif
-
-/*****************************************************************************/
-
-#define EV_VERSION_MAJOR 4
-#define EV_VERSION_MINOR 4
-
-/* eventmask, revents, events... */
-enum {
- EV_UNDEF = -1, /* 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_LIBUV_KQUEUE_HACK = 0x40,
- 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 */
-#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 = (-2147483647 - 1) /* sent when an error occurs */
-};
-
-/* can be used to add custom fields to all watchers, while losing binary compatibility */
-#ifndef EV_COMMON
-# define EV_COMMON void *data;
-#endif
-
-#ifndef EV_CB_DECLARE
-# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
-#endif
-#ifndef EV_CB_INVOKE
-# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
-#endif
-
-/* not official, do not use */
-#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents)
-
-/*
- * struct member types:
- * private: you may look at them, but not change them,
- * and they might not mean anything to you.
- * ro: can be read anytime, but only changed when the watcher isn't active.
- * rw: can be read and modified anytime, even when the watcher is active.
- *
- * some internal details that might be helpful for debugging:
- *
- * active is either 0, which means the watcher is not active,
- * or the array index of the watcher (periodics, timers)
- * or the array index + 1 (most other watchers)
- * or simply 1 for watchers that aren't in some array.
- * pending is either 0, in which case the watcher isn't,
- * or the array index + 1 in the pendings array.
- */
-
-#if EV_MINPRI == EV_MAXPRI
-# define EV_DECL_PRIORITY
-#elif !defined (EV_DECL_PRIORITY)
-# define EV_DECL_PRIORITY int priority;
-#endif
-
-/* shared by all watchers */
-#define EV_WATCHER(type) \
- int active; /* private */ \
- int pending; /* private */ \
- EV_DECL_PRIORITY /* private */ \
- EV_COMMON /* rw */ \
- EV_CB_DECLARE (type) /* private */
-
-#define EV_WATCHER_LIST(type) \
- EV_WATCHER (type) \
- struct ev_watcher_list *next; /* private */
-
-#define EV_WATCHER_TIME(type) \
- EV_WATCHER (type) \
- ev_tstamp at; /* private */
-
-/* base class, nothing to see here unless you subclass */
-typedef struct ev_watcher
-{
- EV_WATCHER (ev_watcher)
-} ev_watcher;
-
-/* base class, nothing to see here unless you subclass */
-typedef struct ev_watcher_list
-{
- EV_WATCHER_LIST (ev_watcher_list)
-} ev_watcher_list;
-
-/* base class, nothing to see here unless you subclass */
-typedef struct ev_watcher_time
-{
- EV_WATCHER_TIME (ev_watcher_time)
-} ev_watcher_time;
-
-/* invoked when fd is either EV_READable or EV_WRITEable */
-/* revent EV_READ, EV_WRITE */
-typedef struct ev_io
-{
- EV_WATCHER_LIST (ev_io)
-
- int fd; /* ro */
- int events; /* ro */
-} ev_io;
-
-/* invoked after a specific time, repeatable (based on monotonic clock) */
-/* revent EV_TIMEOUT */
-typedef struct ev_timer
-{
- EV_WATCHER_TIME (ev_timer)
-
- ev_tstamp repeat; /* rw */
-} ev_timer;
-
-/* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */
-/* revent EV_PERIODIC */
-typedef struct ev_periodic
-{
- EV_WATCHER_TIME (ev_periodic)
-
- ev_tstamp offset; /* rw */
- ev_tstamp interval; /* rw */
- ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now); /* rw */
-} ev_periodic;
-
-/* invoked when the given signal has been received */
-/* revent EV_SIGNAL */
-typedef struct ev_signal
-{
- EV_WATCHER_LIST (ev_signal)
-
- int signum; /* ro */
-} ev_signal;
-
-/* invoked when sigchld is received and waitpid indicates the given pid */
-/* revent EV_CHILD */
-/* does not support priorities */
-typedef struct ev_child
-{
- EV_WATCHER_LIST (ev_child)
-
- int flags; /* private */
- int pid; /* ro */
- int rpid; /* rw, holds the received pid */
- int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */
-} ev_child;
-
-#if EV_STAT_ENABLE
-/* st_nlink = 0 means missing file or other error */
-# ifdef _WIN32
-typedef struct _stati64 ev_statdata;
-# else
-typedef struct stat ev_statdata;
-# endif
-
-/* invoked each time the stat data changes for a given path */
-/* revent EV_STAT */
-typedef struct ev_stat
-{
- EV_WATCHER_LIST (ev_stat)
-
- ev_timer timer; /* private */
- ev_tstamp interval; /* ro */
- const char *path; /* ro */
- ev_statdata prev; /* ro */
- ev_statdata attr; /* ro */
-
- int wd; /* wd for inotify, fd for kqueue */
-} ev_stat;
-#endif
-
-#if EV_IDLE_ENABLE
-/* invoked when the nothing else needs to be done, keeps the process from blocking */
-/* revent EV_IDLE */
-typedef struct ev_idle
-{
- EV_WATCHER (ev_idle)
-} ev_idle;
-#endif
-
-/* invoked for each run of the mainloop, just before the blocking call */
-/* you can still change events in any way you like */
-/* revent EV_PREPARE */
-typedef struct ev_prepare
-{
- EV_WATCHER (ev_prepare)
-} ev_prepare;
-
-/* invoked for each run of the mainloop, just after the blocking call */
-/* revent EV_CHECK */
-typedef struct ev_check
-{
- EV_WATCHER (ev_check)
-} ev_check;
-
-#if EV_FORK_ENABLE
-/* the callback gets invoked before check in the child process when a fork was detected */
-/* revent EV_FORK */
-typedef struct ev_fork
-{
- EV_WATCHER (ev_fork)
-} ev_fork;
-#endif
-
-#if EV_CLEANUP_ENABLE
-/* is invoked just before the loop gets destroyed */
-/* revent EV_CLEANUP */
-typedef struct ev_cleanup
-{
- EV_WATCHER (ev_cleanup)
-} ev_cleanup;
-#endif
-
-#if EV_EMBED_ENABLE
-/* used to embed an event loop inside another */
-/* the callback gets invoked when the event loop has handled events, and can be 0 */
-typedef struct ev_embed
-{
- EV_WATCHER (ev_embed)
-
- struct ev_loop *other; /* ro */
- ev_io io; /* private */
- ev_prepare prepare; /* private */
- ev_check check; /* unused */
- ev_timer timer; /* unused */
- ev_periodic periodic; /* unused */
- ev_idle idle; /* unused */
- ev_fork fork; /* private */
-#if EV_CLEANUP_ENABLE
- ev_cleanup cleanup; /* unused */
-#endif
-} ev_embed;
-#endif
-
-#if EV_ASYNC_ENABLE
-/* invoked when somebody calls ev_async_send on the watcher */
-/* revent EV_ASYNC */
-typedef struct ev_async
-{
- EV_WATCHER (ev_async)
-
- EV_ATOMIC_T sent; /* private */
-} ev_async;
-
-# define ev_async_pending(w) (+(w)->sent)
-#endif
-
-/* the presence of this union forces similar struct layout */
-union ev_any_watcher
-{
- struct ev_watcher w;
- struct ev_watcher_list wl;
-
- struct ev_io io;
- struct ev_timer timer;
- struct ev_periodic periodic;
- struct ev_signal signal;
- struct ev_child child;
-#if EV_STAT_ENABLE
- struct ev_stat stat;
-#endif
-#if EV_IDLE_ENABLE
- struct ev_idle idle;
-#endif
- struct ev_prepare prepare;
- struct ev_check check;
-#if EV_FORK_ENABLE
- struct ev_fork fork;
-#endif
-#if EV_CLEANUP_ENABLE
- struct ev_cleanup cleanup;
-#endif
-#if EV_EMBED_ENABLE
- struct ev_embed embed;
-#endif
-#if EV_ASYNC_ENABLE
- struct ev_async async;
-#endif
-};
-
-/* flag bits for ev_default_loop and ev_loop_new */
-enum {
- /* the default */
- EVFLAG_AUTO = 0x00000000U, /* not quite a mask */
- /* flag bits */
- EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */
- EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */
- /* debugging/feature disable */
- EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */
-#if EV_COMPAT3
- EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */
-#endif
- EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */
- EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */
-};
-
-/* method bits to be ored together */
-enum {
- EVBACKEND_SELECT = 0x00000001U, /* about anywhere */
- EVBACKEND_POLL = 0x00000002U, /* !win */
- EVBACKEND_EPOLL = 0x00000004U, /* linux */
- EVBACKEND_KQUEUE = 0x00000008U, /* bsd */
- EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */
- EVBACKEND_PORT = 0x00000020U, /* solaris 10 */
- EVBACKEND_ALL = 0x0000003FU, /* all known backends */
- EVBACKEND_MASK = 0x0000FFFFU /* all future backends */
-};
-
-#if EV_PROTOTYPES
-int ev_version_major (void);
-int ev_version_minor (void);
-
-unsigned int ev_supported_backends (void);
-unsigned int ev_recommended_backends (void);
-unsigned int ev_embeddable_backends (void);
-
-ev_tstamp ev_time (void);
-void ev_sleep (ev_tstamp delay); /* sleep for a while */
-
-/* Sets the allocation function to use, works like realloc.
- * It is used to allocate and free memory.
- * If it returns zero when memory needs to be allocated, the library might abort
- * or take some potentially destructive action.
- * The default is your system realloc function.
- */
-void ev_set_allocator (void *(*cb)(void *ptr, long size));
-
-/* 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));
-
-#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_INLINE struct ev_loop *
-EV_MAYBE_UNUSED ev_default_loop_uc_ (void)
-{
- extern struct ev_loop *ev_default_loop_ptr;
-
- return ev_default_loop_ptr;
-}
-
-EV_INLINE int
-EV_MAYBE_UNUSED ev_is_default_loop (EV_P)
-{
- 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));
-
-int ev_loop_refcount (EV_P);
-
-ev_tstamp ev_now (EV_P); /* 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_INLINE ev_tstamp
-ev_now (void)
-{
- 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)
-{
- return 1;
-}
-
-#endif /* multiplicity */
-
-/* destroy event loops, also works for the default loop */
-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);
-
-unsigned int ev_backend (EV_P); /* backend in use by loop */
-
-void ev_now_update (EV_P); /* 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));
-#endif
-
-#endif /* prototypes */
-
-/* ev_run flags values */
-enum {
- EVRUN_NOWAIT = 1, /* do not block/wait */
- EVRUN_ONCE = 2 /* block *once* only */
-};
-
-/* ev_break how values */
-enum {
- EVBREAK_CANCEL = 0, /* undo unloop */
- EVBREAK_ONE = 1, /* unloop once */
- EVBREAK_ALL = 2 /* unloop all loops */
-};
-
-#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 */
-
-/*
- * 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);
-
-/*
- * 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);
-
-# 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 */
-
-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 */
-
-/* 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));
-
-unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
-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);
-#endif
-
-#endif
-
-/* these may evaluate ev multiple times, and the other arguments at most once */
-/* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */
-#define ev_init(ev,cb_) do { \
- ((ev_watcher *)(void *)(ev))->active = \
- ((ev_watcher *)(void *)(ev))->pending = 0; \
- ev_set_priority ((ev), 0); \
- ev_set_cb ((ev), cb_); \
-} while (0)
-
-#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0)
-#define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0)
-#define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0)
-#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0)
-#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0)
-#define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0)
-#define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */
-#define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */
-#define ev_check_set(ev) /* nop, yes, this is a serious in-joke */
-#define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0)
-#define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */
-#define ev_cleanup_set(ev) /* nop, yes, this is a serious in-joke */
-#define ev_async_set(ev) /* nop, yes, this is a serious in-joke */
-
-#define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0)
-#define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0)
-#define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0)
-#define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0)
-#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0)
-#define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0)
-#define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0)
-#define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0)
-#define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0)
-#define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0)
-#define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0)
-#define ev_cleanup_init(ev,cb) do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0)
-#define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0)
-
-#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 */
-
-#if EV_MINPRI == EV_MAXPRI
-# define ev_priority(ev) ((ev), EV_MINPRI)
-# define ev_set_priority(ev,pri) ((ev), (pri))
-#else
-# define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority))
-# define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri)
-#endif
-
-#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
-
-#ifndef ev_set_cb
-# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
-#endif
-
-/* stopping (enabling, adding) a watcher does nothing if it is already running */
-/* stopping (disabling, deleting) a watcher does nothing unless its already running */
-#if EV_PROTOTYPES
-
-/* feeds an event into a watcher as if the event actually occured */
-/* 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);
-#if EV_SIGNAL_ENABLE
-void ev_feed_signal (int signum);
-void ev_feed_signal_event (EV_P_ int signum);
-#endif
-void ev_invoke (EV_P_ void *w, int revents);
-int ev_clear_pending (EV_P_ void *w);
-
-void ev_io_start (EV_P_ ev_io *w);
-void ev_io_stop (EV_P_ ev_io *w);
-
-void ev_timer_start (EV_P_ ev_timer *w);
-void ev_timer_stop (EV_P_ ev_timer *w);
-/* 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);
-/* return remaining time */
-ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
-
-#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);
-#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);
-#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);
-# 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);
-# endif
-
-# if EV_IDLE_ENABLE
-void ev_idle_start (EV_P_ ev_idle *w);
-void ev_idle_stop (EV_P_ ev_idle *w);
-# endif
-
-#if EV_PREPARE_ENABLE
-void ev_prepare_start (EV_P_ ev_prepare *w);
-void ev_prepare_stop (EV_P_ ev_prepare *w);
-#endif
-
-#if EV_CHECK_ENABLE
-void ev_check_start (EV_P_ ev_check *w);
-void ev_check_stop (EV_P_ ev_check *w);
-#endif
-
-# if EV_FORK_ENABLE
-void ev_fork_start (EV_P_ ev_fork *w);
-void ev_fork_stop (EV_P_ ev_fork *w);
-# endif
-
-# if EV_CLEANUP_ENABLE
-void ev_cleanup_start (EV_P_ ev_cleanup *w);
-void ev_cleanup_stop (EV_P_ ev_cleanup *w);
-# 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);
-# 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);
-# endif
-
-#if EV_COMPAT3
- #define EVLOOP_NONBLOCK EVRUN_NOWAIT
- #define EVLOOP_ONESHOT EVRUN_ONCE
- #define EVUNLOOP_CANCEL EVBREAK_CANCEL
- #define EVUNLOOP_ONE EVBREAK_ONE
- #define EVUNLOOP_ALL EVBREAK_ALL
- #if EV_PROTOTYPES
- EV_INLINE void EV_MAYBE_UNUSED ev_loop (EV_P_ int flags) { ev_run (EV_A_ flags); }
- EV_INLINE void EV_MAYBE_UNUSED ev_unloop (EV_P_ int how ) { ev_break (EV_A_ how ); }
- EV_INLINE void EV_MAYBE_UNUSED ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); }
- EV_INLINE void EV_MAYBE_UNUSED ev_default_fork (void) { ev_loop_fork (EV_DEFAULT); }
- #if EV_FEATURE_API
- EV_INLINE unsigned int EV_MAYBE_UNUSED ev_loop_count (EV_P) { return ev_iteration (EV_A); }
- EV_INLINE unsigned int EV_MAYBE_UNUSED ev_loop_depth (EV_P) { return ev_depth (EV_A); }
- EV_INLINE void EV_MAYBE_UNUSED ev_loop_verify (EV_P) { ev_verify (EV_A); }
- #endif
- #endif
-#else
- typedef struct ev_loop ev_loop;
-#endif
-
-#endif
-
-EV_CPP(})
-
-#endif
-
View
10 libuv/include/uv-private/uv-sunos.h
@@ -25,12 +25,16 @@
#include <sys/port.h>
#include <port.h>
-#if defined(PORT_SOURCE_FILE)
-
-# define UV_PLATFORM_LOOP_FIELDS \
+/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c,
+ * add the fs_event fields even when this version of SunOS doesn't support
+ * file watching.
+ */
+#define UV_PLATFORM_LOOP_FIELDS \
uv__io_t fs_event_watcher; \
int fs_fd; \
+#if defined(PORT_SOURCE_FILE)
+
# define UV_PLATFORM_FS_EVENT_FIELDS \
file_obj_t fo; \
int fd; \
View
44 libuv/include/uv.h
@@ -221,6 +221,13 @@ typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
+typedef enum {
+ UV_RUN_DEFAULT = 0,
+ UV_RUN_ONCE,
+ UV_RUN_NOWAIT
+} uv_run_mode;
+
+
/*
* This function must be called before any other functions in libuv.
*
@@ -238,18 +245,18 @@ UV_EXTERN void uv_loop_delete(uv_loop_t*);
UV_EXTERN uv_loop_t* uv_default_loop(void);
/*
- * This function starts the event loop. It blocks until the reference count
- * of the loop drops to zero. Always returns zero.
- */
-UV_EXTERN int uv_run(uv_loop_t*);
-
-/*
- * Poll for new events once. Note that this function blocks if there are no
- * pending events. Returns zero when done (no active handles or requests left),
- * or non-zero if more events are expected (meaning you should call
- * uv_run_once() again sometime in the future).
+ * This function runs the event loop. It will act differently depending on the
+ * specified mode:
+ * - UV_RUN_DEFAULT: Runs the event loop until the reference count drops to
+ * zero. Always returns zero.
+ * - UV_RUN_ONCE: Poll for new events once. Note that this function blocks if
+ * there are no pending events. Returns zero when done (no active handles
+ * or requests left), or non-zero if more events are expected (meaning you
+ * should run the event loop again sometime in the future).
+ * - UV_RUN_NOWAIT: Poll for new events once but don't block if there are no
+ * pending events.
*/
-UV_EXTERN int uv_run_once(uv_loop_t*);
+UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode);
/*
* Manually modify the event loop's reference count. Useful if the user wants
@@ -265,7 +272,7 @@ UV_EXTERN int64_t uv_now(uv_loop_t*);
* Get backend file descriptor. Only kqueue, epoll and event ports are
* supported.
*
- * This can be used in conjuction with uv_run_once() to poll in one thread and
+ * This can be used in conjunction with uv_run_once() to poll in one thread and
* run the event loop's event callbacks in another.
*
* Useful for embedding libuv's event loop in another event loop.
@@ -1653,8 +1660,10 @@ UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle);
* ultra efficient so don't go creating a million event loops with a million
* signal watchers.
*
- * TODO(bnoordhuis) As of 2012-08-10 only the default event loop supports
- * signals. That will be fixed.
+ * Note to Linux users: SIGRT0 and SIGRT1 (signals 32 and 33) are used by the
+ * NPTL pthreads library to manage threads. Installing watchers for those
+ * signals will lead to unpredictable behavior and is strongly discouraged.
+ * Future versions of libuv may simply reject them.
*
* Some signal support is available on Windows:
*
@@ -1688,11 +1697,12 @@ struct uv_signal_s {
UV_SIGNAL_PRIVATE_FIELDS
};
-/* These functions are no-ops on Windows. */
UV_EXTERN int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle);
+
UV_EXTERN int uv_signal_start(uv_signal_t* handle,
uv_signal_cb signal_cb,
int signum);
+
UV_EXTERN int uv_signal_stop(uv_signal_t* handle);
@@ -1782,7 +1792,7 @@ UV_EXTERN extern uint64_t uv_hrtime(void);
/*
* Disables inheritance for file descriptors / handles that this process
* inherited from its parent. The effect is that child processes spawned by
- * this proces don't accidently inherit these handles.
+ * this process don't accidentally inherit these handles.
*
* It is recommended to call this function as early in your program as possible,
* before the inherited file descriptors can be closed or duplicated.
@@ -1802,7 +1812,7 @@ UV_EXTERN void uv_disable_stdio_inheritance(void);
UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib);
/*
- * Close the shared libary.
+ * Close the shared library.
*/
UV_EXTERN void uv_dlclose(uv_lib_t* lib);
View
10 libuv/src/fs-poll.c
@@ -190,15 +190,15 @@ static void timer_close_cb(uv_handle_t* handle) {
static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) {
-#ifdef _WIN32
+#if defined(_WIN32)
return a->st_mtime == b->st_mtime
&& a->st_size == b->st_size
&& a->st_mode == b->st_mode;
#else
/* Jump through a few hoops to get sub-second granularity on Linux. */
-# if __linux__
-# if __USE_MISC /* _BSD_SOURCE || _SVID_SOURCE */
+# if defined(__linux__)
+# if defined(__USE_MISC) /* _BSD_SOURCE || _SVID_SOURCE */
if (a->st_ctim.tv_nsec != b->st_ctim.tv_nsec) return 0;
if (a->st_mtim.tv_nsec != b->st_mtim.tv_nsec) return 0;
# else
@@ -208,7 +208,7 @@ static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) {
# endif
/* Jump through different hoops on OS X. */
-# if __APPLE__
+# if defined(__APPLE__)
# if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
if (a->st_ctimespec.tv_nsec != b->st_ctimespec.tv_nsec) return 0;
if (a->st_mtimespec.tv_nsec != b->st_mtimespec.tv_nsec) return 0;
@@ -234,7 +234,7 @@ static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) {
}
-#ifdef _WIN32
+#if defined(_WIN32)
#include "win/internal.h"
#include "win/handle-inl.h"
View
2 libuv/src/unix/aix.c
@@ -45,7 +45,7 @@
#include <sys/proc.h>
#include <sys/procfs.h>
-uint64_t uv_hrtime() {
+uint64_t uv__hrtime(void) {
uint64_t G = 1000000000;
timebasestruct_t t;
read_wall_time(&t, TIMEBASE_SZ);
View
4 libuv/src/unix/async.c
@@ -44,13 +44,13 @@ static int uv__async_make_pending(volatile sig_atomic_t* ptr) {
* on x86, it's about 4x faster. It probably makes zero difference in the
* grand scheme of things but I'm OCD enough not to let this one pass.
*/
-#if __i386__ || __x86_64__
+#if defined(__i386__) || defined(__x86_64__)
{
unsigned int val = 1;
__asm__ __volatile__("xchgl %0, %1" : "+r" (val) : "m" (*ptr));
return val != 0;
}
-#elif __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1 /* gcc >= 4.1 */
+#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 0)
return __sync_val_compare_and_swap(ptr, 0, 1) != 0;
#else
*ptr = 1;
View
72 libuv/src/unix/core.c
@@ -66,6 +66,11 @@ static uv_loop_t default_loop_struct;
static uv_loop_t* default_loop_ptr;
+uint64_t uv_hrtime(void) {
+ return uv__hrtime();
+}
+
+
void uv_close(uv_handle_t* handle, uv_close_cb close_cb) {
assert(!(handle->flags & (UV_CLOSING | UV_CLOSED)));
@@ -267,32 +272,37 @@ int uv_backend_timeout(const uv_loop_t* loop) {
}
-static int uv__run(uv_loop_t* loop) {
- uv_update_time(loop);
- uv__run_timers(loop);
- uv__run_idle(loop);
- uv__run_prepare(loop);
- uv__run_pending(loop);
- uv__io_poll(loop, uv_backend_timeout(loop));
- uv__run_check(loop);
- uv__run_closing_handles(loop);
- return uv__has_active_handles(loop) || uv__has_active_reqs(loop);
+static int uv__loop_alive(uv_loop_t* loop) {
+ return uv__has_active_handles(loop) ||
+ uv__has_active_reqs(loop) ||
+ loop->closing_handles != NULL;
}
-int uv_run(uv_loop_t* loop) {
- while (uv__run(loop));
- return 0;
-}
+int uv_run(uv_loop_t* loop, uv_run_mode mode) {
+ int r;
+ if (!uv__loop_alive(loop))
+ return 0;
-int uv_run_once(uv_loop_t* loop) {
- return uv__run(loop);
+ do {
+ uv__update_time(loop);
+ uv__run_timers(loop);
+ uv__run_idle(loop);
+ uv__run_prepare(loop);
+ uv__run_pending(loop);
+ uv__io_poll(loop, (mode & UV_RUN_NOWAIT ? 0 : uv_backend_timeout(loop)));
+ uv__run_check(loop);
+ uv__run_closing_handles(loop);
+ r = uv__loop_alive(loop);
+ } while (r && !(mode & (UV_RUN_ONCE | UV_RUN_NOWAIT)));
+
+ return r;
}
void uv_update_time(uv_loop_t* loop) {
- loop->time = uv_hrtime() / 1000000;
+ uv__update_time(loop);
}
@@ -348,7 +358,7 @@ int uv__accept(int sockfd) {
assert(sockfd >= 0);
while (1) {
-#if __linux__
+#if defined(__linux__)
static int no_accept4;
if (no_accept4)
@@ -429,6 +439,10 @@ int uv__nonblock(int fd, int set) {
if (r == -1)
return -1;
+ /* Bail out now if already set/clear. */
+ if (!!(r & O_NONBLOCK) == !!set)
+ return 0;
+
if (set)
flags = r | O_NONBLOCK;
else
@@ -453,6 +467,10 @@ int uv__cloexec(int fd, int set) {
if (r == -1)
return -1;
+ /* Bail out now if already set/clear. */
+ if (!!(r & FD_CLOEXEC) == !!set)
+ return 0;
+
if (set)
flags = r | FD_CLOEXEC;
else
@@ -486,24 +504,6 @@ int uv__dup(int fd) {
}
-/* TODO move to uv-common.c? */
-size_t uv__strlcpy(char* dst, const char* src, size_t size) {
- const char *org;
-
- if (size == 0) {
- return 0;
- }
-
- org = src;
- while (--size && *src) {
- *dst++ = *src++;
- }
- *dst = '\0';
-
- return src - org;
-}
-
-
uv_err_t uv_cwd(char* buffer, size_t size) {
if (!buffer || !size) {
return uv__new_artificial_error(UV_EINVAL);
View
5 libuv/src/unix/cygwin.c
@@ -19,7 +19,7 @@
*/
#include "uv.h"
-#include "../uv-common.h"
+#include "internal.h"
#include <assert.h>
#include <stdint.h>
@@ -41,12 +41,13 @@ void uv__platform_loop_delete(uv_loop_t* loop) {
}
-uint64_t uv_hrtime() {
+uint64_t uv__hrtime(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
}
+
void uv_loadavg(double avg[3]) {
/* Unsupported as of cygwin 1.7.7 */
avg[0] = avg[1] = avg[2] = 0;
View
2 libuv/src/unix/darwin.c
@@ -176,7 +176,7 @@ void uv__cf_loop_signal(uv_loop_t* loop, cf_loop_signal_cb cb, void* arg) {
}
-uint64_t uv_hrtime(void) {
+uint64_t uv__hrtime(void) {
mach_timebase_info_data_t info;
if (mach_timebase_info(&info) != KERN_SUCCESS)
View
388 libuv/src/unix/ev/Changes
@@ -1,388 +0,0 @@
-Revision history for libev, a high-performance and full-featured event loop.
-
-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
- or added to the select set (analyzed and tested by Bert Belder).
- - do no rely on ceil() in ev_e?poll.c.
- - backport libev to HP-UX versions before 11 v3.
- - configure did not detect nanosleep and clock_gettime properly when
- they are available in the libc (as opposed to -lrt).
-
-4.03 Tue Jan 11 14:37:25 CET 2011
- - officially support polling files with all backends.
- - support files, /dev/zero etc. the same way as select in the epoll
- backend, by generating events on our own.
- - ports backend: work around solaris bug 6874410 and many related ones
- (EINTR, maybe more), with no performance loss (note that the solaris
- bug report is actually wrong, reality is far more bizarre and broken
- than that).
- - define EV_READ/EV_WRITE as macros in event.h, as some programs use
- #ifdef to test for them.
- - new (experimental) function: ev_feed_signal.
- - new (to become default) EVFLAG_NOSIGMASK flag.
- - new EVBACKEND_MASK symbol.
- - updated COMMON IDIOMS SECTION.
-
-4.01 Fri Nov 5 21:51:29 CET 2010
- - automake fucked it up, apparently, --add-missing -f is not quite enough
- to make it update its files, so 4.00 didn't install ev++.h and
- event.h on make install. grrr.
- - ev_loop(count|depth) didn't return anything (Robin Haberkorn).
- - change EV_UNDEF to 0xffffffff to silence some overzealous compilers.
- - use "(libev) " prefix for all libev error messages now.
-
-4.00 Mon Oct 25 12:32:12 CEST 2010
- - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading.
- - ev_embed_stop did not correctly stop the watcher (very good
- testcase by Vladimir Timofeev).
- - ev_run will now always update the current loop time - it erroneously
- didn't when idle watchers were active, causing timers not to fire.
- - fix a bug where a timeout of zero caused the timer not to fire
- in the libevent emulation (testcase by Péter Szabó).
- - applied win32 fixes by Michael Lenaghan (also James Mansion).
- - replace EV_MINIMAL by EV_FEATURES.
- - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it
- seems the former is *much* faster than the latter.
- - linux kernel version detection (for inotify bug workarounds)
- did not work properly.
- - reduce the number of spurious wake-ups with the ports backend.
- - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu).
- - do async init within ev_async_start, not ev_async_set, which avoids
- an API quirk where the set function must be called in the C++ API
- even when there is nothing to set.
- - add (undocumented) EV_ENABLE when adding events with kqueue,
- this might help with OS X, which seems to need it despite documenting
- not to need it (helpfully pointed out by Tilghman Lesher).
- - do not use poll by default on freebsd, it's broken (what isn't
- on freebsd...).
- - allow to embed epoll on kernels >= 2.6.32.
- - configure now prepends -O3, not appends it, so one can still
- override it.
- - ev.pod: greatly expanded the portability section, added a porting
- section, a description of watcher states and made lots of minor fixes.
- - disable poll backend on AIX, the poll header spams the namespace
- and it's not worth working around dead platforms (reported
- and analyzed by Aivars Kalvans).
- - improve header file compatibility of the standalone eventfd code
- in an obscure case.
- - implement EV_AVOID_STDIO option.
- - do not use sscanf to parse linux version number (smaller, faster,
- no sscanf dependency).
- - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings.
- - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs.
- - add section on accept() problems to the manpage.
- - rename EV_TIMEOUT to EV_TIMER.
- - rename ev_loop_count/depth/verify/loop/unloop.
- - remove ev_default_destroy and ev_default_fork.
- - switch to two-digit minor version.
- - work around an apparent gentoo compiler bug.
- - define _DARWIN_UNLIMITED_SELECT. just so.
- - use enum instead of #define for most constants.
- - improve compatibility to older C++ compilers.
- - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now
- default arguments when compiled as C++.
- - enable automake dependency tracking.
- - ev_loop_new no longer leaks memory when loop creation failed.
- - new ev_cleanup watcher type.
-
-3.9 Thu Dec 31 07:59:59 CET 2009
- - signalfd is no longer used by default and has to be requested
- explicitly - this means that easy to catch bugs become hard to
- catch race conditions, but the users have spoken.
- - point out the unspecified signal mask in the documentation, and
- 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,
- preventing exit when unregistering all watchers (testcases
- provided by ry@tinyclouds.org).
- - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
- symbols to make it easier for apps to do their own fd management.
- - support EV_IDLE_ENABLE being disabled in ev++.h
- (patch by Didier Spezia).
- - take advantage of inotify_init1, if available, to set cloexec/nonblock
- on fd creation, to avoid races.
- - the signal handling pipe wasn't always initialised under windows
- (analysed by lekma).
- - changed minimum glibc requirement from glibc 2.9 to 2.7, for
- signalfd.
- - add missing string.h include (Denis F. Latypoff).
- - only replace ev_stat.prev when we detect an actual difference,
- so prev is (almost) always different to attr. this might
- have caused the problems with 04_stat.t.
- - add ev::timer->remaining () method to C++ API.
-
-3.8 Sun Aug 9 14:30:45 CEST 2009
- - incompatible change: do not necessarily reset signal handler
- to SIG_DFL when a sighandler is stopped.
- - ev_default_destroy did not properly free or zero some members,
- potentially causing crashes and memory corruption on repeated
- ev_default_destroy/ev_default_loop calls.
- - take advantage of signalfd on GNU/Linux systems.
- - document that the signal mask might be in an unspecified
- state when using libev's signal handling.
- - take advantage of some GNU/Linux calls to set cloexec/nonblock
- on fd creation, to avoid race conditions.
-
-3.7 Fri Jul 17 16:36:32 CEST 2009
- - ev_unloop and ev_loop wrongly used a global variable to exit loops,
- instead of using a per-loop variable (bug caught by accident...).
- - the ev_set_io_collect_interval interpretation has changed.
- - add new functionality: ev_set_userdata, ev_userdata,
- ev_set_invoke_pending_cb, ev_set_loop_release_cb,
- ev_invoke_pending, ev_pending_count, together with a long example
- about thread locking.
- - add ev_timer_remaining (as requested by Denis F. Latypoff).
- - add ev_loop_depth.
- - calling ev_unloop in fork/prepare watchers will no longer poll
- for new events.
- - Denis F. Latypoff corrected many typos in example code snippets.
- - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double-
- check that the syscall number is available before trying to
- use it (reported by ry@tinyclouds).
- - use GetSystemTimeAsFileTime instead of _timeb on windows, for
- slightly higher accuracy.
- - properly declare ev_loop_verify and ev_now_update even when
- !EV_MULTIPLICITY.
- - do not compile in any priority code when EV_MAXPRI == EV_MINPRI.
- - support EV_MINIMAL==2 for a reduced API.
- - actually 0-initialise struct sigaction when installing signals.
- - add section on hibernate and stopped processes to ev_timer docs.
-
-3.6 Tue Apr 28 02:49:30 CEST 2009
- - multiple timers becoming ready within an event loop iteration
- will be invoked in the "correct" order now.
- - do not leave the event loop early just because we have no active
- watchers, fixing a problem when embedding a kqueue loop
- that has active kernel events but no registered watchers
- (reported by blacksand blacksand).
- - correctly zero the idx values for arrays, so destroying and
- reinitialising the default loop actually works (patch by
- 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.
- - extend the ev_fork description slightly.
- - optimize a jump out of call_pending.
-
-3.53 Sun Feb 15 02:38:20 CET 2009
- - fix a bug in event pipe creation on win32 that would cause a
- failed assertion on event loop creation (patch by Malek Hadj-Ali).
- - probe for CLOCK_REALTIME support at runtime as well and fall
- back to gettimeofday if there is an error, to support older
- operating systems with newer header files/libraries.
- - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL
- (default most everywhere), otherwise not.
-
-3.52 Wed Jan 7 21:43:02 CET 2009
- - fix compilation of select backend in fd_set mode when NFDBITS is
- missing (to get it to compile on QNX, reported by Rodrigo Campos).
- - better select-nfds handling when select backend is in fd_set mode.
- - diagnose fd_set overruns when select backend is in fd_set mode.
- - due to a thinko, instead of disabling everything but
- select on the borked OS X platform, everything but select was
- allowed (reported by Emanuele Giaquinta).
- - actually verify that local and remote port are matching in
- libev's socketpair emulation, which makes denial-of-service
- attacks harder (but not impossible - it's windows). Make sure
- it even works under vista, which thinks that getpeer/sockname
- should return fantasy port numbers.
- - include "libev" in all assertion messages for potentially
- clearer diagnostics.
- - event_get_version (libevent compatibility) returned
- a useless string instead of the expected version string
- (patch by W.C.A. Wijngaards).
-
-3.51 Wed Dec 24 23:00:11 CET 2008
- - fix a bug where an inotify watcher was added twice, causing
- freezes on hash collisions (reported and analysed by Graham Leggett).
- - new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use
- a direct syscall - slower, but no dependency on librt et al.
- - assume negative return values != -1 signals success of port_getn
- (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52)
- (no known failure reports, but it doesn't hurt).
- - fork detection in ev_embed now stops and restarts the watcher
- automatically.
- - EXPERIMENTAL: default the method to operator () in ev++.h,
- to make it nicer to use functors (requested by Benedek László).
- - fixed const object callbacks in ev++.h.
- - replaced loop_ref argument of watcher.set (loop) by a direct
- ev_loop * in ev++.h, to avoid clashes with functor patch.
- - do not try to watch the empty string via inotify.
- - inotify watchers could be leaked under certain circumstances.
- - OS X 10.5 is actually even more broken than earlier versions,
- so fall back to select on that piece of garbage.
- - fixed some weirdness in the ev_embed documentation.
-
-3.49 Wed Nov 19 11:26:53 CET 2008
- - ev_stat watchers will now use inotify as a mere hint on
- kernels <2.6.25, or if the filesystem is not in the
- "known to be good" list.
- - better mingw32 compatibility (it's not as borked as native win32)
- (analysed by Roger Pack).
- - include stdio.h in the example program, as too many people are
- confused by the weird C language otherwise. I guess the next thing
- I get told is that the "..." ellipses in the examples don't compile
- with their C compiler.
-
-3.48 Thu Oct 30 09:02:37 CET 2008
- - further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll
- backend by assuming the kernel event mask hasn't changed if
- ADD fails with EEXIST.
- - work around spurious event notification bugs in epoll by using
- a 32-bit generation counter. recreate kernel state if we receive
- spurious notifications or unwanted events. this is very costly,
- but I didn't come up with this horrible design.
- - use memset to initialise most arrays now and do away with the
- init functions.
- - expand time-out strategies into a "Be smart about timeouts" section.
- - drop the "struct" from all ev_watcher declarations in the
- documentation and did other clarifications (yeah, it was a mistake
- to have a struct AND a function called ev_loop).
- - fix a bug where ev_default would not initialise the default
- loop again after it was destroyed with ev_default_destroy.
- - rename syserr to ev_syserr to avoid name clashes when embedding,
- do similar changes for event.c.
-
-3.45 Tue Oct 21 21:59:26 CEST 2008
- - disable inotify usage on linux <2.6.25, as it is broken
- (reported by Yoann Vandoorselaere).
- - ev_stat erroneously would try to add inotify watchers
- even when inotify wasn't available (this should only
- have a performance impact).
- - ev_once now passes both timeout and io to the callback if both
- occur concurrently, instead of giving timeouts precedence.
- - disable EV_USE_INOTIFY when sys/inotify.h is too old.
-
-3.44 Mon Sep 29 05:18:39 CEST 2008
- - embed watchers now automatically invoke ev_loop_fork on the
- embedded loop when the parent loop forks.
- - new function: ev_now_update (loop).
- - verify_watcher was not marked static.
- - improve the "associating..." manpage section.
- - documentation tweaks here and there.
-
-3.43 Sun Jul 6 05:34:41 CEST 2008
- - include more include files on windows to get struct _stati64
- (reported by Chris Hulbert, but doesn't quite fix his issue).
- - add missing #include <io.h> in ev.c on windows (reported by
- Matt Tolton).
-
-3.42 Tue Jun 17 12:12:07 CEST 2008
- - work around yet another windows bug: FD_SET actually adds fd's
- multiple times to the fd_*SET*, despite official MSN docs claiming
- otherwise. Reported and well-analysed by Matt Tolton.
- - define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile
- (reported any analysed by Chris Hulbert).
- - fix a bug in ev_ebadf (this function is only used to catch
- programming errors in the libev user). reported by Matt Tolton.
- - fix a bug in fd_intern on win32 (could lead to compile errors
- under some circumstances, but would work correctly if it compiles).
- reported by Matt Tolton.
- - (try to) work around missing lstat on windows.
- - pass in the write fd set as except fd set under windows. windows
- is so uncontrollably lame that it requires this. this means that
- switching off oobinline is not supported (but tcp/ip doesn't
- have oob, so that would be stupid anyways.
- - use posix module symbol to auto-detect monotonic clock presence
- and some other default values.
-
-3.41 Fri May 23 18:42:54 CEST 2008
- - work around an obscure bug in winsocket select: if you
- provide only empty fd sets then select returns WSAEINVAL. how sucky.
- - improve timer scheduling stability and reduce use of time_epsilon.
- - use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces
- codesize and makes for better cache-efficiency.
- - use 3-based 4-heap for !EV_MINIMAL. this makes better use
- of cpu cache lines and gives better growth behaviour than
- 2-based heaps.
- - cache timestamp within heap for !EV_MINIMAL, to avoid random
- memory accesses.
- - document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT.
- - fix a potential aliasing issue in ev_timer_again.
- - add/document ev_periodic_at, retract direct access to ->at.
- - improve ev_stat docs.
- - add portability requirements section.
- - fix manpage headers etc.
- - normalise WSA error codes to lower range on windows.
- - add consistency check code that can be called automatically
- or on demand to check for internal structures (ev_loop_verify).
-
-3.31 Wed Apr 16 20:45:04 CEST 2008
- - added last minute fix for ev_poll.c by Brandon Black.
-
-3.3 Wed Apr 16 19:04:10 CEST 2008
- - event_base_loopexit should return 0 on success
- (W.C.A. Wijngaards).
- - added linux eventfd support.
- - try to autodetect epoll and inotify support
- by libc header version if not using autoconf.
- - new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_.
- - declare functions defined in ev.h as inline if
- C99 or gcc are available.
- - enable inlining with gcc versions 2 and 3.
- - work around broken poll implementations potentially
- not clearing revents field in ev_poll (Brandon Black)
- (no such systems are known at this time).
- - work around a bug in realloc on openbsd and darwin,
- also makes the erroneous valgrind complaints
- go away (noted by various people).
- - fix ev_async_pending, add c++ wrapper for ev_async
- (based on patch sent by Johannes Deisenhofer).
- - add sensible set method to ev::embed.
- - made integer constants type int in ev.h.
-
-3.2 Wed Apr 2 17:11:19 CEST 2008
- - fix a 64 bit overflow issue in the select backend,
- by using fd_mask instead of int for the mask.
- - rename internal sighandler to avoid clash with very old perls.
- - entering ev_loop will not clear the ONESHOT or NONBLOCKING
- flags of any outer loops anymore.
- - add ev_async_pending.
-
-3.1 Thu Mar 13 13:45:22 CET 2008
- - implement ev_async watchers.
- - only initialise signal pipe on demand.
- - make use of sig_atomic_t configurable.
- - improved documentation.
-
-3.0 Mon Jan 28 13:14:47 CET 2008
- - API/ABI bump to version 3.0.
- - ev++.h includes "ev.h" by default now, not <ev.h>.
- - slightly improved documentation.
- - speed up signal detection after a fork.
- - only optionally return trace status changed in ev_child
- watchers.
- - experimental (and undocumented) loop wrappers for ev++.h.
-
-2.01 Tue Dec 25 08:04:41 CET 2007
- - separate Changes file.
- - fix ev_path_set => ev_stat_set typo.
- - remove event_compat.h from the libev tarball.
- - change how include files are found.
- - doc updates.
- - update licenses, explicitly allow for GPL relicensing.
-
-2.0 Sat Dec 22 17:47:03 CET 2007
- - new ev_sleep, ev_set_(io|timeout)_collect_interval.
- - removed epoll from embeddable fd set.
- - fix embed watchers.
- - renamed ev_embed.loop to other.
- - added exported Symbol tables.
- - undefine member wrapper macros at the end of ev.c.
- - respect EV_H in ev++.h.
-
-1.86 Tue Dec 18 02:36:57 CET 2007
- - fix memleak on loop destroy (not relevant for perl).
-
-1.85 Fri Dec 14 20:32:40 CET 2007
- - fix some aliasing issues w.r.t. timers and periodics
- (not relevant for perl).
-
-(for historic versions refer to EV/Changes, found in the Perl interface)
-
-0.1 Wed Oct 31 21:31:48 CET 2007
- - original version; hacked together in <24h.
-
View
36 libuv/src/unix/ev/LICENSE
@@ -1,36 +0,0 @@
-All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Alternatively, the contents of this package may be used under the terms
-of the GNU General Public License ("GPL") version 2 or any later version,
-in which case the provisions of the GPL are applicable instead of the
-above. If you wish to allow the use of your version of this package only
-under the terms of the GPL and not to allow others to use your version of
-this file under the BSD license, indicate your decision by deleting the
-provisions above and replace them with the notice and other provisions
-required by the GPL in this and the other files of this package. If you do
-not delete the provisions above, a recipient may use your version of this
-file under either the BSD or the GPL.
View
18 libuv/src/unix/ev/Makefile.am
@@ -1,18 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-
-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
-
-man_MANS = ev.3
-
-include_HEADERS = ev.h ev++.h event.h
-
-lib_LTLIBRARIES = libev.la
-
-libev_la_SOURCES = ev.c event.c
-libev_la_LDFLAGS = -version-info $(VERSION_INFO)
-
View
771 libuv/src/unix/ev/Makefile.in
@@ -1,771 +0,0 @@
-# Makefile.in generated by automake 1.11.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.
-# 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-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
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/libev.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__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 $@
-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)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(libev_la_SOURCES)
-DIST_SOURCES = $(libev_la_SOURCES)
-man3dir = $(mandir)/man3
-NROFF = nroff
-MANS = $(man_MANS)
-HEADERS = $(include_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-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)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign
-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
-
-man_MANS = ev.3
-include_HEADERS = ev.h ev++.h event.h
-lib_LTLIBRARIES = libev.la
-libev_la_SOURCES = ev.c event.c
-libev_la_LDFLAGS = -version-info $(VERSION_INFO)
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
- && exi