summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ext/socket/depend2
-rw-r--r--ext/socket/extconf.rb2
-rw-r--r--ext/socket/rubysocket.h1
-rw-r--r--include/ruby/intern.h1
-rw-r--r--internal.h8
6 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4dda53684f..5bdf7bec59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Tue Jun 21 21:27:34 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * internal.h: move rb_thread_io_blocking_region() declaration
+ from intern.h to internal.h. It's still experimental API and
+ need more discussion. [ruby-dev:43698]
+ * include/ruby/intern.h: ditto.
+
+ * ext/socket/rubysocket.h: include internal.h.
+ * ext/socket/depend: add internal.h dependency.
+ * ext/socket/extconf.rb: add $INCFLAGS to topdir.
+
Tue Jun 21 20:38:47 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_core.c (datetime_s_*): canonicalize 24 o'clock.
diff --git a/ext/socket/depend b/ext/socket/depend
index f870b9f834..81e4b4f17f 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -1,6 +1,6 @@
SOCK_HEADERS = $(srcdir)/rubysocket.h $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
$(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h \
- $(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h
+ $(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h $(topdir)/internal.h
init.o: init.c $(SOCK_HEADERS)
constants.o: constants.c constdefs.c $(SOCK_HEADERS)
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index dbce2bab47..24ab7ea881 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,5 +1,7 @@
require 'mkmf'
+$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
+
case RUBY_PLATFORM
when /(ms|bcc)win(32|64)|mingw/
test_func = "WSACleanup"
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index a80c93e1fd..d7be138dfd 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -4,6 +4,7 @@
#include "ruby/ruby.h"
#include "ruby/io.h"
#include "ruby/util.h"
+#include "internal.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 582fa8801d..c8b0e1af57 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -806,7 +806,6 @@ void rb_thread_check_ints(void);
int rb_thread_interrupted(VALUE thval);
VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1,
rb_unblock_function_t *ubf, void *data2);
-VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
VALUE rb_mutex_new(void);
diff --git a/internal.h b/internal.h
index c242f450e3..350504646d 100644
--- a/internal.h
+++ b/internal.h
@@ -187,6 +187,14 @@ void Init_eval_method(void);
/* miniprelude.c, prelude.c */
void Init_prelude(void);
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */