Permalink
Browse files

fixes Makefile.am, README.md

  • Loading branch information...
1 parent be94c6c commit 9beb4bb37ed8a4ad8cc62ea12ba142a3ca413d2a @frsyuki committed Apr 12, 2010
Showing with 38 additions and 15 deletions.
  1. +10 −0 Makefile.am
  2. +17 −0 README.md
  3. +1 −1 bootstrap
  4. +1 −4 configure.in
  5. +8 −9 mpsrc/wavy_connect.cc
  6. 0 preprocess.sh → preprocess
  7. +1 −1 test/listen_connect.cc
View
@@ -9,3 +9,13 @@ prep: mpl.rb
prepc:
cd mp && $(MAKE) prepc
+DOC_FILES = \
+ README.md \
+ NOTICE
+
+EXTRA_DIST = \
+ $(DOC_FILES) \
+ mplex \
+ mpl.rb \
+ preprocess
+
View
@@ -2,9 +2,26 @@ mpio
====
Multipurpose concurrent I/O framework for C++
+
## Overview
+## Installation
+
+Following libraries are required to build mpio:
+
+ - linux >= 2.6.18
+ - g++ >= 4.1
+ - ruby >= 1.8.6
+
+Configure and install in the usual way:
+
+ $ ./bootstrap # if needed
+ $ ./configure
+ $ make
+ $ sudo make install
+
+
## Libraries
### Wavy
View
@@ -38,7 +38,7 @@ test -f ChangeLog || touch ChangeLog
test -f NEWS || touch NEWS
test -f README || touch README
-if ! ./preprocess.sh; then
+if ! ./preprocess; then
exit 1
fi
View
@@ -2,7 +2,7 @@ AC_INIT(mpsrc/wavy_kernel.h)
AC_CONFIG_AUX_DIR(ac)
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(mpio, 0.1.0)
+AM_INIT_AUTOMAKE(mpio, 0.3.0)
AC_CONFIG_HEADER(config.h)
AC_SUBST(CFLAGS)
@@ -12,9 +12,6 @@ AC_SUBST(CXXFLAGS)
CXXFLAGS="-O4 -Wall $CXXFLAGS"
AC_CHECK_PROG(RUBY, ruby, ruby)
-if test "x$RUBY" = x; then
- AC_MSG_ERROR([cannot find ruby. Ruby is needed to build.])
-fi
AC_PROG_CC
AC_PROG_CXX
View
@@ -73,7 +73,7 @@ class connect_task {
}
if(::fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
- goto errno_error;
+ goto error;
}
if(::connect(fd, m->addr, m->addrlen) >= 0) {
@@ -82,41 +82,40 @@ class connect_task {
}
if(errno != EINPROGRESS) {
- goto errno_error;
+ goto error;
}
while(true) {
struct pollfd pf = {fd, POLLOUT, 0};
int ret = ::poll(&pf, 1, m->timeout_msec);
if(ret < 0) {
if(errno == EINTR) { continue; }
- goto errno_error;
+ goto error;
}
if(ret == 0) {
errno = ETIMEDOUT;
- goto specific_error;
+ goto error;
}
{
int value = 0;
int len = sizeof(value);
if(::getsockopt(fd, SOL_SOCKET, SO_ERROR,
&value, (socklen_t*)&len) < 0) {
- goto errno_error;
+ goto error;
}
if(value != 0) {
- err = value;
- goto specific_error;
+ errno = value;
+ goto error;
}
goto out;
}
}
- errno_error:
+ error:
err = errno;
- specific_error:
::close(fd);
fd = -1;
File renamed without changes.
@@ -28,7 +28,7 @@ void connected(int fd, int err)
{
if(fd < 0) {
errno = err;
- perror("accept error");
+ perror("connect error");
return;
}

0 comments on commit 9beb4bb

Please sign in to comment.