diff options
author | Steve Huston <shuston@riverace.com> | 2002-08-27 17:38:26 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2002-08-27 17:38:26 +0000 |
commit | 7b5a429be6bcb7376736b32d9ef8b632abd3d45e (patch) | |
tree | 975bd4989100178940b9f15c0ad737d40b783b54 /tests/SOCK_Test.cpp | |
parent | 85e3f3910c6931831afed75e4593f56309a6f610 (diff) | |
download | ATCD-7b5a429be6bcb7376736b32d9ef8b632abd3d45e.tar.gz |
ChangeLogTag:Tue Aug 27 13:28:17 2002 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'tests/SOCK_Test.cpp')
-rw-r--r-- | tests/SOCK_Test.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp index bbcbb7e0707..23bb01f841a 100644 --- a/tests/SOCK_Test.cpp +++ b/tests/SOCK_Test.cpp @@ -111,7 +111,15 @@ server (void *arg) handle_set.reset (); handle_set.set_bit (peer_acceptor->get_handle ()); - int result = ACE_OS::select (int (peer_acceptor->get_handle ()) + 1, + int select_width; +# if defined (ACE_WIN64) + // This arg is ignored on Windows and causes pointer truncation + // warnings on 64-bit compiles. + select_width = 0; +# else + select_width = int (peer_acceptor->get_handle ()) + 1; +# endif /* ACE_WIN64 */ + int result = ACE_OS::select (select_width, handle_set, 0, 0, &tv); ACE_ASSERT (tv == def_timeout); @@ -140,10 +148,17 @@ server (void *arg) handle_set.set_bit (new_stream.get_handle ()); // Read data from client (terminate on error). - + int select_width; for (ssize_t r_bytes; ;) { - if (ACE_OS::select (int (new_stream.get_handle ()) + 1, +# if defined (ACE_WIN64) + // This arg is ignored on Windows and causes pointer truncation + // warnings on 64-bit compiles. + select_width = 0; +# else + select_width = int (new_stream.get_handle ()) + 1; +# endif /* ACE_WIN64 */ + if (ACE_OS::select (select_width, handle_set, 0, 0, 0) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("select")), 0); |