summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2002-08-27 17:38:26 +0000
committerSteve Huston <shuston@riverace.com>2002-08-27 17:38:26 +0000
commit7b5a429be6bcb7376736b32d9ef8b632abd3d45e (patch)
tree975bd4989100178940b9f15c0ad737d40b783b54
parent85e3f3910c6931831afed75e4593f56309a6f610 (diff)
downloadATCD-7b5a429be6bcb7376736b32d9ef8b632abd3d45e.tar.gz
ChangeLogTag:Tue Aug 27 13:28:17 2002 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog87
-rw-r--r--ChangeLogs/ChangeLog-03a87
-rw-r--r--ace/ARGV.cpp2
-rw-r--r--ace/ARGV.h4
-rw-r--r--ace/ARGV.i4
-rw-r--r--ace/Asynch_Acceptor.cpp6
-rw-r--r--ace/Asynch_Acceptor.h6
-rw-r--r--ace/Asynch_IO.cpp54
-rw-r--r--ace/Asynch_IO.h58
-rw-r--r--ace/Asynch_IO_Impl.h48
-rw-r--r--ace/FILE_IO.cpp4
-rw-r--r--ace/FILE_IO.h10
-rw-r--r--ace/FILE_IO.i10
-rw-r--r--ace/Functor_T.i2
-rw-r--r--ace/Malloc_T.cpp18
-rw-r--r--ace/OS.cpp4
-rw-r--r--ace/OS.h2
-rw-r--r--ace/POSIX_Asynch_IO.cpp162
-rw-r--r--ace/POSIX_Asynch_IO.h100
-rw-r--r--ace/POSIX_Proactor.cpp24
-rw-r--r--ace/POSIX_Proactor.h20
-rw-r--r--ace/SOCK_Dgram.i4
-rw-r--r--ace/SPIPE_Stream.h10
-rw-r--r--ace/SPIPE_Stream.i10
-rw-r--r--ace/Strategies_T.cpp2
-rw-r--r--ace/Strategies_T.h6
-rw-r--r--ace/Strategies_T.i2
-rw-r--r--ace/Stream_Modules.cpp6
-rw-r--r--ace/WIN32_Asynch_IO.cpp181
-rw-r--r--ace/WIN32_Asynch_IO.h120
-rw-r--r--ace/WIN32_Proactor.cpp6
-rw-r--r--ace/WIN32_Proactor.h2
-rw-r--r--ace/ace_dll64.mak13
-rw-r--r--ace/config-win32-common.h5
-rw-r--r--ace/config-win32-msvc-7.h5
-rw-r--r--tests/Buffer_Stream_Test.cpp2
-rw-r--r--tests/CDR_Array_Test.cpp9
-rw-r--r--tests/CDR_Test.cpp2
-rw-r--r--tests/Cache_Map_Manager_Test.cpp2
-rw-r--r--tests/Cache_Map_Manager_Test.h2
-rw-r--r--tests/Handle_Set_Test.cpp16
-rw-r--r--tests/MT_Reactor_Timer_Test.cpp3
-rw-r--r--tests/MT_SOCK_Test.cpp20
-rw-r--r--tests/Mem_Map_Test.cpp4
-rw-r--r--tests/Message_Block_Test.cpp4
-rw-r--r--tests/Message_Queue_Notifications_Test.cpp2
-rw-r--r--tests/Priority_Buffer_Test.cpp2
-rw-r--r--tests/Proactor_Scatter_Gather_Test.cpp6
-rw-r--r--tests/Proactor_Test.cpp70
-rw-r--r--tests/SOCK_Send_Recv_Test.cpp2
-rw-r--r--tests/SOCK_Test.cpp21
-rw-r--r--tests/Semaphore_Test.cpp2
-rw-r--r--tests/TP_Reactor_Test.cpp18
-rw-r--r--tests/TP_Reactor_Test.h2
-rw-r--r--tests/TSS_Test.cpp2
-rw-r--r--tests/Thread_Pool_Reactor_Resume_Test.cpp2
-rw-r--r--tests/Thread_Pool_Reactor_Test.cpp2
-rw-r--r--tests/Thread_Pool_Test.cpp4
-rw-r--r--tests/Upgradable_RW_Test.cpp6
59 files changed, 748 insertions, 541 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c7d61d82b6..00c57607361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,90 @@
+Tue Aug 27 13:28:17 2002 Steve Huston <shuston@riverace.com>
+
+ * ace/config-win32-common.h: Added #define ACE_MALLOC_ALIGN 8 for
+ Win64.
+
+ * ace/Malloc_T.cpp (ACE_Cached_Allocator): When dividing up the
+ allocated space, maintain the platform's alignment requirements.
+
+ * ace/ace_dll64.mak: Removed references to Hash_Map_Manager_rt.*.
+
+ * ace/Stream_Modules.cpp (info): Cast string length back to int.
+
+ * ace/ARGV.{h i cpp}: Changed argc() value from size_t to int. It
+ needs to get passed to many places that expect int (argc, argv).
+
+ * ace/OS.{h cpp} (ACE_OS::string_to_argv): argc changed from size_t&
+ to int& to match the change above.
+
+ * ace/FILE_IO.{h i cpp}:
+ * ace/SPIPE_Stream.{h i}: Follow-up to ACE_SOCK_Stream change in:
+ Mon Jul 22 16:39:21 2002 Steve Huston <shuston@riverace.com>
+ (sendv_n, recvv_n, sendv, send, recv) - change iov count from
+ size_t to int.
+
+ * ace/Functor_T.i (ACE_Pointer_Hash::operator()): Use reinterpret_cast
+ to go from pointer to u_long.
+
+ * ace/config-win32-msvc-7.h: Define ACE_AUTO_PTR_LACKS_RESET for
+ Win64 SDK compiler.
+
+ * ace/Strategies_T.{h i cpp} (ACE_Thread_Strategy): Changed n_threads
+ parameter (and n_threads_ member) from size_t to int - matches
+ what's expected by ACE_Task::activate(), which is where this
+ value is passed.
+
+ * ace/Asynch_Acceptor.{h cpp}:
+ * ace/Asynch_IO.{h cpp}:
+ * ace/Asynch_IO_Impl.h:
+ * ace/POSIX_Asynch_IO.{h cpp}:
+ * ace/POSIX_Proactor.{h cpp}:
+ * ace/WIN32_Asynch_IO.{h cpp}:
+ * ace/WIN32_Proactor.{h cpp}: All byte-count arguments and members
+ in all classes changed from u_long to size_t. Some already were...
+
+ * ace/SOCK_Dgram.i (send): address length is an int, not size_t.
+
+ * tests/Cache_Map_Manager_Test.h (Hash_Key::operator()): Cast the
+ size_t argument to u_long for return.
+
+ * tests/Cache_Map_Manager_Test.cpp: Cast arg for ACE_OS::srand to
+ u_int (matches ACE_OS signature), not size_t.
+
+ * tests/CDR_Array_Test.cpp (zero): Change len arg to size_t, and
+ also the values passed to it. Also, correct length args to
+ ACE_InputCDR and ACE_OutputCDR - they're size_t, not int.
+
+ * tests/Handle_Set_Test.cpp: Disable the conversion warnings
+ initializing the array of ACE_HANDLE values on Win64. They're fine.
+
+ * tests/Mem_Map_Test.cpp (reverse_file): Changed size arg from int
+ to size_t.
+
+ * tests/Buffer_Stream_Test.cpp:
+ * tests/CDR_Test.cpp:
+ * tests/Message_Block_Test.cpp:
+ * tests/Message_Queue_Notifications_Test.cpp:
+ * tests/Priority_Buffer_Test.cpp:
+ * tests/Proactor_Scatter_Gather_Test.cpp:
+ * tests/Proactor_Test.cpp:
+ * tests/Semaphore_Test.cpp:
+ * tests/Thread_Pool_Test.cpp:
+ * tests/TP_Reactor_Test.{h cpp}:
+ * tests/Upgradable_RW_Test.cpp: Align size_t/int usage.
+
+ * tests/Message_Queue_Notifications_Test.cpp (Watermark_Test::producer)
+ Change hwm from size_t to ssize_t so it can go less than zero and
+ break the 'for' loop properly.
+
+ * tests/MT_SOCK_Test.cpp:
+ * tests/SOCK_Test.cpp: Use an int to pass to select(), always 0
+ for Win64.
+
+ * tests/SOCK_Send_Recv_Test.cpp:
+ * tests/Thread_Pool_Reactor_Resume_Test.cpp:
+ * tests/Thread_Pool_Reactor_Test.cpp:
+ * tests/TSS_TEst.cpp: Add missing type cast.
+
Tue Aug 27 11:08:54 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
* ace/Pair_T.{h,i}: Added support for operator== to the ACE_Pair
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 5c7d61d82b6..00c57607361 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,90 @@
+Tue Aug 27 13:28:17 2002 Steve Huston <shuston@riverace.com>
+
+ * ace/config-win32-common.h: Added #define ACE_MALLOC_ALIGN 8 for
+ Win64.
+
+ * ace/Malloc_T.cpp (ACE_Cached_Allocator): When dividing up the
+ allocated space, maintain the platform's alignment requirements.
+
+ * ace/ace_dll64.mak: Removed references to Hash_Map_Manager_rt.*.
+
+ * ace/Stream_Modules.cpp (info): Cast string length back to int.
+
+ * ace/ARGV.{h i cpp}: Changed argc() value from size_t to int. It
+ needs to get passed to many places that expect int (argc, argv).
+
+ * ace/OS.{h cpp} (ACE_OS::string_to_argv): argc changed from size_t&
+ to int& to match the change above.
+
+ * ace/FILE_IO.{h i cpp}:
+ * ace/SPIPE_Stream.{h i}: Follow-up to ACE_SOCK_Stream change in:
+ Mon Jul 22 16:39:21 2002 Steve Huston <shuston@riverace.com>
+ (sendv_n, recvv_n, sendv, send, recv) - change iov count from
+ size_t to int.
+
+ * ace/Functor_T.i (ACE_Pointer_Hash::operator()): Use reinterpret_cast
+ to go from pointer to u_long.
+
+ * ace/config-win32-msvc-7.h: Define ACE_AUTO_PTR_LACKS_RESET for
+ Win64 SDK compiler.
+
+ * ace/Strategies_T.{h i cpp} (ACE_Thread_Strategy): Changed n_threads
+ parameter (and n_threads_ member) from size_t to int - matches
+ what's expected by ACE_Task::activate(), which is where this
+ value is passed.
+
+ * ace/Asynch_Acceptor.{h cpp}:
+ * ace/Asynch_IO.{h cpp}:
+ * ace/Asynch_IO_Impl.h:
+ * ace/POSIX_Asynch_IO.{h cpp}:
+ * ace/POSIX_Proactor.{h cpp}:
+ * ace/WIN32_Asynch_IO.{h cpp}:
+ * ace/WIN32_Proactor.{h cpp}: All byte-count arguments and members
+ in all classes changed from u_long to size_t. Some already were...
+
+ * ace/SOCK_Dgram.i (send): address length is an int, not size_t.
+
+ * tests/Cache_Map_Manager_Test.h (Hash_Key::operator()): Cast the
+ size_t argument to u_long for return.
+
+ * tests/Cache_Map_Manager_Test.cpp: Cast arg for ACE_OS::srand to
+ u_int (matches ACE_OS signature), not size_t.
+
+ * tests/CDR_Array_Test.cpp (zero): Change len arg to size_t, and
+ also the values passed to it. Also, correct length args to
+ ACE_InputCDR and ACE_OutputCDR - they're size_t, not int.
+
+ * tests/Handle_Set_Test.cpp: Disable the conversion warnings
+ initializing the array of ACE_HANDLE values on Win64. They're fine.
+
+ * tests/Mem_Map_Test.cpp (reverse_file): Changed size arg from int
+ to size_t.
+
+ * tests/Buffer_Stream_Test.cpp:
+ * tests/CDR_Test.cpp:
+ * tests/Message_Block_Test.cpp:
+ * tests/Message_Queue_Notifications_Test.cpp:
+ * tests/Priority_Buffer_Test.cpp:
+ * tests/Proactor_Scatter_Gather_Test.cpp:
+ * tests/Proactor_Test.cpp:
+ * tests/Semaphore_Test.cpp:
+ * tests/Thread_Pool_Test.cpp:
+ * tests/TP_Reactor_Test.{h cpp}:
+ * tests/Upgradable_RW_Test.cpp: Align size_t/int usage.
+
+ * tests/Message_Queue_Notifications_Test.cpp (Watermark_Test::producer)
+ Change hwm from size_t to ssize_t so it can go less than zero and
+ break the 'for' loop properly.
+
+ * tests/MT_SOCK_Test.cpp:
+ * tests/SOCK_Test.cpp: Use an int to pass to select(), always 0
+ for Win64.
+
+ * tests/SOCK_Send_Recv_Test.cpp:
+ * tests/Thread_Pool_Reactor_Resume_Test.cpp:
+ * tests/Thread_Pool_Reactor_Test.cpp:
+ * tests/TSS_TEst.cpp: Add missing type cast.
+
Tue Aug 27 11:08:54 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
* ace/Pair_T.{h,i}: Added support for operator== to the ACE_Pair
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
index 5ef10f7da8d..ccf88313461 100644
--- a/ace/ARGV.cpp
+++ b/ace/ARGV.cpp
@@ -24,7 +24,7 @@ ACE_ARGV::dump (void) const
ACE_ARGV *this_obj = ACE_const_cast (ACE_ARGV *, this);
- for (size_t i = 0; i < this->argc_; i++)
+ for (int i = 0; i < this->argc_; i++)
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("\nargv_[%i] = %s"),
i,
diff --git a/ace/ARGV.h b/ace/ARGV.h
index cbb1f9a3f8a..32b4a2e56ae 100644
--- a/ace/ARGV.h
+++ b/ace/ARGV.h
@@ -88,7 +88,7 @@ public:
ACE_TCHAR **argv (void);
/// Returns <argc>.
- size_t argc (void) const;
+ int argc (void) const;
/// Returns the <buf>. Caller should not delete this memory since
/// the <ARGV> destructor will delete it.
@@ -147,7 +147,7 @@ private:
int state_;
/// Number of arguments in the ARGV array.
- size_t argc_;
+ int argc_;
/// The array of string arguments.
ACE_TCHAR **argv_;
diff --git a/ace/ARGV.i b/ace/ARGV.i
index f45bdf4b125..4b118c700c0 100644
--- a/ace/ARGV.i
+++ b/ace/ARGV.i
@@ -2,7 +2,7 @@
// $Id$
// Return the number of args
-ACE_INLINE size_t
+ACE_INLINE int
ACE_ARGV::argc (void) const
{
ACE_TRACE ("ACE_ARGV::argc");
@@ -58,7 +58,7 @@ ACE_ARGV::operator[] (size_t i)
ACE_TRACE ("ACE_ARGV::operator[]");
// Don't go out of bounds.
- if (i >= this->argc_)
+ if (i >= ACE_static_cast (size_t, this->argc_))
return 0;
return (const ACE_TCHAR *) this->argv ()[i];
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
index dd4f84b1e2d..1068cdd916b 100644
--- a/ace/Asynch_Acceptor.cpp
+++ b/ace/Asynch_Acceptor.cpp
@@ -348,7 +348,7 @@ ACE_Asynch_Acceptor<HANDLER>::parse_address (const
int remote_size = 0;
::GetAcceptExSockaddrs (message_block.rd_ptr (),
- bytes_to_read_,
+ ACE_static_cast (DWORD, this->bytes_to_read_),
this->address_size (),
this->address_size (),
&local_addr,
@@ -439,14 +439,14 @@ ACE_Asynch_Acceptor<HANDLER>::reissue_accept (int new_value)
this->reissue_accept_ = new_value;
}
-template <class HANDLER> int
+template <class HANDLER> size_t
ACE_Asynch_Acceptor<HANDLER>::bytes_to_read (void) const
{
return this->bytes_to_read_;
}
template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::bytes_to_read (int new_value)
+ACE_Asynch_Acceptor<HANDLER>::bytes_to_read (size_t new_value)
{
this->bytes_to_read_ = new_value;
}
diff --git a/ace/Asynch_Acceptor.h b/ace/Asynch_Acceptor.h
index 18fbe4f4c10..26146446a6c 100644
--- a/ace/Asynch_Acceptor.h
+++ b/ace/Asynch_Acceptor.h
@@ -219,10 +219,10 @@ public:
virtual void reissue_accept (int new_value);
/// Get bytes to be read with the <accept> call.
- virtual int bytes_to_read (void) const;
+ virtual size_t bytes_to_read (void) const;
/// Set bytes to be read with the <accept> call.
- virtual void bytes_to_read (int new_value);
+ virtual void bytes_to_read (size_t new_value);
/// This is required by the AcceptEx call.
static size_t address_size (void);
@@ -270,7 +270,7 @@ private:
int reissue_accept_;
/// Bytes to be read with the <accept> call.
- int bytes_to_read_;
+ size_t bytes_to_read_;
};
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 81be02534f4..91e616e5457 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -12,7 +12,7 @@ ACE_RCSID(ace, Asynch_IO, "$Id$")
#include "ace/INET_Addr.h"
#include "ace/Asynch_IO_Impl.h"
-u_long
+size_t
ACE_Asynch_Result::bytes_transferred (void) const
{
return this->implementation ()->bytes_transferred ();
@@ -193,7 +193,7 @@ ACE_Asynch_Read_Stream::open (ACE_Handler &handler,
int
ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
@@ -208,7 +208,7 @@ ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
int
ACE_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
@@ -238,7 +238,7 @@ ACE_Asynch_Read_Stream::implementation (ACE_Asynch_Read_Stream_Impl *implementat
// ************************************************************
-u_long
+size_t
ACE_Asynch_Read_Stream::Result::bytes_to_read (void) const
{
return this->implementation ()->bytes_to_read ();
@@ -315,7 +315,7 @@ ACE_Asynch_Write_Stream::open (ACE_Handler &handler,
int
ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
@@ -330,7 +330,7 @@ ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
int
ACE_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
@@ -360,7 +360,7 @@ ACE_Asynch_Write_Stream::implementation (ACE_Asynch_Write_Stream_Impl *implement
// ************************************************************
-u_long
+size_t
ACE_Asynch_Write_Stream::Result::bytes_to_write (void) const
{
return this->implementation ()->bytes_to_write ();
@@ -437,7 +437,7 @@ ACE_Asynch_Read_File::open (ACE_Handler &handler,
int
ACE_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -456,7 +456,7 @@ ACE_Asynch_Read_File::read (ACE_Message_Block &message_block,
#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
int
ACE_Asynch_Read_File::readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -549,7 +549,7 @@ ACE_Asynch_Write_File::open (ACE_Handler &handler,
int
ACE_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -568,7 +568,7 @@ ACE_Asynch_Write_File::write (ACE_Message_Block &message_block,
#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
int
ACE_Asynch_Write_File::writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -661,7 +661,7 @@ ACE_Asynch_Accept::open (ACE_Handler &handler,
int
ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -691,7 +691,7 @@ ACE_Asynch_Accept::implementation (ACE_Asynch_Accept_Impl *implementation)
// ************************************************************
-u_long
+size_t
ACE_Asynch_Accept::Result::bytes_to_read (void) const
{
return this->implementation ()->bytes_to_read ();
@@ -875,10 +875,10 @@ ACE_Asynch_Transmit_File::open (ACE_Handler &handler,
int
ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -930,13 +930,13 @@ ACE_Asynch_Transmit_File::Result::header_and_trailer (void) const
return this->implementation ()->header_and_trailer ();
}
-u_long
+size_t
ACE_Asynch_Transmit_File::Result::bytes_to_write (void) const
{
return this->implementation ()->bytes_to_write ();
}
-u_long
+size_t
ACE_Asynch_Transmit_File::Result::bytes_per_send (void) const
{
return this->implementation ()->bytes_per_send ();
@@ -967,9 +967,9 @@ ACE_Asynch_Transmit_File::Result::implementation (void) const
// ************************************************************
ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Block *header,
- u_long header_bytes,
+ size_t header_bytes,
ACE_Message_Block *trailer,
- u_long trailer_bytes)
+ size_t trailer_bytes)
: header_ (header),
header_bytes_ (header_bytes),
trailer_ (trailer),
@@ -983,9 +983,9 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::~Header_And_Trailer (void)
void
ACE_Asynch_Transmit_File::Header_And_Trailer::header_and_trailer (ACE_Message_Block *header,
- u_long header_bytes,
+ size_t header_bytes,
ACE_Message_Block *trailer,
- u_long trailer_bytes)
+ size_t trailer_bytes)
{
this->header (header);
this->header_bytes (header_bytes);
@@ -1005,14 +1005,14 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::header (ACE_Message_Block *message
this->header_ = message_block;
}
-u_long
+size_t
ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (void) const
{
return this->header_bytes_;
}
void
-ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (u_long bytes)
+ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (size_t bytes)
{
this->header_bytes_ = bytes;
}
@@ -1029,14 +1029,14 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (ACE_Message_Block *messag
this->trailer_ = message_block;
}
-u_long
+size_t
ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (void) const
{
return this->trailer_bytes_;
}
void
-ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (u_long bytes)
+ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (size_t bytes)
{
this->trailer_bytes_ = bytes;
}
@@ -1307,7 +1307,7 @@ ACE_Asynch_Read_Dgram::Result::flags (void) const
return this->implementation ()->flags ();
}
-u_long
+size_t
ACE_Asynch_Read_Dgram::Result::bytes_to_read (void) const
{
return this->implementation ()->bytes_to_read ();
@@ -1410,7 +1410,7 @@ ACE_Asynch_Write_Dgram::implementation (ACE_Asynch_Write_Dgram_Impl *implementat
// ************************************************************
-u_long
+size_t
ACE_Asynch_Write_Dgram::Result::bytes_to_write (void) const
{
return this->implementation ()->bytes_to_write ();
diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h
index 0d6ea8854b2..f043296ab47 100644
--- a/ace/Asynch_IO.h
+++ b/ace/Asynch_IO.h
@@ -65,7 +65,7 @@ class ACE_Export ACE_Asynch_Result
public:
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -289,7 +289,7 @@ public:
* ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
*/
int read (ACE_Message_Block &message_block,
- u_long num_bytes_to_read,
+ size_t num_bytes_to_read,
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
@@ -300,7 +300,7 @@ public:
* message blocks using the continuation field.
*/
int readv (ACE_Message_Block &message_block,
- u_long num_bytes_to_read,
+ size_t num_bytes_to_read,
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
@@ -339,7 +339,7 @@ public:
public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -415,7 +415,7 @@ public:
* ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
@@ -426,7 +426,7 @@ public:
* message blocks using the continuation field.
*/
int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act = 0,
int priority = 0,
int signal_number = ACE_SIGRTMIN);
@@ -465,7 +465,7 @@ public:
public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block (void) const;
@@ -542,7 +542,7 @@ public:
* ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
*/
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset = 0,
u_long offset_high = 0,
const void *act = 0,
@@ -557,7 +557,7 @@ public:
* memory page and must be aligned on a system memory page size boundary
*/
int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset = 0,
u_long offset_high = 0,
const void *act = 0,
@@ -678,7 +678,7 @@ public:
* ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset = 0,
u_long offset_high = 0,
const void *act = 0,
@@ -693,7 +693,7 @@ public:
* memory page and must be aligned on a system memory page size boundary
*/
int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset = 0,
u_long offset_high = 0,
const void *act = 0,
@@ -816,7 +816,7 @@ public:
* ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
*/
int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle = ACE_INVALID_HANDLE,
const void *act = 0,
int priority = 0,
@@ -855,7 +855,7 @@ public:
public:
/// The number of bytes which were requested at the start of the
/// asynchronous accept.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -1044,10 +1044,10 @@ public:
*/
int transmit_file (ACE_HANDLE file,
Header_And_Trailer *header_and_trailer = 0,
- u_long bytes_to_write = 0,
+ size_t bytes_to_write = 0,
u_long offset = 0,
u_long offset_high = 0,
- u_long bytes_per_send = 0,
+ size_t bytes_per_send = 0,
u_long flags = 0,
const void *act = 0,
int priority = 0,
@@ -1094,11 +1094,11 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous transmit file.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Number of bytes per send requested at the start of the transmit
/// file.
- u_long bytes_per_send (void) const;
+ size_t bytes_per_send (void) const;
/// Flags which were passed into transmit file.
u_long flags (void) const;
@@ -1132,18 +1132,18 @@ public:
public:
/// Constructor.
Header_And_Trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
+ size_t header_bytes = 0,
ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
+ size_t trailer_bytes = 0);
/// Destructor
virtual ~Header_And_Trailer (void);
/// This method allows all the member to be set in one fell swoop.
void header_and_trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
+ size_t header_bytes = 0,
ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
+ size_t trailer_bytes = 0);
/// Get header which goes before the file data.
ACE_Message_Block *header (void) const;
@@ -1152,10 +1152,10 @@ public:
void header (ACE_Message_Block *message_block);
/// Get size of the header data.
- u_long header_bytes (void) const;
+ size_t header_bytes (void) const;
/// Set size of the header data.
- void header_bytes (u_long bytes);
+ void header_bytes (size_t bytes);
/// Get trailer which goes after the file data.
ACE_Message_Block *trailer (void) const;
@@ -1164,10 +1164,10 @@ public:
void trailer (ACE_Message_Block *message_block);
/// Get size of the trailer data.
- u_long trailer_bytes (void) const;
+ size_t trailer_bytes (void) const;
/// Set size of the trailer data.
- void trailer_bytes (u_long bytes);
+ void trailer_bytes (size_t bytes);
/// Conversion routine.
ACE_LPTRANSMIT_FILE_BUFFERS transmit_buffers (void);
@@ -1177,13 +1177,13 @@ public:
ACE_Message_Block *header_;
/// Size of header data.
- u_long header_bytes_;
+ size_t header_bytes_;
/// Trailer data.
ACE_Message_Block *trailer_;
/// Size of trailer data.
- u_long trailer_bytes_;
+ size_t trailer_bytes_;
/// Target data structure.
ACE_TRANSMIT_FILE_BUFFERS transmit_buffers_;
@@ -1298,7 +1298,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data
ACE_Message_Block *message_block (void) const;
@@ -1433,7 +1433,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block which contains the sent data
ACE_Message_Block *message_block (void) const;
diff --git a/ace/Asynch_IO_Impl.h b/ace/Asynch_IO_Impl.h
index 3dd5696b4f6..f28823f4eb0 100644
--- a/ace/Asynch_IO_Impl.h
+++ b/ace/Asynch_IO_Impl.h
@@ -52,7 +52,7 @@ public:
virtual ~ACE_Asynch_Result_Impl (void);
/// Number of bytes transferred by the operation.
- virtual u_long bytes_transferred (void) const = 0;
+ virtual size_t bytes_transferred (void) const = 0;
/// ACT associated with the operation.
virtual const void *act (void) const = 0;
@@ -90,7 +90,7 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
/// This is called when the asynchronous operation completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error = 0) = 0;
@@ -159,7 +159,7 @@ public:
/// This starts off an asynchronous read. Upto <bytes_to_read> will
/// be read and stored in the <message_block>.
virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number) = 0;
@@ -170,7 +170,7 @@ public:
* message blocks using the continuation field.
*/
virtual int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number) = 0;
@@ -196,7 +196,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- virtual u_long bytes_to_read (void) const = 0;
+ virtual size_t bytes_to_read (void) const = 0;
/// Message block which contains the read data.
virtual ACE_Message_Block &message_block (void) const = 0;
@@ -225,7 +225,7 @@ public:
/// This starts off an asynchronous write. Upto <bytes_to_write>
/// will be written from the <message_block>.
virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number) = 0;
@@ -236,7 +236,7 @@ public:
* message blocks using the continuation field.
*/
virtual int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number) = 0;
@@ -262,7 +262,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- virtual u_long bytes_to_write (void) const = 0;
+ virtual size_t bytes_to_write (void) const = 0;
/// Message block that contains the data to be written.
virtual ACE_Message_Block &message_block (void) const = 0;
@@ -294,7 +294,7 @@ public:
* at <offset> from the beginning of the file.
*/
virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -309,7 +309,7 @@ public:
* memory page and must be aligned on a system memory page size boundary
*/
virtual int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -324,7 +324,7 @@ public:
/// This starts off an asynchronous read. Upto <bytes_to_read> will
/// be read and stored in the <message_block>.
virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number) = 0;
@@ -335,7 +335,7 @@ public:
* message blocks using the continuation field.
*/
virtual int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number) = 0;
@@ -383,7 +383,7 @@ public:
* start at <offset> from the beginning of the file.
*/
virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -398,7 +398,7 @@ public:
* memory page and must be aligned on a system memory page size boundary
*/
virtual int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -414,7 +414,7 @@ public:
/// This starts off an asynchronous write. Upto <bytes_to_write>
/// will be written from the <message_block>.
virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number) = 0;
@@ -425,7 +425,7 @@ public:
* message blocks using the continuation field.
*/
virtual int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number) = 0;
@@ -479,7 +479,7 @@ public:
* the new connection is placed at the end of this buffer.
*/
virtual int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -505,7 +505,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous accept.
- virtual u_long bytes_to_read (void) const = 0;
+ virtual size_t bytes_to_read (void) const = 0;
/// Message block which contains the read data.
virtual ACE_Message_Block &message_block (void) const = 0;
@@ -589,10 +589,10 @@ public:
/// This starts off an asynchronous transmit file.
virtual int transmit_file (ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -627,11 +627,11 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous transmit file.
- virtual u_long bytes_to_write (void) const = 0;
+ virtual size_t bytes_to_write (void) const = 0;
/// Number of bytes per send requested at the start of the transmit
/// file.
- virtual u_long bytes_per_send (void) const = 0;
+ virtual size_t bytes_per_send (void) const = 0;
/// Flags which were passed into transmit file.
virtual u_long flags (void) const = 0;
@@ -712,7 +712,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- virtual u_long bytes_to_read (void) const = 0;
+ virtual size_t bytes_to_read (void) const = 0;
/// The address of where the packet came from
virtual int remote_address (ACE_Addr& addr) const = 0;
@@ -795,7 +795,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- virtual u_long bytes_to_write (void) const = 0;
+ virtual size_t bytes_to_write (void) const = 0;
/// Message block which contains the sent data
virtual ACE_Message_Block *message_block (void) const = 0;
diff --git a/ace/FILE_IO.cpp b/ace/FILE_IO.cpp
index de7400f3c82..09ad3ef4266 100644
--- a/ace/FILE_IO.cpp
+++ b/ace/FILE_IO.cpp
@@ -39,7 +39,7 @@ ACE_FILE_IO::send (size_t n, ...) const
{
ACE_TRACE ("ACE_FILE_IO::send");
va_list argp;
- size_t total_tuples = n / 2;
+ int total_tuples = (ACE_static_cast (int, n)) / 2;
iovec *iovp;
#if defined (ACE_HAS_ALLOCA)
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
@@ -51,7 +51,7 @@ ACE_FILE_IO::send (size_t n, ...) const
va_start (argp, n);
- for (size_t i = 0; i < total_tuples; i++)
+ for (int i = 0; i < total_tuples; i++)
{
iovp[i].iov_base = va_arg (argp, char *);
iovp[i].iov_len = va_arg (argp, int);
diff --git a/ace/FILE_IO.h b/ace/FILE_IO.h
index b4060da77aa..d7bfcf63290 100644
--- a/ace/FILE_IO.h
+++ b/ace/FILE_IO.h
@@ -87,10 +87,10 @@ public:
#endif /* ACE_HAS_STREAM_PIPES */
/// Send iovecs via <::writev>.
- ssize_t send (const iovec iov[], size_t n) const;
+ ssize_t send (const iovec iov[], int n) const;
/// Recv iovecs via <::readv>.
- ssize_t recv (iovec iov[], size_t n) const;
+ ssize_t recv (iovec iov[], int n) const;
/**
* Send N char *ptrs and int lengths. Note that the char *'s
@@ -121,7 +121,7 @@ public:
/// Send an <iovec> of size <n> to the file.
ssize_t sendv (const iovec iov[],
- size_t n) const;
+ int n) const;
/**
* Allows a client to read from a file without having to provide a
@@ -136,11 +136,11 @@ public:
/// Send an <iovec> of size <n> to the file. Will block until all
/// bytes are sent or an error occurs.
ssize_t sendv_n (const iovec iov[],
- size_t n) const;
+ int n) const;
/// Receive an <iovec> of size <n> to the file.
ssize_t recvv_n (iovec iov[],
- size_t n) const;
+ int n) const;
/// Dump the state of an object.
void dump (void) const;
diff --git a/ace/FILE_IO.i b/ace/FILE_IO.i
index a00d6aef8ba..c987b604413 100644
--- a/ace/FILE_IO.i
+++ b/ace/FILE_IO.i
@@ -4,7 +4,7 @@
// FILE_IO.i
ASYS_INLINE ssize_t
-ACE_FILE_IO::sendv_n (const iovec iov[], size_t n) const
+ACE_FILE_IO::sendv_n (const iovec iov[], int n) const
{
ACE_TRACE ("ACE_FILE_IO::sendv_n");
return ACE::writev_n (this->get_handle (),
@@ -27,7 +27,7 @@ ACE_FILE_IO::send_n (const ACE_Message_Block *message_block,
// Recv an n byte message from the file.
ASYS_INLINE ssize_t
-ACE_FILE_IO::recvv_n (iovec iov[], size_t n) const
+ACE_FILE_IO::recvv_n (iovec iov[], int n) const
{
ACE_TRACE ("ACE_FILE_IO::recvv_n");
// @@ Carlos, can you please update this to call the
@@ -40,7 +40,7 @@ ACE_FILE_IO::recvv_n (iovec iov[], size_t n) const
// Send an <iovec> of size <n> to the file.
ASYS_INLINE ssize_t
-ACE_FILE_IO::sendv (const iovec iov[], size_t n) const
+ACE_FILE_IO::sendv (const iovec iov[], int n) const
{
ACE_TRACE ("ACE_FILE_IO::sendv");
return ACE_OS::writev (this->get_handle (), iov, n);
@@ -81,14 +81,14 @@ ACE_FILE_IO::recv (void *buf, size_t n) const
}
ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const iovec iov[], size_t n) const
+ACE_FILE_IO::send (const iovec iov[], int n) const
{
ACE_TRACE ("ACE_FILE_IO::send");
return ACE_OS::writev (this->get_handle (), iov, n);
}
ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (iovec iov[], size_t n) const
+ACE_FILE_IO::recv (iovec iov[], int n) const
{
ACE_TRACE ("ACE_FILE_IO::recv");
return ACE_OS::readv (this->get_handle (), iov, n);
diff --git a/ace/Functor_T.i b/ace/Functor_T.i
index d626f76ed15..2a8ba63bec1 100644
--- a/ace/Functor_T.i
+++ b/ace/Functor_T.i
@@ -10,7 +10,7 @@ ACE_Hash<TYPE>::operator () (const TYPE &t) const
template <class TYPE> ACE_INLINE u_long
ACE_Pointer_Hash<TYPE>::operator () (TYPE t) const
{
- return u_long (t);
+ return ACE_reinterpret_cast (u_long, t);
}
template <class TYPE> ACE_INLINE int
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index 44a4a43c03c..703232d0d45 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -23,14 +23,28 @@ ACE_Cached_Allocator<T, ACE_LOCK>::ACE_Cached_Allocator (size_t n_chunks)
: pool_ (0),
free_list_ (ACE_PURE_FREE_LIST)
{
+ // To maintain alignment requirements, make sure that each element
+ // inserted into the free list is aligned properly for the platform.
+ // Since the memory is allocated as a char[], the compiler won't help.
+ // To make sure enough room is allocated, round up the size so that
+ // each element starts aligned.
+ //
+ // NOTE - this would probably be easier by defining pool_ as a pointer
+ // to T and allocating an array of them (the compiler would probably
+ // take care of the alignment for us), but then the ACE_NEW below would
+ // require a default constructor on T - a requirement that is not in
+ // previous versions of ACE
+ size_t chunk_size = sizeof (T);
+ if (chunk_size % ACE_MALLOC_ALIGN != 0)
+ chunk_size += (ACE_MALLOC_ALIGN - (chunk_size % ACE_MALLOC_ALIGN));
ACE_NEW (this->pool_,
- char[n_chunks * sizeof (T)]);
+ char[n_chunks * chunk_size]);
for (size_t c = 0;
c < n_chunks;
c++)
{
- void* placement = this->pool_ + c * sizeof(T);
+ void* placement = this->pool_ + c * chunk_size;
this->free_list_.add (new (placement) ACE_Cached_Mem_Pool_Node<T>);
}
// Put into free list using placement contructor, no real memory
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 1a18aca1e8e..369fa166aa4 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -3787,7 +3787,7 @@ ACE_OS::argv_to_string (ACE_TCHAR **argv,
int
ACE_OS::string_to_argv (ACE_TCHAR *buf,
- size_t &argc,
+ int &argc,
ACE_TCHAR **&argv,
int substitute_env_args)
{
@@ -3855,7 +3855,7 @@ ACE_OS::string_to_argv (ACE_TCHAR *buf,
ACE_TCHAR *ptr = buf;
- for (size_t i = 0; i < argc; i++)
+ for (int i = 0; i < argc; i++)
{
// Skip whitespace..
while (ACE_OS::ace_isspace (*ptr))
diff --git a/ace/OS.h b/ace/OS.h
index cecdc85b4c9..7a3ecf768a1 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -4559,7 +4559,7 @@ public:
ACE_TCHAR *&buf,
int substitute_env_args = 1);
static int string_to_argv (ACE_TCHAR *buf,
- size_t &argc,
+ int &argc,
ACE_TCHAR **&argv,
int substitute_env_args = 1);
static long sysconf (int);
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp
index 034002976c7..6919fd863a6 100644
--- a/ace/POSIX_Asynch_IO.cpp
+++ b/ace/POSIX_Asynch_IO.cpp
@@ -15,14 +15,14 @@
#include "ace/POSIX_Asynch_IO.i"
#endif /* __ACE_INLINE__ */
-u_long
+size_t
ACE_POSIX_Asynch_Result::bytes_transferred (void) const
{
return this->bytes_transferred_;
}
void
-ACE_POSIX_Asynch_Result::set_bytes_transferred (u_long nbytes)
+ACE_POSIX_Asynch_Result::set_bytes_transferred (size_t nbytes)
{
this->bytes_transferred_= nbytes;
}
@@ -231,7 +231,7 @@ ACE_POSIX_Asynch_Operation::ACE_POSIX_Asynch_Operation (ACE_POSIX_AIOCB_Proactor
// *********************************************************************
-u_long
+size_t
ACE_POSIX_Asynch_Read_Stream_Result::bytes_to_read (void) const
{
return this->aio_nbytes;
@@ -252,7 +252,7 @@ ACE_POSIX_Asynch_Read_Stream_Result::handle (void) const
ACE_POSIX_Asynch_Read_Stream_Result::ACE_POSIX_Asynch_Read_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -269,7 +269,7 @@ ACE_POSIX_Asynch_Read_Stream_Result::ACE_POSIX_Asynch_Read_Stream_Result (ACE_Ha
}
void
-ACE_POSIX_Asynch_Read_Stream_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Read_Stream_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -299,7 +299,7 @@ ACE_POSIX_Asynch_Read_Stream_Result::~ACE_POSIX_Asynch_Read_Stream_Result (void)
// = Base class operations. These operations are here to kill
// dominance warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Read_Stream_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -376,12 +376,12 @@ ACE_POSIX_Asynch_Read_Stream::ACE_POSIX_Asynch_Read_Stream (ACE_POSIX_AIOCB_Proa
int
ACE_POSIX_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
+ size_t bytes_to_read,
+ const void *act,
+ int priority,
+ int signal_number)
{
- u_long space = message_block.space ();
+ size_t space = message_block.space ();
if ( bytes_to_read > space )
bytes_to_read=space;
@@ -447,7 +447,7 @@ ACE_POSIX_Asynch_Read_Stream::proactor (void) const
// *********************************************************************
-u_long
+size_t
ACE_POSIX_Asynch_Write_Stream_Result::bytes_to_write (void) const
{
return this->aio_nbytes;
@@ -468,7 +468,7 @@ ACE_POSIX_Asynch_Write_Stream_Result::handle (void) const
ACE_POSIX_Asynch_Write_Stream_Result::ACE_POSIX_Asynch_Write_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
ACE_HANDLE event,
int priority,
@@ -485,7 +485,7 @@ ACE_POSIX_Asynch_Write_Stream_Result::ACE_POSIX_Asynch_Write_Stream_Result (ACE_
}
void
-ACE_POSIX_Asynch_Write_Stream_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Write_Stream_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -516,7 +516,7 @@ ACE_POSIX_Asynch_Write_Stream_Result::~ACE_POSIX_Asynch_Write_Stream_Result (voi
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Write_Stream_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -593,16 +593,16 @@ ACE_POSIX_Asynch_Write_Stream::ACE_POSIX_Asynch_Write_Stream (ACE_POSIX_AIOCB_Pr
int
ACE_POSIX_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
+ size_t bytes_to_write,
+ const void *act,
+ int priority,
+ int signal_number)
{
- u_long len = message_block.length();
- if ( bytes_to_write > len )
+ size_t len = message_block.length();
+ if (bytes_to_write > len)
bytes_to_write = len;
- if ( bytes_to_write == 0 )
+ if (bytes_to_write == 0)
ACE_ERROR_RETURN
((LM_ERROR,
ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_Stream::write:")
@@ -667,7 +667,7 @@ ACE_POSIX_Asynch_Write_Stream::proactor (void) const
ACE_POSIX_Asynch_Read_File_Result::ACE_POSIX_Asynch_Read_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
u_long offset,
u_long offset_high,
@@ -694,7 +694,7 @@ ACE_POSIX_Asynch_Read_File_Result::ACE_POSIX_Asynch_Read_File_Result (ACE_Handle
}
void
-ACE_POSIX_Asynch_Read_File_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Read_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -725,7 +725,7 @@ ACE_POSIX_Asynch_Read_File_Result::~ACE_POSIX_Asynch_Read_File_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Read_File_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -790,7 +790,7 @@ ACE_POSIX_Asynch_Read_File_Result::signal_number (void) const
// dominace warnings. These methods route their call to the
// ACE_POSIX_Asynch_Read_Stream_Result base class.
-u_long
+size_t
ACE_POSIX_Asynch_Read_File_Result::bytes_to_read (void) const
{
return ACE_POSIX_Asynch_Read_Stream_Result::bytes_to_read ();
@@ -826,14 +826,14 @@ ACE_POSIX_Asynch_Read_File::ACE_POSIX_Asynch_Read_File (ACE_POSIX_AIOCB_Proactor
int
ACE_POSIX_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- u_long space = message_block.space ();
+ size_t bytes_to_read,
+ u_long offset,
+ u_long offset_high,
+ const void *act,
+ int priority,
+ int signal_number)
+{
+ size_t space = message_block.space ();
if ( bytes_to_read > space )
bytes_to_read=space;
@@ -872,10 +872,10 @@ ACE_POSIX_Asynch_Read_File::~ACE_POSIX_Asynch_Read_File (void)
int
ACE_POSIX_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
+ size_t bytes_to_read,
+ const void *act,
+ int priority,
+ int signal_number)
{
return ACE_POSIX_Asynch_Read_Stream::read (message_block,
bytes_to_read,
@@ -917,7 +917,7 @@ ACE_POSIX_Asynch_Read_File::proactor (void) const
ACE_POSIX_Asynch_Write_File_Result::ACE_POSIX_Asynch_Write_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
u_long offset,
u_long offset_high,
@@ -944,7 +944,7 @@ ACE_POSIX_Asynch_Write_File_Result::ACE_POSIX_Asynch_Write_File_Result (ACE_Hand
}
void
-ACE_POSIX_Asynch_Write_File_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Write_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -975,7 +975,7 @@ ACE_POSIX_Asynch_Write_File_Result::~ACE_POSIX_Asynch_Write_File_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Write_File_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -1040,7 +1040,7 @@ ACE_POSIX_Asynch_Write_File_Result::signal_number (void) const
// dominance warnings. These methods route their call to the
// ACE_POSIX_Asynch_Write_Stream_Result base class.
-u_long
+size_t
ACE_POSIX_Asynch_Write_File_Result::bytes_to_write (void) const
{
return ACE_POSIX_Asynch_Write_Stream_Result::bytes_to_write ();
@@ -1076,18 +1076,18 @@ ACE_POSIX_Asynch_Write_File::ACE_POSIX_Asynch_Write_File (ACE_POSIX_AIOCB_Proact
int
ACE_POSIX_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- u_long len = message_block.length();
- if ( bytes_to_write > len )
+ size_t bytes_to_write,
+ u_long offset,
+ u_long offset_high,
+ const void *act,
+ int priority,
+ int signal_number)
+{
+ size_t len = message_block.length();
+ if (bytes_to_write > len)
bytes_to_write = len;
- if ( bytes_to_write == 0 )
+ if (bytes_to_write == 0)
ACE_ERROR_RETURN
((LM_ERROR,
ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_File::write:")
@@ -1122,10 +1122,10 @@ ACE_POSIX_Asynch_Write_File::~ACE_POSIX_Asynch_Write_File (void)
int
ACE_POSIX_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
+ size_t bytes_to_write,
+ const void *act,
+ int priority,
+ int signal_number)
{
return ACE_POSIX_Asynch_Write_Stream::write (message_block,
bytes_to_write,
@@ -1165,7 +1165,7 @@ ACE_POSIX_Asynch_Write_File::proactor (void) const
// *********************************************************************
-u_long
+size_t
ACE_POSIX_Asynch_Accept_Result::bytes_to_read (void) const
{
return this->aio_nbytes;
@@ -1193,7 +1193,7 @@ ACE_POSIX_Asynch_Accept_Result::ACE_POSIX_Asynch_Accept_Result (ACE_Handler &han
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -1210,7 +1210,7 @@ ACE_POSIX_Asynch_Accept_Result::ACE_POSIX_Asynch_Accept_Result (ACE_Handler &han
}
void
-ACE_POSIX_Asynch_Accept_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Accept_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -1238,7 +1238,7 @@ ACE_POSIX_Asynch_Accept_Result::~ACE_POSIX_Asynch_Accept_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Accept_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -1398,7 +1398,7 @@ ACE_POSIX_Asynch_Accept::open (ACE_Handler &handler,
int
ACE_POSIX_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -1771,7 +1771,7 @@ ACE_POSIX_Asynch_Connect_Result::ACE_POSIX_Asynch_Connect_Result (ACE_Handler &h
}
void
-ACE_POSIX_Asynch_Connect_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Connect_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -1796,7 +1796,7 @@ ACE_POSIX_Asynch_Connect_Result::~ACE_POSIX_Asynch_Connect_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Connect_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -2404,13 +2404,13 @@ ACE_POSIX_Asynch_Transmit_File_Result::header_and_trailer (void) const
return this->header_and_trailer_;
}
-u_long
+size_t
ACE_POSIX_Asynch_Transmit_File_Result::bytes_to_write (void) const
{
return this->aio_nbytes;
}
-u_long
+size_t
ACE_POSIX_Asynch_Transmit_File_Result::bytes_per_send (void) const
{
return this->bytes_per_send_;
@@ -2426,10 +2426,10 @@ ACE_POSIX_Asynch_Transmit_File_Result::ACE_POSIX_Asynch_Transmit_File_Result (AC
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event,
@@ -2448,7 +2448,7 @@ ACE_POSIX_Asynch_Transmit_File_Result::ACE_POSIX_Asynch_Transmit_File_Result (AC
}
void
-ACE_POSIX_Asynch_Transmit_File_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Transmit_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -2489,7 +2489,7 @@ ACE_POSIX_Asynch_Transmit_File_Result::~ACE_POSIX_Asynch_Transmit_File_Result (v
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_POSIX_Asynch_Transmit_File_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -2898,10 +2898,10 @@ ACE_POSIX_Asynch_Transmit_File::ACE_POSIX_Asynch_Transmit_File (ACE_POSIX_AIOCB_
int
ACE_POSIX_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -3000,7 +3000,7 @@ ACE_POSIX_Asynch_Transmit_File::proactor (void) const
}
// *********************************************************************
-u_long
+size_t
ACE_POSIX_Asynch_Read_Dgram_Result::bytes_to_read (void) const
{
return this->bytes_to_read_;
@@ -3041,7 +3041,7 @@ ACE_POSIX_Asynch_Read_Dgram_Result::handle (void) const
return this->handle_;
}
-u_long
+size_t
ACE_POSIX_Asynch_Read_Dgram_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -3116,7 +3116,7 @@ ACE_POSIX_Asynch_Read_Dgram_Result::message_block () const
ACE_POSIX_Asynch_Read_Dgram_Result::ACE_POSIX_Asynch_Read_Dgram_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block *message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
int flags,
int protocol_family,
const void* act,
@@ -3140,7 +3140,7 @@ ACE_POSIX_Asynch_Read_Dgram_Result::ACE_POSIX_Asynch_Read_Dgram_Result (ACE_Hand
}
void
-ACE_POSIX_Asynch_Read_Dgram_Result::complete (u_long bytes_transferred,
+ACE_POSIX_Asynch_Read_Dgram_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -3169,7 +3169,7 @@ ACE_POSIX_Asynch_Read_Dgram_Result::~ACE_POSIX_Asynch_Read_Dgram_Result (void)
}
//***************************************************************************
-u_long
+size_t
ACE_POSIX_Asynch_Write_Dgram_Result::bytes_to_write (void) const
{
return this->bytes_to_write_;
@@ -3187,7 +3187,7 @@ ACE_POSIX_Asynch_Write_Dgram_Result::handle (void) const
return this->handle_;
}
-u_long
+size_t
ACE_POSIX_Asynch_Write_Dgram_Result::bytes_transferred (void) const
{
return ACE_POSIX_Asynch_Result::bytes_transferred ();
@@ -3284,10 +3284,10 @@ ACE_POSIX_Asynch_Write_Dgram_Result::ACE_POSIX_Asynch_Write_Dgram_Result (ACE_Ha
}
void
-ACE_POSIX_Asynch_Write_Dgram_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ACE_POSIX_Asynch_Write_Dgram_Result::complete (size_t bytes_transferred,
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
diff --git a/ace/POSIX_Asynch_IO.h b/ace/POSIX_Asynch_IO.h
index acf8b2e8e5a..893d9f54459 100644
--- a/ace/POSIX_Asynch_IO.h
+++ b/ace/POSIX_Asynch_IO.h
@@ -52,7 +52,7 @@ class ACE_Export ACE_POSIX_Asynch_Result : public virtual ACE_Asynch_Result_Impl
{
public:
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -105,7 +105,7 @@ public:
void set_error (u_long errcode);
/// Simulate value to use in the post_completion ()
- void set_bytes_transferred (u_long nbytes);
+ void set_bytes_transferred (size_t nbytes);
protected:
/// Constructor. <Event> is not used on POSIX.
@@ -129,7 +129,7 @@ protected:
const void *act_;
/// Bytes transferred by this operation.
- u_long bytes_transferred_;
+ size_t bytes_transferred_;
/// Success indicator.
int success_;
@@ -235,7 +235,7 @@ class ACE_Export ACE_POSIX_Asynch_Read_Stream_Result : public virtual ACE_Asynch
public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -247,7 +247,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -298,7 +298,7 @@ protected:
ACE_POSIX_Asynch_Read_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -308,7 +308,7 @@ protected:
/// Get the data copied to this class, before calling application
/// handler.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -343,7 +343,7 @@ public:
/// This starts off an asynchronous read. Upto <bytes_to_read> will
/// be read and stored in the <message_block>.
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -399,7 +399,7 @@ class ACE_Export ACE_POSIX_Asynch_Write_Stream_Result : public virtual ACE_Async
public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block (void) const;
@@ -411,7 +411,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -464,14 +464,14 @@ protected:
ACE_POSIX_Asynch_Write_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
ACE_HANDLE event,
int priority,
int signal_number);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -507,7 +507,7 @@ public:
/// This starts off an asynchronous write. Upto <bytes_to_write>
/// will be written from the <message_block>.
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -560,7 +560,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -611,7 +611,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -628,7 +628,7 @@ protected:
ACE_POSIX_Asynch_Read_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
u_long offset,
u_long offset_high,
@@ -637,7 +637,7 @@ protected:
int signal_number);
/// ACE_Proactor will call this method when the read completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -676,7 +676,7 @@ public:
* at <offset> from the beginning of the file.
*/
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -716,7 +716,7 @@ private:
* method to <ACE_POSIX_Asynch_Read_Stream::read>.
*/
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -754,7 +754,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -805,7 +805,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block (void) const;
@@ -822,7 +822,7 @@ protected:
ACE_POSIX_Asynch_Write_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
u_long offset,
u_long offset_high,
@@ -831,7 +831,7 @@ protected:
int signal_number);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -862,7 +862,7 @@ public:
* start at <offset> from the beginning of the file.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -902,7 +902,7 @@ private:
* one.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -931,7 +931,7 @@ class ACE_Export ACE_POSIX_Asynch_Accept_Result : public virtual ACE_Asynch_Acce
public:
/// The number of bytes which were requested at the start of the
/// asynchronous accept.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -946,7 +946,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1000,14 +1000,14 @@ protected:
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
int signal_number);
/// ACE_Proactor will call this method when the accept completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1071,7 +1071,7 @@ public:
* the new connection is placed at the end of this buffer.
*/
int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -1169,7 +1169,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1226,7 +1226,7 @@ protected:
int signal_number);
/// ACE_Proactor will call this method when the accept completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1400,11 +1400,11 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous transmit file.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Number of bytes per send requested at the start of the transmit
/// file.
- u_long bytes_per_send (void) const;
+ size_t bytes_per_send (void) const;
/// Flags which were passed into transmit file.
u_long flags (void) const;
@@ -1413,7 +1413,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1465,10 +1465,10 @@ protected:
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event,
@@ -1478,7 +1478,7 @@ protected:
// ACE_Asynch_Transmit_File factory.
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1501,7 +1501,7 @@ protected:
/// Number of bytes per send requested at the start of the transmit
/// file.
- u_long bytes_per_send_;
+ size_t bytes_per_send_;
/// Flags which were passed into transmit file.
u_long flags_;
@@ -1533,10 +1533,10 @@ public:
*/
int transmit_file (ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -1662,7 +1662,7 @@ class ACE_Export ACE_POSIX_Asynch_Write_Dgram_Result : public virtual ACE_Asynch
public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block which contains the sent data
ACE_Message_Block *message_block (void) const;
@@ -1677,7 +1677,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1728,7 +1728,7 @@ protected:
int signal_number);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1738,7 +1738,7 @@ protected:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write_;
+ size_t bytes_to_write_;
/// Message block used for the send.
ACE_Message_Block *message_block_;
@@ -1851,7 +1851,7 @@ class ACE_Export ACE_POSIX_Asynch_Read_Dgram_Result : public virtual ACE_Asynch_
public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data
ACE_Message_Block *message_block (void) const;
@@ -1871,7 +1871,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1914,7 +1914,7 @@ protected:
ACE_POSIX_Asynch_Read_Dgram_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block *message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
int flags,
int protocol_family,
const void* act,
@@ -1923,7 +1923,7 @@ protected:
int signal_number = 0);
/// Proactor will call this method when the read completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1932,7 +1932,7 @@ protected:
virtual ~ACE_POSIX_Asynch_Read_Dgram_Result (void);
/// Bytes requested when the asynchronous read was initiated.
- u_long bytes_to_read_;
+ size_t bytes_to_read_;
/// Message block for reading the data into.
ACE_Message_Block *message_block_;
diff --git a/ace/POSIX_Proactor.cpp b/ace/POSIX_Proactor.cpp
index ad1e5172440..6d479cf8636 100644
--- a/ace/POSIX_Proactor.cpp
+++ b/ace/POSIX_Proactor.cpp
@@ -40,7 +40,7 @@ public:
/// This method calls the <handler>'s <handle_wakeup> method.
- virtual void complete (u_long bytes_transferred = 0,
+ virtual void complete (size_t bytes_transferred = 0,
int success = 1,
const void *completion_key = 0,
u_long error = 0);
@@ -137,7 +137,7 @@ ACE_Asynch_Read_Stream_Result_Impl *
ACE_POSIX_Proactor::create_asynch_read_stream_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -161,7 +161,7 @@ ACE_Asynch_Write_Stream_Result_Impl *
ACE_POSIX_Proactor::create_asynch_write_stream_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
ACE_HANDLE event,
int priority,
@@ -185,7 +185,7 @@ ACE_Asynch_Read_File_Result_Impl *
ACE_POSIX_Proactor::create_asynch_read_file_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
u_long offset,
u_long offset_high,
@@ -213,7 +213,7 @@ ACE_Asynch_Write_File_Result_Impl *
ACE_POSIX_Proactor::create_asynch_write_file_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
u_long offset,
u_long offset_high,
@@ -298,7 +298,7 @@ ACE_POSIX_Proactor::create_asynch_accept_result (ACE_Handler &handler,
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -344,10 +344,10 @@ ACE_POSIX_Proactor::create_asynch_transmit_file_result (ACE_Handler &handler,
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event,
@@ -428,7 +428,7 @@ ACE_POSIX_Proactor::handle_close (ACE_HANDLE handle,
void
ACE_POSIX_Proactor::application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
+ size_t bytes_transferred,
const void */* completion_key*/,
u_long error)
{
@@ -1284,7 +1284,7 @@ ACE_POSIX_AIOCB_Proactor::find_completed_aio (int &error_status,
void
ACE_POSIX_AIOCB_Proactor::application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
+ size_t bytes_transferred,
const void *completion_key,
u_long error)
{
@@ -2069,7 +2069,7 @@ ACE_POSIX_Asynch_Timer::ACE_POSIX_Asynch_Timer (ACE_Handler &handler,
}
void
-ACE_POSIX_Asynch_Timer::complete (u_long /* bytes_transferred */,
+ACE_POSIX_Asynch_Timer::complete (size_t /* bytes_transferred */,
int /* success */,
const void * /* completion_key */,
u_long /* error */)
@@ -2094,7 +2094,7 @@ ACE_POSIX_Wakeup_Completion::~ACE_POSIX_Wakeup_Completion (void)
}
void
-ACE_POSIX_Wakeup_Completion::complete (u_long /* bytes_transferred */,
+ACE_POSIX_Wakeup_Completion::complete (size_t /* bytes_transferred */,
int /* success */,
const void * /* completion_key */,
u_long /* error */)
diff --git a/ace/POSIX_Proactor.h b/ace/POSIX_Proactor.h
index 14ac48d9440..0aa730d9180 100644
--- a/ace/POSIX_Proactor.h
+++ b/ace/POSIX_Proactor.h
@@ -131,7 +131,7 @@ public:
virtual ACE_Asynch_Read_Stream_Result_Impl *create_asynch_read_stream_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
ACE_HANDLE event = ACE_INVALID_HANDLE,
int priority = 0,
@@ -140,7 +140,7 @@ public:
virtual ACE_Asynch_Write_Stream_Result_Impl *create_asynch_write_stream_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
ACE_HANDLE event = ACE_INVALID_HANDLE,
int priority = 0,
@@ -149,7 +149,7 @@ public:
virtual ACE_Asynch_Read_File_Result_Impl *create_asynch_read_file_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
u_long offset,
u_long offset_high,
@@ -160,7 +160,7 @@ public:
virtual ACE_Asynch_Write_File_Result_Impl *create_asynch_write_file_result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
u_long offset,
u_long offset_high,
@@ -193,7 +193,7 @@ public:
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
ACE_HANDLE event = ACE_INVALID_HANDLE,
int priority = 0,
@@ -210,10 +210,10 @@ public:
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event = ACE_INVALID_HANDLE,
@@ -240,7 +240,7 @@ protected:
* POSIX Proators.
*/
void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
+ size_t bytes_transferred,
const void *completion_key,
u_long error);
@@ -394,7 +394,7 @@ protected:
/// We will call the base class's application_specific_code from
/// here.
void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
+ size_t bytes_transferred,
const void *completion_key,
u_long error);
@@ -611,7 +611,7 @@ protected:
virtual ~ACE_POSIX_Asynch_Timer (void) {}
/// This method calls the <handler>'s handle_timeout method.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error = 0);
diff --git a/ace/SOCK_Dgram.i b/ace/SOCK_Dgram.i
index 8a7c094f8a5..502063aecab 100644
--- a/ace/SOCK_Dgram.i
+++ b/ace/SOCK_Dgram.i
@@ -27,7 +27,7 @@ ACE_SOCK_Dgram::send (const void *buf,
{
ACE_TRACE ("ACE_SOCK_Dgram::send");
sockaddr *saddr = (sockaddr *) addr.get_addr ();
- size_t len = addr.get_size ();
+ int len = addr.get_size ();
return ACE_OS::sendto (this->get_handle (),
(const char *) buf,
n,
@@ -69,7 +69,7 @@ ACE_SOCK_Dgram::send (const iovec buffers[],
{
ACE_TRACE ("ACE_SOCK_Dgram::send");
sockaddr *saddr = (sockaddr *) addr.get_addr ();
- size_t len = addr.get_size ();
+ int len = addr.get_size ();
return ACE_OS::sendto (this->get_handle (),
buffers,
buffer_count,
diff --git a/ace/SPIPE_Stream.h b/ace/SPIPE_Stream.h
index 65d1ca36062..ad778fda45d 100644
--- a/ace/SPIPE_Stream.h
+++ b/ace/SPIPE_Stream.h
@@ -86,10 +86,10 @@ public:
int *flags) const;
/// Send iovecs via <::writev>.
- ssize_t send (const iovec iov[], size_t n) const;
+ ssize_t send (const iovec iov[], int n) const;
/// Recv iovecs via <::readv>.
- ssize_t recv (iovec iov[], size_t n) const;
+ ssize_t recv (iovec iov[], int n) const;
/**
* Send N char *ptrs and int lengths. Note that the char *'s
@@ -116,16 +116,16 @@ public:
/// Send an <iovec> of size <n> to the stream.
ssize_t sendv (const iovec iov[],
- size_t n) const;
+ int n) const;
/// Send an <iovec> of size <n> to the stream. Will block until all
/// bytes are sent or an error occurs.
ssize_t sendv_n (const iovec iov[],
- size_t n) const;
+ int n) const;
/// Receive an <iovec> of size <n> to the stream.
ssize_t recvv_n (iovec iov[],
- size_t n) const;
+ int n) const;
// = Meta-type info
typedef ACE_SPIPE_Addr PEER_ADDR;
diff --git a/ace/SPIPE_Stream.i b/ace/SPIPE_Stream.i
index 4733a628815..4c458e7c3ad 100644
--- a/ace/SPIPE_Stream.i
+++ b/ace/SPIPE_Stream.i
@@ -76,14 +76,14 @@ ACE_SPIPE_Stream::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *fl
}
ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const iovec iov[], size_t n) const
+ACE_SPIPE_Stream::send (const iovec iov[], int n) const
{
ACE_TRACE ("ACE_SPIPE_Stream::send");
return ACE_OS::writev (this->get_handle (), iov, n);
}
ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (iovec iov[], size_t n) const
+ACE_SPIPE_Stream::recv (iovec iov[], int n) const
{
ACE_TRACE ("ACE_SPIPE_Stream::recv");
return ACE_OS::readv (this->get_handle (), iov, n);
@@ -162,7 +162,7 @@ ACE_SPIPE_Stream::recv (void *buf, size_t n,
ASYS_INLINE ssize_t
ACE_SPIPE_Stream::sendv_n (const iovec iov[],
- size_t n) const
+ int n) const
{
ACE_TRACE ("ACE_SPIPE_Stream::sendv_n");
return ACE::writev_n (this->get_handle (),
@@ -174,7 +174,7 @@ ACE_SPIPE_Stream::sendv_n (const iovec iov[],
ASYS_INLINE ssize_t
ACE_SPIPE_Stream::recvv_n (iovec iov[],
- size_t n) const
+ int n) const
{
ACE_TRACE ("ACE_SPIPE_Stream::recvv_n");
// @@ Carlos, can you please update this to call the
@@ -188,7 +188,7 @@ ACE_SPIPE_Stream::recvv_n (iovec iov[],
ASYS_INLINE ssize_t
ACE_SPIPE_Stream::sendv (const iovec iov[],
- size_t n) const
+ int n) const
{
ACE_TRACE ("ACE_SPIPE_Stream::sendv");
return ACE_OS::writev (this->get_handle (),
diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp
index f8c3052e2f2..eee0936a94e 100644
--- a/ace/Strategies_T.cpp
+++ b/ace/Strategies_T.cpp
@@ -210,7 +210,7 @@ ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handl
template <class SVC_HANDLER> int
ACE_Thread_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr,
long thr_flags,
- size_t n_threads,
+ int n_threads,
int flags)
{
ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::open");
diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h
index 9f69808bef7..eade82c392e 100644
--- a/ace/Strategies_T.h
+++ b/ace/Strategies_T.h
@@ -331,13 +331,13 @@ public:
/// Initialize the strategy.
ACE_Thread_Strategy (ACE_Thread_Manager *tm,
long thr_flags,
- size_t n_threads = 1,
+ int n_threads = 1,
int flags = 0);
/// Initialize the strategy.
virtual int open (ACE_Thread_Manager *tm,
long thr_flags,
- size_t n_threads = 1,
+ int n_threads = 1,
int flags = 0);
virtual ~ACE_Thread_Strategy (void);
@@ -368,7 +368,7 @@ protected:
long thr_flags_;
/// Number of threads to spawn.
- size_t n_threads_;
+ int n_threads_;
};
/**
diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i
index b296457a9e5..41582fc6e95 100644
--- a/ace/Strategies_T.i
+++ b/ace/Strategies_T.i
@@ -164,7 +164,7 @@ ACE_Reactive_Strategy<SVC_HANDLER>::~ACE_Reactive_Strategy (void)
template <class SVC_HANDLER> ASYS_INLINE
ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_mgr,
long thr_flags,
- size_t n_threads,
+ int n_threads,
int flags)
{
ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy");
diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp
index 859e2369839..9ca3ddfd6eb 100644
--- a/ace/Stream_Modules.cpp
+++ b/ace/Stream_Modules.cpp
@@ -140,7 +140,7 @@ ACE_Stream_Head<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_OS::strlen (name);
+ return ACE_static_cast (int, ACE_OS_String::strlen (name));
}
template <ACE_SYNCH_DECL> int
@@ -279,7 +279,7 @@ ACE_Stream_Tail<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_OS::strlen (name);
+ return ACE_static_cast (int, ACE_OS_String::strlen (name));
}
template <ACE_SYNCH_DECL> int
@@ -356,7 +356,7 @@ ACE_Thru_Task<ACE_SYNCH_USE>::info (ACE_TCHAR **strp,
return -1;
else
ACE_OS::strsncpy (*strp, name, length);
- return ACE_OS::strlen (name);
+ return ACE_static_cast (int, ACE_OS_String::strlen (name));
}
template <ACE_SYNCH_DECL> int
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
index f4fcffb051f..b26b37a8345 100644
--- a/ace/WIN32_Asynch_IO.cpp
+++ b/ace/WIN32_Asynch_IO.cpp
@@ -12,7 +12,7 @@
#include "ace/INET_Addr.h"
#include "ace/Task_T.h"
-u_long
+size_t
ACE_WIN32_Asynch_Result::bytes_transferred (void) const
{
return this->bytes_transferred_;
@@ -89,7 +89,7 @@ ACE_WIN32_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor)
}
void
-ACE_WIN32_Asynch_Result::set_bytes_transferred (u_long nbytes)
+ACE_WIN32_Asynch_Result::set_bytes_transferred (size_t nbytes)
{
this->bytes_transferred_ = nbytes;
}
@@ -200,7 +200,7 @@ ACE_WIN32_Asynch_Operation::~ACE_WIN32_Asynch_Operation (void)
// ************************************************************
-u_long
+size_t
ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read (void) const
{
return this->bytes_to_read_;
@@ -221,7 +221,7 @@ ACE_WIN32_Asynch_Read_Stream_Result::handle (void) const
ACE_WIN32_Asynch_Read_Stream_Result::ACE_WIN32_Asynch_Read_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -238,7 +238,7 @@ ACE_WIN32_Asynch_Read_Stream_Result::ACE_WIN32_Asynch_Read_Stream_Result (ACE_Ha
}
void
-ACE_WIN32_Asynch_Read_Stream_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Read_Stream_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -283,7 +283,7 @@ ACE_WIN32_Asynch_Read_Stream_Result::~ACE_WIN32_Asynch_Read_Stream_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Read_Stream_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -364,16 +364,16 @@ ACE_WIN32_Asynch_Read_Stream::ACE_WIN32_Asynch_Read_Stream (ACE_WIN32_Proactor *
int
ACE_WIN32_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
{
- u_long space = message_block.space ();
- if ( bytes_to_read > space )
+ size_t space = message_block.space ();
+ if (bytes_to_read > space)
bytes_to_read = space;
- if ( bytes_to_read == 0 )
+ if (bytes_to_read == 0)
ACE_ERROR_RETURN
((LM_ERROR,
ACE_LIB_TEXT ("ACE_WIN32_Asynch_Read_Stream::read:")
@@ -406,7 +406,7 @@ ACE_WIN32_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
@@ -471,7 +471,7 @@ ACE_WIN32_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
result->set_error (0); // Clear error before starting IO.
- u_long bytes_recvd = 0;
+ DWORD bytes_recvd = 0;
u_long flags = 0;
int initiate_result = ::WSARecv (ACE_reinterpret_cast (SOCKET, result->handle ()),
@@ -590,7 +590,7 @@ ACE_WIN32_Asynch_Read_Stream::proactor (void) const
return ACE_WIN32_Asynch_Operation::proactor ();
}
-u_long
+size_t
ACE_WIN32_Asynch_Write_Stream_Result::bytes_to_write (void) const
{
return this->bytes_to_write_;
@@ -611,7 +611,7 @@ ACE_WIN32_Asynch_Write_Stream_Result::handle (void) const
ACE_WIN32_Asynch_Write_Stream_Result::ACE_WIN32_Asynch_Write_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
ACE_HANDLE event,
int priority,
@@ -628,7 +628,7 @@ ACE_WIN32_Asynch_Write_Stream_Result::ACE_WIN32_Asynch_Write_Stream_Result (ACE_
}
void
-ACE_WIN32_Asynch_Write_Stream_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Write_Stream_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -673,7 +673,7 @@ ACE_WIN32_Asynch_Write_Stream_Result::~ACE_WIN32_Asynch_Write_Stream_Result (voi
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Write_Stream_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -754,12 +754,12 @@ ACE_WIN32_Asynch_Write_Stream::ACE_WIN32_Asynch_Write_Stream (ACE_WIN32_Proactor
int
ACE_WIN32_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
{
- u_long len = message_block.length();
+ size_t len = message_block.length();
if ( bytes_to_write > len )
bytes_to_write = len ;
@@ -795,7 +795,7 @@ ACE_WIN32_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
@@ -976,7 +976,7 @@ ACE_WIN32_Asynch_Write_Stream::proactor (void) const
ACE_WIN32_Asynch_Read_File_Result::ACE_WIN32_Asynch_Read_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
u_long offset,
u_long offset_high,
@@ -1002,7 +1002,7 @@ ACE_WIN32_Asynch_Read_File_Result::ACE_WIN32_Asynch_Read_File_Result (ACE_Handle
}
void
-ACE_WIN32_Asynch_Read_File_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Read_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -1053,7 +1053,7 @@ ACE_WIN32_Asynch_Read_File_Result::~ACE_WIN32_Asynch_Read_File_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Read_File_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -1118,7 +1118,7 @@ ACE_WIN32_Asynch_Read_File_Result::signal_number (void) const
// warnings. These methods route their call to the
// ACE_WIN32_Asynch_Read_Stream_Result base class.
-u_long
+size_t
ACE_WIN32_Asynch_Read_File_Result::bytes_to_read (void) const
{
return ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read ();
@@ -1154,14 +1154,14 @@ ACE_WIN32_Asynch_Read_File::ACE_WIN32_Asynch_Read_File (ACE_WIN32_Proactor *win3
int
ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
int priority,
int signal_number)
{
- u_long space = message_block.space ();
+ size_t space = message_block.space ();
if ( bytes_to_read > space )
bytes_to_read = space;
@@ -1199,7 +1199,7 @@ ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -1217,7 +1217,7 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
// We should not read more than user requested,
// but it is allowed to read less
- u_long total_space = 0;
+ size_t total_space = 0;
for (const ACE_Message_Block* msg = &message_block;
msg != 0 && buffer_pointers_count < ACE_IOV_MAX && total_space < bytes_to_read;
@@ -1225,36 +1225,22 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
{
size_t msg_space = msg->space ();
- if ( msg_space < page_size )
+ if (msg_space < page_size)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("ACE_WIN32_Asynch_Read_File::readv:")
ACE_LIB_TEXT ("Invalid message block size\n")),
-1);
- *ACE_reinterpret_cast (size_t *, &buffer_pointers[buffer_pointers_count])
- = ACE_reinterpret_cast (size_t, msg->wr_ptr ());
-
- *ACE_reinterpret_cast (size_t *,
- ACE_reinterpret_cast (char *,
- &buffer_pointers[buffer_pointers_count]) + 4)
- = 0;
-
+ buffer_pointers[buffer_pointers_count].Buffer = msg->wr_ptr ();
total_space += page_size;
}
// not read more than buffers space
- if ( bytes_to_read > total_space )
+ if (bytes_to_read > total_space)
bytes_to_read = total_space;
// last one should be completely 0
- *ACE_reinterpret_cast (size_t *, &buffer_pointers[buffer_pointers_count])
- = 0;
- *ACE_reinterpret_cast (size_t *,
- ACE_reinterpret_cast (char *,
- &buffer_pointers[buffer_pointers_count]) + 4)
- = 0;
-
-
+ buffer_pointers[buffer_pointers_count].Buffer = 0;
ACE_WIN32_Asynch_Read_File_Result *result = 0;
ACE_NEW_RETURN (result,
@@ -1319,7 +1305,7 @@ ACE_WIN32_Asynch_Read_File::~ACE_WIN32_Asynch_Read_File (void)
int
ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
@@ -1333,7 +1319,7 @@ ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number)
@@ -1376,7 +1362,7 @@ ACE_WIN32_Asynch_Read_File::proactor (void) const
ACE_WIN32_Asynch_Write_File_Result::ACE_WIN32_Asynch_Write_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
u_long offset,
u_long offset_high,
@@ -1402,7 +1388,7 @@ ACE_WIN32_Asynch_Write_File_Result::ACE_WIN32_Asynch_Write_File_Result (ACE_Hand
}
void
-ACE_WIN32_Asynch_Write_File_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Write_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -1454,7 +1440,7 @@ ACE_WIN32_Asynch_Write_File_Result::~ACE_WIN32_Asynch_Write_File_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Write_File_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -1519,7 +1505,7 @@ ACE_WIN32_Asynch_Write_File_Result::signal_number (void) const
// warnings. These methods route their call to the
// ACE_WIN32_Asynch_Write_Stream_Result base class.
-u_long
+size_t
ACE_WIN32_Asynch_Write_File_Result::bytes_to_write (void) const
{
return ACE_WIN32_Asynch_Write_Stream_Result::bytes_to_write ();
@@ -1553,14 +1539,14 @@ ACE_WIN32_Asynch_Write_File::ACE_WIN32_Asynch_Write_File (ACE_WIN32_Proactor *wi
int
ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
int priority,
int signal_number)
{
- u_long len = message_block.length ();
+ size_t len = message_block.length ();
if ( bytes_to_write > len )
bytes_to_write = len;
@@ -1597,7 +1583,7 @@ ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -1615,7 +1601,7 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
// We should not read more than user requested,
// but it is allowed to read less
- u_long total_len = 0;
+ size_t total_len = 0;
for (const ACE_Message_Block* msg = &message_block;
msg != 0 && buffer_pointers_count < ACE_IOV_MAX && total_len < bytes_to_write;
@@ -1624,40 +1610,27 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
size_t msg_len = msg->length ();
// Don't allow writing less than page_size, unless
- // the size of the message block is big enough (so we don't write from memory which
- // does not belong to the message block), and the message block is the last in the chain
- if ( msg_len < page_size &&
- (msg->size () - (msg->rd_ptr () - msg->base ()) < page_size || // message block too small
- bytes_to_write - total_len > page_size ))// NOT last chunk
+ // the size of the message block is big enough (so we don't write from
+ // memory which does not belong to the message block), and the message
+ // block is the last in the chain.
+ if (msg_len < page_size &&
+ (msg->size () - (msg->rd_ptr () - msg->base ()) < page_size || // message block too small
+ bytes_to_write - total_len > page_size ))// NOT last chunk
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("ACE_WIN32_Asynch_Write_File::writev:")
ACE_LIB_TEXT ("Invalid message block length\n")),
-1);
- *ACE_reinterpret_cast (size_t *, &buffer_pointers[buffer_pointers_count])
- = ACE_reinterpret_cast (size_t, msg->rd_ptr ());
-
- *ACE_reinterpret_cast (size_t *,
- ACE_reinterpret_cast (char *,
- &buffer_pointers[buffer_pointers_count]) + 4)
- = 0;
-
+ buffer_pointers[buffer_pointers_count].Buffer = msg->rd_ptr ();
total_len += page_size;
}
// not write more than we have in buffers
- if ( bytes_to_write > total_len )
+ if (bytes_to_write > total_len)
bytes_to_write = total_len;
// last one should be completely 0
- *ACE_reinterpret_cast (size_t *, &buffer_pointers[buffer_pointers_count])
- = 0;
- *ACE_reinterpret_cast (size_t *,
- ACE_reinterpret_cast (char *,
- &buffer_pointers[buffer_pointers_count]) + 4)
- = 0;
-
-
+ buffer_pointers[buffer_pointers_count].Buffer = 0;
ACE_WIN32_Asynch_Write_File_Result *result = 0;
ACE_NEW_RETURN (result,
@@ -1722,7 +1695,7 @@ ACE_WIN32_Asynch_Write_File::~ACE_WIN32_Asynch_Write_File (void)
int
ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
@@ -1736,7 +1709,7 @@ ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
int
ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number)
@@ -1776,7 +1749,7 @@ ACE_WIN32_Asynch_Write_File::proactor (void) const
return ACE_WIN32_Asynch_Operation::proactor ();
}
-u_long
+size_t
ACE_WIN32_Asynch_Accept_Result::bytes_to_read (void) const
{
return this->bytes_to_read_;
@@ -1804,7 +1777,7 @@ ACE_WIN32_Asynch_Accept_Result::ACE_WIN32_Asynch_Accept_Result (ACE_Handler &han
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -1820,7 +1793,7 @@ ACE_WIN32_Asynch_Accept_Result::ACE_WIN32_Asynch_Accept_Result (ACE_Handler &han
}
void
-ACE_WIN32_Asynch_Accept_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Accept_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -1848,7 +1821,7 @@ ACE_WIN32_Asynch_Accept_Result::~ACE_WIN32_Asynch_Accept_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Accept_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -1923,7 +1896,7 @@ ACE_WIN32_Asynch_Accept::ACE_WIN32_Asynch_Accept (ACE_WIN32_Proactor *win32_proa
int
ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -2094,7 +2067,7 @@ ACE_WIN32_Asynch_Connect_Result::ACE_WIN32_Asynch_Connect_Result
}
void
-ACE_WIN32_Asynch_Connect_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Connect_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -2119,7 +2092,7 @@ ACE_WIN32_Asynch_Connect_Result::~ACE_WIN32_Asynch_Connect_Result (void)
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Connect_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -2727,13 +2700,13 @@ ACE_WIN32_Asynch_Transmit_File_Result::header_and_trailer (void) const
return this->header_and_trailer_;
}
-u_long
+size_t
ACE_WIN32_Asynch_Transmit_File_Result::bytes_to_write (void) const
{
return this->bytes_to_write_;
}
-u_long
+size_t
ACE_WIN32_Asynch_Transmit_File_Result::bytes_per_send (void) const
{
return this->bytes_per_send_;
@@ -2749,10 +2722,10 @@ ACE_WIN32_Asynch_Transmit_File_Result::ACE_WIN32_Asynch_Transmit_File_Result (AC
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event,
@@ -2771,7 +2744,7 @@ ACE_WIN32_Asynch_Transmit_File_Result::ACE_WIN32_Asynch_Transmit_File_Result (AC
}
void
-ACE_WIN32_Asynch_Transmit_File_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Transmit_File_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -2812,7 +2785,7 @@ ACE_WIN32_Asynch_Transmit_File_Result::~ACE_WIN32_Asynch_Transmit_File_Result (v
// Base class operations. These operations are here to kill dominance
// warnings. These methods call the base class methods.
-u_long
+size_t
ACE_WIN32_Asynch_Transmit_File_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -2888,10 +2861,10 @@ ACE_WIN32_Asynch_Transmit_File::ACE_WIN32_Asynch_Transmit_File (ACE_WIN32_Proact
int
ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -3002,7 +2975,7 @@ ACE_WIN32_Asynch_Transmit_File::proactor (void) const
return ACE_WIN32_Asynch_Operation::proactor ();
}
-u_long
+size_t
ACE_WIN32_Asynch_Read_Dgram_Result::bytes_to_read (void) const
{
return this->bytes_to_read_;
@@ -3050,7 +3023,7 @@ ACE_WIN32_Asynch_Read_Dgram_Result::handle (void) const
return this->handle_;
}
-u_long
+size_t
ACE_WIN32_Asynch_Read_Dgram_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -3119,7 +3092,7 @@ ACE_WIN32_Asynch_Read_Dgram_Result::post_completion (ACE_Proactor_Impl *proactor
ACE_WIN32_Asynch_Read_Dgram_Result::ACE_WIN32_Asynch_Read_Dgram_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block *message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
int flags,
int protocol_family,
const void* act,
@@ -3143,7 +3116,7 @@ ACE_WIN32_Asynch_Read_Dgram_Result::ACE_WIN32_Asynch_Read_Dgram_Result (ACE_Hand
}
void
-ACE_WIN32_Asynch_Read_Dgram_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Read_Dgram_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -3201,7 +3174,7 @@ ACE_WIN32_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block,
{
number_of_bytes_recvd = 0;
- u_long bytes_to_read = 0;
+ size_t bytes_to_read = 0;
iovec iov[ACE_IOV_MAX];
int iovcnt = 0;
@@ -3225,7 +3198,7 @@ ACE_WIN32_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block,
bytes_to_read += msg_space;
}
- if ( bytes_to_read == 0 )
+ if (bytes_to_read == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_LIB_TEXT ("ACE_WIN32_Asynch_Read_Dgram::recv:")
ACE_LIB_TEXT ("Attempt to read 0 bytes\n")),
@@ -3332,7 +3305,7 @@ ACE_WIN32_Asynch_Read_Dgram::ACE_WIN32_Asynch_Read_Dgram (ACE_WIN32_Proactor *wi
//***********************************************
-u_long
+size_t
ACE_WIN32_Asynch_Write_Dgram_Result::bytes_to_write (void) const
{
return this->bytes_to_write_;
@@ -3356,7 +3329,7 @@ ACE_WIN32_Asynch_Write_Dgram_Result::handle (void) const
return this->handle_;
}
-u_long
+size_t
ACE_WIN32_Asynch_Write_Dgram_Result::bytes_transferred (void) const
{
return ACE_WIN32_Asynch_Result::bytes_transferred ();
@@ -3442,7 +3415,7 @@ ACE_WIN32_Asynch_Write_Dgram_Result::ACE_WIN32_Asynch_Write_Dgram_Result (ACE_Ha
}
void
-ACE_WIN32_Asynch_Write_Dgram_Result::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Write_Dgram_Result::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -3497,7 +3470,7 @@ ACE_WIN32_Asynch_Write_Dgram::send (ACE_Message_Block *message_block,
{
number_of_bytes_sent = 0;
- u_long bytes_to_write = 0;
+ size_t bytes_to_write = 0;
iovec iov[ACE_IOV_MAX];
int iovcnt = 0;
diff --git a/ace/WIN32_Asynch_IO.h b/ace/WIN32_Asynch_IO.h
index f7e3a67ae99..3cdb6f14c22 100644
--- a/ace/WIN32_Asynch_IO.h
+++ b/ace/WIN32_Asynch_IO.h
@@ -68,7 +68,7 @@ class ACE_Export ACE_WIN32_Asynch_Result : public virtual ACE_Asynch_Result_Impl
public:
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -112,7 +112,7 @@ public:
void set_error (u_long errcode);
/// Simulate value to use in the post_completion ()
- void set_bytes_transferred (u_long nbytes);
+ void set_bytes_transferred (size_t nbytes);
protected:
/// Constructor.
@@ -131,7 +131,7 @@ protected:
const void *act_;
/// Bytes transferred by this operation.
- u_long bytes_transferred_;
+ size_t bytes_transferred_;
/// Success indicator.
int success_;
@@ -214,7 +214,7 @@ class ACE_Export ACE_WIN32_Asynch_Read_Stream_Result : public virtual ACE_Asynch
public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -226,7 +226,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -272,7 +272,7 @@ protected:
ACE_WIN32_Asynch_Read_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
@@ -280,7 +280,7 @@ protected:
int scatter_enabled = 0);
/// Proactor will call this method when the read completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -289,7 +289,7 @@ protected:
virtual ~ACE_WIN32_Asynch_Read_Stream_Result (void);
/// Bytes requested when the asynchronous read was initiated.
- u_long bytes_to_read_;
+ size_t bytes_to_read_;
/// Message block for reading the data into.
ACE_Message_Block &message_block_;
@@ -324,7 +324,7 @@ public:
/// This starts off an asynchronous read. Upto <bytes_to_read> will
/// be read and stored in the <message_block>.
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -334,7 +334,7 @@ public:
* message blocks using the continuation field.
*/
int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -391,7 +391,7 @@ class ACE_Export ACE_WIN32_Asynch_Write_Stream_Result : public virtual ACE_Async
public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block (void) const;
@@ -403,7 +403,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -449,7 +449,7 @@ protected:
ACE_WIN32_Asynch_Write_Stream_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
ACE_HANDLE event,
int priority,
@@ -457,7 +457,7 @@ protected:
int gather_enabled = 0);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -467,7 +467,7 @@ protected:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write_;
+ size_t bytes_to_write_;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block_;
@@ -502,7 +502,7 @@ public:
/// This starts off an asynchronous write. Upto <bytes_to_write>
/// will be written from the <message_block>.
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -512,7 +512,7 @@ public:
* message blocks using the continuation field.
*/
int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -573,7 +573,7 @@ public:
// methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -614,7 +614,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -631,7 +631,7 @@ protected:
ACE_WIN32_Asynch_Read_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
u_long offset,
u_long offset_high,
@@ -641,7 +641,7 @@ protected:
int scatter_enabled = 0);
/// ACE_Proactor will call this method when the read completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -679,7 +679,7 @@ public:
* at <offset> from the beginning of the file.
*/
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -693,7 +693,7 @@ public:
* and must be aligned on a system memory page size boundary
*/
int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
u_long offset,
u_long offset_high,
const void *act,
@@ -735,7 +735,7 @@ private:
* ACE_WIN32_Asynch_Read_Stream class.
*/
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -745,7 +745,7 @@ private:
* message blocks using the continuation field.
*/
int readv (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void *act,
int priority,
int signal_number = 0);
@@ -782,7 +782,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -823,7 +823,7 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block that contains the data to be written.
ACE_Message_Block &message_block (void) const;
@@ -840,7 +840,7 @@ protected:
ACE_WIN32_Asynch_Write_File_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void* act,
u_long offset,
u_long offset_high,
@@ -850,7 +850,7 @@ protected:
int gather_enabled = 0);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -884,7 +884,7 @@ public:
* start at <offset> from the beginning of the file.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -898,7 +898,7 @@ public:
* and must be aligned on a system memory page size boundary
*/
int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
const void *act,
@@ -940,7 +940,7 @@ private:
* ACE_WIN32_Asynch_Write_Stream class.
*/
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -950,7 +950,7 @@ private:
* message blocks using the continuation field.
*/
int writev (ACE_Message_Block &message_block,
- u_long bytes_to_write,
+ size_t bytes_to_write,
const void *act,
int priority,
int signal_number = 0);
@@ -978,7 +978,7 @@ class ACE_Export ACE_WIN32_Asynch_Accept_Result : public virtual ACE_Asynch_Acce
public:
/// The number of bytes which were requested at the start of the
/// asynchronous accept.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data.
ACE_Message_Block &message_block (void) const;
@@ -993,7 +993,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1037,14 +1037,14 @@ protected:
ACE_HANDLE listen_handle,
ACE_HANDLE accept_handle,
ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
const void* act,
ACE_HANDLE event,
int priority,
int signal_number = 0);
/// ACE_Proactor will call this method when the accept completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1053,7 +1053,7 @@ protected:
virtual ~ACE_WIN32_Asynch_Accept_Result (void);
/// Bytes requested when the asynchronous read was initiated.
- u_long bytes_to_read_;
+ size_t bytes_to_read_;
/// Message block for reading the data into.
ACE_Message_Block &message_block_;
@@ -1096,7 +1096,7 @@ public:
* the new connection is placed at the end of this buffer.
*/
int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
ACE_HANDLE accept_handle,
const void *act,
int priority,
@@ -1159,7 +1159,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1207,7 +1207,7 @@ protected:
int signal_number);
/// ACE_Proactor will call this method when the accept completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1378,11 +1378,11 @@ public:
/// The number of bytes which were requested at the start of the
/// asynchronous transmit file.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Number of bytes per send requested at the start of the transmit
/// file.
- u_long bytes_per_send (void) const;
+ size_t bytes_per_send (void) const;
/// Flags which were passed into transmit file.
u_long flags (void) const;
@@ -1391,7 +1391,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1435,10 +1435,10 @@ protected:
ACE_HANDLE socket,
ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
ACE_HANDLE event,
@@ -1446,7 +1446,7 @@ protected:
int signal_number = 0);
/// Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1465,11 +1465,11 @@ protected:
/// The number of bytes which were requested at the start of the
/// asynchronous transmit file.
- u_long bytes_to_write_;
+ size_t bytes_to_write_;
/// Number of bytes per send requested at the start of the transmit
/// file.
- u_long bytes_per_send_;
+ size_t bytes_per_send_;
/// Flags which were passed into transmit file.
u_long flags_;
@@ -1514,10 +1514,10 @@ public:
*/
int transmit_file (ACE_HANDLE file,
ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
+ size_t bytes_to_write,
u_long offset,
u_long offset_high,
- u_long bytes_per_send,
+ size_t bytes_per_send,
u_long flags,
const void *act,
int priority,
@@ -1570,7 +1570,7 @@ class ACE_Export ACE_WIN32_Asynch_Read_Dgram_Result : public virtual ACE_Asynch_
public:
/// The number of bytes which were requested at the start of the
/// asynchronous read.
- u_long bytes_to_read (void) const;
+ size_t bytes_to_read (void) const;
/// Message block which contains the read data
ACE_Message_Block *message_block (void) const;
@@ -1590,7 +1590,7 @@ public:
// dominance warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1633,7 +1633,7 @@ protected:
ACE_WIN32_Asynch_Read_Dgram_Result (ACE_Handler &handler,
ACE_HANDLE handle,
ACE_Message_Block *message_block,
- u_long bytes_to_read,
+ size_t bytes_to_read,
int flags,
int protocol_family,
const void* act,
@@ -1642,7 +1642,7 @@ protected:
int signal_number = 0);
/// Proactor will call this method when the read completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1651,7 +1651,7 @@ protected:
virtual ~ACE_WIN32_Asynch_Read_Dgram_Result (void);
/// Bytes requested when the asynchronous read was initiated.
- u_long bytes_to_read_;
+ size_t bytes_to_read_;
/// Message block for reading the data into.
ACE_Message_Block *message_block_;
@@ -1764,7 +1764,7 @@ class ACE_Export ACE_WIN32_Asynch_Write_Dgram_Result : public virtual ACE_Asynch
public:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write (void) const;
+ size_t bytes_to_write (void) const;
/// Message block which contains the sent data
ACE_Message_Block *message_block (void) const;
@@ -1779,7 +1779,7 @@ public:
// warnings. These methods call the base class methods.
/// Number of bytes transferred by the operation.
- u_long bytes_transferred (void) const;
+ size_t bytes_transferred (void) const;
/// ACT associated with the operation.
const void *act (void) const;
@@ -1830,7 +1830,7 @@ protected:
int signal_number = 0);
/// ACE_Proactor will call this method when the write completes.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error);
@@ -1840,7 +1840,7 @@ protected:
/// The number of bytes which were requested at the start of the
/// asynchronous write.
- u_long bytes_to_write_;
+ size_t bytes_to_write_;
/// Message block used for the send.
ACE_Message_Block *message_block_;
diff --git a/ace/WIN32_Proactor.cpp b/ace/WIN32_Proactor.cpp
index 2f127ea46b4..e502b9bef4c 100644
--- a/ace/WIN32_Proactor.cpp
+++ b/ace/WIN32_Proactor.cpp
@@ -32,7 +32,7 @@ public:
virtual ~ACE_WIN32_Wakeup_Completion (void);
/// This method calls the <handler>'s <handle_wakeup> method.
- virtual void complete (u_long bytes_transferred = 0,
+ virtual void complete (size_t bytes_transferred = 0,
int success = 1,
const void *completion_key = 0,
u_long error = 0);
@@ -760,7 +760,7 @@ ACE_WIN32_Asynch_Timer::ACE_WIN32_Asynch_Timer (ACE_Handler &handler,
}
void
-ACE_WIN32_Asynch_Timer::complete (u_long bytes_transferred,
+ACE_WIN32_Asynch_Timer::complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error)
@@ -788,7 +788,7 @@ ACE_WIN32_Wakeup_Completion::~ACE_WIN32_Wakeup_Completion (void)
}
void
-ACE_WIN32_Wakeup_Completion::complete (u_long /* bytes_transferred */,
+ACE_WIN32_Wakeup_Completion::complete (size_t /* bytes_transferred */,
int /* success */,
const void * /* completion_key */,
u_long /* error */)
diff --git a/ace/WIN32_Proactor.h b/ace/WIN32_Proactor.h
index 7cc9b083708..8c6d34c6697 100644
--- a/ace/WIN32_Proactor.h
+++ b/ace/WIN32_Proactor.h
@@ -309,7 +309,7 @@ protected:
int signal_number = 0);
/// This method calls the <handler>'s handle_timeout method.
- virtual void complete (u_long bytes_transferred,
+ virtual void complete (size_t bytes_transferred,
int success,
const void *completion_key,
u_long error = 0);
diff --git a/ace/ace_dll64.mak b/ace/ace_dll64.mak
index b96042ff477..6c5554cdb7a 100644
--- a/ace/ace_dll64.mak
+++ b/ace/ace_dll64.mak
@@ -102,7 +102,6 @@ CLEAN :
-@erase "$(INTDIR)\Handle_Ops.obj"
-@erase "$(INTDIR)\Handle_Set.obj"
-@erase "$(INTDIR)\Hash_Map_Manager.obj"
- -@erase "$(INTDIR)\Hash_Map_Manager_rt.obj"
-@erase "$(INTDIR)\Hashable.obj"
-@erase "$(INTDIR)\High_Res_Timer.obj"
-@erase "$(INTDIR)\INET_Addr.obj"
@@ -389,7 +388,6 @@ LINK32_OBJS= \
"$(INTDIR)\Handle_Ops.obj" \
"$(INTDIR)\Handle_Set.obj" \
"$(INTDIR)\Hash_Map_Manager.obj" \
- "$(INTDIR)\Hash_Map_Manager_rt.obj" \
"$(INTDIR)\Hashable.obj" \
"$(INTDIR)\High_Res_Timer.obj" \
"$(INTDIR)\INET_Addr.obj" \
@@ -642,7 +640,6 @@ CLEAN :
-@erase "$(INTDIR)\Handle_Ops.obj"
-@erase "$(INTDIR)\Handle_Set.obj"
-@erase "$(INTDIR)\Hash_Map_Manager.obj"
- -@erase "$(INTDIR)\Hash_Map_Manager_rt.obj"
-@erase "$(INTDIR)\Hashable.obj"
-@erase "$(INTDIR)\High_Res_Timer.obj"
-@erase "$(INTDIR)\INET_Addr.obj"
@@ -929,7 +926,6 @@ LINK32_OBJS= \
"$(INTDIR)\Handle_Ops.obj" \
"$(INTDIR)\Handle_Set.obj" \
"$(INTDIR)\Hash_Map_Manager.obj" \
- "$(INTDIR)\Hash_Map_Manager_rt.obj" \
"$(INTDIR)\Hashable.obj" \
"$(INTDIR)\High_Res_Timer.obj" \
"$(INTDIR)\INET_Addr.obj" \
@@ -1182,7 +1178,6 @@ CLEAN :
-@erase "$(INTDIR)\Handle_Ops.obj"
-@erase "$(INTDIR)\Handle_Set.obj"
-@erase "$(INTDIR)\Hash_Map_Manager.obj"
- -@erase "$(INTDIR)\Hash_Map_Manager_rt.obj"
-@erase "$(INTDIR)\Hashable.obj"
-@erase "$(INTDIR)\High_Res_Timer.obj"
-@erase "$(INTDIR)\INET_Addr.obj"
@@ -1469,7 +1464,6 @@ LINK32_OBJS= \
"$(INTDIR)\Handle_Ops.obj" \
"$(INTDIR)\Handle_Set.obj" \
"$(INTDIR)\Hash_Map_Manager.obj" \
- "$(INTDIR)\Hash_Map_Manager_rt.obj" \
"$(INTDIR)\Hashable.obj" \
"$(INTDIR)\High_Res_Timer.obj" \
"$(INTDIR)\INET_Addr.obj" \
@@ -1720,7 +1714,6 @@ CLEAN :
-@erase "$(INTDIR)\Handle_Ops.obj"
-@erase "$(INTDIR)\Handle_Set.obj"
-@erase "$(INTDIR)\Hash_Map_Manager.obj"
- -@erase "$(INTDIR)\Hash_Map_Manager_rt.obj"
-@erase "$(INTDIR)\Hashable.obj"
-@erase "$(INTDIR)\High_Res_Timer.obj"
-@erase "$(INTDIR)\INET_Addr.obj"
@@ -2007,7 +2000,6 @@ LINK32_OBJS= \
"$(INTDIR)\Handle_Ops.obj" \
"$(INTDIR)\Handle_Set.obj" \
"$(INTDIR)\Hash_Map_Manager.obj" \
- "$(INTDIR)\Hash_Map_Manager_rt.obj" \
"$(INTDIR)\Hashable.obj" \
"$(INTDIR)\High_Res_Timer.obj" \
"$(INTDIR)\INET_Addr.obj" \
@@ -2511,11 +2503,6 @@ SOURCE=.\Hash_Map_Manager.cpp
"$(INTDIR)\Hash_Map_Manager.obj" : $(SOURCE) "$(INTDIR)"
-SOURCE=.\Hash_Map_Manager_rt.cpp
-
-"$(INTDIR)\Hash_Map_Manager_rt.obj" : $(SOURCE) "$(INTDIR)"
-
-
SOURCE=.\Hashable.cpp
"$(INTDIR)\Hashable.obj" : $(SOURCE) "$(INTDIR)"
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index e17d38d19a7..ded7a356cae 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -506,5 +506,10 @@ typedef unsigned long long ACE_UINT64;
#define SO_REUSEPORT 0x0400 // We just have to pick a value that won't conflict
#endif
+#if defined (ACE_WIN64)
+// Data must be aligned on 8-byte boundaries, at a minimum.
+# define ACE_MALLOC_ALIGN 8
+#endif /* ACE_WIN64 */
+
#include "ace/post.h"
#endif /* ACE_CONFIG_WIN32_COMMON_H */
diff --git a/ace/config-win32-msvc-7.h b/ace/config-win32-msvc-7.h
index a3a389e2878..c5b1b0703a3 100644
--- a/ace/config-win32-msvc-7.h
+++ b/ace/config-win32-msvc-7.h
@@ -32,6 +32,11 @@
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
#endif
+// Win64 SDK compiler claims std::auto_ptr<>::reset not available.
+#if defined (_WIN64) || defined (WIN64)
+#define ACE_AUTO_PTR_LACKS_RESET
+#endif
+
#if !defined (ACE_HAS_BROKEN_NESTED_TEMPLATES)
#define ACE_HAS_BROKEN_NESTED_TEMPLATES
#endif
diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp
index 3f15dc447b2..f35d2698f08 100644
--- a/tests/Buffer_Stream_Test.cpp
+++ b/tests/Buffer_Stream_Test.cpp
@@ -175,7 +175,7 @@ Consumer::svc (void)
if (result == -1)
break;
- int length = mb->length ();
+ size_t length = mb->length ();
if (length > 0)
{
diff --git a/tests/CDR_Array_Test.cpp b/tests/CDR_Array_Test.cpp
index 4ee99fe6d21..d1cb547add3 100644
--- a/tests/CDR_Array_Test.cpp
+++ b/tests/CDR_Array_Test.cpp
@@ -155,7 +155,7 @@ private:
static ACE_UINT32 seal = 0xdeadbeef;
void
-zero (char* p, int k)
+zero (char* p, size_t k)
{
char* end = p + k;
while (p < end)
@@ -189,7 +189,7 @@ CDR_Test<T, H>::CDR_Test (int total, int niter, int use_array)
char* srcbuf;
char* dstbuf;
{
- const int stotal =
+ const size_t stotal =
(total + 10) * H::size () + sizeof(ACE_UINT32) + ACE_CDR::MAX_ALIGNMENT;
ACE_NEW(srcbuf, char[stotal]);
@@ -394,7 +394,8 @@ CDR_Test<T, H>::do_test (int total, int niter, int use_array,
int n;
for (n = 0; n < niter; n++)
{
- int size = H::size () * (dst_offset + total) + ACE_CDR::MAX_ALIGNMENT;
+ size_t size = H::size () * (dst_offset + total) +
+ ACE_CDR::MAX_ALIGNMENT;
ACE_OutputCDR os (dstbuf, size);
// This is intrusive...
@@ -498,7 +499,7 @@ CDR_Test<T, H>::do_test (int total, int niter, int use_array,
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("====== Read iteration %d\n"), n));
- int size = (total + dst_offset) * H::size ();
+ size_t size = (total + dst_offset) * H::size ();
ACE_InputCDR is (toread, size, opposite_byte_order);
// This is intrusive...
diff --git a/tests/CDR_Test.cpp b/tests/CDR_Test.cpp
index e4242dc3967..dda55b701f7 100644
--- a/tests/CDR_Test.cpp
+++ b/tests/CDR_Test.cpp
@@ -112,7 +112,7 @@ short_stream (void)
os.write_double_array (d_array, 3);
const ACE_Message_Block *out_mb = os.begin ();
- u_int len = out_mb->length ();
+ size_t len = out_mb->length ();
// Create an input stream (copy constructor)
ACE_InputCDR is (os);
diff --git a/tests/Cache_Map_Manager_Test.cpp b/tests/Cache_Map_Manager_Test.cpp
index 3b7937d4e8e..dec12796a7a 100644
--- a/tests/Cache_Map_Manager_Test.cpp
+++ b/tests/Cache_Map_Manager_Test.cpp
@@ -542,7 +542,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE);
// Providing random a unique seed.
- ACE_OS::srand (ACE_static_cast (size_t, ACE_OS::time (0)));
+ ACE_OS::srand (ACE_static_cast (u_int, ACE_OS::time (0)));
// Create the lookup array.
ACE_NEW_RETURN (lookup_array,
diff --git a/tests/Cache_Map_Manager_Test.h b/tests/Cache_Map_Manager_Test.h
index 5f75635a04c..a6bead7858d 100644
--- a/tests/Cache_Map_Manager_Test.h
+++ b/tests/Cache_Map_Manager_Test.h
@@ -31,7 +31,7 @@ public:
u_long operator () (size_t t) const
{
// Simply returns t
- return t;
+ return ACE_static_cast (u_long, t);
}
};
diff --git a/tests/Handle_Set_Test.cpp b/tests/Handle_Set_Test.cpp
index cc5cafa3d92..ce87f195ffd 100644
--- a/tests/Handle_Set_Test.cpp
+++ b/tests/Handle_Set_Test.cpp
@@ -68,6 +68,11 @@ test_duplicates (size_t count)
// <ACE_DEFAULT_SELECT_REACTOR_SIZE> is less than any of these
// <HANDLE> values, the logic in <test_boundaries> will simply ignore
// these values.
+#if defined (ACE_WIN64)
+ // The casts below are legit...
+# pragma warning(push)
+# pragma warning(disable : 4312)
+#endif /* ACE_WIN64 */
static ACE_HANDLE handle_vector[] =
{
(ACE_HANDLE) 0,
@@ -86,6 +91,9 @@ static ACE_HANDLE handle_vector[] =
(ACE_HANDLE) ACE_DEFAULT_SELECT_REACTOR_SIZE,
ACE_INVALID_HANDLE
};
+#if defined (ACE_WIN64)
+# pragma warning(pop)
+#endif /* ACE_WIN64 */
static void
test_boundaries (void)
@@ -118,6 +126,11 @@ test_boundaries (void)
// Insert the vector of <ACE_HANDLE>s into the set.
+#if defined (ACE_WIN64)
+ // The casts below are legit...
+# pragma warning(push)
+# pragma warning(disable : 4312)
+#endif /* ACE_WIN64 */
for (int i = 0;
handle_vector[i] != ACE_INVALID_HANDLE;
i++)
@@ -128,6 +141,9 @@ test_boundaries (void)
set.insert (handle_vector[i]);
}
}
+#if defined (ACE_WIN64)
+# pragma warning(pop)
+#endif /* ACE_WIN64 */
int count = 0;
diff --git a/tests/MT_Reactor_Timer_Test.cpp b/tests/MT_Reactor_Timer_Test.cpp
index 9026b5a6e98..f9f5b2b3c24 100644
--- a/tests/MT_Reactor_Timer_Test.cpp
+++ b/tests/MT_Reactor_Timer_Test.cpp
@@ -149,7 +149,8 @@ Dispatch_Count_Handler::Dispatch_Count_Handler (void)
ACE_Reactor *r = ACE_Reactor::instance ();
- this->input_seen_ = this->notify_seen_ = this->timers_fired_ = 0;
+ this->input_seen_ = this->notify_seen_ = 0;
+ this->timers_fired_ = 0;
// Initialize the pipe.
if (this->pipe_.open () == -1)
diff --git a/tests/MT_SOCK_Test.cpp b/tests/MT_SOCK_Test.cpp
index 19b80154007..314be674a4f 100644
--- a/tests/MT_SOCK_Test.cpp
+++ b/tests/MT_SOCK_Test.cpp
@@ -146,7 +146,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);
@@ -191,7 +199,15 @@ server (void *arg)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) waiting in select\n")));
- if (ACE_OS::select (int (new_stream.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 (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,
diff --git a/tests/Mem_Map_Test.cpp b/tests/Mem_Map_Test.cpp
index a9e4b9054c0..54583b54c74 100644
--- a/tests/Mem_Map_Test.cpp
+++ b/tests/Mem_Map_Test.cpp
@@ -33,12 +33,12 @@ static const int NUM_LINES = 15;
static void
reverse_file (ACE_HANDLE file_handle,
char *array,
- int size)
+ size_t size)
{
int count = 0;
// LynxOS 3.0.0/PowerPC needs the volatile qualifier, with -O2
// optimization enabled and without ACE_HAS_INLINE.
- volatile int i = size;
+ volatile size_t i = size;
--i;
if (array[i] == '\0')
diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp
index 2971e25ba59..52074394384 100644
--- a/tests/Message_Block_Test.cpp
+++ b/tests/Message_Block_Test.cpp
@@ -98,7 +98,7 @@ Worker_Task::svc (void)
ACE_ASSERT (this->msg_queue ()->dequeue_head (mb) != -1);
- int length = mb->length ();
+ size_t length = mb->length ();
// If there's a next() Task then "logically" copy the message by
// calling <duplicate> and send it on down the pipeline. Note
@@ -203,7 +203,7 @@ produce (Worker_Task &worker_task,
ACE_TCHAR buf[BUFSIZ];
ACE_OS::sprintf (buf, ACE_SIZE_T_FORMAT_SPECIFIER, count);
- int n = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR);
+ size_t n = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR);
// Allocate a new message.
ACE_NEW_RETURN (mb,
diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp
index 502b5557262..cc3b4840f01 100644
--- a/tests/Message_Queue_Notifications_Test.cpp
+++ b/tests/Message_Queue_Notifications_Test.cpp
@@ -205,7 +205,7 @@ Watermark_Test::producer (void)
{
int i = watermark_iterations;
- for (int hwm = this->hwm_;
+ for (ssize_t hwm = this->hwm_;
hwm >= 0 ;
hwm -= this->len_)
{
diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp
index b71a4c6084e..4f123885a04 100644
--- a/tests/Priority_Buffer_Test.cpp
+++ b/tests/Priority_Buffer_Test.cpp
@@ -68,7 +68,7 @@ consumer (void *args)
local_count++;
- int length = mb->length ();
+ size_t length = mb->length ();
if (length > 0)
{
diff --git a/tests/Proactor_Scatter_Gather_Test.cpp b/tests/Proactor_Scatter_Gather_Test.cpp
index 7220de98eae..40b2bbc40d3 100644
--- a/tests/Proactor_Scatter_Gather_Test.cpp
+++ b/tests/Proactor_Scatter_Gather_Test.cpp
@@ -132,7 +132,7 @@ last_chunk (ACE_Message_Block *chain,
if (!chain)
return 0;
- size_t index = 1;
+ int index = 1;
last = chain;
while (0 != last->cont ())
{
@@ -335,8 +335,8 @@ private:
// Output file
ACE_Asynch_Write_File wf_;
ACE_HANDLE output_file_handle_;
- size_t writing_file_offset_;
- size_t reported_file_offset_;
+ u_long writing_file_offset_;
+ u_long reported_file_offset_;
ACE_Message_Block *odd_chain_;
ACE_Message_Block *even_chain_;
long io_count_;
diff --git a/tests/Proactor_Test.cpp b/tests/Proactor_Test.cpp
index d8c06c1423a..30253749cf4 100644
--- a/tests/Proactor_Test.cpp
+++ b/tests/Proactor_Test.cpp
@@ -86,7 +86,7 @@ static int loglevel = 0; // 0 full , 1 only errors
static const size_t MIN_TIME = 1; // min 1 sec
static const size_t MAX_TIME = 3600; // max 1 hour
-static size_t seconds = 2; // default time to run - 2 seconds
+static u_int seconds = 2; // default time to run - 2 seconds
static ACE_TCHAR complete_message[] =
ACE_TEXT ("GET / HTTP/1.1\r\n")
@@ -165,7 +165,7 @@ public:
virtual int svc (void);
- int start (size_t num_threads,
+ int start (int num_threads,
ProactorType type_proactor,
size_t max_op );
int stop (void);
@@ -283,7 +283,7 @@ MyTask::delete_proactor (void)
}
int
-MyTask::start (size_t num_threads,
+MyTask::start (int num_threads,
ProactorType type_proactor,
size_t max_op)
{
@@ -362,8 +362,8 @@ public:
Receiver (Acceptor *acceptor = 0, int index = -1);
~Receiver (void);
- long get_total_snd (void) { return this->total_snd_; }
- long get_total_rcv (void) { return this->total_rcv_; }
+ size_t get_total_snd (void) { return this->total_snd_; }
+ size_t get_total_rcv (void) { return this->total_rcv_; }
long get_total_w (void) { return this->total_w_; }
long get_total_r (void) { return this->total_r_; }
@@ -400,8 +400,8 @@ private:
long io_count_;
int flg_cancel_;
- long total_snd_;
- long total_rcv_;
+ size_t total_snd_;
+ size_t total_rcv_;
long total_w_;
long total_r_;
};
@@ -411,8 +411,8 @@ class Acceptor : public ACE_Asynch_Acceptor<Receiver>
friend class Receiver;
public:
int get_number_sessions (void) { return this->sessions_; }
- long get_total_snd (void) { return this->total_snd_; }
- long get_total_rcv (void) { return this->total_rcv_; }
+ size_t get_total_snd (void) { return this->total_snd_; }
+ size_t get_total_rcv (void) { return this->total_rcv_; }
long get_total_w (void) { return this->total_w_; }
long get_total_r (void) { return this->total_r_; }
@@ -432,8 +432,8 @@ private:
ACE_SYNCH_RECURSIVE_MUTEX lock_;
int sessions_;
Receiver *list_receivers_[MAX_RECEIVERS];
- long total_snd_;
- long total_rcv_;
+ size_t total_snd_;
+ size_t total_rcv_;
long total_w_;
long total_r_;
};
@@ -715,17 +715,17 @@ Receiver::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
ACE_TEXT ("bytes_transfered"),
result.bytes_transferred ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("act"),
- (u_long) result.act ()));
+ result.act ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("success"),
result.success ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("completion_key"),
- (u_long) result.completion_key ()));
+ result.completion_key ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("error"),
@@ -792,17 +792,17 @@ Receiver::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
ACE_TEXT ("bytes_transfered"),
result.bytes_transferred ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("act"),
- (u_long) result.act ()));
+ result.act ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("success"),
result.success ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("completion_key"),
- (u_long) result.completion_key ()));
+ result.completion_key ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("error"),
@@ -850,8 +850,8 @@ public:
Sender (Connector *connector = 0, int index = -1);
~Sender (void);
- long get_total_snd (void) { return this->total_snd_; }
- long get_total_rcv (void) { return this->total_rcv_; }
+ size_t get_total_snd (void) { return this->total_snd_; }
+ size_t get_total_rcv (void) { return this->total_rcv_; }
long get_total_w (void) { return this->total_w_; }
long get_total_r (void) { return this->total_r_; }
@@ -877,8 +877,8 @@ private:
long io_count_;
int flg_cancel_;
- long total_snd_;
- long total_rcv_;
+ size_t total_snd_;
+ size_t total_rcv_;
long total_w_;
long total_r_;
};
@@ -888,8 +888,8 @@ class Connector : public ACE_Asynch_Connector<Sender>
friend class Sender;
public:
int get_number_sessions (void) { return this->sessions_; }
- long get_total_snd (void) { return this->total_snd_; }
- long get_total_rcv (void) { return this->total_rcv_; }
+ size_t get_total_snd (void) { return this->total_snd_; }
+ size_t get_total_rcv (void) { return this->total_rcv_; }
long get_total_w (void) { return this->total_w_; }
long get_total_r (void) { return this->total_r_; }
@@ -910,8 +910,8 @@ private:
ACE_SYNCH_RECURSIVE_MUTEX lock_;
int sessions_;
Sender *list_senders_[MAX_SENDERS];
- long total_snd_;
- long total_rcv_;
+ size_t total_snd_;
+ size_t total_rcv_;
long total_w_;
long total_r_;
};
@@ -1338,17 +1338,17 @@ Sender::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
ACE_TEXT ("bytes_transfered"),
result.bytes_transferred ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("act"),
- (u_long) result.act ()));
+ result.act ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("success"),
result.success ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("completion_key"),
- (u_long) result.completion_key ()));
+ result.completion_key ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("error"),
@@ -1450,17 +1450,17 @@ Sender::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
ACE_TEXT ("bytes_transfered"),
result.bytes_transferred ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("act"),
- (u_long) result.act ()));
+ result.act ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("success"),
result.success ()));
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s = %u\n"),
+ ACE_TEXT ("%s = %@\n"),
ACE_TEXT ("completion_key"),
- (u_long) result.completion_key ()));
+ result.completion_key ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %d\n"),
ACE_TEXT ("error"),
diff --git a/tests/SOCK_Send_Recv_Test.cpp b/tests/SOCK_Send_Recv_Test.cpp
index c1ff063f0b0..940babdb42d 100644
--- a/tests/SOCK_Send_Recv_Test.cpp
+++ b/tests/SOCK_Send_Recv_Test.cpp
@@ -95,7 +95,7 @@ client (void *arg)
// The server will verify that this data pattern gets there intact.
for (i = 0; i < sizeof buffer; ++i)
- buffer[i] = i;
+ buffer[i] = ACE_static_cast (u_char, i);
iovec iov[5];
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);
diff --git a/tests/Semaphore_Test.cpp b/tests/Semaphore_Test.cpp
index 55c73ba94e9..cdc8b671572 100644
--- a/tests/Semaphore_Test.cpp
+++ b/tests/Semaphore_Test.cpp
@@ -144,7 +144,7 @@ parse_args (int argc, ACE_TCHAR *argv[])
static void *
worker (void *)
{
- for (size_t iterations = 1;
+ for (long iterations = 1;
iterations <= n_iterations;
iterations++)
{
diff --git a/tests/TP_Reactor_Test.cpp b/tests/TP_Reactor_Test.cpp
index ab0e355edb3..06a536bba07 100644
--- a/tests/TP_Reactor_Test.cpp
+++ b/tests/TP_Reactor_Test.cpp
@@ -75,7 +75,7 @@ static int both = 0;
static const ACE_TCHAR *host = 0;
// number of Senders instances
-static size_t senders = 1;
+static int senders = 1;
// duplex mode: == 0 half-duplex
// != 0 full duplex
@@ -92,7 +92,7 @@ static int loglevel = 1; // 0 full , 1 only errors
static const size_t MIN_TIME = 1; // min 1 sec
static const size_t MAX_TIME = 3600; // max 1 hour
-static size_t seconds = 2; // default time to run - 2 seconds
+static u_int seconds = 2; // default time to run - 2 seconds
static char data[] =
"GET / HTTP/1.1\r\n"
@@ -133,7 +133,7 @@ public:
virtual int svc (void);
- int start (size_t num_threads);
+ int start (int num_threads);
int stop (void);
private:
@@ -193,7 +193,7 @@ MyTask::delete_reactor (void)
}
int
-MyTask::start (size_t num_threads)
+MyTask::start (int num_threads)
{
if (this->create_reactor () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -358,7 +358,7 @@ Acceptor::make_svc_handler (Receiver *&sh)
if (sessions_ >= MAX_RECEIVERS)
return -1;
- for (size_t i = 0; i < MAX_RECEIVERS; ++i)
+ for (int i = 0; i < MAX_RECEIVERS; ++i)
if (this->list_receivers_ [i] == 0)
{
ACE_NEW_RETURN (sh,
@@ -565,7 +565,7 @@ Receiver::handle_output (ACE_HANDLE h)
int err = 0;
ssize_t res = 0;
- int bytes = 0;
+ size_t bytes = 0;
int qcount = this->getq (mb, &tv);
@@ -736,7 +736,7 @@ Connector::make_svc_handler (Sender * & sh)
if (sessions_ >= MAX_SENDERS)
return -1;
- for (size_t i = 0; i < MAX_SENDERS; ++i)
+ for (int i = 0; i < MAX_SENDERS; ++i)
if (this->list_senders_ [i] == 0)
{
ACE_NEW_RETURN (sh,
@@ -822,7 +822,7 @@ Sender::initiate_write (void)
{
if ( this->msg_queue ()->message_count () < 20) // flow control
{
- int nbytes = ACE_OS::strlen (send_buf_);
+ size_t nbytes = ACE_OS_String::strlen (send_buf_);
ACE_Message_Block *mb = 0;
ACE_NEW_RETURN (mb,
@@ -964,7 +964,7 @@ Sender::handle_output (ACE_HANDLE h)
int err=0;
ssize_t res=0;
- int bytes=0;
+ size_t bytes=0;
int qcount = this->getq (mb , & tv);
diff --git a/tests/TP_Reactor_Test.h b/tests/TP_Reactor_Test.h
index 6f192b5efb3..d6341e5f0da 100644
--- a/tests/TP_Reactor_Test.h
+++ b/tests/TP_Reactor_Test.h
@@ -167,7 +167,7 @@ class Connector: public ACE_Connector<Sender,ACE_SOCK_CONNECTOR>
{
friend class Sender;
public:
- long get_number_sessions (void) { return sessions_; }
+ size_t get_number_sessions (void) { return sessions_; }
long get_total_snd (void) { return this->total_snd_; }
long get_total_rcv (void) { return this->total_rcv_; }
long get_total_w (void) { return this->total_w_; }
diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp
index 7f98fe32646..8f5881eb344 100644
--- a/tests/TSS_Test.cpp
+++ b/tests/TSS_Test.cpp
@@ -93,7 +93,7 @@ worker (void *c)
{
// Cast the arg to a long, first, because a pointer is the same
// size as a long on all current ACE platforms.
- int count = (int) (long) c;
+ int count = ACE_reinterpret_cast (int, c);
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) worker, iterations = %d\n"), count));
diff --git a/tests/Thread_Pool_Reactor_Resume_Test.cpp b/tests/Thread_Pool_Reactor_Resume_Test.cpp
index 3dde6a34920..86b42311e00 100644
--- a/tests/Thread_Pool_Reactor_Resume_Test.cpp
+++ b/tests/Thread_Pool_Reactor_Resume_Test.cpp
@@ -304,7 +304,7 @@ worker (void *)
ACE_OS::sleep (3);
const ACE_TCHAR *msg = ACE_TEXT ("Message from Connection worker");
ACE_TCHAR buf [BUFSIZ];
- buf[0] = ACE_OS::strlen (msg) + 1;
+ buf[0] = ACE_static_cast (ACE_TCHAR, (ACE_OS_String::strlen (msg) + 1));
ACE_OS::strcpy (&buf[1], msg);
ACE_INET_Addr addr (rendezvous);
diff --git a/tests/Thread_Pool_Reactor_Test.cpp b/tests/Thread_Pool_Reactor_Test.cpp
index 42c2fb8abf6..821164fc748 100644
--- a/tests/Thread_Pool_Reactor_Test.cpp
+++ b/tests/Thread_Pool_Reactor_Test.cpp
@@ -251,7 +251,7 @@ worker (void *)
ACE_OS::sleep (3);
const ACE_TCHAR *msg = ACE_TEXT ("Message from Connection worker");
ACE_TCHAR buf [BUFSIZ];
- buf[0] = ACE_OS::strlen (msg) + 1;
+ buf[0] = ACE_static_cast (ACE_TCHAR, (ACE_OS_String::strlen (msg) + 1));
ACE_OS::strcpy (&buf[1], msg);
ACE_INET_Addr addr (rendezvous);
diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp
index c2247ac6aeb..b6584a3bc17 100644
--- a/tests/Thread_Pool_Test.cpp
+++ b/tests/Thread_Pool_Test.cpp
@@ -137,7 +137,7 @@ Thread_Pool::svc (void)
break;
}
- int length = mb->length ();
+ size_t length = mb->length ();
if (length > 0)
ACE_DEBUG ((LM_DEBUG,
@@ -358,7 +358,7 @@ Thread_Pool::test_empty_message_shutdown (void)
this->thr_count ()));
this->dump ();
- int i = 0;
+ size_t i = 0;
// Enqueue an empty message to flag each consumer thread to
// inform it to shutdown.
diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp
index 9b8cd9dffa1..0571ce1b4ce 100644
--- a/tests/Upgradable_RW_Test.cpp
+++ b/tests/Upgradable_RW_Test.cpp
@@ -27,7 +27,7 @@ ACE_RCSID(tests, Upgradable_RW_Test, "$Id$")
#if defined (ACE_HAS_THREADS)
// Default number of iterations.
-static size_t n_iterations = 50;
+static long n_iterations = 50;
// Maximum string length used
static const size_t MAX_STRING_SIZE = 200;
@@ -36,10 +36,10 @@ static const size_t MAX_STRING_SIZE = 200;
// #define RW_MUTEX 1
// Default number of readers.
-static size_t n_readers = 10;
+static u_int n_readers = 10;
// Default number of writers.
-static size_t n_writers = 0;
+static u_int n_writers = 0;
// Number of entries in the hash map
static u_int n_entries = 10;