summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/ACE.cpp4
-rw-r--r--ACE/ace/Acceptor.h6
-rw-r--r--ACE/ace/Event_Handler.cpp4
-rw-r--r--ACE/ace/Filecache.cpp8
-rw-r--r--ACE/ace/High_Res_Timer.cpp9
-rw-r--r--ACE/ace/High_Res_Timer.h7
-rw-r--r--ACE/ace/Metrics_Cache_T.inl2
-rw-r--r--ACE/ace/OS_NS_Thread.cpp6
-rw-r--r--ACE/ace/OS_NS_stdio.inl2
-rw-r--r--ACE/ace/OS_NS_sys_time.inl10
-rw-r--r--ACE/ace/OS_NS_sys_wait.h2
-rw-r--r--ACE/ace/OS_NS_unistd.cpp93
-rw-r--r--ACE/ace/OS_NS_unistd.inl2
-rw-r--r--ACE/ace/SOCK_Connector.cpp3
-rw-r--r--ACE/ace/SOCK_SEQPACK_Connector.cpp3
-rw-r--r--ACE/ace/SString.cpp3
-rw-r--r--ACE/ace/Stats.cpp7
-rw-r--r--ACE/ace/TLI_Connector.cpp2
-rw-r--r--ACE/ace/Token.cpp2
-rw-r--r--ACE/ace/UTF16_Encoding_Converter.cpp2
-rw-r--r--ACE/ace/WFMO_Reactor.cpp22
-rw-r--r--ACE/ace/config-WinCE.h4
-rw-r--r--ACE/ace/os_include/os_signal.h4
-rw-r--r--ACE/ace/os_include/sys/os_types.h4
24 files changed, 96 insertions, 115 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp
index 87c50d06d42..d656b031f5a 100644
--- a/ACE/ace/ACE.cpp
+++ b/ACE/ace/ACE.cpp
@@ -2731,9 +2731,7 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
return -1;
/* NOTREACHED */
case 0:
- if (timeout != 0
- && timeout->sec () == 0
- && timeout->usec () == 0)
+ if (timeout != 0 && *timeout == ACE_Time_Value::zero)
errno = EWOULDBLOCK;
else
errno = ETIMEDOUT;
diff --git a/ACE/ace/Acceptor.h b/ACE/ace/Acceptor.h
index 6a024bca6ff..496512afd6e 100644
--- a/ACE/ace/Acceptor.h
+++ b/ACE/ace/Acceptor.h
@@ -89,7 +89,7 @@ public:
* @param use_select Affects behavior when called back by the reactor
* when a connection can be accepted. If non-zero,
* this object will accept all pending connections,
- * intead of just the one that triggered the reactor
+ * instead of just the one that triggered the reactor
* callback. Uses ACE_OS::select() internally to
* detect any remaining acceptable connections.
* The default is 1.
@@ -128,7 +128,7 @@ public:
* @param use_select Affects behavior when called back by the reactor
* when a connection can be accepted. If non-zero,
* this object will accept all pending connections,
- * intead of just the one that triggered the reactor
+ * instead of just the one that triggered the reactor
* callback. Uses ACE_OS::select() internally to
* detect any remaining acceptable connections.
* The default is 1.
@@ -341,7 +341,7 @@ public:
* @param use_select Affects behavior when called back by the reactor
* when a connection can be accepted. If non-zero,
* this object will accept all pending connections,
- * intead of just the one that triggered the reactor
+ * instead of just the one that triggered the reactor
* callback. Uses ACE_OS::select() internally to
* detect any remaining acceptable connections.
* The default is 1.
diff --git a/ACE/ace/Event_Handler.cpp b/ACE/ace/Event_Handler.cpp
index d4542b61349..42c8b36cd8e 100644
--- a/ACE/ace/Event_Handler.cpp
+++ b/ACE/ace/Event_Handler.cpp
@@ -244,8 +244,6 @@ ACE_Event_Handler::reference_counting_policy (void)
return this->reference_counting_policy_;
}
-//#if !defined (ACE_HAS_WINCE)
-
ACE_THR_FUNC_RETURN
ACE_Event_Handler::read_adapter (void *args)
{
@@ -299,8 +297,6 @@ ACE_Event_Handler::remove_stdin_handler (ACE_Reactor *reactor,
#endif /* ACE_WIN32 */
}
-//#endif /* ACE_HAS_WINCE */
-
// ---------------------------------------------------------------------
ACE_Event_Handler_var::ACE_Event_Handler_var (void)
diff --git a/ACE/ace/Filecache.cpp b/ACE/ace/Filecache.cpp
index 5122cb6fdc8..72601d8d1d3 100644
--- a/ACE/ace/Filecache.cpp
+++ b/ACE/ace/Filecache.cpp
@@ -738,15 +738,7 @@ ACE_Filecache_Object::update (void) const
if (ACE_OS::stat (this->filename_, &statbuf) == -1)
result = 1;
else
- // non-portable code may follow
-#if defined (ACE_HAS_WINCE)
- // Yup, non-portable... there's probably a way to safely implement
- // difftime() on WinCE, but for now, this will have to do. It flags
- // every file as having changed since cached.
- result = 1;
-#else
result = ACE_OS::difftime (this->stat_.st_mtime, statbuf.st_mtime) < 0;
-#endif /* ACE_HAS_WINCE */
return result;
}
diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp
index 838120bb7b7..accab008d36 100644
--- a/ACE/ace/High_Res_Timer.cpp
+++ b/ACE/ace/High_Res_Timer.cpp
@@ -193,7 +193,7 @@ ACE_High_Res_Timer::global_scale_factor (void)
#if (defined (ACE_WIN32) || defined (ACE_HAS_POWERPC_TIMER) || \
defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_ALPHA_TIMER)) && \
!defined (ACE_HAS_HI_RES_TIMER) && \
- ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || \
+ (defined (ACE_WIN32) || \
defined (ghs) || defined (__GNUG__) || \
defined (__INTEL_COMPILER))
// Check if the global scale factor needs to be set, and do if so.
@@ -422,7 +422,6 @@ ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const
nanoseconds = nanoseconds >> 10;
}
-#if !defined (ACE_HAS_WINCE)
void
ACE_High_Res_Timer::print_ave (const ACE_TCHAR *str,
const int count,
@@ -507,12 +506,10 @@ ACE_High_Res_Timer::print_total (const ACE_TCHAR *str,
buf,
ACE_OS::strlen (buf));
}
-#endif /* !ACE_HAS_WINCE */
int
ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env)
{
-#if !defined (ACE_HAS_WINCE)
if (env != 0)
{
const char *env_value = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (env));
@@ -526,9 +523,7 @@ ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env)
}
}
}
-#else
- ACE_UNUSED_ARG (env);
-#endif /* !ACE_HAS_WINCE */
+
return -1;
}
diff --git a/ACE/ace/High_Res_Timer.h b/ACE/ace/High_Res_Timer.h
index 642ffc796c5..2bb9730280a 100644
--- a/ACE/ace/High_Res_Timer.h
+++ b/ACE/ace/High_Res_Timer.h
@@ -204,12 +204,8 @@ public:
/// to start_incr and stop_incr.
void elapsed_time_incr (ACE_hrtime_t &nanoseconds) const;
-#if !defined (ACE_HAS_WINCE)
- // @@ WINCE These two functions are currently not supported on Windows CE.
- // However, we should probably use the handle and ACE_Log_Msg to
- // print out the result.
/// Print total time.
- /// @note only use <print_total> if incremental timings had been used!
+ /// @note only use @c print_total if incremental timings had been used!
void print_total (const ACE_TCHAR *message,
const int iterations = 1,
ACE_HANDLE handle = ACE_STDOUT) const;
@@ -218,7 +214,6 @@ public:
void print_ave (const ACE_TCHAR *message,
const int iterations = 1,
ACE_HANDLE handle = ACE_STDOUT) const;
-#endif /* !ACE_HAS_WINCE */
/// Dump the state of an object.
void dump (void) const;
diff --git a/ACE/ace/Metrics_Cache_T.inl b/ACE/ace/Metrics_Cache_T.inl
index e0f542ab366..778132f8b13 100644
--- a/ACE/ace/Metrics_Cache_T.inl
+++ b/ACE/ace/Metrics_Cache_T.inl
@@ -27,7 +27,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_start (u_long i)
this->interval_initialized_ = 1;
ACE_hrtime_t hrtime_now = ACE_OS::gethrtime ();
ACE_High_Res_Timer::hrtime_to_tv (this->interval_start_,
- hrtime_now);
+ hrtime_now);
this->interval_end_.set (this->interval_start_.sec(),
this->interval_start_.usec());
}
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp
index 84d9ed408d5..e2ce61c53ee 100644
--- a/ACE/ace/OS_NS_Thread.cpp
+++ b/ACE/ace/OS_NS_Thread.cpp
@@ -1446,7 +1446,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv,
ACE_Errno_Guard error (errno, 0);
int msec_timeout;
- if (timeout->sec () == 0 && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
msec_timeout = 0; // Do a "poll."
else
{
@@ -1609,7 +1609,7 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv,
int error = 0;
int msec_timeout;
- if (timeout->sec () == 0 && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
msec_timeout = 0; // Do a "poll."
else
{
@@ -2968,7 +2968,7 @@ ACE_OS::event_timedwait (ACE_event_t *event,
#if defined (ACE_WIN32)
DWORD result;
- if (timeout->sec () == 0 && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
// Do a "poll".
result = ::WaitForSingleObject (*event, 0);
else
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 0d3c18a6738..3c610552f88 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -768,7 +768,7 @@ ACE_OS::perror (const wchar_t *s)
#else
ACE_Wide_To_Ascii n_s (s);
::perror (n_s.char_rep ());
-#endif /* ACE_HAS_WINCE */
+#endif /* ACE_LACKS_PERROR */
}
#endif /* ACE_HAS_WCHAR */
diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl
index 9300e4ac011..604df97926d 100644
--- a/ACE/ace/OS_NS_sys_time.inl
+++ b/ACE/ace/OS_NS_sys_time.inl
@@ -26,10 +26,10 @@ ACE_OS::gettimeofday (void)
{
// ACE_OS_TRACE ("ACE_OS::gettimeofday");
-#if !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32)
+#if !defined (ACE_WIN32)
timeval tv;
int result = 0;
-#endif // !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32)
+#endif // !defined (ACE_WIN32)
#if (0)
struct timespec ts;
@@ -38,7 +38,7 @@ ACE_OS::gettimeofday (void)
tv.tv_sec = ts.tv_sec;
tv.tv_usec = ts.tv_nsec / 1000L; // timespec has nsec, but timeval has usec
-#elif defined (ACE_HAS_WINCE)
+#elif defined (ACE_WIN32) && defined (ACE_LACKS_GETSYSTEMTIMEASFILETIME)
SYSTEMTIME tsys;
FILETIME tfile;
::GetSystemTime (&tsys);
@@ -81,12 +81,12 @@ ACE_OS::gettimeofday (void)
ACE_OSCALL (::gettimeofday (&tv), int, -1, result);
# endif /* ACE_HAS_SVR4_GETTIMEOFDAY */
#endif /* 0 */
-#if !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32)
+#if !defined (ACE_WIN32)
if (result == -1)
return ACE_Time_Value ((time_t)-1);
else
return ACE_Time_Value (tv);
-#endif // !defined (ACE_HAS_WINCE)&& !defined (ACE_WIN32)
+#endif // !defined (ACE_WIN32)
}
#if defined (ACE_WIN32) && defined (_WIN32_WCE)
diff --git a/ACE/ace/OS_NS_sys_wait.h b/ACE/ace/OS_NS_sys_wait.h
index 59628474ad6..0b172763efa 100644
--- a/ACE/ace/OS_NS_sys_wait.h
+++ b/ACE/ace/OS_NS_sys_wait.h
@@ -59,7 +59,7 @@ namespace ACE_OS
ACE_HANDLE handle = 0);
/**
- * Calls @c ::waitpid on UNIX/POSIX platforms Does not work on Vxworks 5.5.x.
+ * Calls @c ::waitpid on UNIX/POSIX platforms Does not work on VxWorks 5.5.x.
* On Win32, @a pid is ignored if the @a handle is not equal to 0.
* Passing the process @a handle is prefer on Win32 because using
* @a pid to wait on the project doesn't always work correctly
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index ae58e30511f..059d2799dea 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -486,7 +486,10 @@ ACE_OS::pread (ACE_HANDLE handle,
if (original_low_position == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
- return -1;
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
// Go to the correct position
LONG low_offset = ACE_LOW_PART (offset);
@@ -497,7 +500,10 @@ ACE_OS::pread (ACE_HANDLE handle,
FILE_BEGIN);
if (altered_position == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
- return -1;
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
DWORD bytes_read;
@@ -550,7 +556,10 @@ ACE_OS::pread (ACE_HANDLE handle,
&original_high_position,
FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
- return -1;
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
return (ssize_t) bytes_read;
@@ -605,27 +614,30 @@ ACE_OS::pwrite (ACE_HANDLE handle,
ACE_OS_GUARD
// Remember the original file pointer position
- LARGE_INTEGER orig_position;
- orig_position.QuadPart = 0;
- orig_position.LowPart = ::SetFilePointer (handle,
- 0,
- &orig_position.HighPart,
- FILE_CURRENT);
- if (orig_position.LowPart == INVALID_SET_FILE_POINTER
+ LONG original_high_position = 0;
+ DWORD original_low_position = ::SetFilePointer (handle,
+ 0,
+ &original_high_position,
+ FILE_CURRENT);
+
+ if (original_low_position == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
- return -1;
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
DWORD bytes_written;
- LARGE_INTEGER loffset;
- loffset.QuadPart = offset;
+ LONG low_offset = ACE_LOW_PART (offset);
+ LONG high_offset = ACE_HIGH_PART (offset);
# if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
OVERLAPPED overlapped;
overlapped.Internal = 0;
overlapped.InternalHigh = 0;
- overlapped.Offset = loffset.LowPart;
- overlapped.OffsetHigh = loffset.HighPart;
+ overlapped.Offset = low_offset;
+ overlapped.OffsetHigh = high_offset;
overlapped.hEvent = 0;
BOOL result = ::WriteFile (handle,
@@ -637,35 +649,27 @@ ACE_OS::pwrite (ACE_HANDLE handle,
if (result == FALSE)
{
if (::GetLastError () != ERROR_IO_PENDING)
- return -1;
-
- result = ::GetOverlappedResult (handle,
- &overlapped,
- &bytes_written,
- TRUE);
- if (result == FALSE)
- return -1;
+ {
+ return -1;
+ }
+ else
+ {
+ result = ::GetOverlappedResult (handle,
+ &overlapped,
+ &bytes_written,
+ TRUE);
+ if (result == FALSE)
+ return -1;
+ }
}
# else /* ACE_HAS_WIN32_OVERLAPPED_IO */
- // Go to the correct position; if this is a Windows variant without
- // overlapped I/O, it probably doesn't have SetFilePointerEx either,
- // so manage this with SetFilePointer, changing calls based on the use
- // of 64 bit offsets.
- DWORD newpos;
-# if defined (_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
- newpos = ::SetFilePointer (handle,
- loffset.LowPart,
- &loffset.HighPart,
- FILE_BEGIN);
-# else
- newpos = ::SetFilePointer (handle,
- loffset.LowPart,
- 0,
- FILE_BEGIN);
-# endif /* 64-bit file offsets */
- if (newpos == 0xFFFFFFFF && ::GetLastError () != NO_ERROR)
+ if (::SetFilePointer (handle,
+ low_offset,
+ &high_offset,
+ FILE_BEGIN) == INVALID_SET_FILE_POINTER
+ && ::GetLastError () != NO_ERROR)
{
ACE_OS::set_errno_to_last_error ();
return -1;
@@ -683,11 +687,14 @@ ACE_OS::pwrite (ACE_HANDLE handle,
// Reset the original file pointer position
if (::SetFilePointer (handle,
- orig_position.LowPart,
- &orig_position.HighPart,
+ original_low_position,
+ &original_high_position,
FILE_BEGIN) == INVALID_SET_FILE_POINTER
&& GetLastError () != NO_ERROR)
- return -1;
+ {
+ ACE_OS::set_errno_to_last_error ();
+ return -1;
+ }
return (ssize_t) bytes_written;
diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl
index f0d7514b9a0..49f2bb579f6 100644
--- a/ACE/ace/OS_NS_unistd.inl
+++ b/ACE/ace/OS_NS_unistd.inl
@@ -213,7 +213,7 @@ ACE_OS::dup (ACE_HANDLE handle)
/* NOTREACHED */
#else
ACE_OSCALL_RETURN (::dup (handle), ACE_HANDLE, ACE_INVALID_HANDLE);
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
+#endif /* ACE_LACKS_DUP */
}
ACE_INLINE int
diff --git a/ACE/ace/SOCK_Connector.cpp b/ACE/ace/SOCK_Connector.cpp
index 2dda434d258..ea70011cedf 100644
--- a/ACE/ace/SOCK_Connector.cpp
+++ b/ACE/ace/SOCK_Connector.cpp
@@ -119,8 +119,7 @@ ACE_SOCK_Connector::shared_connect_finish (ACE_SOCK_Stream &new_stream,
if (error == EINPROGRESS || error == EWOULDBLOCK)
{
// This expression checks if we were polling.
- if (timeout->sec () == 0
- && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
{
#if defined(ACE_WIN32)
// In order to detect when the socket that has been
diff --git a/ACE/ace/SOCK_SEQPACK_Connector.cpp b/ACE/ace/SOCK_SEQPACK_Connector.cpp
index 7027b460fe7..e56253b1b6f 100644
--- a/ACE/ace/SOCK_SEQPACK_Connector.cpp
+++ b/ACE/ace/SOCK_SEQPACK_Connector.cpp
@@ -243,8 +243,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_finish (ACE_SOCK_SEQPACK_Association
if (error == EINPROGRESS || error == EWOULDBLOCK)
{
// This expression checks if we were polling.
- if (timeout->sec () == 0
- && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
error = EWOULDBLOCK;
// Wait synchronously using timeout.
else if (this->complete (new_association,
diff --git a/ACE/ace/SString.cpp b/ACE/ace/SString.cpp
index 6305bee14f8..5ba108655aa 100644
--- a/ACE/ace/SString.cpp
+++ b/ACE/ace/SString.cpp
@@ -2,9 +2,6 @@
#include "ace/Malloc_T.h"
#include "ace/OS_Memory.h"
-#if !defined (ACE_HAS_WINCE)
-//# include "ace/Service_Config.h"
-#endif /* !ACE_HAS_WINCE */
#include "ace/SString.h"
#include "ace/Auto_Ptr.h"
#include "ace/OS_NS_string.h"
diff --git a/ACE/ace/Stats.cpp b/ACE/ace/Stats.cpp
index 57f20799cc4..9166bee8ca6 100644
--- a/ACE/ace/Stats.cpp
+++ b/ACE/ace/Stats.cpp
@@ -273,15 +273,10 @@ ACE_Stats::print_summary (const u_int precision,
}
else
{
-#if !defined (ACE_HAS_WINCE)
ACE_OS::fprintf (file,
ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW: %s\n"),
ACE_OS::strerror (overflow_));
-#else
- // WinCE doesn't have strerror ;(
- ACE_OS::fprintf (file,
- ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW\n"));
-#endif /* ACE_HAS_WINCE */
+
return -1;
}
}
diff --git a/ACE/ace/TLI_Connector.cpp b/ACE/ace/TLI_Connector.cpp
index 9a11d2c880b..eb909aadfaf 100644
--- a/ACE/ace/TLI_Connector.cpp
+++ b/ACE/ace/TLI_Connector.cpp
@@ -159,7 +159,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
// non-blocking handle or whether there's really an error.
if (t_errno == TNODATA)
{
- if (timeout->sec () == 0 && timeout->usec () == 0)
+ if (*timeout == ACE_Time_Value::zero)
errno = EWOULDBLOCK;
else
result = this->complete (new_stream, 0, timeout);
diff --git a/ACE/ace/Token.cpp b/ACE/ace/Token.cpp
index a209b02183d..5018881ff6f 100644
--- a/ACE/ace/Token.cpp
+++ b/ACE/ace/Token.cpp
@@ -216,7 +216,7 @@ ACE_Token::shared_acquire (void (*sleep_hook_func)(void *),
}
// Do a quick check for "polling" behavior.
- if (timeout != 0 && timeout->sec () == 0 && timeout->usec () == 0)
+ if (timeout != 0 && *timeout == ACE_Time_Value::zero)
{
errno = ETIME;
return -1;
diff --git a/ACE/ace/UTF16_Encoding_Converter.cpp b/ACE/ace/UTF16_Encoding_Converter.cpp
index d57ab9e5154..f287f058712 100644
--- a/ACE/ace/UTF16_Encoding_Converter.cpp
+++ b/ACE/ace/UTF16_Encoding_Converter.cpp
@@ -305,7 +305,7 @@ ACE_UTF16_Encoding_Converter::encoded (const ACE_Byte* source,
static const size_t converted = begin * 4;
ACE_Byte target[converted];
- ACE_UTF16_Encoding_Converter* converter;
+ ACE_UTF16_Encoding_Converter* converter = 0;
ACE_NEW_RETURN (converter,
ACE_UTF16_Encoding_Converter (false),
0);
diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp
index b2f849ae3ad..bae271f850a 100644
--- a/ACE/ace/WFMO_Reactor.cpp
+++ b/ACE/ace/WFMO_Reactor.cpp
@@ -1756,9 +1756,12 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time,
// grab the lock and recheck the ok_to_wait_ event. When we can get them
// both, or there's an error/timeout, return.
#if defined (ACE_HAS_WINCE)
- ACE_Time_Value timeout = ACE_OS::gettimeofday ();
+ ACE_Time_Value timeout;
if (max_wait_time != 0)
- timeout += *max_wait_time;
+ {
+ timeout = ACE_OS::gettimeofday ();
+ timeout += *max_wait_time;
+ }
while (1)
{
int status;
@@ -1773,14 +1776,15 @@ ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time,
if (max_wait_time == 0)
status = this->lock_.acquire ();
else
- status = this->lock_.acquire (timeout);
+ {
+ status = this->lock_.acquire (timeout);
+ }
if (status == -1)
return -1;
// Have the lock_, now re-check the event. If it's not signaled,
// another thread changed something so go back and wait again.
- ACE_Time_Value poll_it = ACE_OS::gettimeofday ();
- if (this->ok_to_wait_.wait (&poll_it) == 0)
+ if (this->ok_to_wait_.wait (&ACE_Time_Value::zero, 0) == 0)
break;
this->lock_.release ();
}
@@ -1899,10 +1903,8 @@ ACE_WFMO_Reactor::expire_timers (void)
int
ACE_WFMO_Reactor::dispatch (DWORD wait_status)
{
- int handlers_dispatched = 0;
-
// Expire timers
- handlers_dispatched += this->expire_timers ();
+ int handlers_dispatched = this->expire_timers ();
switch (wait_status)
{
@@ -1937,7 +1939,7 @@ ACE_WFMO_Reactor::dispatch_handles (DWORD wait_status)
DWORD dispatch_slot = 0;
// Cache this value, this is the absolute value.
- DWORD max_handlep1 = this->handler_rep_.max_handlep1 ();
+ DWORD const max_handlep1 = this->handler_rep_.max_handlep1 ();
// nCount starts off at <max_handlep1>, this is a transient count of
// handles last waited on.
@@ -2215,7 +2217,7 @@ ACE_WFMO_Reactor::upcall (ACE_Event_Handler *event_handler,
}
}
- if (ACE_BIT_ENABLED (actual_events, FD_ACCEPT))
+ if (ACE_BIT_ENABLED (actual_events, FD_ACCEPT))
{
action = event_handler->handle_input (io_handle);
if (action <= 0)
diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h
index da20eaa6eca..bc7cfa7e621 100644
--- a/ACE/ace/config-WinCE.h
+++ b/ACE/ace/config-WinCE.h
@@ -103,6 +103,7 @@
# define ACE_USES_WINCE_SEMA_SIMULATION
# define ACE_LACKS_ERRNO_H
# define ACE_LACKS_DUP
+# define ACE_LACKS_GETSYSTEMTIMEASFILETIME
#endif
#define ACE_LACKS_REGNOTIFYCHANGEKEYVALUE
@@ -227,9 +228,6 @@
# define BUFSIZ 1024
#endif
-typedef void (__cdecl * __sighandler_t)(int); // keep Signal compilation happy
-typedef long off_t;
-
#define ACE_LACKS_MALLOC_H // We do have malloc.h, but don't use it.
#define ACE_HAS_WINCE_BROKEN_ERRNO
diff --git a/ACE/ace/os_include/os_signal.h b/ACE/ace/os_include/os_signal.h
index 4384e58a28a..dfde6708ff6 100644
--- a/ACE/ace/os_include/os_signal.h
+++ b/ACE/ace/os_include/os_signal.h
@@ -173,6 +173,10 @@ extern "C"
# define ACE_NSIG NSIG
#endif /* __Lynx__ */
+#if defined (ACE_HAS_WINCE)
+ typedef void (__cdecl * __sighandler_t)(int);
+#endif
+
#if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES) || defined (ACE_HAS_LYNXOS50_SIGNALS)
// Prototypes for both signal() and struct sigaction are consistent..
typedef void (*ACE_SignalHandler)(int);
diff --git a/ACE/ace/os_include/sys/os_types.h b/ACE/ace/os_include/sys/os_types.h
index af086149c86..bb416f3f46e 100644
--- a/ACE/ace/os_include/sys/os_types.h
+++ b/ACE/ace/os_include/sys/os_types.h
@@ -59,6 +59,10 @@ typedef double ACE_timer_t;
typedef unsigned int dev_t;
#endif /* ACE_LACKS_DEV_T */
+#if defined (ACE_HAS_WINCE)
+ typedef long off_t;
+#endif
+
#if defined(ACE_WIN32) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS==64)
typedef __int64 ACE_OFF_T;
#else