rev 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +11 -0
- data/README +10 -3
- data/Rakefile +2 -2
- data/examples/echo_client.rb +35 -0
- data/examples/google.rb +8 -0
- data/examples/httpclient.rb +35 -0
- data/ext/http11_client/Makefile +149 -0
- data/ext/http11_client/http11_client.bundle +0 -0
- data/ext/http11_client/http11_client.o +0 -0
- data/ext/http11_client/http11_parser.o +0 -0
- data/ext/http11_client/mkmf.log +12 -0
- data/ext/libev/Changes +114 -1
- data/ext/libev/ev.c +212 -97
- data/ext/libev/ev.h +13 -7
- data/ext/libev/ev_epoll.c +44 -11
- data/ext/libev/ev_kqueue.c +2 -2
- data/ext/libev/ev_poll.c +3 -1
- data/ext/libev/ev_port.c +4 -4
- data/ext/libev/ev_select.c +58 -19
- data/ext/libev/ev_vars.h +5 -1
- data/ext/libev/ev_win32.c +32 -3
- data/ext/libev/ev_wrap.h +4 -0
- data/ext/libev/test_libev_win32.c +123 -0
- data/ext/libev/update_ev_wrap +0 -0
- data/ext/rev/Makefile +149 -0
- data/ext/rev/ev_wrap.h +8 -0
- data/ext/rev/extconf.rb +17 -0
- data/ext/rev/libev.c +8 -0
- data/ext/rev/libev.o +0 -0
- data/ext/rev/mkmf.log +221 -0
- data/ext/rev/rev.h +8 -2
- data/ext/rev/rev_buffer.c +2 -3
- data/ext/rev/rev_buffer.o +0 -0
- data/ext/rev/rev_ext.bundle +0 -0
- data/ext/rev/rev_ext.c +4 -3
- data/ext/rev/rev_ext.o +0 -0
- data/ext/rev/rev_io_watcher.c +1 -2
- data/ext/rev/rev_io_watcher.o +0 -0
- data/ext/rev/rev_loop.c +4 -4
- data/ext/rev/rev_loop.o +0 -0
- data/ext/rev/rev_ssl.o +0 -0
- data/ext/rev/rev_timer_watcher.c +1 -2
- data/ext/rev/rev_timer_watcher.o +0 -0
- data/ext/rev/rev_utils.c +14 -0
- data/ext/rev/rev_utils.o +0 -0
- data/ext/rev/rev_watcher.c +7 -6
- data/ext/rev/rev_watcher.o +0 -0
- data/lib/http11_client.bundle +0 -0
- data/lib/rev.rb +1 -1
- data/lib/rev/dns_resolver.rb +29 -9
- data/lib/rev/io.rb +6 -4
- data/lib/rev/listener.rb +5 -1
- data/lib/rev/loop.rb +8 -4
- data/lib/rev/server.rb +3 -2
- data/lib/rev/socket.rb +14 -5
- data/lib/rev_ext.bundle +0 -0
- data/lib/revem.rb +210 -0
- data/rev.gemspec +2 -2
- metadata +29 -3
data/ext/libev/ev_wrap.h
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
#define vec_ro ((loop)->vec_ro)
|
23
23
|
#define vec_wi ((loop)->vec_wi)
|
24
24
|
#define vec_wo ((loop)->vec_wo)
|
25
|
+
#define vec_eo ((loop)->vec_eo)
|
25
26
|
#define vec_max ((loop)->vec_max)
|
26
27
|
#define polls ((loop)->polls)
|
27
28
|
#define pollmax ((loop)->pollmax)
|
@@ -70,6 +71,7 @@
|
|
70
71
|
#define asynccnt ((loop)->asynccnt)
|
71
72
|
#define fs_fd ((loop)->fs_fd)
|
72
73
|
#define fs_w ((loop)->fs_w)
|
74
|
+
#define fs_2625 ((loop)->fs_2625)
|
73
75
|
#define fs_hash ((loop)->fs_hash)
|
74
76
|
#else
|
75
77
|
#undef EV_WRAP_H
|
@@ -94,6 +96,7 @@
|
|
94
96
|
#undef vec_ro
|
95
97
|
#undef vec_wi
|
96
98
|
#undef vec_wo
|
99
|
+
#undef vec_eo
|
97
100
|
#undef vec_max
|
98
101
|
#undef polls
|
99
102
|
#undef pollmax
|
@@ -142,5 +145,6 @@
|
|
142
145
|
#undef asynccnt
|
143
146
|
#undef fs_fd
|
144
147
|
#undef fs_w
|
148
|
+
#undef fs_2625
|
145
149
|
#undef fs_hash
|
146
150
|
#endif
|
@@ -0,0 +1,123 @@
|
|
1
|
+
// a single header file is required
|
2
|
+
#include <ev.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <io.h>
|
5
|
+
|
6
|
+
// every watcher type has its own typedef'd struct
|
7
|
+
// with the name ev_TYPE
|
8
|
+
ev_io stdin_watcher;
|
9
|
+
ev_timer timeout_watcher;
|
10
|
+
|
11
|
+
// all watcher callbacks have a similar signature
|
12
|
+
// this callback is called when data is readable on stdin
|
13
|
+
static void
|
14
|
+
stdin_cb (EV_P_ ev_io *w, int revents)
|
15
|
+
{
|
16
|
+
puts ("stdin ready or done or something");
|
17
|
+
// for one-shot events, one must manually stop the watcher
|
18
|
+
// with its corresponding stop function.
|
19
|
+
//ev_io_stop (EV_A_ w);
|
20
|
+
|
21
|
+
// this causes all nested ev_loop's to stop iterating
|
22
|
+
//ev_unloop (EV_A_ EVUNLOOP_ALL);
|
23
|
+
}
|
24
|
+
|
25
|
+
// another callback, this time for a time-out
|
26
|
+
static void
|
27
|
+
timeout_cb (EV_P_ ev_timer *w, int revents)
|
28
|
+
{
|
29
|
+
puts ("timeout");
|
30
|
+
// this causes the innermost ev_loop to stop iterating
|
31
|
+
ev_unloop (EV_A_ EVUNLOOP_ONE);
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
#include <winsock.h>
|
37
|
+
|
38
|
+
#include <stdlib.h>
|
39
|
+
#include <iostream>
|
40
|
+
int get_server_fd()
|
41
|
+
{
|
42
|
+
|
43
|
+
//----------------------
|
44
|
+
// Initialize Winsock.
|
45
|
+
WSADATA wsaData;
|
46
|
+
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
|
47
|
+
if (iResult != NO_ERROR) {
|
48
|
+
printf("Error at WSAStartup()\n");
|
49
|
+
return 1;
|
50
|
+
}
|
51
|
+
|
52
|
+
//----------------------
|
53
|
+
// Create a SOCKET for listening for
|
54
|
+
// incoming connection requests.
|
55
|
+
SOCKET ListenSocket;
|
56
|
+
ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
57
|
+
if (ListenSocket == INVALID_SOCKET) {
|
58
|
+
printf("Error at socket(): %ld\n", WSAGetLastError());
|
59
|
+
WSACleanup();
|
60
|
+
return 1;
|
61
|
+
}
|
62
|
+
printf("socket returned %d\n", ListenSocket);
|
63
|
+
|
64
|
+
//----------------------
|
65
|
+
// The sockaddr_in structure specifies the address family,
|
66
|
+
// IP address, and port for the socket that is being bound.
|
67
|
+
sockaddr_in service;
|
68
|
+
service.sin_family = AF_INET;
|
69
|
+
service.sin_addr.s_addr = inet_addr("127.0.0.1");
|
70
|
+
service.sin_port = htons(4444);
|
71
|
+
|
72
|
+
if (bind( ListenSocket,
|
73
|
+
(SOCKADDR*) &service,
|
74
|
+
sizeof(service)) == SOCKET_ERROR) {
|
75
|
+
printf("bind() failed.\n");
|
76
|
+
closesocket(ListenSocket);
|
77
|
+
WSACleanup();
|
78
|
+
return 1;
|
79
|
+
}
|
80
|
+
|
81
|
+
//----------------------
|
82
|
+
// Listen for incoming connection requests.
|
83
|
+
// on the created socket
|
84
|
+
if (listen( ListenSocket, 1 ) == SOCKET_ERROR) {
|
85
|
+
printf("Error listening on socket.\n");
|
86
|
+
closesocket(ListenSocket);
|
87
|
+
WSACleanup();
|
88
|
+
return 1;
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
printf("sock and osf handle are %d %d, error is \n", ListenSocket, _get_osfhandle (ListenSocket)); // -1 is invalid file handle: http://msdn.microsoft.com/en-us/library/ks2530z6.aspx
|
93
|
+
printf("err was %d\n", WSAGetLastError());
|
94
|
+
//----------------------
|
95
|
+
return ListenSocket;
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
int
|
100
|
+
main (void)
|
101
|
+
{
|
102
|
+
struct ev_loop *loopy = ev_default_loop(0);
|
103
|
+
int fd = get_server_fd();
|
104
|
+
int fd_real = _open_osfhandle(fd, NULL);
|
105
|
+
int conv = _get_osfhandle(fd_real);
|
106
|
+
printf("got server fd %d, loop %d, fd_real %d, that converted %d\n", fd, loopy, fd_real, conv);
|
107
|
+
// accept(fd, NULL, NULL);
|
108
|
+
// initialise an io watcher, then start it
|
109
|
+
// this one will watch for stdin to become readable
|
110
|
+
ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ conv, EV_READ);
|
111
|
+
ev_io_start (loopy, &stdin_watcher);
|
112
|
+
|
113
|
+
// initialise a timer watcher, then start it
|
114
|
+
// simple non-repeating 5.5 second timeout
|
115
|
+
//ev_timer_init (&timeout_watcher, timeout_cb, 15.5, 0.);
|
116
|
+
//ev_timer_start (loopy, &timeout_watcher);
|
117
|
+
printf("starting loop\n");
|
118
|
+
// now wait for events to arrive
|
119
|
+
ev_loop (loopy, 0);
|
120
|
+
|
121
|
+
// unloop was called, so exit
|
122
|
+
return 0;
|
123
|
+
}
|
data/ext/libev/update_ev_wrap
CHANGED
File without changes
|
data/ext/rev/Makefile
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
|
2
|
+
SHELL = /bin/sh
|
3
|
+
|
4
|
+
#### Start of system configuration section. ####
|
5
|
+
|
6
|
+
srcdir = .
|
7
|
+
topdir = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0
|
8
|
+
hdrdir = $(topdir)
|
9
|
+
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
+
prefix = $(DESTDIR)/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr
|
11
|
+
exec_prefix = $(prefix)
|
12
|
+
sitedir = $(DESTDIR)/Library/Ruby/Site
|
13
|
+
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
14
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
15
|
+
dvidir = $(docdir)
|
16
|
+
datarootdir = $(prefix)/share
|
17
|
+
archdir = $(rubylibdir)/$(arch)
|
18
|
+
sbindir = $(exec_prefix)/sbin
|
19
|
+
psdir = $(docdir)
|
20
|
+
localedir = $(datarootdir)/locale
|
21
|
+
htmldir = $(docdir)
|
22
|
+
datadir = $(datarootdir)
|
23
|
+
includedir = $(prefix)/include
|
24
|
+
infodir = $(DESTDIR)/usr/share/info
|
25
|
+
sysconfdir = $(prefix)/etc
|
26
|
+
mandir = $(DESTDIR)/usr/share/man
|
27
|
+
libdir = $(exec_prefix)/lib
|
28
|
+
sharedstatedir = $(prefix)/com
|
29
|
+
oldincludedir = $(DESTDIR)/usr/include
|
30
|
+
pdfdir = $(docdir)
|
31
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
32
|
+
bindir = $(exec_prefix)/bin
|
33
|
+
localstatedir = $(prefix)/var
|
34
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
35
|
+
libexecdir = $(exec_prefix)/libexec
|
36
|
+
|
37
|
+
CC = gcc
|
38
|
+
LIBRUBY = $(LIBRUBY_SO)
|
39
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
40
|
+
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
41
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)
|
42
|
+
|
43
|
+
RUBY_EXTCONF_H =
|
44
|
+
CFLAGS = -fno-common -arch ppc -arch i386 -Os -pipe -fno-common
|
45
|
+
INCFLAGS = -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I.
|
46
|
+
CPPFLAGS = -DRUBY_VERSION_CODE=186 -DHAVE_SYS_SELECT_H -DEV_USE_SELECT -DHAVE_POLL_H -DEV_USE_POLL -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DEV_USE_KQUEUE -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_SSL_H -DHAVE_SYS_RESOURCE_H -DHAVE_SYS_RESOURCE_H -DHAVE_SYSCTLBYNAME -DHAVE_SYSCTLBYNAME
|
47
|
+
CXXFLAGS = $(CFLAGS)
|
48
|
+
DLDFLAGS = -L. -arch ppc -arch i386
|
49
|
+
LDSHARED = cc -arch ppc -arch i386 -pipe -bundle -undefined dynamic_lookup
|
50
|
+
AR = ar
|
51
|
+
EXEEXT =
|
52
|
+
|
53
|
+
RUBY_INSTALL_NAME = ruby
|
54
|
+
RUBY_SO_NAME = ruby
|
55
|
+
arch = universal-darwin9.0
|
56
|
+
sitearch = universal-darwin9.0
|
57
|
+
ruby_version = 1.8
|
58
|
+
ruby = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
|
59
|
+
RUBY = $(ruby)
|
60
|
+
RM = rm -f
|
61
|
+
MAKEDIRS = mkdir -p
|
62
|
+
INSTALL = /usr/bin/install -c
|
63
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
64
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
65
|
+
COPY = cp
|
66
|
+
|
67
|
+
#### End of system configuration section. ####
|
68
|
+
|
69
|
+
preload =
|
70
|
+
|
71
|
+
libpath = . $(libdir)
|
72
|
+
LIBPATH = -L"." -L"$(libdir)"
|
73
|
+
DEFFILE =
|
74
|
+
|
75
|
+
CLEANFILES = mkmf.log
|
76
|
+
DISTCLEANFILES =
|
77
|
+
|
78
|
+
extout =
|
79
|
+
extout_prefix =
|
80
|
+
target_prefix =
|
81
|
+
LOCAL_LIBS =
|
82
|
+
LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lm -lssl -lcrypto
|
83
|
+
SRCS = libev.c rev_buffer.c rev_ext.c rev_io_watcher.c rev_loop.c rev_ssl.c rev_timer_watcher.c rev_utils.c rev_watcher.c
|
84
|
+
OBJS = libev.o rev_buffer.o rev_ext.o rev_io_watcher.o rev_loop.o rev_ssl.o rev_timer_watcher.o rev_utils.o rev_watcher.o
|
85
|
+
TARGET = rev_ext
|
86
|
+
DLLIB = $(TARGET).bundle
|
87
|
+
EXTSTATIC =
|
88
|
+
STATIC_LIB =
|
89
|
+
|
90
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
91
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
92
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
93
|
+
|
94
|
+
TARGET_SO = $(DLLIB)
|
95
|
+
CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
|
96
|
+
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
97
|
+
|
98
|
+
all: $(DLLIB)
|
99
|
+
static: $(STATIC_LIB)
|
100
|
+
|
101
|
+
clean:
|
102
|
+
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
103
|
+
|
104
|
+
distclean: clean
|
105
|
+
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
106
|
+
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
107
|
+
|
108
|
+
realclean: distclean
|
109
|
+
install: install-so install-rb
|
110
|
+
|
111
|
+
install-so: $(RUBYARCHDIR)
|
112
|
+
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
113
|
+
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
114
|
+
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
115
|
+
install-rb: pre-install-rb install-rb-default
|
116
|
+
install-rb-default: pre-install-rb-default
|
117
|
+
pre-install-rb: Makefile
|
118
|
+
pre-install-rb-default: Makefile
|
119
|
+
$(RUBYARCHDIR):
|
120
|
+
$(MAKEDIRS) $@
|
121
|
+
|
122
|
+
site-install: site-install-so site-install-rb
|
123
|
+
site-install-so: install-so
|
124
|
+
site-install-rb: install-rb
|
125
|
+
|
126
|
+
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
127
|
+
|
128
|
+
.cc.o:
|
129
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
130
|
+
|
131
|
+
.cxx.o:
|
132
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
133
|
+
|
134
|
+
.cpp.o:
|
135
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
136
|
+
|
137
|
+
.C.o:
|
138
|
+
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
139
|
+
|
140
|
+
.c.o:
|
141
|
+
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
142
|
+
|
143
|
+
$(DLLIB): $(OBJS)
|
144
|
+
@-$(RM) $@
|
145
|
+
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
$(OBJS): ruby.h defines.h
|
data/ext/rev/ev_wrap.h
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#define EV_STANDALONE /* keeps ev from requiring config.h */
|
2
|
+
#ifdef _WIN32
|
3
|
+
# define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */
|
4
|
+
# define FD_SETSIZE 2048 /* wishful thinking, as msvcrt6 [?] seems to only allow 512 fd's and 256 sockets max */
|
5
|
+
#endif
|
6
|
+
|
7
|
+
#include "../libev/ev.h"
|
8
|
+
|
data/ext/rev/extconf.rb
CHANGED
@@ -12,6 +12,10 @@ if have_func('rb_str_set_len')
|
|
12
12
|
$defs << '-DHAVE_RB_STR_SET_LEN'
|
13
13
|
end
|
14
14
|
|
15
|
+
if have_library('rt', 'clock_gettime')
|
16
|
+
libs << "-lrt"
|
17
|
+
end
|
18
|
+
|
15
19
|
if have_header('sys/select.h')
|
16
20
|
$defs << '-DEV_USE_SELECT'
|
17
21
|
end
|
@@ -37,6 +41,10 @@ if have_header('openssl/ssl.h')
|
|
37
41
|
libs << '-lssl -lcrypto'
|
38
42
|
end
|
39
43
|
|
44
|
+
if have_header('sys/resource.h')
|
45
|
+
$defs << '-DHAVE_SYS_RESOURCE_H'
|
46
|
+
end
|
47
|
+
|
40
48
|
# ncpu detection specifics
|
41
49
|
case RUBY_PLATFORM
|
42
50
|
when /linux/
|
@@ -51,3 +59,12 @@ $LIBS << ' ' << libs.join(' ')
|
|
51
59
|
|
52
60
|
dir_config('rev_ext')
|
53
61
|
create_makefile('rev_ext')
|
62
|
+
|
63
|
+
if have_header('openssl/ssl.h') and RUBY_PLATFORM =~ /mingw|win32/
|
64
|
+
print "Note--SSL not yet supported on windows--continuing without SSL support"
|
65
|
+
makefile_contents = File.read 'Makefile'
|
66
|
+
makefile_contents.gsub!('-DHAVE_OPENSSL_SSL_H', '')
|
67
|
+
makefile_contents.gsub! 'LIBS = $(LIBRUBYARG_SHARED)', 'LIBS = -lws2_32 $(LIBRUBYARG_SHARED)' # for some reason has to come first or ioctlsocket will be mapped to an [inverted] ruby specific version
|
68
|
+
|
69
|
+
File.open('Makefile', 'w') { |f| f.write makefile_contents }
|
70
|
+
end
|
data/ext/rev/libev.c
ADDED
data/ext/rev/libev.o
ADDED
Binary file
|
data/ext/rev/mkmf.log
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
have_func: checking for rb_thread_blocking_region()... -------------------- no
|
2
|
+
|
3
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lpthread -ldl -lm "
|
4
|
+
conftest.c: In function ‘t’:
|
5
|
+
conftest.c:3: error: ‘rb_thread_blocking_region’ undeclared (first use in this function)
|
6
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
7
|
+
conftest.c:3: error: for each function it appears in.)
|
8
|
+
conftest.c: In function ‘t’:
|
9
|
+
conftest.c:3: error: ‘rb_thread_blocking_region’ undeclared (first use in this function)
|
10
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
11
|
+
conftest.c:3: error: for each function it appears in.)
|
12
|
+
lipo: can't figure out the architecture type of: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//ccZ0eGQ4.out
|
13
|
+
checked program was:
|
14
|
+
/* begin */
|
15
|
+
1: /*top*/
|
16
|
+
2: int main() { return 0; }
|
17
|
+
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return 0; }
|
18
|
+
/* end */
|
19
|
+
|
20
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lpthread -ldl -lm "
|
21
|
+
Undefined symbols for architecture i386:
|
22
|
+
"_rb_thread_blocking_region", referenced from:
|
23
|
+
_t in ccEKa8tY.o
|
24
|
+
ld: symbol(s) not found for architecture i386
|
25
|
+
collect2: ld returned 1 exit status
|
26
|
+
Undefined symbols for architecture ppc:
|
27
|
+
"_rb_thread_blocking_region", referenced from:
|
28
|
+
_t in ccop4EPn.o
|
29
|
+
ld: symbol(s) not found for architecture ppc
|
30
|
+
collect2: ld returned 1 exit status
|
31
|
+
lipo: can't open input file: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//cc1ylayd.out (No such file or directory)
|
32
|
+
checked program was:
|
33
|
+
/* begin */
|
34
|
+
1: /*top*/
|
35
|
+
2: int main() { return 0; }
|
36
|
+
3: int t() { rb_thread_blocking_region(); return 0; }
|
37
|
+
/* end */
|
38
|
+
|
39
|
+
--------------------
|
40
|
+
|
41
|
+
have_func: checking for rb_str_set_len()... -------------------- no
|
42
|
+
|
43
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lpthread -ldl -lm "
|
44
|
+
conftest.c: In function ‘t’:
|
45
|
+
conftest.c:3: error: ‘rb_str_set_len’ undeclared (first use in this function)
|
46
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
47
|
+
conftest.c:3: error: for each function it appears in.)
|
48
|
+
conftest.c: In function ‘t’:
|
49
|
+
conftest.c:3: error: ‘rb_str_set_len’ undeclared (first use in this function)
|
50
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
51
|
+
conftest.c:3: error: for each function it appears in.)
|
52
|
+
lipo: can't figure out the architecture type of: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//ccbMxFWX.out
|
53
|
+
checked program was:
|
54
|
+
/* begin */
|
55
|
+
1: /*top*/
|
56
|
+
2: int main() { return 0; }
|
57
|
+
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
|
58
|
+
/* end */
|
59
|
+
|
60
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lpthread -ldl -lm "
|
61
|
+
Undefined symbols for architecture ppc:
|
62
|
+
"_rb_str_set_len", referenced from:
|
63
|
+
_t in ccXwxaQX.o
|
64
|
+
ld: symbol(s) not found for architecture ppc
|
65
|
+
collect2: ld returned 1 exit status
|
66
|
+
Undefined symbols for architecture i386:
|
67
|
+
"_rb_str_set_len", referenced from:
|
68
|
+
_t in cc3mIxYe.o
|
69
|
+
ld: symbol(s) not found for architecture i386
|
70
|
+
collect2: ld returned 1 exit status
|
71
|
+
lipo: can't open input file: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//ccYXmnYF.out (No such file or directory)
|
72
|
+
checked program was:
|
73
|
+
/* begin */
|
74
|
+
1: /*top*/
|
75
|
+
2: int main() { return 0; }
|
76
|
+
3: int t() { rb_str_set_len(); return 0; }
|
77
|
+
/* end */
|
78
|
+
|
79
|
+
--------------------
|
80
|
+
|
81
|
+
have_library: checking for clock_gettime() in -lrt... -------------------- no
|
82
|
+
|
83
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lrt -lpthread -ldl -lm "
|
84
|
+
conftest.c: In function ‘t’:
|
85
|
+
conftest.c:3: error: ‘clock_gettime’ undeclared (first use in this function)
|
86
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
87
|
+
conftest.c:3: error: for each function it appears in.)
|
88
|
+
conftest.c: In function ‘t’:
|
89
|
+
conftest.c:3: error: ‘clock_gettime’ undeclared (first use in this function)
|
90
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
91
|
+
conftest.c:3: error: for each function it appears in.)
|
92
|
+
lipo: can't figure out the architecture type of: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//cc5WtETn.out
|
93
|
+
checked program was:
|
94
|
+
/* begin */
|
95
|
+
1: /*top*/
|
96
|
+
2: int main() { return 0; }
|
97
|
+
3: int t() { void ((*volatile p)()); p = (void ((*)()))clock_gettime; return 0; }
|
98
|
+
/* end */
|
99
|
+
|
100
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lrt -lpthread -ldl -lm "
|
101
|
+
ld: library not found for -lrt
|
102
|
+
collect2: ld returned 1 exit status
|
103
|
+
ld: library not found for -lrt
|
104
|
+
collect2: ld returned 1 exit status
|
105
|
+
lipo: can't open input file: /var/folders/lS/lSIRdUtDGyq6fA5qofVEz++++TI/-Tmp-//ccUwCYId.out (No such file or directory)
|
106
|
+
checked program was:
|
107
|
+
/* begin */
|
108
|
+
1: /*top*/
|
109
|
+
2: int main() { return 0; }
|
110
|
+
3: int t() { clock_gettime(); return 0; }
|
111
|
+
/* end */
|
112
|
+
|
113
|
+
--------------------
|
114
|
+
|
115
|
+
have_header: checking for sys/select.h... -------------------- yes
|
116
|
+
|
117
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
118
|
+
checked program was:
|
119
|
+
/* begin */
|
120
|
+
1: #include <sys/select.h>
|
121
|
+
/* end */
|
122
|
+
|
123
|
+
--------------------
|
124
|
+
|
125
|
+
have_header: checking for poll.h... -------------------- yes
|
126
|
+
|
127
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
128
|
+
checked program was:
|
129
|
+
/* begin */
|
130
|
+
1: #include <poll.h>
|
131
|
+
/* end */
|
132
|
+
|
133
|
+
--------------------
|
134
|
+
|
135
|
+
have_header: checking for sys/epoll.h... -------------------- no
|
136
|
+
|
137
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
138
|
+
conftest.c:1:23: error: sys/epoll.h: No such file or directory
|
139
|
+
checked program was:
|
140
|
+
/* begin */
|
141
|
+
1: #include <sys/epoll.h>
|
142
|
+
/* end */
|
143
|
+
|
144
|
+
--------------------
|
145
|
+
|
146
|
+
have_header: checking for sys/event.h... -------------------- yes
|
147
|
+
|
148
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
149
|
+
checked program was:
|
150
|
+
/* begin */
|
151
|
+
1: #include <sys/event.h>
|
152
|
+
/* end */
|
153
|
+
|
154
|
+
--------------------
|
155
|
+
|
156
|
+
have_header: checking for sys/queue.h... -------------------- yes
|
157
|
+
|
158
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
159
|
+
checked program was:
|
160
|
+
/* begin */
|
161
|
+
1: #include <sys/queue.h>
|
162
|
+
/* end */
|
163
|
+
|
164
|
+
--------------------
|
165
|
+
|
166
|
+
have_header: checking for port.h... -------------------- no
|
167
|
+
|
168
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
169
|
+
conftest.c:1:18: error: port.h: No such file or directory
|
170
|
+
checked program was:
|
171
|
+
/* begin */
|
172
|
+
1: #include <port.h>
|
173
|
+
/* end */
|
174
|
+
|
175
|
+
--------------------
|
176
|
+
|
177
|
+
have_header: checking for openssl/ssl.h... -------------------- yes
|
178
|
+
|
179
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
180
|
+
checked program was:
|
181
|
+
/* begin */
|
182
|
+
1: #include <openssl/ssl.h>
|
183
|
+
/* end */
|
184
|
+
|
185
|
+
--------------------
|
186
|
+
|
187
|
+
have_header: checking for sys/resource.h... -------------------- yes
|
188
|
+
|
189
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
190
|
+
checked program was:
|
191
|
+
/* begin */
|
192
|
+
1: #include <sys/resource.h>
|
193
|
+
/* end */
|
194
|
+
|
195
|
+
--------------------
|
196
|
+
|
197
|
+
have_func: checking for sysctlbyname() in sys/param.h,sys/sysctl.h... -------------------- yes
|
198
|
+
|
199
|
+
"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L. -arch ppc -arch i386 -lruby -lpthread -ldl -lm "
|
200
|
+
checked program was:
|
201
|
+
/* begin */
|
202
|
+
1: #include <sys/param.h>
|
203
|
+
2: #include <sys/sysctl.h>
|
204
|
+
3:
|
205
|
+
4: /*top*/
|
206
|
+
5: int main() { return 0; }
|
207
|
+
6: int t() { void ((*volatile p)()); p = (void ((*)()))sysctlbyname; return 0; }
|
208
|
+
/* end */
|
209
|
+
|
210
|
+
--------------------
|
211
|
+
|
212
|
+
have_header: checking for openssl/ssl.h... -------------------- yes
|
213
|
+
|
214
|
+
"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
|
215
|
+
checked program was:
|
216
|
+
/* begin */
|
217
|
+
1: #include <openssl/ssl.h>
|
218
|
+
/* end */
|
219
|
+
|
220
|
+
--------------------
|
221
|
+
|