summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-12-16 15:41:12 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-12-16 15:41:12 +0000
commit9ab4bb4925f884f2897380be3e71989043c29128 (patch)
tree29bda70a246543ca81b283fe7f70382e4aa355a3 /ACE
parent6ffceaf0fe92aaaadfe784a5b18afbec333af09a (diff)
downloadATCD-9ab4bb4925f884f2897380be3e71989043c29128.tar.gz
Tue Dec 16 15:40:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ChangeLog14
-rw-r--r--ACE/ace/Pipe.cpp26
-rw-r--r--ACE/ace/config-qnx-neutrino.h3
-rw-r--r--ACE/ace/config-qnx-rtp-62x.h3
-rw-r--r--ACE/ace/config-qnx-rtp-pre62x.h3
-rw-r--r--ACE/ace/config-tandem-nsk-mips-v2.h7
-rw-r--r--ACE/ace/config-tandem-nsk-mips-v3.h7
-rw-r--r--ACE/performance-tests/TCP/tcp_test.cpp29
8 files changed, 59 insertions, 33 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 970c2ed96d4..997747e8418 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,17 @@
+Tue Dec 16 15:40:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/config-qnx-neutrino.h:
+ * ace/config-qnx-rtp-62x.h:
+ * ace/config-qnx-rtp-pre62x.h:
+ * ace/config-tandem-nsk-mips-v2.h:
+ * ace/config-tandem-nsk-mips-v3.h:
+ * ace/Pipe.cpp:
+ * performance-tests/TCP/tcp_test.cpp:
+ Reworked ACE_LACKS_SOCKET_BUFSIZ into ACE_LACKS_SO_RCVBUF
+ and ACE_LACKS_SO_SNDBUF so that each of them could be
+ independently enabled/disabled. Updated a few config files
+ for this.
+
Tue Dec 16 11:04:00 UTC 2008 Olli Savia <ops@iki.fi>
* ace/config-linux-common.h:
diff --git a/ACE/ace/Pipe.cpp b/ACE/ace/Pipe.cpp
index aa87ab740eb..e1a8c1586eb 100644
--- a/ACE/ace/Pipe.cpp
+++ b/ACE/ace/Pipe.cpp
@@ -97,9 +97,10 @@ ACE_Pipe::open (int buffer_size)
}
# endif /* ! ACE_LACKS_TCP_NODELAY */
-# if defined (ACE_LACKS_SOCKET_BUFSIZ)
+# if defined (ACE_LACKS_SO_RCVBUF) && defined (ACE_LACKS_SO_SNDBUF)
ACE_UNUSED_ARG (buffer_size);
-# else /* ! ACE_LACKS_SOCKET_BUFSIZ */
+# endif
+# if !defined (ACE_LACKS_SO_RCVBUF)
if (reader.set_option (SOL_SOCKET,
SO_RCVBUF,
reinterpret_cast <void *> (&buffer_size),
@@ -109,16 +110,18 @@ ACE_Pipe::open (int buffer_size)
this->close ();
return -1;
}
- else if (writer.set_option (SOL_SOCKET,
- SO_SNDBUF,
- reinterpret_cast <void *> (&buffer_size),
- sizeof (buffer_size)) == -1
+# endif /* !ACE_LACKS_SO_RCVBUF */
+# if !defined (ACE_LACKS_SO_SNDBUF)
+ if (writer.set_option (SOL_SOCKET,
+ SO_SNDBUF,
+ reinterpret_cast <void *> (&buffer_size),
+ sizeof (buffer_size)) == -1
&& errno != ENOTSUP)
{
this->close ();
return -1;
}
-# endif /* ! ACE_LACKS_SOCKET_BUFSIZ */
+# endif /* !ACE_LACKS_SO_SNDBUF */
#elif defined (ACE_HAS_STREAM_PIPES) || defined (__QNX__)
ACE_UNUSED_ARG (buffer_size);
@@ -156,9 +159,10 @@ ACE_Pipe::open (int buffer_size)
ACE_TEXT ("%p\n"),
ACE_TEXT ("socketpair")),
-1);
-# if defined (ACE_LACKS_SOCKET_BUFSIZ)
+# if defined (ACE_LACKS_SO_SNDBUF) && defined (ACE_LACKS_SO_RCVBUF)
ACE_UNUSED_ARG (buffer_size);
-# else /* ! ACE_LACKS_SOCKET_BUFSIZ */
+# endif
+# if !defined (ACE_LACKS_SO_RCVBUF)
if (ACE_OS::setsockopt (this->handles_[0],
SOL_SOCKET,
SO_RCVBUF,
@@ -169,6 +173,8 @@ ACE_Pipe::open (int buffer_size)
this->close ();
return -1;
}
+# endif
+# if !defined (ACE_LACKS_SO_SNDBUF)
if (ACE_OS::setsockopt (this->handles_[1],
SOL_SOCKET,
SO_SNDBUF,
@@ -179,7 +185,7 @@ ACE_Pipe::open (int buffer_size)
this->close ();
return -1;
}
-# endif /* ! ACE_LACKS_SOCKET_BUFSIZ */
+# endif /* ! ACE_LACKS_SO_SNDBUF */
# if defined (ACE_OPENVMS) && !defined (ACE_LACKS_TCP_NODELAY)
int one = 1;
// OpenVMS implements socketpair(AF_UNIX...) by returning AF_INET sockets.
diff --git a/ACE/ace/config-qnx-neutrino.h b/ACE/ace/config-qnx-neutrino.h
index ba53271f0b5..530d60ccd73 100644
--- a/ACE/ace/config-qnx-neutrino.h
+++ b/ACE/ace/config-qnx-neutrino.h
@@ -106,7 +106,8 @@
#define ACE_LACKS_RWLOCK_T
#define ACE_LACKS_SBRK
#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SOCKET_BUFSIZ
+#define ACE_LACKS_SO_SNDBUF
+#define ACE_LACKS_SO_RCVBUF
#define ACE_LACKS_SOCKETPAIR
#define ACE_LACKS_STROPTS_H
#define ACE_LACKS_STREAM_MODULES
diff --git a/ACE/ace/config-qnx-rtp-62x.h b/ACE/ace/config-qnx-rtp-62x.h
index c7aa8eb08fe..997ab989c84 100644
--- a/ACE/ace/config-qnx-rtp-62x.h
+++ b/ACE/ace/config-qnx-rtp-62x.h
@@ -86,7 +86,8 @@
#define ACE_LACKS_POLL_H
#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SOCKET_BUFSIZ
+#define ACE_LACKS_SO_SNDBUF
+#define ACE_LACKS_SO_RCVBUF
#define ACE_LACKS_STREAM_MODULES
#define ACE_LACKS_STROPTS_H
#define ACE_LACKS_STRPTIME
diff --git a/ACE/ace/config-qnx-rtp-pre62x.h b/ACE/ace/config-qnx-rtp-pre62x.h
index f3696811662..9324096ee2f 100644
--- a/ACE/ace/config-qnx-rtp-pre62x.h
+++ b/ACE/ace/config-qnx-rtp-pre62x.h
@@ -84,7 +84,8 @@
#define ACE_LACKS_RWLOCK_T
#define ACE_LACKS_SBRK
#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SOCKET_BUFSIZ
+#define ACE_LACKS_SO_SNDBUF
+#define ACE_LACKS_SO_RCVBUF
#define ACE_LACKS_SOCKETPAIR
// Even if the QNX RTP docs says that socket pair are
// available, there is actually no implementation of
diff --git a/ACE/ace/config-tandem-nsk-mips-v2.h b/ACE/ace/config-tandem-nsk-mips-v2.h
index 2df876b180b..5e906d82826 100644
--- a/ACE/ace/config-tandem-nsk-mips-v2.h
+++ b/ACE/ace/config-tandem-nsk-mips-v2.h
@@ -215,11 +215,8 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform supports System V IPC
#define ACE_HAS_SYSV_IPC
-// Platform lacks the socketpair() call
-// [Needed due to failure of Pipe_Test. even though nsk platform
-// has socketpair(), Pipe.cpp tries to set socket buf size but this
-// is not allowed for AF_UNIX protocol on nsk.]
-#define ACE_LACKS_SOCKET_BUFSIZ
+#define ACE_LACKS_SO_SNDBUF
+#define ACE_LACKS_SO_RCVBUF
// Platform lacks the socketpair() call
#define ACE_LACKS_SOCKETPAIR
diff --git a/ACE/ace/config-tandem-nsk-mips-v3.h b/ACE/ace/config-tandem-nsk-mips-v3.h
index 55e119605e5..05b0107b7b6 100644
--- a/ACE/ace/config-tandem-nsk-mips-v3.h
+++ b/ACE/ace/config-tandem-nsk-mips-v3.h
@@ -216,11 +216,8 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform supports System V IPC
#define ACE_HAS_SYSV_IPC
-// Platform lacks the socketpair() call
-// [Needed due to failure of Pipe_Test. even though nsk platform
-// has socketpair(), Pipe.cpp tries to set socket buf size but this
-// is not allowed for AF_UNIX protocol on nsk.]
-#define ACE_LACKS_SOCKET_BUFSIZ
+#define ACE_LACKS_SO_SNDBUF
+#define ACE_LACKS_SO_RCVBUF
// Platform lacks the socketpair() call
#define ACE_LACKS_SOCKETPAIR
diff --git a/ACE/performance-tests/TCP/tcp_test.cpp b/ACE/performance-tests/TCP/tcp_test.cpp
index 74cda3e7eec..3aceb05b449 100644
--- a/ACE/performance-tests/TCP/tcp_test.cpp
+++ b/ACE/performance-tests/TCP/tcp_test.cpp
@@ -340,7 +340,7 @@ Server::Server (const ACE_INET_Addr &addr)
"ACE_Reactor::register_handler: Server\n"));
}
-#if !defined (ACE_LACKS_SOCKET_BUFSIZ)
+#if !defined (ACE_LACKS_SO_SNDBUF)
if (so_bufsz != 0)
{
if (this->endpoint_.set_option (SOL_SOCKET,
@@ -348,17 +348,26 @@ Server::Server (const ACE_INET_Addr &addr)
(void *) &so_bufsz,
sizeof (so_bufsz)) == -1
&& errno != ENOTSUP)
- ACE_ERROR ((LM_ERROR, "Server::Server: SO_SNDBUF %p\n",
- "set_option failed"));
- else if (this->endpoint_.set_option (SOL_SOCKET,
- SO_RCVBUF,
- (void *) &so_bufsz,
- sizeof (so_bufsz)) == -1
+ {
+ ACE_ERROR ((LM_ERROR, "Server::Server: SO_SNDBUF %p\n",
+ "set_option failed"));
+ }
+ }
+#endif /* ACE_LACKS_SO_SNDBUF */
+#if !defined (ACE_LACKS_SO_RCVBUF)
+ if (so_bufsz != 0)
+ {
+ if (this->endpoint_.set_option (SOL_SOCKET,
+ SO_RCVBUF,
+ (void *) &so_bufsz,
+ sizeof (so_bufsz)) == -1
&& errno != ENOTSUP)
- ACE_ERROR ((LM_ERROR, "Server::Server: SO_RCVBUF %p\n",
- "set_option failed"));
+ {
+ ACE_ERROR ((LM_ERROR, "Server::Server: SO_RCVBUF %p\n",
+ "set_option failed"));
+ }
}
-#endif /* !ACE_LACKS_SOCKET_BUFSIZ */
+#endif /* !ACE_LACKS_SO_RCVBUF */
if (acceptor.close () == -1)
ACE_ERROR ((LM_ERROR, "Server::Server %p\n",
"close failed"));