diff options
author | Steve Huston <shuston@riverace.com> | 2002-07-17 16:13:56 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2002-07-17 16:13:56 +0000 |
commit | a0adf64a4c0e3d0f9750e82e00f289b1c89a9806 (patch) | |
tree | b04e73cec55793d41b8a55ef6271d90ceb5d1fde | |
parent | dec7a748e600c7f2e36f6983cf178aea00667df1 (diff) | |
download | ATCD-a0adf64a4c0e3d0f9750e82e00f289b1c89a9806.tar.gz |
ChangeLogTag:Wed Jul 17 11:34:28 2002 Steve Huston <shuston@riverace.com>
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 14 | ||||
-rw-r--r-- | ace/OS.cpp | 4 | ||||
-rw-r--r-- | ace/OS.i | 9 | ||||
-rw-r--r-- | ace/WFMO_Reactor.cpp | 6 | ||||
-rw-r--r-- | ace/WIN32_Proactor.cpp | 4 |
6 files changed, 46 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 04d697e4f11..7cfeb2f411b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Wed Jul 17 11:34:28 2002 Steve Huston <shuston@riverace.com> + + * ace/OS.{i cpp}: Windows, in calls to _open_osfhandle(), cast + handle to long for C++Builder. Only MSVC has the intptr_t type. + + * ace/WFMO_Reactor.cpp (make_changes_in_current_infos, + make_changes_in_suspension_infos): Run the index from 0 to + last_valid_slot rather than valid slot down to 0 to allow + correct use of size_t index. + + * ace/WIN32_Proactor.cpp (register_handle, post_completion): Use + a reinterpret_cast, not static_cast to cast void* to ULONG for + non-Win64. + Wed Jul 17 03:50:56 UTC 2002 Don Hinton <dhinton@objectsciences.com> * ace/ACE.cpp: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 04d697e4f11..7cfeb2f411b 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,17 @@ +Wed Jul 17 11:34:28 2002 Steve Huston <shuston@riverace.com> + + * ace/OS.{i cpp}: Windows, in calls to _open_osfhandle(), cast + handle to long for C++Builder. Only MSVC has the intptr_t type. + + * ace/WFMO_Reactor.cpp (make_changes_in_current_infos, + make_changes_in_suspension_infos): Run the index from 0 to + last_valid_slot rather than valid slot down to 0 to allow + correct use of size_t index. + + * ace/WIN32_Proactor.cpp (register_handle, post_completion): Use + a reinterpret_cast, not static_cast to cast void* to ULONG for + non-Win64. + Wed Jul 17 03:50:56 UTC 2002 Don Hinton <dhinton@objectsciences.com> * ace/ACE.cpp: diff --git a/ace/OS.cpp b/ace/OS.cpp index 025b13835b4..9ecdea3b03c 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -899,7 +899,11 @@ ACE_OS::fopen (const ACE_TCHAR *filename, } # else hmode &= _O_TEXT | _O_RDONLY | _O_APPEND; +# if defined (__BORLANDC__) + int fd = _open_osfhandle (long (handle), hmode); +# else int fd = _open_osfhandle (intptr_t (handle), hmode); +# endif /* __BORLANDC__ */ if (fd != -1) { # if defined (__BORLANDC__) && !defined (ACE_USES_WCHAR) @@ -9160,7 +9160,11 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) FILE *file = 0; +# if defined (__BORLANDC__) + int crt_handle = ::_open_osfhandle (long (handle), 0); +# else int crt_handle = ::_open_osfhandle (intptr_t (handle), 0); +# endif /* __BORLANDC__ */ if (crt_handle != -1) { @@ -10745,7 +10749,12 @@ ACE_OS::isatty (ACE_HANDLE handle) ACE_UNUSED_ARG (handle); return 0; #else +# if defined (__BORLANDC__) + int fd = ::_open_osfhandle (long (handle), 0); +# else int fd = ::_open_osfhandle (intptr_t (handle), 0); +# endif /* __BORLANDC__ */ + int status = ::_isatty (fd); ::_close (fd); return status; diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp index f5b203fd2f6..a84de536887 100644 --- a/ace/WFMO_Reactor.cpp +++ b/ace/WFMO_Reactor.cpp @@ -676,7 +676,7 @@ ACE_WFMO_Reactor_Handler_Repository::make_changes_in_current_infos (void) // handle arrays size_t last_valid_slot = this->max_handlep1_ - 1; - for (int i = last_valid_slot; i >= 0; i--) + for (size_t i = 0; i <= last_valid_slot; i++) { // This stuff is necessary here, since we should not make // the upcall until all the internal data structures have @@ -771,13 +771,13 @@ ACE_WFMO_Reactor_Handler_Repository::make_changes_in_current_infos (void) int ACE_WFMO_Reactor_Handler_Repository::make_changes_in_suspension_infos (void) { - int i; + size_t i; // Go through the <suspended_handle> array if (this->handles_to_be_deleted_ > 0 || this->handles_to_be_resumed_ > 0) { size_t last_valid_slot = this->suspended_handles_ - 1; - for (i = last_valid_slot; i >= 0; i--) + for (i = 0; i <= last_valid_slot; i++) { // This stuff is necessary here, since we should not make // the upcall until all the internal data structures have diff --git a/ace/WIN32_Proactor.cpp b/ace/WIN32_Proactor.cpp index 7d11a365bd2..2f127ea46b4 100644 --- a/ace/WIN32_Proactor.cpp +++ b/ace/WIN32_Proactor.cpp @@ -121,7 +121,7 @@ ACE_WIN32_Proactor::register_handle (ACE_HANDLE handle, #if defined (ACE_WIN64) ULONG_PTR comp_key (ACE_static_cast (ULONG_PTR, completion_key)); #else - ULONG comp_key (ACE_static_cast (ULONG, completion_key)); + ULONG comp_key (ACE_reinterpret_cast (ULONG, completion_key)); #endif /* ACE_WIN64 */ // No locking is needed here as no state changes. @@ -680,7 +680,7 @@ ACE_WIN32_Proactor::post_completion (ACE_WIN32_Asynch_Result *result) #if defined (ACE_WIN64) ULONG_PTR comp_key (ACE_static_cast (ULONG_PTR, completion_key)); #else - ULONG comp_key (ACE_static_cast (ULONG, completion_key)); + ULONG comp_key (ACE_reinterpret_cast (ULONG, completion_key)); #endif /* ACE_WIN64 */ // Post a completion |