aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-08 08:03:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-08 08:03:19 +0000
commit1c22ef17053e096c18ed34e9772073c57ad3a7b5 (patch)
treebc4c7d00dae629a4915fa4b1d0c86a55e5b2d4f6 /io.c
parentb68b9ec6987acc0198124e5997f649ecd7f75dc7 (diff)
downloadruby-1c22ef17053e096c18ed34e9772073c57ad3a7b5.tar.gz
* configure.in (shutdown, sched_yield, pthread_attr_setinheritsched):
check for Haiku. * eval_intern.h, io.c, thread_pthread.c: use autoconfisticated results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/io.c b/io.c
index ed3023b190..380755a599 100644
--- a/io.c
+++ b/io.c
@@ -25,12 +25,10 @@
#endif
#include <sys/types.h>
-#if !defined(_WIN32) && !defined(__DJGPP__)
-#if defined(__BEOS__) && !defined(__HAIKU__)
-# include <net/socket.h>
-# else
-# include <sys/socket.h>
-# endif
+#if defined HAVE_NET_SOCKET_H
+# include <net/socket.h>
+#elif defined HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
#endif
#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
@@ -201,7 +199,7 @@ static int max_file_descriptor = NOFILE;
# endif
#endif
-#if defined(__HAIKU__)
+#ifndef HAVE_SHUTDOWN
#define shutdown(a,b) 0
#endif
@@ -209,7 +207,6 @@ static int max_file_descriptor = NOFILE;
#define is_socket(fd, path) rb_w32_is_socket(fd)
#elif !defined(S_ISSOCK)
#define is_socket(fd, path) 0
-#define shutdown(a,b) 0
#else
static int
is_socket(int fd, const char *path)