foolio 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +21 -0
- data/examples/timer.rb +20 -0
- data/ext/foolio/extconf.rb +34 -0
- data/ext/foolio/foolio_ext.c +921 -0
- data/ext/foolio/gen.rb +50 -0
- data/ext/foolio/make_table.rb +12 -0
- data/ext/foolio/templ +243 -0
- data/ext/libuv/.gitignore +33 -0
- data/ext/libuv/.mailmap +13 -0
- data/ext/libuv/.travis.yml +9 -0
- data/ext/libuv/AUTHORS +61 -0
- data/ext/libuv/LICENSE +44 -0
- data/ext/libuv/Makefile +71 -0
- data/ext/libuv/README.md +90 -0
- data/ext/libuv/common.gypi +178 -0
- data/ext/libuv/gyp_uv +73 -0
- data/ext/libuv/include/uv-private/eio.h +403 -0
- data/ext/libuv/include/uv-private/ev.h +838 -0
- data/ext/libuv/include/uv-private/ngx-queue.h +108 -0
- data/ext/libuv/include/uv-private/tree.h +768 -0
- data/ext/libuv/include/uv-private/uv-unix.h +324 -0
- data/ext/libuv/include/uv-private/uv-win.h +517 -0
- data/ext/libuv/include/uv.h +1838 -0
- data/ext/libuv/src/fs-poll.c +235 -0
- data/ext/libuv/src/inet.c +293 -0
- data/ext/libuv/src/unix/async.c +148 -0
- data/ext/libuv/src/unix/core.c +696 -0
- data/ext/libuv/src/unix/cygwin.c +83 -0
- data/ext/libuv/src/unix/darwin.c +342 -0
- data/ext/libuv/src/unix/dl.c +83 -0
- data/ext/libuv/src/unix/eio/Changes +63 -0
- data/ext/libuv/src/unix/eio/LICENSE +36 -0
- data/ext/libuv/src/unix/eio/Makefile.am +15 -0
- data/ext/libuv/src/unix/eio/aclocal.m4 +8957 -0
- data/ext/libuv/src/unix/eio/autogen.sh +3 -0
- data/ext/libuv/src/unix/eio/config.h.in +86 -0
- data/ext/libuv/src/unix/eio/config_cygwin.h +80 -0
- data/ext/libuv/src/unix/eio/config_darwin.h +141 -0
- data/ext/libuv/src/unix/eio/config_freebsd.h +81 -0
- data/ext/libuv/src/unix/eio/config_linux.h +94 -0
- data/ext/libuv/src/unix/eio/config_netbsd.h +81 -0
- data/ext/libuv/src/unix/eio/config_openbsd.h +137 -0
- data/ext/libuv/src/unix/eio/config_sunos.h +84 -0
- data/ext/libuv/src/unix/eio/configure.ac +22 -0
- data/ext/libuv/src/unix/eio/demo.c +194 -0
- data/ext/libuv/src/unix/eio/ecb.h +370 -0
- data/ext/libuv/src/unix/eio/eio.3 +3428 -0
- data/ext/libuv/src/unix/eio/eio.c +2593 -0
- data/ext/libuv/src/unix/eio/eio.pod +969 -0
- data/ext/libuv/src/unix/eio/libeio.m4 +195 -0
- data/ext/libuv/src/unix/eio/xthread.h +164 -0
- data/ext/libuv/src/unix/error.c +105 -0
- data/ext/libuv/src/unix/ev/Changes +388 -0
- data/ext/libuv/src/unix/ev/LICENSE +36 -0
- data/ext/libuv/src/unix/ev/Makefile.am +18 -0
- data/ext/libuv/src/unix/ev/Makefile.in +771 -0
- data/ext/libuv/src/unix/ev/README +58 -0
- data/ext/libuv/src/unix/ev/aclocal.m4 +8957 -0
- data/ext/libuv/src/unix/ev/autogen.sh +6 -0
- data/ext/libuv/src/unix/ev/config.guess +1526 -0
- data/ext/libuv/src/unix/ev/config.h.in +125 -0
- data/ext/libuv/src/unix/ev/config.sub +1658 -0
- data/ext/libuv/src/unix/ev/config_cygwin.h +123 -0
- data/ext/libuv/src/unix/ev/config_darwin.h +122 -0
- data/ext/libuv/src/unix/ev/config_freebsd.h +120 -0
- data/ext/libuv/src/unix/ev/config_linux.h +141 -0
- data/ext/libuv/src/unix/ev/config_netbsd.h +120 -0
- data/ext/libuv/src/unix/ev/config_openbsd.h +126 -0
- data/ext/libuv/src/unix/ev/config_sunos.h +122 -0
- data/ext/libuv/src/unix/ev/configure +13037 -0
- data/ext/libuv/src/unix/ev/configure.ac +18 -0
- data/ext/libuv/src/unix/ev/depcomp +630 -0
- data/ext/libuv/src/unix/ev/ev++.h +816 -0
- data/ext/libuv/src/unix/ev/ev.3 +5311 -0
- data/ext/libuv/src/unix/ev/ev.c +3925 -0
- data/ext/libuv/src/unix/ev/ev.pod +5243 -0
- data/ext/libuv/src/unix/ev/ev_epoll.c +266 -0
- data/ext/libuv/src/unix/ev/ev_kqueue.c +235 -0
- data/ext/libuv/src/unix/ev/ev_poll.c +148 -0
- data/ext/libuv/src/unix/ev/ev_port.c +179 -0
- data/ext/libuv/src/unix/ev/ev_select.c +310 -0
- data/ext/libuv/src/unix/ev/ev_vars.h +203 -0
- data/ext/libuv/src/unix/ev/ev_win32.c +153 -0
- data/ext/libuv/src/unix/ev/ev_wrap.h +196 -0
- data/ext/libuv/src/unix/ev/event.c +402 -0
- data/ext/libuv/src/unix/ev/event.h +170 -0
- data/ext/libuv/src/unix/ev/install-sh +294 -0
- data/ext/libuv/src/unix/ev/libev.m4 +39 -0
- data/ext/libuv/src/unix/ev/ltmain.sh +8413 -0
- data/ext/libuv/src/unix/ev/missing +336 -0
- data/ext/libuv/src/unix/ev/mkinstalldirs +111 -0
- data/ext/libuv/src/unix/freebsd.c +326 -0
- data/ext/libuv/src/unix/fs.c +739 -0
- data/ext/libuv/src/unix/internal.h +188 -0
- data/ext/libuv/src/unix/kqueue.c +120 -0
- data/ext/libuv/src/unix/linux/inotify.c +239 -0
- data/ext/libuv/src/unix/linux/linux-core.c +557 -0
- data/ext/libuv/src/unix/linux/syscalls.c +388 -0
- data/ext/libuv/src/unix/linux/syscalls.h +124 -0
- data/ext/libuv/src/unix/loop-watcher.c +62 -0
- data/ext/libuv/src/unix/loop.c +94 -0
- data/ext/libuv/src/unix/netbsd.c +108 -0
- data/ext/libuv/src/unix/openbsd.c +295 -0
- data/ext/libuv/src/unix/pipe.c +259 -0
- data/ext/libuv/src/unix/poll.c +114 -0
- data/ext/libuv/src/unix/process.c +495 -0
- data/ext/libuv/src/unix/signal.c +269 -0
- data/ext/libuv/src/unix/stream.c +990 -0
- data/ext/libuv/src/unix/sunos.c +481 -0
- data/ext/libuv/src/unix/tcp.c +393 -0
- data/ext/libuv/src/unix/thread.c +251 -0
- data/ext/libuv/src/unix/timer.c +136 -0
- data/ext/libuv/src/unix/tty.c +145 -0
- data/ext/libuv/src/unix/udp.c +659 -0
- data/ext/libuv/src/unix/uv-eio.c +107 -0
- data/ext/libuv/src/unix/uv-eio.h +13 -0
- data/ext/libuv/src/uv-common.c +380 -0
- data/ext/libuv/src/uv-common.h +170 -0
- data/ext/libuv/src/win/async.c +100 -0
- data/ext/libuv/src/win/atomicops-inl.h +56 -0
- data/ext/libuv/src/win/core.c +278 -0
- data/ext/libuv/src/win/dl.c +86 -0
- data/ext/libuv/src/win/error.c +155 -0
- data/ext/libuv/src/win/fs-event.c +510 -0
- data/ext/libuv/src/win/fs.c +1948 -0
- data/ext/libuv/src/win/getaddrinfo.c +365 -0
- data/ext/libuv/src/win/handle-inl.h +149 -0
- data/ext/libuv/src/win/handle.c +154 -0
- data/ext/libuv/src/win/internal.h +343 -0
- data/ext/libuv/src/win/loop-watcher.c +122 -0
- data/ext/libuv/src/win/pipe.c +1672 -0
- data/ext/libuv/src/win/poll.c +616 -0
- data/ext/libuv/src/win/process-stdio.c +500 -0
- data/ext/libuv/src/win/process.c +1013 -0
- data/ext/libuv/src/win/req-inl.h +220 -0
- data/ext/libuv/src/win/req.c +25 -0
- data/ext/libuv/src/win/signal.c +57 -0
- data/ext/libuv/src/win/stream-inl.h +67 -0
- data/ext/libuv/src/win/stream.c +167 -0
- data/ext/libuv/src/win/tcp.c +1394 -0
- data/ext/libuv/src/win/thread.c +372 -0
- data/ext/libuv/src/win/threadpool.c +74 -0
- data/ext/libuv/src/win/timer.c +224 -0
- data/ext/libuv/src/win/tty.c +1799 -0
- data/ext/libuv/src/win/udp.c +716 -0
- data/ext/libuv/src/win/util.c +864 -0
- data/ext/libuv/src/win/winapi.c +132 -0
- data/ext/libuv/src/win/winapi.h +4452 -0
- data/ext/libuv/src/win/winsock.c +557 -0
- data/ext/libuv/src/win/winsock.h +171 -0
- data/ext/libuv/test/benchmark-async-pummel.c +97 -0
- data/ext/libuv/test/benchmark-async.c +137 -0
- data/ext/libuv/test/benchmark-fs-stat.c +135 -0
- data/ext/libuv/test/benchmark-getaddrinfo.c +94 -0
- data/ext/libuv/test/benchmark-list.h +127 -0
- data/ext/libuv/test/benchmark-loop-count.c +88 -0
- data/ext/libuv/test/benchmark-million-timers.c +65 -0
- data/ext/libuv/test/benchmark-ping-pongs.c +213 -0
- data/ext/libuv/test/benchmark-pound.c +324 -0
- data/ext/libuv/test/benchmark-pump.c +462 -0
- data/ext/libuv/test/benchmark-sizes.c +44 -0
- data/ext/libuv/test/benchmark-spawn.c +162 -0
- data/ext/libuv/test/benchmark-tcp-write-batch.c +140 -0
- data/ext/libuv/test/benchmark-thread.c +64 -0
- data/ext/libuv/test/benchmark-udp-packet-storm.c +247 -0
- data/ext/libuv/test/blackhole-server.c +118 -0
- data/ext/libuv/test/dns-server.c +321 -0
- data/ext/libuv/test/echo-server.c +378 -0
- data/ext/libuv/test/fixtures/empty_file +0 -0
- data/ext/libuv/test/fixtures/load_error.node +1 -0
- data/ext/libuv/test/run-benchmarks.c +64 -0
- data/ext/libuv/test/run-tests.c +138 -0
- data/ext/libuv/test/runner-unix.c +295 -0
- data/ext/libuv/test/runner-unix.h +36 -0
- data/ext/libuv/test/runner-win.c +285 -0
- data/ext/libuv/test/runner-win.h +42 -0
- data/ext/libuv/test/runner.c +355 -0
- data/ext/libuv/test/runner.h +159 -0
- data/ext/libuv/test/task.h +112 -0
- data/ext/libuv/test/test-async.c +118 -0
- data/ext/libuv/test/test-callback-order.c +76 -0
- data/ext/libuv/test/test-callback-stack.c +203 -0
- data/ext/libuv/test/test-connection-fail.c +148 -0
- data/ext/libuv/test/test-cwd-and-chdir.c +64 -0
- data/ext/libuv/test/test-delayed-accept.c +188 -0
- data/ext/libuv/test/test-dlerror.c +58 -0
- data/ext/libuv/test/test-error.c +59 -0
- data/ext/libuv/test/test-fail-always.c +29 -0
- data/ext/libuv/test/test-fs-event.c +474 -0
- data/ext/libuv/test/test-fs-poll.c +146 -0
- data/ext/libuv/test/test-fs.c +1843 -0
- data/ext/libuv/test/test-get-currentexe.c +63 -0
- data/ext/libuv/test/test-get-loadavg.c +36 -0
- data/ext/libuv/test/test-get-memory.c +38 -0
- data/ext/libuv/test/test-getaddrinfo.c +122 -0
- data/ext/libuv/test/test-getsockname.c +342 -0
- data/ext/libuv/test/test-hrtime.c +54 -0
- data/ext/libuv/test/test-idle.c +81 -0
- data/ext/libuv/test/test-ipc-send-recv.c +209 -0
- data/ext/libuv/test/test-ipc.c +620 -0
- data/ext/libuv/test/test-list.h +427 -0
- data/ext/libuv/test/test-loop-handles.c +336 -0
- data/ext/libuv/test/test-multiple-listen.c +102 -0
- data/ext/libuv/test/test-mutexes.c +63 -0
- data/ext/libuv/test/test-pass-always.c +28 -0
- data/ext/libuv/test/test-ping-pong.c +253 -0
- data/ext/libuv/test/test-pipe-bind-error.c +140 -0
- data/ext/libuv/test/test-pipe-connect-error.c +96 -0
- data/ext/libuv/test/test-platform-output.c +87 -0
- data/ext/libuv/test/test-poll-close.c +72 -0
- data/ext/libuv/test/test-poll.c +573 -0
- data/ext/libuv/test/test-process-title.c +49 -0
- data/ext/libuv/test/test-ref.c +338 -0
- data/ext/libuv/test/test-run-once.c +48 -0
- data/ext/libuv/test/test-semaphore.c +111 -0
- data/ext/libuv/test/test-shutdown-close.c +103 -0
- data/ext/libuv/test/test-shutdown-eof.c +183 -0
- data/ext/libuv/test/test-signal.c +162 -0
- data/ext/libuv/test/test-spawn.c +863 -0
- data/ext/libuv/test/test-stdio-over-pipes.c +246 -0
- data/ext/libuv/test/test-tcp-bind-error.c +191 -0
- data/ext/libuv/test/test-tcp-bind6-error.c +154 -0
- data/ext/libuv/test/test-tcp-close-while-connecting.c +80 -0
- data/ext/libuv/test/test-tcp-close.c +129 -0
- data/ext/libuv/test/test-tcp-connect-error-after-write.c +95 -0
- data/ext/libuv/test/test-tcp-connect-error.c +70 -0
- data/ext/libuv/test/test-tcp-connect-timeout.c +85 -0
- data/ext/libuv/test/test-tcp-connect6-error.c +68 -0
- data/ext/libuv/test/test-tcp-flags.c +51 -0
- data/ext/libuv/test/test-tcp-shutdown-after-write.c +131 -0
- data/ext/libuv/test/test-tcp-unexpected-read.c +113 -0
- data/ext/libuv/test/test-tcp-write-error.c +168 -0
- data/ext/libuv/test/test-tcp-write-to-half-open-connection.c +135 -0
- data/ext/libuv/test/test-tcp-writealot.c +170 -0
- data/ext/libuv/test/test-thread.c +183 -0
- data/ext/libuv/test/test-threadpool.c +57 -0
- data/ext/libuv/test/test-timer-again.c +141 -0
- data/ext/libuv/test/test-timer.c +152 -0
- data/ext/libuv/test/test-tty.c +110 -0
- data/ext/libuv/test/test-udp-dgram-too-big.c +86 -0
- data/ext/libuv/test/test-udp-ipv6.c +156 -0
- data/ext/libuv/test/test-udp-multicast-join.c +139 -0
- data/ext/libuv/test/test-udp-multicast-ttl.c +86 -0
- data/ext/libuv/test/test-udp-options.c +86 -0
- data/ext/libuv/test/test-udp-send-and-recv.c +208 -0
- data/ext/libuv/test/test-util.c +97 -0
- data/ext/libuv/test/test-walk-handles.c +77 -0
- data/ext/libuv/uv.gyp +375 -0
- data/ext/libuv/vcbuild.bat +105 -0
- data/foolio.gemspec +18 -0
- data/lib/foolio.rb +9 -0
- data/lib/foolio/handle.rb +27 -0
- data/lib/foolio/listener.rb +26 -0
- data/lib/foolio/loop.rb +79 -0
- data/lib/foolio/stream.rb +109 -0
- data/lib/foolio/version.rb +3 -0
- metadata +309 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
/* config.h. Generated from config.h.in by configure. */
|
2
|
+
/* config.h.in. Generated from configure.ac by autoheader. */
|
3
|
+
|
4
|
+
/* Define to 1 if you have the <dlfcn.h> header file. */
|
5
|
+
#define HAVE_DLFCN_H 1
|
6
|
+
|
7
|
+
/* fdatasync(2) is available */
|
8
|
+
/* #undef HAVE_FDATASYNC */
|
9
|
+
|
10
|
+
/* utimes(2) is available */
|
11
|
+
#define HAVE_UTIMES 1
|
12
|
+
|
13
|
+
/* futimes(2) is available */
|
14
|
+
#define HAVE_FUTIMES 1
|
15
|
+
|
16
|
+
/* Define to 1 if you have the <inttypes.h> header file. */
|
17
|
+
#define HAVE_INTTYPES_H 1
|
18
|
+
|
19
|
+
/* Define to 1 if you have the <memory.h> header file. */
|
20
|
+
#define HAVE_MEMORY_H 1
|
21
|
+
|
22
|
+
/* pread(2) and pwrite(2) are available */
|
23
|
+
#define HAVE_PREADWRITE 1
|
24
|
+
|
25
|
+
/* readahead(2) is available (linux) */
|
26
|
+
/* #undef HAVE_READAHEAD */
|
27
|
+
|
28
|
+
/* sendfile(2) is available and supported */
|
29
|
+
#define HAVE_SENDFILE 0
|
30
|
+
|
31
|
+
/* Define to 1 if you have the <stdint.h> header file. */
|
32
|
+
#define HAVE_STDINT_H 1
|
33
|
+
|
34
|
+
/* Define to 1 if you have the <stdlib.h> header file. */
|
35
|
+
#define HAVE_STDLIB_H 1
|
36
|
+
|
37
|
+
/* Define to 1 if you have the <strings.h> header file. */
|
38
|
+
#define HAVE_STRINGS_H 1
|
39
|
+
|
40
|
+
/* Define to 1 if you have the <string.h> header file. */
|
41
|
+
#define HAVE_STRING_H 1
|
42
|
+
|
43
|
+
/* sync_file_range(2) is available */
|
44
|
+
/* #undef HAVE_SYNC_FILE_RANGE */
|
45
|
+
|
46
|
+
/* Define to 1 if you have the <sys/stat.h> header file. */
|
47
|
+
#define HAVE_SYS_STAT_H 1
|
48
|
+
|
49
|
+
/* Define to 1 if you have the <sys/types.h> header file. */
|
50
|
+
#define HAVE_SYS_TYPES_H 1
|
51
|
+
|
52
|
+
/* Define to 1 if you have the <unistd.h> header file. */
|
53
|
+
#define HAVE_UNISTD_H 1
|
54
|
+
|
55
|
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
56
|
+
*/
|
57
|
+
#define LT_OBJDIR ".libs/"
|
58
|
+
|
59
|
+
/* Name of package */
|
60
|
+
#define PACKAGE "libeio"
|
61
|
+
|
62
|
+
/* Define to the address where bug reports for this package should be sent. */
|
63
|
+
#define PACKAGE_BUGREPORT ""
|
64
|
+
|
65
|
+
/* Define to the full name of this package. */
|
66
|
+
#define PACKAGE_NAME ""
|
67
|
+
|
68
|
+
/* Define to the full name and version of this package. */
|
69
|
+
#define PACKAGE_STRING ""
|
70
|
+
|
71
|
+
/* Define to the one symbol short name of this package. */
|
72
|
+
#define PACKAGE_TARNAME ""
|
73
|
+
|
74
|
+
/* Define to the version of this package. */
|
75
|
+
#define PACKAGE_VERSION ""
|
76
|
+
|
77
|
+
/* Define to 1 if you have the ANSI C header files. */
|
78
|
+
#define STDC_HEADERS 1
|
79
|
+
|
80
|
+
/* Version number of package */
|
81
|
+
#define VERSION "1.0"
|
@@ -0,0 +1,137 @@
|
|
1
|
+
/* config.h. Generated from config.h.in by configure. */
|
2
|
+
/* config.h.in. Generated from configure.ac by autoheader. */
|
3
|
+
|
4
|
+
/* Define to 1 if you have the <dlfcn.h> header file. */
|
5
|
+
#define HAVE_DLFCN_H 1
|
6
|
+
|
7
|
+
/* fallocate(2) is available */
|
8
|
+
/* #undef HAVE_FALLOCATE */
|
9
|
+
|
10
|
+
/* fdatasync(2) is available */
|
11
|
+
/* #undef HAVE_FDATASYNC */
|
12
|
+
|
13
|
+
/* futimes(2) is available */
|
14
|
+
#define HAVE_FUTIMES 1
|
15
|
+
|
16
|
+
/* Define to 1 if you have the <inttypes.h> header file. */
|
17
|
+
#define HAVE_INTTYPES_H 1
|
18
|
+
|
19
|
+
/* Define to 1 if you have the <memory.h> header file. */
|
20
|
+
#define HAVE_MEMORY_H 1
|
21
|
+
|
22
|
+
/* posix_fadvise(2) is available */
|
23
|
+
/* #undef HAVE_POSIX_FADVISE */
|
24
|
+
|
25
|
+
/* posix_madvise(2) is available */
|
26
|
+
#define HAVE_POSIX_MADVISE 1
|
27
|
+
|
28
|
+
/* prctl(PR_SET_NAME) is available */
|
29
|
+
/* #undef HAVE_PRCTL_SET_NAME */
|
30
|
+
|
31
|
+
/* pread(2) and pwrite(2) are available */
|
32
|
+
#define HAVE_PREADWRITE 1
|
33
|
+
|
34
|
+
/* readahead(2) is available (linux) */
|
35
|
+
/* #undef HAVE_READAHEAD */
|
36
|
+
|
37
|
+
/* sendfile(2) is available and supported */
|
38
|
+
/* #undef HAVE_SENDFILE */
|
39
|
+
|
40
|
+
/* Define to 1 if you have the <stdint.h> header file. */
|
41
|
+
#define HAVE_STDINT_H 1
|
42
|
+
|
43
|
+
/* Define to 1 if you have the <stdlib.h> header file. */
|
44
|
+
#define HAVE_STDLIB_H 1
|
45
|
+
|
46
|
+
/* Define to 1 if you have the <strings.h> header file. */
|
47
|
+
#define HAVE_STRINGS_H 1
|
48
|
+
|
49
|
+
/* Define to 1 if you have the <string.h> header file. */
|
50
|
+
#define HAVE_STRING_H 1
|
51
|
+
|
52
|
+
/* sync_file_range(2) is available */
|
53
|
+
/* #undef HAVE_SYNC_FILE_RANGE */
|
54
|
+
|
55
|
+
/* Define to 1 if you have the <sys/prctl.h> header file. */
|
56
|
+
/* #undef HAVE_SYS_PRCTL_H */
|
57
|
+
|
58
|
+
/* Define to 1 if you have the <sys/stat.h> header file. */
|
59
|
+
#define HAVE_SYS_STAT_H 1
|
60
|
+
|
61
|
+
/* syscall(__NR_syncfs) is available */
|
62
|
+
/* #undef HAVE_SYS_SYNCFS */
|
63
|
+
|
64
|
+
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
65
|
+
#define HAVE_SYS_SYSCALL_H 1
|
66
|
+
|
67
|
+
/* Define to 1 if you have the <sys/types.h> header file. */
|
68
|
+
#define HAVE_SYS_TYPES_H 1
|
69
|
+
|
70
|
+
/* Define to 1 if you have the <unistd.h> header file. */
|
71
|
+
#define HAVE_UNISTD_H 1
|
72
|
+
|
73
|
+
/* utimes(2) is available */
|
74
|
+
#define HAVE_UTIMES 1
|
75
|
+
|
76
|
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
77
|
+
*/
|
78
|
+
#define LT_OBJDIR ".libs/"
|
79
|
+
|
80
|
+
/* Name of package */
|
81
|
+
#define PACKAGE "libeio"
|
82
|
+
|
83
|
+
/* Define to the address where bug reports for this package should be sent. */
|
84
|
+
#define PACKAGE_BUGREPORT ""
|
85
|
+
|
86
|
+
/* Define to the full name of this package. */
|
87
|
+
#define PACKAGE_NAME ""
|
88
|
+
|
89
|
+
/* Define to the full name and version of this package. */
|
90
|
+
#define PACKAGE_STRING ""
|
91
|
+
|
92
|
+
/* Define to the one symbol short name of this package. */
|
93
|
+
#define PACKAGE_TARNAME ""
|
94
|
+
|
95
|
+
/* Define to the home page for this package. */
|
96
|
+
#define PACKAGE_URL ""
|
97
|
+
|
98
|
+
/* Define to the version of this package. */
|
99
|
+
#define PACKAGE_VERSION ""
|
100
|
+
|
101
|
+
/* Define to 1 if you have the ANSI C header files. */
|
102
|
+
#define STDC_HEADERS 1
|
103
|
+
|
104
|
+
/* Enable extensions on AIX 3, Interix. */
|
105
|
+
#ifndef _ALL_SOURCE
|
106
|
+
# define _ALL_SOURCE 1
|
107
|
+
#endif
|
108
|
+
/* Enable GNU extensions on systems that have them. */
|
109
|
+
#ifndef _GNU_SOURCE
|
110
|
+
# define _GNU_SOURCE 1
|
111
|
+
#endif
|
112
|
+
/* Enable threading extensions on Solaris. */
|
113
|
+
#ifndef _POSIX_PTHREAD_SEMANTICS
|
114
|
+
# define _POSIX_PTHREAD_SEMANTICS 1
|
115
|
+
#endif
|
116
|
+
/* Enable extensions on HP NonStop. */
|
117
|
+
#ifndef _TANDEM_SOURCE
|
118
|
+
# define _TANDEM_SOURCE 1
|
119
|
+
#endif
|
120
|
+
/* Enable general extensions on Solaris. */
|
121
|
+
#ifndef __EXTENSIONS__
|
122
|
+
# define __EXTENSIONS__ 1
|
123
|
+
#endif
|
124
|
+
|
125
|
+
|
126
|
+
/* Version number of package */
|
127
|
+
#define VERSION "1.0"
|
128
|
+
|
129
|
+
/* Define to 1 if on MINIX. */
|
130
|
+
/* #undef _MINIX */
|
131
|
+
|
132
|
+
/* Define to 2 if the system does not provide POSIX.1 features except with
|
133
|
+
this defined. */
|
134
|
+
/* #undef _POSIX_1_SOURCE */
|
135
|
+
|
136
|
+
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
137
|
+
/* #undef _POSIX_SOURCE */
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/* config.h. Generated from config.h.in by configure. */
|
2
|
+
/* config.h.in. Generated from configure.ac by autoheader. */
|
3
|
+
|
4
|
+
/* Define to 1 if you have the <dlfcn.h> header file. */
|
5
|
+
#define HAVE_DLFCN_H 1
|
6
|
+
|
7
|
+
/* fdatasync(2) is available */
|
8
|
+
#define HAVE_FDATASYNC 1
|
9
|
+
|
10
|
+
/* utimes(2) is available */
|
11
|
+
#define HAVE_UTIMES 1
|
12
|
+
|
13
|
+
/* futimes(2) is available */
|
14
|
+
#define HAVE_FUTIMES 1
|
15
|
+
|
16
|
+
/* Define to 1 if you have the <inttypes.h> header file. */
|
17
|
+
#define HAVE_INTTYPES_H 1
|
18
|
+
|
19
|
+
/* Define to 1 if you have the <memory.h> header file. */
|
20
|
+
#define HAVE_MEMORY_H 1
|
21
|
+
|
22
|
+
/* pread(2) and pwrite(2) are available */
|
23
|
+
#define HAVE_PREADWRITE 1
|
24
|
+
|
25
|
+
/* readahead(2) is available (linux) */
|
26
|
+
/* #undef HAVE_READAHEAD */
|
27
|
+
|
28
|
+
/* sendfile(2) is available and supported */
|
29
|
+
/* #undef HAVE_SENDFILE */
|
30
|
+
|
31
|
+
/* Define to 1 if you have the <stdint.h> header file. */
|
32
|
+
#define HAVE_STDINT_H 1
|
33
|
+
|
34
|
+
/* Define to 1 if you have the <stdlib.h> header file. */
|
35
|
+
#define HAVE_STDLIB_H 1
|
36
|
+
|
37
|
+
/* Define to 1 if you have the <strings.h> header file. */
|
38
|
+
#define HAVE_STRINGS_H 1
|
39
|
+
|
40
|
+
/* Define to 1 if you have the <string.h> header file. */
|
41
|
+
#define HAVE_STRING_H 1
|
42
|
+
|
43
|
+
/* sync_file_range(2) is available */
|
44
|
+
/* #undef HAVE_SYNC_FILE_RANGE */
|
45
|
+
|
46
|
+
/* Define to 1 if you have the <sys/stat.h> header file. */
|
47
|
+
#define HAVE_SYS_STAT_H 1
|
48
|
+
|
49
|
+
/* Define to 1 if you have the <sys/types.h> header file. */
|
50
|
+
#define HAVE_SYS_TYPES_H 1
|
51
|
+
|
52
|
+
/* Define to 1 if you have the <unistd.h> header file. */
|
53
|
+
#define HAVE_UNISTD_H 1
|
54
|
+
|
55
|
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
56
|
+
*/
|
57
|
+
#define LT_OBJDIR ".libs/"
|
58
|
+
|
59
|
+
/* Name of package */
|
60
|
+
#define PACKAGE "libeio"
|
61
|
+
|
62
|
+
/* Define to the address where bug reports for this package should be sent. */
|
63
|
+
#define PACKAGE_BUGREPORT ""
|
64
|
+
|
65
|
+
/* Define to the full name of this package. */
|
66
|
+
#define PACKAGE_NAME ""
|
67
|
+
|
68
|
+
/* Define to the full name and version of this package. */
|
69
|
+
#define PACKAGE_STRING ""
|
70
|
+
|
71
|
+
/* Define to the one symbol short name of this package. */
|
72
|
+
#define PACKAGE_TARNAME ""
|
73
|
+
|
74
|
+
/* Define to the home page for this package. */
|
75
|
+
#define PACKAGE_URL ""
|
76
|
+
|
77
|
+
/* Define to the version of this package. */
|
78
|
+
#define PACKAGE_VERSION ""
|
79
|
+
|
80
|
+
/* Define to 1 if you have the ANSI C header files. */
|
81
|
+
#define STDC_HEADERS 1
|
82
|
+
|
83
|
+
/* Version number of package */
|
84
|
+
#define VERSION "1.0"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
AC_PREREQ(2.59)
|
2
|
+
AC_INIT
|
3
|
+
AC_CONFIG_SRCDIR([eio.h])
|
4
|
+
AC_CONFIG_HEADERS([config.h])
|
5
|
+
|
6
|
+
AM_INIT_AUTOMAKE(libeio,1.0)
|
7
|
+
AM_MAINTAINER_MODE
|
8
|
+
|
9
|
+
AC_GNU_SOURCE
|
10
|
+
|
11
|
+
AC_PROG_LIBTOOL
|
12
|
+
|
13
|
+
AC_PROG_CC
|
14
|
+
|
15
|
+
if test "x$GCC" = xyes ; then
|
16
|
+
CFLAGS="-O3 $CFLAGS"
|
17
|
+
fi
|
18
|
+
|
19
|
+
m4_include([libeio.m4])
|
20
|
+
|
21
|
+
AC_CONFIG_FILES([Makefile])
|
22
|
+
AC_OUTPUT
|
@@ -0,0 +1,194 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
#include <stdlib.h>
|
3
|
+
#include <unistd.h>
|
4
|
+
#include <poll.h>
|
5
|
+
#include <string.h>
|
6
|
+
#include <assert.h>
|
7
|
+
#include <fcntl.h>
|
8
|
+
#include <sys/types.h>
|
9
|
+
#include <sys/stat.h>
|
10
|
+
|
11
|
+
#include "eio.h"
|
12
|
+
|
13
|
+
int respipe [2];
|
14
|
+
|
15
|
+
void
|
16
|
+
want_poll (void)
|
17
|
+
{
|
18
|
+
char dummy;
|
19
|
+
printf ("want_poll ()\n");
|
20
|
+
write (respipe [1], &dummy, 1);
|
21
|
+
}
|
22
|
+
|
23
|
+
void
|
24
|
+
done_poll (void)
|
25
|
+
{
|
26
|
+
char dummy;
|
27
|
+
printf ("done_poll ()\n");
|
28
|
+
read (respipe [0], &dummy, 1);
|
29
|
+
}
|
30
|
+
|
31
|
+
void
|
32
|
+
event_loop (void)
|
33
|
+
{
|
34
|
+
// an event loop. yeah.
|
35
|
+
struct pollfd pfd;
|
36
|
+
pfd.fd = respipe [0];
|
37
|
+
pfd.events = POLLIN;
|
38
|
+
|
39
|
+
printf ("\nentering event loop\n");
|
40
|
+
while (eio_nreqs ())
|
41
|
+
{
|
42
|
+
poll (&pfd, 1, -1);
|
43
|
+
printf ("eio_poll () = %d\n", eio_poll ());
|
44
|
+
}
|
45
|
+
printf ("leaving event loop\n");
|
46
|
+
}
|
47
|
+
|
48
|
+
int
|
49
|
+
res_cb (eio_req *req)
|
50
|
+
{
|
51
|
+
printf ("res_cb(%d|%s) = %d\n", req->type, req->data ? req->data : "?", EIO_RESULT (req));
|
52
|
+
|
53
|
+
if (req->result < 0)
|
54
|
+
abort ();
|
55
|
+
|
56
|
+
return 0;
|
57
|
+
}
|
58
|
+
|
59
|
+
int
|
60
|
+
readdir_cb (eio_req *req)
|
61
|
+
{
|
62
|
+
char *buf = (char *)EIO_BUF (req);
|
63
|
+
|
64
|
+
printf ("readdir_cb = %d\n", EIO_RESULT (req));
|
65
|
+
|
66
|
+
if (EIO_RESULT (req) < 0)
|
67
|
+
return 0;
|
68
|
+
|
69
|
+
while (EIO_RESULT (req)--)
|
70
|
+
{
|
71
|
+
printf ("readdir = <%s>\n", buf);
|
72
|
+
buf += strlen (buf) + 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
return 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
int
|
79
|
+
stat_cb (eio_req *req)
|
80
|
+
{
|
81
|
+
struct stat *buf = EIO_STAT_BUF (req);
|
82
|
+
|
83
|
+
if (req->type == EIO_FSTAT)
|
84
|
+
printf ("fstat_cb = %d\n", EIO_RESULT (req));
|
85
|
+
else
|
86
|
+
printf ("stat_cb(%s) = %d\n", EIO_PATH (req), EIO_RESULT (req));
|
87
|
+
|
88
|
+
if (!EIO_RESULT (req))
|
89
|
+
printf ("stat size %d perm 0%o\n", buf->st_size, buf->st_mode & 0777);
|
90
|
+
|
91
|
+
return 0;
|
92
|
+
}
|
93
|
+
|
94
|
+
int
|
95
|
+
read_cb (eio_req *req)
|
96
|
+
{
|
97
|
+
unsigned char *buf = (unsigned char *)EIO_BUF (req);
|
98
|
+
|
99
|
+
printf ("read_cb = %d (%02x%02x%02x%02x %02x%02x%02x%02x)\n",
|
100
|
+
EIO_RESULT (req),
|
101
|
+
buf [0], buf [1], buf [2], buf [3],
|
102
|
+
buf [4], buf [5], buf [6], buf [7]);
|
103
|
+
|
104
|
+
return 0;
|
105
|
+
}
|
106
|
+
|
107
|
+
int last_fd;
|
108
|
+
|
109
|
+
int
|
110
|
+
open_cb (eio_req *req)
|
111
|
+
{
|
112
|
+
printf ("open_cb = %d\n", EIO_RESULT (req));
|
113
|
+
|
114
|
+
last_fd = EIO_RESULT (req);
|
115
|
+
|
116
|
+
return 0;
|
117
|
+
}
|
118
|
+
|
119
|
+
int
|
120
|
+
main (void)
|
121
|
+
{
|
122
|
+
printf ("pipe ()\n");
|
123
|
+
if (pipe (respipe)) abort ();
|
124
|
+
|
125
|
+
printf ("eio_init ()\n");
|
126
|
+
if (eio_init (want_poll, done_poll)) abort ();
|
127
|
+
|
128
|
+
do
|
129
|
+
{
|
130
|
+
/* avoid relative paths yourself(!) */
|
131
|
+
eio_mkdir ("eio-test-dir", 0777, 0, res_cb, "mkdir");
|
132
|
+
eio_nop (0, res_cb, "nop");
|
133
|
+
event_loop ();
|
134
|
+
|
135
|
+
eio_stat ("eio-test-dir", 0, stat_cb, "stat");
|
136
|
+
eio_lstat ("eio-test-dir", 0, stat_cb, "stat");
|
137
|
+
eio_open ("eio-test-dir/eio-test-file", O_RDWR | O_CREAT, 0777, 0, open_cb, "open");
|
138
|
+
eio_symlink ("test", "eio-test-dir/eio-symlink", 0, res_cb, "symlink");
|
139
|
+
eio_mknod ("eio-test-dir/eio-fifo", S_IFIFO, 0, 0, res_cb, "mknod");
|
140
|
+
event_loop ();
|
141
|
+
|
142
|
+
eio_utime ("eio-test-dir", 12345.678, 23456.789, 0, res_cb, "utime");
|
143
|
+
eio_futime (last_fd, 92345.678, 93456.789, 0, res_cb, "futime");
|
144
|
+
eio_chown ("eio-test-dir", getuid (), getgid (), 0, res_cb, "chown");
|
145
|
+
eio_fchown (last_fd, getuid (), getgid (), 0, res_cb, "fchown");
|
146
|
+
eio_fchmod (last_fd, 0723, 0, res_cb, "fchmod");
|
147
|
+
eio_readdir ("eio-test-dir", 0, 0, readdir_cb, "readdir");
|
148
|
+
eio_readdir ("/nonexistant", 0, 0, readdir_cb, "readdir");
|
149
|
+
eio_fstat (last_fd, 0, stat_cb, "stat");
|
150
|
+
eio_write (last_fd, "test\nfail\n", 10, 4, 0, res_cb, "write");
|
151
|
+
event_loop ();
|
152
|
+
|
153
|
+
eio_read (last_fd, 0, 8, 0, EIO_PRI_DEFAULT, read_cb, "read");
|
154
|
+
eio_readlink ("eio-test-dir/eio-symlink", 0, res_cb, "readlink");
|
155
|
+
event_loop ();
|
156
|
+
|
157
|
+
eio_dup2 (1, 2, EIO_PRI_DEFAULT, res_cb, "dup"); // dup stdout to stderr
|
158
|
+
eio_chmod ("eio-test-dir", 0765, 0, res_cb, "chmod");
|
159
|
+
eio_ftruncate (last_fd, 9, 0, res_cb, "ftruncate");
|
160
|
+
eio_fdatasync (last_fd, 0, res_cb, "fdatasync");
|
161
|
+
eio_fsync (last_fd, 0, res_cb, "fsync");
|
162
|
+
eio_sync (0, res_cb, "sync");
|
163
|
+
eio_busy (0.5, 0, res_cb, "busy");
|
164
|
+
event_loop ();
|
165
|
+
|
166
|
+
eio_sendfile (1, last_fd, 4, 5, 0, res_cb, "sendfile"); // write "test\n" to stdout
|
167
|
+
eio_fstat (last_fd, 0, stat_cb, "stat");
|
168
|
+
event_loop ();
|
169
|
+
|
170
|
+
eio_truncate ("eio-test-dir/eio-test-file", 6, 0, res_cb, "truncate");
|
171
|
+
eio_readahead (last_fd, 0, 64, 0, res_cb, "readahead");
|
172
|
+
event_loop ();
|
173
|
+
|
174
|
+
eio_close (last_fd, 0, res_cb, "close");
|
175
|
+
eio_link ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-2", 0, res_cb, "link");
|
176
|
+
event_loop ();
|
177
|
+
|
178
|
+
eio_rename ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-renamed", 0, res_cb, "rename");
|
179
|
+
event_loop ();
|
180
|
+
|
181
|
+
eio_unlink ("eio-test-dir/eio-fifo", 0, res_cb, "unlink");
|
182
|
+
eio_unlink ("eio-test-dir/eio-symlink", 0, res_cb, "unlink");
|
183
|
+
eio_unlink ("eio-test-dir/eio-test-file-2", 0, res_cb, "unlink");
|
184
|
+
eio_unlink ("eio-test-dir/eio-test-file-renamed", 0, res_cb, "unlink");
|
185
|
+
event_loop ();
|
186
|
+
|
187
|
+
eio_rmdir ("eio-test-dir", 0, res_cb, "rmdir");
|
188
|
+
event_loop ();
|
189
|
+
}
|
190
|
+
while (0);
|
191
|
+
|
192
|
+
return 0;
|
193
|
+
}
|
194
|
+
|