Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixes Makefile.am, README.md

  • Loading branch information...
commit 9beb4bb37ed8a4ad8cc62ea12ba142a3ca413d2a 1 parent be94c6c
FURUHASHI Sadayuki authored April 12, 2010
10  Makefile.am
@@ -9,3 +9,13 @@ prep: mpl.rb
9 9
 prepc:
10 10
 	cd mp && $(MAKE) prepc
11 11
 
  12
+DOC_FILES = \
  13
+		README.md \
  14
+		NOTICE
  15
+
  16
+EXTRA_DIST = \
  17
+		$(DOC_FILES) \
  18
+		mplex \
  19
+		mpl.rb \
  20
+		preprocess
  21
+
17  README.md
Source Rendered
@@ -2,9 +2,26 @@ mpio
2 2
 ====
3 3
 Multipurpose concurrent I/O framework for C++
4 4
 
  5
+
5 6
 ## Overview
6 7
 
7 8
 
  9
+## Installation
  10
+
  11
+Following libraries are required to build mpio:
  12
+
  13
+  - linux >= 2.6.18
  14
+  - g++ >= 4.1
  15
+  - ruby >= 1.8.6
  16
+
  17
+Configure and install in the usual way:
  18
+
  19
+    $ ./bootstrap  # if needed
  20
+    $ ./configure
  21
+    $ make
  22
+    $ sudo make install
  23
+
  24
+
8 25
 ## Libraries
9 26
 
10 27
 ### Wavy
2  bootstrap
@@ -38,7 +38,7 @@ test -f ChangeLog || touch ChangeLog
38 38
 test -f NEWS      || touch NEWS
39 39
 test -f README    || touch README
40 40
 
41  
-if ! ./preprocess.sh; then
  41
+if ! ./preprocess; then
42 42
 	exit 1
43 43
 fi
44 44
 
5  configure.in
@@ -2,7 +2,7 @@ AC_INIT(mpsrc/wavy_kernel.h)
2 2
 AC_CONFIG_AUX_DIR(ac)
3 3
 AC_CANONICAL_TARGET
4 4
 
5  
-AM_INIT_AUTOMAKE(mpio, 0.1.0)
  5
+AM_INIT_AUTOMAKE(mpio, 0.3.0)
6 6
 AC_CONFIG_HEADER(config.h)
7 7
 
8 8
 AC_SUBST(CFLAGS)
@@ -12,9 +12,6 @@ AC_SUBST(CXXFLAGS)
12 12
 CXXFLAGS="-O4 -Wall $CXXFLAGS"
13 13
 
14 14
 AC_CHECK_PROG(RUBY, ruby, ruby)
15  
-if test "x$RUBY" = x; then
16  
-	AC_MSG_ERROR([cannot find ruby. Ruby is needed to build.])
17  
-fi
18 15
 
19 16
 AC_PROG_CC
20 17
 AC_PROG_CXX
17  mpsrc/wavy_connect.cc
@@ -73,7 +73,7 @@ class connect_task {
73 73
 		}
74 74
 
75 75
 		if(::fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
76  
-			goto errno_error;
  76
+			goto error;
77 77
 		}
78 78
 
79 79
 		if(::connect(fd, m->addr, m->addrlen) >= 0) {
@@ -82,7 +82,7 @@ class connect_task {
82 82
 		}
83 83
 
84 84
 		if(errno != EINPROGRESS) {
85  
-			goto errno_error;
  85
+			goto error;
86 86
 		}
87 87
 
88 88
 		while(true) {
@@ -90,12 +90,12 @@ class connect_task {
90 90
 			int ret = ::poll(&pf, 1, m->timeout_msec);
91 91
 			if(ret < 0) {
92 92
 				if(errno == EINTR) { continue; }
93  
-				goto errno_error;
  93
+				goto error;
94 94
 			}
95 95
 
96 96
 			if(ret == 0) {
97 97
 				errno = ETIMEDOUT;
98  
-				goto specific_error;
  98
+				goto error;
99 99
 			}
100 100
 
101 101
 			{
@@ -103,20 +103,19 @@ class connect_task {
103 103
 				int len = sizeof(value);
104 104
 				if(::getsockopt(fd, SOL_SOCKET, SO_ERROR,
105 105
 						&value, (socklen_t*)&len) < 0) {
106  
-					goto errno_error;
  106
+					goto error;
107 107
 				}
108 108
 				if(value != 0) {
109  
-					err = value;
110  
-					goto specific_error;
  109
+					errno = value;
  110
+					goto error;
111 111
 				}
112 112
 				goto out;
113 113
 			}
114 114
 		}
115 115
 
116  
-	errno_error:
  116
+	error:
117 117
 		err = errno;
118 118
 
119  
-	specific_error:
120 119
 		::close(fd);
121 120
 		fd = -1;
122 121
 
0  preprocess.sh → preprocess
File renamed without changes
2  test/listen_connect.cc
@@ -28,7 +28,7 @@ void connected(int fd, int err)
28 28
 {
29 29
 	if(fd < 0) {
30 30
 		errno = err;
31  
-		perror("accept error");
  31
+		perror("connect error");
32 32
 		return;
33 33
 	}
34 34
 

0 notes on commit 9beb4bb

Please sign in to comment.
Something went wrong with that request. Please try again.