summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-09-30 07:13:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-09-30 07:13:09 +0000
commit57dd4edef4cd5a6e40362e5c3823947ca9a9769c (patch)
tree9dc396bc34a7cb252b59c6f550fcb3d7133e55c5
parent0af4419ec19e9c2abd5272d664d92e7eee4bc82d (diff)
downloadATCD-57dd4edef4cd5a6e40362e5c3823947ca9a9769c.tar.gz
ChangeLogTag: Fri Sep 30 07:13:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ace/ACE.cpp18
-rw-r--r--ace/MEM_IO.cpp4
-rw-r--r--ace/OS_NS_stdio.cpp20
-rw-r--r--ace/OS_NS_stdio.inl8
-rw-r--r--ace/OS_NS_unistd.inl11
-rw-r--r--ace/SOCK_Dgram.cpp12
-rw-r--r--ace/SOCK_Dgram_Bcast.cpp2
-rw-r--r--ace/SOCK_IO.cpp4
8 files changed, 44 insertions, 35 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index b739eb26d64..dbe9eb5e2e0 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -184,7 +184,7 @@ ACE::select (int width,
timeout);
if (result > 0)
{
-# if !defined (ACE_WIN64)
+# if !defined (ACE_WIN32)
// This isn't needed for Windows... it's a no-op anyway.
if (readfds)
readfds->sync ((ACE_HANDLE) width);
@@ -192,7 +192,7 @@ ACE::select (int width,
writefds->sync ((ACE_HANDLE) width);
if (exceptfds)
exceptfds->sync ((ACE_HANDLE) width);
-#endif /* ACE_WIN64 */
+#endif /* ACE_WIN32 */
}
return result;
}
@@ -208,7 +208,7 @@ ACE::select (int width,
0,
timeout);
-#if !defined (ACE_WIN64)
+#if !defined (ACE_WIN32)
if (result > 0)
readfds.sync ((ACE_HANDLE) width);
#endif /* ACE_WIN64 */
@@ -2270,7 +2270,7 @@ ACE::handle_ready (ACE_HANDLE handle,
// Wait for data or for the timeout to elapse.
int select_width;
-# if defined (ACE_WIN64)
+# if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
@@ -2615,7 +2615,13 @@ ACE::handle_timed_complete (ACE_HANDLE h,
int n = ACE_OS::poll (&fds, 1, timeout);
#else
// Use C-style cast because the type of h varies by platform
+# if defined (ACE_WIN32)
+ // This arg is ignored on Windows and causes pointer truncation
+ // warnings on 64-bit compiles.
+ int select_width = 0;
+# else
int select_width = int(h) + 1;
+# endif /* ACE_WIN32 */
int n = ACE_OS::select (select_width, // Ignored on windows
rd_handles,
wr_handles,
@@ -2777,13 +2783,13 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
#else
int select_width;
-# if defined (ACE_WIN64)
+# if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
# else
select_width = int (listener) + 1;
-# endif /* ACE_WIN64 */
+# endif /* ACE_WIN32 */
int n = ACE_OS::select (select_width,
rd_handle, 0, 0,
timeout);
diff --git a/ace/MEM_IO.cpp b/ace/MEM_IO.cpp
index 00e72ab5637..a3ebd3a839e 100644
--- a/ace/MEM_IO.cpp
+++ b/ace/MEM_IO.cpp
@@ -370,14 +370,14 @@ ACE_MEM_IO::send (const ACE_Message_Block *message_block,
if (this->deliver_strategy_ == 0)
return -1; // Something went seriously wrong.
- ssize_t len = message_block->total_length ();
+ size_t len = message_block->total_length ();
if (len != 0)
{
ACE_MEM_SAP_Node *buf =
reinterpret_cast<ACE_MEM_SAP_Node *> (
this->deliver_strategy_->acquire_buffer (len));
- ssize_t n = 0;
+ size_t n = 0;
while (message_block != 0)
{
ACE_OS::memcpy (static_cast<char *> (buf->data ()) + n,
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp
index c224a29f449..0b5d1713740 100644
--- a/ace/OS_NS_stdio.cpp
+++ b/ace/OS_NS_stdio.cpp
@@ -130,11 +130,13 @@ ACE_OS::fopen (const char *filename,
}
# else
hmode &= _O_TEXT | _O_RDONLY | _O_APPEND;
-# if defined (ACE_WIN64)
- int fd = _open_osfhandle (intptr_t (handle), hmode);
+
+# if (defined(__BORLANDC__) && __BORLANDC__ < 0x0570)
+ int fd = ::_open_osfhandle (long (handle), 0);
# else
- int fd = _open_osfhandle (long (handle), hmode);
-# endif /* ACE_WIN64 */
+ int fd = ::_open_osfhandle (intptr_t (handle), 0);
+# endif
+
if (fd != -1)
{
# if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR)
@@ -185,11 +187,13 @@ ACE_OS::fopen (const wchar_t *filename,
}
# else
hmode &= _O_TEXT | _O_RDONLY | _O_APPEND;
-# if defined (ACE_WIN64)
- int fd = _open_osfhandle (intptr_t (handle), hmode);
+
+# if (defined(__BORLANDC__) && __BORLANDC__ < 0x0570)
+ int fd = ::_open_osfhandle (long (handle), hmode);
# else
- int fd = _open_osfhandle (long (handle), hmode);
-# endif /* ACE_WIN64 */
+ int fd = ::_open_osfhandle (intptr_t (handle), hmode);
+# endif
+
if (fd != -1)
{
# if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR)
diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl
index bb3fa454a4d..ada51707bea 100644
--- a/ace/OS_NS_stdio.inl
+++ b/ace/OS_NS_stdio.inl
@@ -635,11 +635,11 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode)
FILE *file = 0;
-# if defined (ACE_WIN64)
- int crt_handle = ::_open_osfhandle (intptr_t (handle), 0);
-# else
+#if (defined(__BORLANDC__) && __BORLANDC__ < 0x0570)
int crt_handle = ::_open_osfhandle (long (handle), 0);
-# endif /* ACE_WIN64 */
+#else
+ int crt_handle = ::_open_osfhandle (intptr_t (handle), 0);
+#endif
if (crt_handle != -1)
{
diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl
index 820d28232ac..ecfbacda0fd 100644
--- a/ace/OS_NS_unistd.inl
+++ b/ace/OS_NS_unistd.inl
@@ -736,12 +736,11 @@ ACE_OS::isatty (ACE_HANDLE handle)
ACE_UNUSED_ARG (handle);
return 0;
#else
-# if defined (ACE_WIN64)
- int fd = ::_open_osfhandle (intptr_t (handle), 0);
-# else
- int fd = ::_open_osfhandle (long (handle), 0);
-# endif /* ACE_WIN64 */
-
+# if (defined(__BORLANDC__) && __BORLANDC__ < 0x0570)
+ int fd = ::_open_osfhandle (long (handle), 0);
+# else
+ int fd = ::_open_osfhandle (intptr_t (handle), 0);
+#endif
int status = ::_isatty (fd);
::_close (fd);
return status;
diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp
index 13547a6849a..b3e2c96b2bc 100644
--- a/ace/SOCK_Dgram.cpp
+++ b/ace/SOCK_Dgram.cpp
@@ -58,13 +58,13 @@ ACE_SOCK_Dgram::recv (iovec *io_vec,
// Check the status of the current socket to make sure there's data
// to recv (or time out).
int select_width;
-# if defined (ACE_WIN64)
+# if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
# else
select_width = int (this->get_handle ()) + 1;
-# endif /* ACE_WIN64 */
+# endif /* ACE_WIN32 */
switch (ACE_OS::select (select_width,
handle_set,
0, 0,
@@ -447,13 +447,13 @@ ACE_SOCK_Dgram::recv (void *buf,
// Check the status of the current socket.
int select_width;
-#if defined (ACE_WIN64)
+#if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
#else
select_width = int (this->get_handle ()) + 1;
-#endif /* ACE_WIN64 */
+#endif /* ACE_WIN32 */
switch (ACE_OS::select (select_width,
handle_set,
0,
@@ -486,13 +486,13 @@ ACE_SOCK_Dgram::send (const void *buf,
// Check the status of the current socket.
int select_width;
-#if defined (ACE_WIN64)
+#if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
#else
select_width = int (this->get_handle ()) + 1;
-#endif /* ACE_WIN64 */
+#endif /* ACE_WIN32 */
switch (ACE_OS::select (select_width,
0,
handle_set,
diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp
index 86701c0d562..ac8ea8f00fe 100644
--- a/ace/SOCK_Dgram_Bcast.cpp
+++ b/ace/SOCK_Dgram_Bcast.cpp
@@ -300,7 +300,7 @@ ACE_SOCK_Dgram_Bcast::send (const void *buf,
int flags) const
{
ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
- size_t iterations = 0;
+ ssize_t iterations = 0;
ssize_t total_bytes = 0;
if (this->if_list_ == 0)
diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp
index cdc12148bde..844a70ef877 100644
--- a/ace/SOCK_IO.cpp
+++ b/ace/SOCK_IO.cpp
@@ -43,13 +43,13 @@ ACE_SOCK_IO::recvv (iovec *io_vec,
// Check the status of the current socket.
int select_width;
-# if defined (ACE_WIN64)
+# if defined (ACE_WIN32)
// This arg is ignored on Windows and causes pointer truncation
// warnings on 64-bit compiles.
select_width = 0;
# else
select_width = int (this->get_handle ()) + 1;
-# endif /* ACE_WIN64 */
+# endif /* ACE_WIN32 */
switch (ACE_OS::select (select_width,
handle_set,
0, 0,