diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-19 09:11:03 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-19 09:11:03 +0000 |
commit | a2e2f45052399dd019ca5a3761445ec947bd54e6 (patch) | |
tree | d9d4aef2560d545313423c06c21072e59b588927 | |
parent | 145b4ab298bf86b70d13736606751d11aaa21015 (diff) | |
download | ATCD-a2e2f45052399dd019ca5a3761445ec947bd54e6.tar.gz |
CE stuff.
-rw-r--r-- | ace/ACE.cpp | 60 | ||||
-rw-r--r-- | ace/ACE.h | 12 | ||||
-rw-r--r-- | ace/Asynch_IO.cpp | 2 | ||||
-rw-r--r-- | ace/Asynch_IO.h | 2 | ||||
-rw-r--r-- | ace/OS.cpp | 10 | ||||
-rw-r--r-- | ace/OS.h | 18 | ||||
-rw-r--r-- | ace/OS.i | 95 | ||||
-rw-r--r-- | ace/Object_Manager.cpp | 14 | ||||
-rw-r--r-- | ace/Parse_Node.cpp | 38 | ||||
-rw-r--r-- | ace/Proactor.cpp | 2 | ||||
-rw-r--r-- | ace/Proactor.h | 2 | ||||
-rw-r--r-- | ace/Service_Config.cpp | 6 | ||||
-rw-r--r-- | ace/Service_Config.h | 9 | ||||
-rw-r--r-- | ace/Service_Config.i | 37 | ||||
-rw-r--r-- | ace/Service_Object.cpp | 6 | ||||
-rw-r--r-- | ace/Service_Object.h | 7 | ||||
-rw-r--r-- | ace/Service_Object.i | 14 | ||||
-rw-r--r-- | ace/Svc_Conf.y | 31 | ||||
-rw-r--r-- | ace/Svc_Conf_l.cpp | 4 | ||||
-rw-r--r-- | ace/Svc_Conf_y.cpp | 57 | ||||
-rw-r--r-- | ace/WFMO_Reactor.cpp | 18 | ||||
-rw-r--r-- | ace/WFMO_Reactor.h | 5 | ||||
-rw-r--r-- | ace/WFMO_Reactor.i | 27 | ||||
-rw-r--r-- | ace/ace_ce_dll.dsp | 489 | ||||
-rw-r--r-- | ace/config-WinCE.h | 3 |
25 files changed, 839 insertions, 129 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index cd183d83d5f..7080367bfc5 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -505,23 +505,19 @@ netsvc.so netsvc.so + warning libnetsvc.so */ -#if !defined (ACE_HAS_WINCE) -// @@ This is gradually getting out of hands. Changing this part -// also requires changing Parse_Node.*. I won't touch that for -// now. int -ACE::ldfind (const char filename[], - char pathname[], +ACE::ldfind (const ASYS_TCHAR filename[], + ASYS_TCHAR pathname[], size_t maxpathnamelen) { ACE_TRACE ("ACE::ldfind"); - char tempcopy[MAXPATHLEN + 1]; - char searchpathname[MAXPATHLEN + 1]; - char searchfilename[MAXPATHLEN + 1]; + ASYS_TCHAR tempcopy[MAXPATHLEN + 1]; + ASYS_TCHAR searchpathname[MAXPATHLEN + 1]; + ASYS_TCHAR searchfilename[MAXPATHLEN + 1]; // Create a copy of filename to work with. - if (ACE_OS::strlen (filename) + 1 > (sizeof tempcopy / sizeof (char))) + if (ACE_OS::strlen (filename) + 1 > (sizeof tempcopy / sizeof (ASYS_TCHAR))) { errno = ENOMEM; return -1; @@ -530,7 +526,7 @@ ACE::ldfind (const char filename[], ACE_OS::strcpy (tempcopy, filename); // Insert canonical directory separators. - char *separator_ptr; + ASYS_TCHAR *separator_ptr; if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') // Make all the directory separators ``canonical'' to simplify @@ -557,23 +553,34 @@ ACE::ldfind (const char filename[], // Check to see if this has an appropriate DLL suffix for the OS // platform. - char *s = ACE_OS::strrchr (searchfilename, '.'); + ASYS_TCHAR *s = ACE_OS::strrchr (searchfilename, '.'); + + ASYS_TCHAR *dll_suffix = +#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS) + ACE_DLL_SUFFIX; +#else + _TEXT (ACE_DLL_SUFFIX); +#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ if (s != 0) { // Check whether this matches the appropriate platform-specific suffix. - if (ACE_OS::strcmp (s, ACE_DLL_SUFFIX) == 0) + if (ACE_OS::strcmp (s, dll_suffix) == 0) got_suffix = 1; else ACE_ERROR ((LM_WARNING, - "Warning: improper suffix for a shared library on this platform: %s\n", + ASYS_TEXT ("Warning: improper suffix for a shared library on this platform: %s\n"), s)); } // Make sure we've got enough space in searchfilename. if (ACE_OS::strlen (searchfilename) + ACE_OS::strlen (ACE_DLL_PREFIX) + - got_suffix ? 0 : ACE_OS::strlen (ACE_DLL_SUFFIX) >= (sizeof searchfilename / sizeof (char))) +#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS) + got_suffix ? 0 : ACE_OS::strlen (dll_suffix) >= (sizeof searchfilename / sizeof (char))) +#else + got_suffix ? 0 : ACE_OS::strlen (dll_suffix) >= (sizeof searchfilename / sizeof (char))) +#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ { errno = ENOMEM; return -1; @@ -596,19 +603,19 @@ ACE::ldfind (const char filename[], // First, try matching the filename *without* adding a // prefix. - ACE_OS::sprintf (pathname, "%s%s%s", + ACE_OS::sprintf (pathname, ASYS_TEXT ("%s%s%s"), searchpathname, searchfilename, - got_suffix ? "" : ACE_DLL_SUFFIX); + got_suffix ? ASYS_TEXT ("") : dll_suffix); if (ACE_OS::access (pathname, F_OK) == 0) return 0; // Second, try matching the filename *with* adding a prefix. - ACE_OS::sprintf (pathname, "%s%s%s%s", + ACE_OS::sprintf (pathname, ASYS_TEXT ("%s%s%s%s"), searchpathname, ACE_DLL_PREFIX, searchfilename, - got_suffix ? "" : ACE_DLL_SUFFIX); + got_suffix ? ASYS_TEXT ("") : dll_suffix); if (ACE_OS::access (pathname, F_OK) == 0) return 0; } @@ -667,22 +674,22 @@ ACE::ldfind (const char filename[], // First, try matching the filename *without* adding a // prefix. - ACE_OS::sprintf (pathname, "%s%c%s%s", + ACE_OS::sprintf (pathname, ASYS_TEXT ("%s%c%s%s"), path_entry, ACE_DIRECTORY_SEPARATOR_CHAR, searchfilename, - got_suffix ? "" : ACE_DLL_SUFFIX); + got_suffix ? ASYS_TEXT ("") : dll_suffix); if (ACE_OS::access (pathname, F_OK) == 0) break; // Second, try matching the filename *with* adding a // prefix. - ACE_OS::sprintf (pathname, "%s%c%s%s%s", + ACE_OS::sprintf (pathname, ASYS_TEXT ("%s%c%s%s%s"), path_entry, ACE_DIRECTORY_SEPARATOR_CHAR, ACE_DLL_PREFIX, searchfilename, - got_suffix ? "" : ACE_DLL_SUFFIX); + got_suffix ? ASYS_TEXT ("") : dll_suffix); if (ACE_OS::access (pathname, F_OK) == 0) break; @@ -702,17 +709,16 @@ ACE::ldfind (const char filename[], } FILE * -ACE::ldopen (const char *filename, const char *type) +ACE::ldopen (const ASYS_TCHAR *filename, const ASYS_TCHAR *type) { ACE_TRACE ("ACE::ldopen"); - char buf[MAXPATHLEN + 1]; + ASYS_TCHAR buf[MAXPATHLEN + 1]; - if (ACE::ldfind (filename, buf, sizeof buf) == -1) + if (ACE::ldfind (filename, buf, sizeof (buf)/sizeof (ASYS_TCHAR)) == -1) return 0; else return ACE_OS::fopen (buf, type); } -#endif /* ACE_HAS_WINCE */ const char * ACE::basename (const char *pathname, char delim) diff --git a/ace/ACE.h b/ace/ACE.h index c5ce96096b4..9153b304519 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -451,11 +451,8 @@ public: // = Methods for searching and opening shared libraries. -#if !defined (ACE_HAS_WINCE) - // @@ I'll leave the best part to the very last. ;) - - static int ldfind (const char *filename, - char *pathname, + static int ldfind (const ASYS_TCHAR *filename, + ASYS_TCHAR *pathname, size_t maxlen); // Finds the file <filename> either using an absolute path or using // a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g., @@ -465,12 +462,11 @@ public: // apply the appropriate prefix (e.g., "lib" on UNIX and "" on // Win32) if the <filename> doesn't match directly. - static FILE *ldopen (const char *filename, - const char *type); + static FILE *ldopen (const ASYS_TCHAR *filename, + const ASYS_TCHAR *type); // Uses <ldopen> to locate and open the appropriate <filename> and // returns a pointer to the file, else it returns a NULL // pointer. <type> specifies how the file should be open. -#endif /* !ACE_HAS_WINCE */ // = Shield us from Win32's inability to select on STDIN. diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp index 2035e4bb5eb..b3ac3e9d258 100644 --- a/ace/Asynch_IO.cpp +++ b/ace/Asynch_IO.cpp @@ -4,7 +4,7 @@ #define ACE_BUILD_DLL #include "ace/Asynch_IO.h" -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) // This only works on Win32 platforms #include "ace/Proactor.h" diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h index 81f96c591af..5539eb5075c 100644 --- a/ace/Asynch_IO.h +++ b/ace/Asynch_IO.h @@ -27,7 +27,7 @@ #include "ace/OS.h" -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) // Forward declarations class ACE_Proactor; diff --git a/ace/OS.cpp b/ace/OS.cpp index e7175bb50c6..f5276d9efcf 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -25,11 +25,11 @@ #include "ace/Object_Manager.h" #if defined (ACE_HAS_WINCE) -const wchar_t *day_of_week_name[] = {L"Sun", L"Mon", L"Tue", L"Wed", - L"Thr", L"Fri", L"Sat"}; -const wchar_t *month_name[] = {L"Jan", L"Feb", L"Mar", L"Apr", - L"May", L"Jun", L"Jul", L"Aug", - L"Sep", L"Oct", L"Nov", L"Dec" }; +const wchar_t *ACE_OS::day_of_week_name[] = {L"Sun", L"Mon", L"Tue", L"Wed", + L"Thr", L"Fri", L"Sat"}; +const wchar_t *ACE_OS::month_name[] = {L"Jan", L"Feb", L"Mar", L"Apr", + L"May", L"Jun", L"Jul", L"Aug", + L"Sep", L"Oct", L"Nov", L"Dec" }; #endif /* ACE_HAS_WINCE */ #if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) @@ -4990,6 +4990,24 @@ private: #endif /* ACE_HAS_WINCE */ }; +#if defined (ACE_HAS_WINCE) +// **** Warning **** +// You should not use the following functions under CE at all. +// **** Warning **** +size_t fwrite (void *buf, size_t sz, size_t count, FILE *fp); +size_t fread (void *buf, size_t sz, size_t count, FILE *fp); +int getc (FILE *fp); +int ferror (FILE *fp); +int isatty (ACE_HANDLE h); +ACE_HANDLE fileno (FILE *fp); +int fflush (FILE *fp); +void exit (int status); +int fprintf (FILE *fp, char *format, const char *msg); // not a general purpose + // fprintf at all. +int printf (const char *format, ...); +int putchar (int c); +#endif /* ACE_HAS_WINCE */ + #if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES) extern "C" ssize_t send_timedwait (ACE_HANDLE handle, const char *buf, @@ -1030,8 +1030,7 @@ ACE_OS::_exit (int status) #elif !defined (ACE_HAS_WINCE) ::_exit (status); #else - ACE_UNUSED_ARG (status); - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("Don't know how to implement _exit yet!\n"))); + ::TerminateProcess (::GetCurrentProcess (), status); #endif /* VXWORKS */ } @@ -1183,7 +1182,7 @@ ACE_OS::strrchr (const char *s, int c) #if !defined (ACE_LACKS_STRRCHR) return (const char *) ::strrchr (s, c); #else - char *p = s + ::strlen (s); + const char *p = s + ::strlen (s); while (*p != c) if (p == s) @@ -6513,9 +6512,9 @@ ACE_OS::exit (int status) ::exit (status); #endif /* ACE_WIN32 */ #else - // @@ Whew, WinCE doesn't have ExitProcess and TerminateProcess - // is not exactly what we want. How can we solve this???? - ACE_UNUSED_ARG (status); + // @@ This is not exactly the same as ExitProcess. But this is the + // closest one I can get. + ::TerminateProcess (::GetCurrentProcess (), status); #endif /* ACE_HAS_WINCE */ } @@ -7088,7 +7087,13 @@ ACE_OS::open (const char *filename, LPSECURITY_ATTRIBUTES sa) { // ACE_TRACE ("ACE_OS::open"); -#if defined (ACE_WIN32) +#if defined (ACE_HAS_WINCE) + ACE_UNUSED_ARG (filename); + ACE_UNUSED_ARG (mode); + ACE_UNUSED_ARG (perms); + ACE_UNUSED_ARG (sa); + return 0; +#elif defined (ACE_WIN32) ACE_UNUSED_ARG (perms); // Warning: This function ignores _O_APPEND @@ -9018,3 +9023,79 @@ ACE_Thread_Adapter::entry_point (void) { return this->entry_point_; } + +#if defined (ACE_HAS_WINCE) +ACE_INLINE size_t +fwrite (void *buf, size_t sz, size_t count, FILE *fp) +{ + return ACE_OS::fwrite (buf, sz, count, fp); +} + +ACE_INLINE size_t +fread (void *buf, size_t sz, size_t count, FILE *fp) +{ + return ACE_OS::fread (buf, sz, count, fp); +} + +ACE_INLINE int +getc (FILE *fp) +{ + char retv; + if (ACE_OS::fread (&retv, 1, 1, fp) != 1) + return EOF; + else + return retv; +} + +ACE_INLINE int +ferror (FILE *fp) +{ + // @@ Hey! What should I implement here? + return 0; +} + +ACE_INLINE int +isatty (ACE_HANDLE h) +{ + return ACE_OS::isatty (h); +} + +ACE_INLINE ACE_HANDLE +fileno (FILE *fp) +{ + return fp; +} + +ACE_INLINE int +fflush (FILE *fp) +{ + return ACE_OS::fflush (fp); +} + +ACE_INLINE void +exit (int status) +{ + ACE_OS::exit (status); +} + +ACE_INLINE int +fprintf (FILE *fp, char *format, const char *msg) +{ + ACE_DEBUG ((LM_DEBUG, ASYS_WIDE_STRING (format), ASYS_WIDE_STRING (msg))); + return 0; +} + +ACE_INLINE int +printf (const char *format, ...) +{ + ACE_UNUSED_ARG (format); + return 0; +} + +ACE_INLINE int +putchar (int c) +{ + ACE_UNUSED_ARG (c); + return c; +} +#endif /* ACE_HAS_WINCE */ diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp index b2ed8de84bd..3b288ba9af3 100644 --- a/ace/Object_Manager.cpp +++ b/ace/Object_Manager.cpp @@ -4,7 +4,9 @@ #include "ace/Object_Manager.h" #include "ace/Token_Manager.h" +#if !defined (ACE_HAS_WINCE) #include "ace/Naming_Context.h" +#endif /* !ACE_HAS_WINCE */ #include "ace/Service_Manager.h" #include "ace/Service_Config.h" #include "ace/Signal.h" @@ -99,7 +101,9 @@ public: ~ACE_Object_Manager_Preallocations(); private: +#if !defined (ACE_HAS_WINCE) ACE_Static_Svc_Descriptor ace_svc_desc_ACE_Naming_Context; +#endif /* !ACE_HAS_WINCE */ ACE_Static_Svc_Descriptor ace_svc_desc_ACE_Service_Manager; }; @@ -115,16 +119,18 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations () { // Define the static services. This macro call creates static service // descriptors that are used for initialization below. +#if !defined (ACE_HAS_WINCE) ACE_STATIC_SVC_DEFINE (ACE_Naming_Context_initializer, - "ACE_Naming_Context", + ASYS_TEXT ("ACE_Naming_Context"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (ACE_Naming_Context), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, 0) +#endif /* !ACE_HAS_WINCE */ ACE_STATIC_SVC_DEFINE (ACE_Service_Manager_initializer, - "ACE_Service_Manager", + ASYS_TEXT ("ACE_Service_Manager"), ACE_SVC_OBJ_T, &ACE_SVC_NAME (ACE_Service_Manager), ACE_Service_Type::DELETE_THIS | @@ -133,15 +139,19 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations () // Initialize the static service objects using the descriptors created // above. +#if !defined (ACE_HAS_WINCE) ace_svc_desc_ACE_Naming_Context = ace_svc_desc_ACE_Naming_Context_initializer; +#endif /* !ACE_HAS_WINCE */ ace_svc_desc_ACE_Service_Manager = ace_svc_desc_ACE_Service_Manager_initializer; // Add to the list of static configured services. +#if !defined (ACE_HAS_WINCE) ACE_Service_Config::static_svcs ()-> insert (&ace_svc_desc_ACE_Naming_Context); +#endif /* !ACE_HAS_WINCE */ ACE_Service_Config::static_svcs ()-> insert (&ace_svc_desc_ACE_Service_Manager); diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index d8048f5b1ad..7a2b9b32a15 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -34,7 +34,7 @@ ACE_Stream_Node::apply (void) ACE_TRACE ("ACE_Stream_Node::apply"); if (ACE_Service_Config::initialize (this->node_->record (), - ASYS_WIDE_STRING (this->node_->parameters ())) == -1) + this->node_->parameters ()) == -1) ace_yyerrno++; ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("did stream on %s, error = %d\n"), @@ -206,7 +206,7 @@ ACE_Remove_Node::apply (void) ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Type *sr, char *parms) - : ACE_Static_Node (sr->name (), parms), + : ACE_Static_Node (sr->chname (), parms), record_ (sr) { ACE_TRACE ("ACE_Dynamic_Node::ACE_Dynamic_Node"); @@ -270,7 +270,7 @@ ACE_Static_Node::record (void) const ACE_Service_Type *sr; if (ACE_Service_Repository::instance()->find - (this->name (), (const ACE_Service_Type **) &sr) == -1) + (ACE_WIDE_STRING (this->name ()), (const ACE_Service_Type **) &sr) == -1) return 0; else return sr; @@ -371,13 +371,13 @@ ACE_Location_Node::open_handle (void) { ACE_TRACE ("ACE_Location_Node::open_handle"); - char dl_pathname[MAXPATHLEN + 1]; + ASYS_TCHAR dl_pathname[MAXPATHLEN + 1]; // Transform the pathname into the appropriate dynamic link library // by searching the ACE_LD_SEARCH_PATH. - ACE::ldfind (this->pathname (), + ACE::ldfind (ACE_WIDE_STRING (this->pathname ()), dl_pathname, - (sizeof dl_pathname / sizeof (char))); + (sizeof dl_pathname / sizeof (ASYS_TCHAR))); this->handle (ACE_OS::dlopen (dl_pathname)); @@ -389,7 +389,7 @@ ACE_Location_Node::open_handle (void) ASYS_TEXT ("dlopen failed for %s"), dl_pathname)); - char *errmsg = ACE_OS::dlerror (); + ASYS_TCHAR *errmsg = ACE_OS::dlerror (); if (errmsg != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -428,9 +428,11 @@ ACE_Object_Node::symbol (void) ACE_TRACE ("ACE_Object_Node::symbol"); if (this->open_handle () != 0) { + ASYS_TCHAR *wname = ACE_const_cast (ASYS_TCHAR*, + ASYS_WIDE_STRING (this->object_name_)); this->symbol_ = (void *) ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (), - (char *) this->object_name_); + wname); if (this->symbol_ == 0) { @@ -438,9 +440,9 @@ ACE_Object_Node::symbol (void) ACE_ERROR ((LM_ERROR, ASYS_TEXT ("dlsym failed for object %s\n"), - this->object_name_)); + wname)); - char *errmsg = ACE_OS::dlerror (); + ASYS_TCHAR *errmsg = ACE_OS::dlerror (); if (errmsg != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -492,9 +494,12 @@ ACE_Function_Node::symbol (void) // Locate the factory function <function_name> in the shared // object. + ASYS_TCHAR *wname = ACE_const_cast (ASYS_TCHAR *, + ASYS_WIDE_STRING (this->function_name_)); + func = (void *(*)(void)) ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (), - (ACE_DL_TYPE) this->function_name_); + wname); if (func == 0) { @@ -506,9 +511,9 @@ ACE_Function_Node::symbol (void) ACE_ERROR ((LM_ERROR, ASYS_TEXT ("dlsym failed for function %s\n"), - this->function_name_)); + wname)); - char *errmsg = ACE_OS::dlerror (); + ASYS_TCHAR *errmsg = ACE_OS::dlerror (); if (errmsg != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -603,15 +608,16 @@ ACE_Static_Function_Node::symbol (void) ACE_Static_Svc_Descriptor **ssdp = 0; ACE_STATIC_SVCS &svcs = *ACE_Service_Config::static_svcs (); + ASYS_TCHAR *wname = ACE_const_cast (ASYS_TCHAR *, + ASYS_WIDE_STRING (this->function_name_)); for (ACE_STATIC_SVCS_ITERATOR iter (svcs); iter.next (ssdp) != 0; iter.advance ()) { ACE_Static_Svc_Descriptor *ssd = *ssdp; - if (ACE_OS::strcmp (ssd->name_, - this->function_name_) == 0) + wname) == 0) func = (void *(*)(void)) ssd->alloc_; } @@ -625,7 +631,7 @@ ACE_Static_Function_Node::symbol (void) ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("no static service registered for function %s\n"), - this->function_name_), + wname), 0); } } diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp index d8b7db5a3c5..237260ba434 100644 --- a/ace/Proactor.cpp +++ b/ace/Proactor.cpp @@ -4,7 +4,7 @@ #define ACE_BUILD_DLL #include "ace/Proactor.h" -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) // This only works on Win32 platforms #include "ace/Task_T.h" diff --git a/ace/Proactor.h b/ace/Proactor.h index c785aa2b3a8..19731d00ae2 100644 --- a/ace/Proactor.h +++ b/ace/Proactor.h @@ -27,7 +27,7 @@ #include "ace/Timer_Heap.h" #include "ace/Timer_Wheel.h" -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) // This only works on Win32 platforms // Forward declarations. diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 38faf6456e0..9e7aee972ae 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -10,7 +10,9 @@ #include "ace/Service_Types.h" #include "ace/Containers.h" #include "ace/Auto_Ptr.h" -#include "ace/Proactor.h" +#if !defined (ACE_HAS_WINCE) +# include "ace/Proactor.h" +#endif /* !ACE_HAS_WINCE */ #include "ace/Reactor.h" #include "ace/Thread_Manager.h" @@ -547,7 +549,9 @@ ACE_Service_Config::close_singletons (void) ACE_TRACE ("ACE_Service_Config::close_singletons"); ACE_Reactor::close_singleton (); +#if !defined (ACE_HAS_WINCE) ACE_Proactor::close_singleton (); +#endif /* !ACE_HAS_WINCE */ ACE_Thread_Manager::close_singleton (); return 0; diff --git a/ace/Service_Config.h b/ace/Service_Config.h index c2c87818ed7..3cd1222727b 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -241,6 +241,15 @@ public: // Totally remove <svc_name> from the daemon by removing it // from the ACE_Reactor, and unlinking it if necessary. +#if defined (ACE_HAS_WINCE) + // We must provide these function to bridge Svc_Conf parser with ACE. + static int initialize (const ACE_Service_Type *, char parameters[]); + static int initialize (const char svc_name[], char parameters[]); + static int resume (const char svc_name[]); + static int suspend (const char svc_name[]); + static int remove (const char svc_name[]); +#endif /* ACE_HAS_WINCE */ + void dump (void) const; // Dump the state of an object. diff --git a/ace/Service_Config.i b/ace/Service_Config.i index 1550381c637..ae3c0bd2704 100644 --- a/ace/Service_Config.i +++ b/ace/Service_Config.i @@ -29,3 +29,40 @@ ACE_Service_Config::signal_handler (ACE_Sig_Adapter *signal_handler) { signal_handler_ = signal_handler; } + +#if defined (ACE_HAS_WINCE) + // We must provide these function to bridge Svc_Conf parser with ACE. + +ACE_INLINE int +ACE_Service_Config::initialize (const ACE_Service_Type *sp, char parameters[]) +{ + wchar_t *wparameters = ACE_const_cast (wchar_t *, ACE_WIDE_STRING (parameters)); + return ACE_Service_Config::initialize (sp, wparameters); +} + +ACE_INLINE int +ACE_Service_Config::initialize (const char svc_name[], char parameters[]) +{ + const wchar_t *wsvc_name = ACE_WIDE_STRING (svc_name); + wchar_t *wparameters = ACE_const_cast (wchar_t *, ACE_WIDE_STRING (parameters)); + return ACE_Service_Config::initialize (wsvc_name, wparameters); +} + +ACE_INLINE int +ACE_Service_Config::resume (const char svc_name[]) +{ + return ACE_Service_Config::resume (ACE_WIDE_STRING (svc_name)); +} + +ACE_INLINE int +ACE_Service_Config::suspend (const char svc_name[]) +{ + return ACE_Service_Config::suspend (ACE_WIDE_STRING (svc_name)); +} + +ACE_INLINE int +ACE_Service_Config::remove (const char svc_name[]) +{ + return ACE_Service_Config::remove (ACE_WIDE_STRING (svc_name)); +} +#endif /* ACE_HAS_WINCE */ diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp index c2a374222c7..f33fc87d649 100644 --- a/ace/Service_Object.cpp +++ b/ace/Service_Object.cpp @@ -24,6 +24,9 @@ ACE_Service_Type::ACE_Service_Type (const ASYS_TCHAR *n, const ACE_SHLIB_HANDLE h, int active) : name_ (0), +#if defined (ACE_HAS_MOSTLY_UNICODE_APIS) + chname_ (0), +#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ type_ (t), handle_ (h), active_ (active) @@ -39,6 +42,9 @@ ACE_Service_Type::~ACE_Service_Type (void) if (this->handle_ != 0) ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_); delete [] (ASYS_TCHAR *) this->name_; +#if defined (ACE_HAS_MOSTLY_UNICODE_APIS) + delete [] (char *) this->chname_; +#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ } void diff --git a/ace/Service_Object.h b/ace/Service_Object.h index 980017554e1..a5e285c9a37 100644 --- a/ace/Service_Object.h +++ b/ace/Service_Object.h @@ -73,6 +73,7 @@ public: const ASYS_TCHAR *name (void) const; void name (const ASYS_TCHAR *); + const char *chname (void) const; const ACE_Service_Type_Impl *type (void) const; void type (const ACE_Service_Type_Impl *, @@ -96,6 +97,12 @@ private: const ASYS_TCHAR *name_; // Humanly readible name of svc. +#if defined (ACE_HAS_MOSTLY_UNICODE_APIS) + char *chname_; + // This interface is used to pass char name when instantiate + // ACE_Parse_Node. +#endif /* ACE_HAS_MOSTLY_UNICODE_APIS */ + const ACE_Service_Type_Impl *type_; // Pointer to C++ object that implements the svc. diff --git a/ace/Service_Object.i b/ace/Service_Object.i index d58e7fa8dbb..d8e511b9ca9 100644 --- a/ace/Service_Object.i +++ b/ace/Service_Object.i @@ -26,6 +26,16 @@ ACE_Service_Type::name (void) const return this->name_; } +ACE_INLINE const char * +ACE_Service_Type::chname (void) const +{ +#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS) + return this->name (); +#else + return this->chname_; +#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */ +} + ACE_INLINE const ACE_Service_Type_Impl * ACE_Service_Type::type (void) const { @@ -47,6 +57,10 @@ ACE_Service_Type::name (const ASYS_TCHAR *n) delete [] (ASYS_TCHAR *) this->name_; this->name_ = ACE_OS::strcpy (new ASYS_TCHAR [ACE_OS::strlen (n) + 1], n); +#if defined (ACE_HAS_MOSTLY_UNICODE_APIS) + delete [] (char *) this->chname_; + this->chname_ = ACE_MULTIBYTE_STRING (this->name_); +#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */ } ACE_INLINE void diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y index b248c66eb8c..1979ca959c4 100644 --- a/ace/Svc_Conf.y +++ b/ace/Svc_Conf.y @@ -147,7 +147,7 @@ module { if ($<static_node_>1 != 0) { - ACE_ARGV args ($<static_node_>1->parameters ()); + ACE_ARGV args (ASYS_WIDE_STRING ($<static_node_>1->parameters ())); ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1); if (mt->init (args.argc (), args.argv ()) == -1 @@ -202,8 +202,9 @@ svc_location if (sym != 0) { - ACE_Service_Type_Impl *stp = ace_create_service_type ($1, $2, sym, flags); - $$ = new ACE_Service_Type ($1, stp, $3->handle (), $4); + ACE_Service_Type_Impl *stp + = ace_create_service_type (ASYS_WIDE_STRING ($1), $2, sym, flags); + $$ = new ACE_Service_Type (ASYS_WIDE_STRING ($1), stp, $3->handle (), $4); } else { @@ -289,7 +290,7 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name) const ACE_Service_Type *sr = str_rec->record (); const ACE_Service_Type_Impl *type = sr->type (); ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type; - ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name); + ACE_Module_Type *mt = st == 0 ? 0 : st->find (ASYS_WIDE_STRING (svc_name)); if (sr == 0 || st == 0 || mt == 0) { @@ -311,34 +312,35 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type) const ACE_Service_Type *sv = svc_type->record (); type = sv->type (); ACE_Module_Type *mt = (ACE_Module_Type *) type; + const char *module_type_name = svc_type->name (); + const ASYS_TCHAR *wname = ASYS_WIDE_STRING (module_type_name); if (sr == 0 || st == 0 || mt == 0) { ACE_ERROR ((LM_ERROR, ASYS_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"), - ASYS_WIDE_STRING (svc_type->name ()), + wname, ASYS_WIDE_STRING (str_rec->name ()))); yyerrno++; } // Make sure that the Module has the same name as the // Module_Type object from the svc.conf file. - const char *module_type_name = svc_type->name (); ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) + if (ACE_OS::strcmp (mp->name (), wname) != 0) { ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"), - ASYS_WIDE_STRING (module_type_name), - ASYS_WIDE_STRING (mp->name ()))); - mp->name (module_type_name); + wname, + mp->name ())); + mp->name (wname); } return mt; } ACE_Service_Type_Impl * -ace_create_service_type (const char *name, +ace_create_service_type (const ASYS_TCHAR *name, int type, void *symbol, u_int flags) @@ -353,17 +355,18 @@ ace_create_service_type (const char *name, { case ACE_SVC_OBJ_T: ACE_NEW_RETURN (stp, - ACE_Service_Object_Type ((ACE_Service_Object *) symbol, name, flags), + ACE_Service_Object_Type ((ACE_Service_Object *) symbol, + ASYS_WIDE_STRING (name), flags), 0); break; case ACE_MODULE_T: ACE_NEW_RETURN (stp, - ACE_Module_Type (symbol, name, flags), + ACE_Module_Type (symbol, ASYS_WIDE_STRING (name), flags), 0); break; case ACE_STREAM_T: ACE_NEW_RETURN (stp, - ACE_Stream_Type (symbol, name, flags), + ACE_Stream_Type (symbol, ASYS_WIDE_STRING (name), flags), 0); break; default: diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp index 62482eb63a7..53400f77bd3 100644 --- a/ace/Svc_Conf_l.cpp +++ b/ace/Svc_Conf_l.cpp @@ -748,7 +748,7 @@ case 19: YY_USER_ACTION # line 52 "Svc_Conf.l" { // Eliminate the opening and closing double quotes - *strrchr (ace_yytext, '"') = '\0'; + *ACE_OS::strrchr (ace_yytext, '"') = '\0'; ace_yyleng -= 1; ace_yylval.ident_ = ace_obstack->copy (ace_yytext + 1, ace_yyleng); return token (ACE_STRING); } @@ -782,7 +782,7 @@ YY_USER_ACTION case 24: YY_USER_ACTION # line 67 "Svc_Conf.l" -{ ACE_ERROR ((LM_ERROR, "unknown char = %d\n", *ace_yytext)); } +{ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("unknown char = %d\n"), *ace_yytext)); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PARAMETERS): diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp index 495f33297cd..f7b95330435 100644 --- a/ace/Svc_Conf_y.cpp +++ b/ace/Svc_Conf_y.cpp @@ -244,7 +244,7 @@ YYSTYPE ace_yylval; #define ace_yystacksize YYSTACKSIZE short ace_yyss[YYSTACKSIZE]; YYSTYPE ace_yyvs[YYSTACKSIZE]; -#line 273 "Svc_Conf.y" +#line 274 "Svc_Conf.y" // Prints the error string to standard output. Cleans up the error // messages. @@ -264,7 +264,7 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name) const ACE_Service_Type *sr = str_rec->record (); const ACE_Service_Type_Impl *type = sr->type (); ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type; - ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name); + ACE_Module_Type *mt = st == 0 ? 0 : st->find (ASYS_WIDE_STRING (svc_name)); if (sr == 0 || st == 0 || mt == 0) { @@ -286,34 +286,35 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type) const ACE_Service_Type *sv = svc_type->record (); type = sv->type (); ACE_Module_Type *mt = (ACE_Module_Type *) type; + const char *module_type_name = svc_type->name (); + const ASYS_TCHAR *wname = ASYS_WIDE_STRING (module_type_name); if (sr == 0 || st == 0 || mt == 0) { ACE_ERROR ((LM_ERROR, ASYS_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"), - ASYS_WIDE_STRING (svc_type->name ()), + wname, ASYS_WIDE_STRING (str_rec->name ()))); ace_yyerrno++; } // Make sure that the Module has the same name as the // Module_Type object from the svc.conf file. - const char *module_type_name = svc_type->name (); ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) + if (ACE_OS::strcmp (mp->name (), wname) != 0) { ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"), - ASYS_WIDE_STRING (module_type_name), - ASYS_WIDE_STRING (mp->name ()))); - mp->name (module_type_name); + wname, + mp->name ())); + mp->name (wname); } return mt; } ACE_Service_Type_Impl * -ace_create_service_type (const char *name, +ace_create_service_type (const ASYS_TCHAR *name, int type, void *symbol, u_int flags) @@ -328,17 +329,18 @@ ace_create_service_type (const char *name, { case ACE_SVC_OBJ_T: ACE_NEW_RETURN (stp, - ACE_Service_Object_Type ((ACE_Service_Object *) symbol, name, flags), + ACE_Service_Object_Type ((ACE_Service_Object *) symbol, + ASYS_WIDE_STRING (name), flags), 0); break; case ACE_MODULE_T: ACE_NEW_RETURN (stp, - ACE_Module_Type (symbol, name, flags), + ACE_Module_Type (symbol, ASYS_WIDE_STRING (name), flags), 0); break; case ACE_STREAM_T: ACE_NEW_RETURN (stp, - ACE_Stream_Type (symbol, name, flags), + ACE_Stream_Type (symbol, ASYS_WIDE_STRING (name), flags), 0); break; default: @@ -371,7 +373,7 @@ main (int argc, char *argv[]) return ace_yyparse (); } #endif /* DEBUGGING */ -#line 375 "Svc_Conf_y.cpp" +#line 377 "Svc_Conf_y.cpp" #define YYABORT goto ace_yyabort #define YYACCEPT goto ace_yyaccept #define YYERROR goto ace_yyerrlab @@ -788,7 +790,7 @@ case 25: { if (ace_yyvsp[0].static_node_ != 0) { - ACE_ARGV args (ace_yyvsp[0].static_node_->parameters ()); + ACE_ARGV args (ASYS_WIDE_STRING (ace_yyvsp[0].static_node_->parameters ())); ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_); if (mt->init (args.argc (), args.argv ()) == -1 @@ -850,8 +852,9 @@ case 30: if (sym != 0) { - ACE_Service_Type_Impl *stp = ace_create_service_type (ace_yyvsp[-3].ident_, ace_yyvsp[-2].type_, sym, flags); - ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_, stp, ace_yyvsp[-1].location_node_->handle (), ace_yyvsp[0].type_); + ACE_Service_Type_Impl *stp + = ace_create_service_type (ASYS_WIDE_STRING (ace_yyvsp[-3].ident_), ace_yyvsp[-2].type_, sym, flags); + ace_yyval.svc_record_ = new ACE_Service_Type (ASYS_WIDE_STRING (ace_yyvsp[-3].ident_), stp, ace_yyvsp[-1].location_node_->handle (), ace_yyvsp[0].type_); } else { @@ -862,64 +865,64 @@ case 30: } break; case 31: -#line 219 "Svc_Conf.y" +#line 220 "Svc_Conf.y" { ace_yyval.type_ = 1; } break; case 32: -#line 223 "Svc_Conf.y" +#line 224 "Svc_Conf.y" { ace_yyval.type_ = 0; } break; case 33: -#line 227 "Svc_Conf.y" +#line 228 "Svc_Conf.y" { ace_yyval.type_ = 1; } break; case 34: -#line 234 "Svc_Conf.y" +#line 235 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_); } break; case 35: -#line 238 "Svc_Conf.y" +#line 239 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_); } break; case 36: -#line 242 "Svc_Conf.y" +#line 243 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_); } break; case 37: -#line 249 "Svc_Conf.y" +#line 250 "Svc_Conf.y" { ace_yyval.type_ = ACE_MODULE_T; } break; case 38: -#line 253 "Svc_Conf.y" +#line 254 "Svc_Conf.y" { ace_yyval.type_ = ACE_SVC_OBJ_T; } break; case 39: -#line 257 "Svc_Conf.y" +#line 258 "Svc_Conf.y" { ace_yyval.type_ = ACE_STREAM_T; } break; case 41: -#line 264 "Svc_Conf.y" +#line 265 "Svc_Conf.y" { ace_yyval.ident_ = 0; } break; -#line 922 "Svc_Conf_y.cpp" +#line 925 "Svc_Conf_y.cpp" } ace_yyssp -= ace_yym; ace_yystate = *ace_yyssp; diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp index 135091e3aa8..0ede7bfae7a 100644 --- a/ace/WFMO_Reactor.cpp +++ b/ace/WFMO_Reactor.cpp @@ -8,12 +8,12 @@ #include "ace/Timer_Heap.h" #include "ace/Thread.h" -#if defined (ACE_WIN32) - #if !defined (__ACE_INLINE__) #include "ace/WFMO_Reactor.i" #endif /* __ACE_INLINE__ */ +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) + #include "ace/Auto_Ptr.h" ACE_WFMO_Reactor_Handler_Repository::ACE_WFMO_Reactor_Handler_Repository (ACE_WFMO_Reactor &wfmo_reactor) @@ -868,8 +868,8 @@ ACE_WFMO_Reactor::open (size_t size, // Open the handle repository // Two additional handles for internal purposes if (this->handler_rep_.open (size + 2) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", - "opening handler repository"), + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), + ASYS_TEXT ("opening handler repository")), -1); else this->delete_handler_rep_ = 1; @@ -879,15 +879,15 @@ ACE_WFMO_Reactor::open (size_t size, // Open the notification handler if (this->notify_handler_.open (*this, this->timer_queue_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", - "opening notify handler "), + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), + ASYS_TEXT ("opening notify handler ")), -1); // Register for <wakeup_all_threads> event if (this->register_handler (&this->wakeup_all_threads_handler_, this->wakeup_all_threads_.handle ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", - "registering thread wakeup handler"), + ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), + ASYS_TEXT ("registering thread wakeup handler")), -1); // Since we have added two handles into the handler repository, @@ -1621,7 +1621,7 @@ ACE_WFMO_Reactor_Notify::handle_signal (int signum, result = buffer->eh_->handle_exception (ACE_INVALID_HANDLE); break; default: - ACE_ERROR ((LM_ERROR, "invalid mask = %d\n", buffer->mask_)); + ACE_ERROR ((LM_ERROR, ASYS_TEXT ("invalid mask = %d\n"), buffer->mask_)); break; } if (result == -1) diff --git a/ace/WFMO_Reactor.h b/ace/WFMO_Reactor.h index 01290b4ca88..801cd9ad888 100644 --- a/ace/WFMO_Reactor.h +++ b/ace/WFMO_Reactor.h @@ -438,7 +438,8 @@ private: // An auto event is used so that we can <signal> it to wakeup one // thread up (e.g., when the <notify> method is called). -#if defined (ACE_WIN32) // because Sun C++ 4.1 can't cope with this declaration: +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) +// because Sun C++ 4.1 can't cope with this declaration: ACE_Message_Queue<ACE_MT_SYNCH> message_queue_; #endif /* ACE_WIN32 */ // Message queue that keeps track of pending <ACE_Event_Handlers>. @@ -454,7 +455,7 @@ private: // -1, which means "iterate until the queue is empty." }; -#if defined (ACE_WIN32) +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) class ACE_Export ACE_WFMO_Reactor : public ACE_Reactor_Impl { // = TITLE diff --git a/ace/WFMO_Reactor.i b/ace/WFMO_Reactor.i index 3caa922ad44..fddce6ee27d 100644 --- a/ace/WFMO_Reactor.i +++ b/ace/WFMO_Reactor.i @@ -3,8 +3,6 @@ #include "ace/Handle_Set.h" -#if defined (ACE_WIN32) - /************************************************************/ ACE_INLINE int @@ -21,6 +19,8 @@ ACE_Wakeup_All_Threads_Handler::handle_signal (int signum, return 0; } +#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) + /************************************************************/ ACE_INLINE @@ -563,7 +563,7 @@ ACE_WFMO_Reactor::suspend_handlers (void) // First suspend all current handles int changes_required = 0; - for (int i = 0; i < this->handler_rep_.max_handlep1_ && error == 0; i++) + for (size_t i = 0; i < this->handler_rep_.max_handlep1_ && error == 0; i++) { result = this->handler_rep_.suspend_handler_i (this->handler_rep_.current_handles_[i], changes_required); if (result == -1) @@ -572,7 +572,7 @@ ACE_WFMO_Reactor::suspend_handlers (void) if (!error) // Then suspend all to_be_added_handles - for (int i = 0; i < this->handler_rep_.handles_to_be_added_; i++) + for (size_t i = 0; i < this->handler_rep_.handles_to_be_added_; i++) { this->handler_rep_.to_be_added_info_[i].suspend_entry_ = 1; } @@ -644,7 +644,7 @@ ACE_WFMO_Reactor::resume_handlers (void) if (!error) // Then resume all to_be_added_handles - for (int i = 0; i < this->handler_rep_.handles_to_be_added_; i++) + for (size_t i = 0; i < this->handler_rep_.handles_to_be_added_; i++) { this->handler_rep_.to_be_added_info_[i].suspend_entry_ = 0; } @@ -916,5 +916,22 @@ ACE_WFMO_Reactor::size (void) // Size of repository minus the 2 used for internal purposes return this->handler_rep_.max_size_ - 2; } +#else +ACE_INLINE int +ACE_WFMO_Reactor_Handler_Repository::changes_required (void) +{ + return 0; +} + +ACE_INLINE int +ACE_WFMO_Reactor_Handler_Repository::make_changes (void) +{ + return 0; +} + +ACE_INLINE +ACE_WFMO_Reactor_Handler_Repository::~ACE_WFMO_Reactor_Handler_Repository (void) +{ +} #endif /* ACE_WIN32 */ diff --git a/ace/ace_ce_dll.dsp b/ace/ace_ce_dll.dsp index 0476f69bfce..d820633f101 100644 --- a/ace/ace_ce_dll.dsp +++ b/ace/ace_ce_dll.dsp @@ -980,6 +980,129 @@ DEP_CPP_ARRAY=\ # End Source File
# Begin Source File
+SOURCE=.\Asynch_IO.cpp
+
+!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Debug"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Debug"
+
+DEP_CPP_ASYNC=\
+ ".\ACE.h"\
+ ".\ACE.i"\
+ ".\Addr.h"\
+ ".\Addr.i"\
+ ".\Asynch_IO.h"\
+ ".\Asynch_IO.i"\
+ ".\Atomic_Op.i"\
+ ".\Auto_Ptr.cpp"\
+ ".\Auto_Ptr.h"\
+ ".\Auto_Ptr.i"\
+ ".\Basic_Types.h"\
+ ".\Basic_Types.i"\
+ ".\config-win32-common.h"\
+ ".\config-win32.h"\
+ ".\config-WinCE.h"\
+ ".\config.h"\
+ ".\Containers.cpp"\
+ ".\Containers.h"\
+ ".\Containers.i"\
+ ".\Event_Handler.h"\
+ ".\Event_Handler.i"\
+ ".\Free_List.cpp"\
+ ".\Free_List.h"\
+ ".\Free_List.i"\
+ ".\Handle_Set.h"\
+ ".\Handle_Set.i"\
+ ".\High_Res_Timer.h"\
+ ".\High_Res_Timer.i"\
+ ".\inc_user_config.h"\
+ ".\INET_Addr.h"\
+ ".\INET_Addr.i"\
+ ".\iosfwd.h"\
+ ".\Log_Msg.h"\
+ ".\Log_Priority.h"\
+ ".\Log_Record.h"\
+ ".\Log_Record.i"\
+ ".\Malloc.h"\
+ ".\Malloc.i"\
+ ".\Malloc_T.cpp"\
+ ".\Malloc_T.h"\
+ ".\Malloc_T.i"\
+ ".\Managed_Object.cpp"\
+ ".\Managed_Object.h"\
+ ".\Managed_Object.i"\
+ ".\Mem_Map.h"\
+ ".\Mem_Map.i"\
+ ".\Memory_Pool.h"\
+ ".\Memory_Pool.i"\
+ ".\Message_Block.h"\
+ ".\Message_Block.i"\
+ ".\Object_Manager.h"\
+ ".\Object_Manager.i"\
+ ".\OS.h"\
+ ".\OS.i"\
+ ".\Proactor.h"\
+ ".\Proactor.i"\
+ ".\Reactor.h"\
+ ".\Reactor.i"\
+ ".\Reactor_Impl.h"\
+ ".\Service_Config.h"\
+ ".\Service_Config.i"\
+ ".\Service_Object.h"\
+ ".\Service_Object.i"\
+ ".\Shared_Object.h"\
+ ".\Shared_Object.i"\
+ ".\Signal.h"\
+ ".\Signal.i"\
+ ".\SString.h"\
+ ".\SString.i"\
+ ".\streams.h"\
+ ".\SV_Semaphore_Complex.h"\
+ ".\SV_Semaphore_Complex.i"\
+ ".\SV_Semaphore_Simple.h"\
+ ".\SV_Semaphore_Simple.i"\
+ ".\Svc_Conf_Tokens.h"\
+ ".\Synch.h"\
+ ".\Synch.i"\
+ ".\Synch_T.cpp"\
+ ".\Synch_T.h"\
+ ".\Synch_T.i"\
+ ".\sys_conf.h"\
+ ".\Thread.h"\
+ ".\Thread.i"\
+ ".\Thread_Manager.h"\
+ ".\Thread_Manager.i"\
+ ".\Timer_Heap.h"\
+ ".\Timer_Heap_T.cpp"\
+ ".\Timer_Heap_T.h"\
+ ".\Timer_List.h"\
+ ".\Timer_List_T.cpp"\
+ ".\Timer_List_T.h"\
+ ".\Timer_Queue.h"\
+ ".\Timer_Queue_T.cpp"\
+ ".\Timer_Queue_T.h"\
+ ".\Timer_Queue_T.i"\
+ ".\Timer_Wheel.h"\
+ ".\Timer_Wheel_T.cpp"\
+ ".\Timer_Wheel_T.h"\
+ ".\Trace.h"\
+ ".\Version.h"\
+ ".\ws2tcpip.h"\
+
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\Basic_Types.cpp
!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
@@ -6827,6 +6950,251 @@ DEP_CPP_STRAT=\ # End Source File
# Begin Source File
+SOURCE=.\Svc_Conf_l.cpp
+
+!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Debug"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Debug"
+
+DEP_CPP_SVC_C=\
+ ".\ACE.h"\
+ ".\ACE.i"\
+ ".\Atomic_Op.i"\
+ ".\Auto_Ptr.cpp"\
+ ".\Auto_Ptr.h"\
+ ".\Auto_Ptr.i"\
+ ".\Basic_Types.h"\
+ ".\Basic_Types.i"\
+ ".\config-win32-common.h"\
+ ".\config-win32.h"\
+ ".\config-WinCE.h"\
+ ".\config.h"\
+ ".\Containers.cpp"\
+ ".\Containers.h"\
+ ".\Containers.i"\
+ ".\Event_Handler.h"\
+ ".\Event_Handler.i"\
+ ".\Free_List.cpp"\
+ ".\Free_List.h"\
+ ".\Free_List.i"\
+ ".\Handle_Set.h"\
+ ".\Handle_Set.i"\
+ ".\inc_user_config.h"\
+ ".\iosfwd.h"\
+ ".\Log_Msg.h"\
+ ".\Log_Priority.h"\
+ ".\Log_Record.h"\
+ ".\Log_Record.i"\
+ ".\Malloc.h"\
+ ".\Malloc.i"\
+ ".\Malloc_T.cpp"\
+ ".\Malloc_T.h"\
+ ".\Malloc_T.i"\
+ ".\Managed_Object.cpp"\
+ ".\Managed_Object.h"\
+ ".\Managed_Object.i"\
+ ".\Mem_Map.h"\
+ ".\Mem_Map.i"\
+ ".\Memory_Pool.h"\
+ ".\Memory_Pool.i"\
+ ".\Object_Manager.h"\
+ ".\Object_Manager.i"\
+ ".\Obstack.h"\
+ ".\OS.h"\
+ ".\OS.i"\
+ ".\Parse_Node.h"\
+ ".\Parse_Node.i"\
+ ".\Reactor.h"\
+ ".\Reactor.i"\
+ ".\Reactor_Impl.h"\
+ ".\Service_Config.h"\
+ ".\Service_Config.i"\
+ ".\Service_Object.h"\
+ ".\Service_Object.i"\
+ ".\Service_Types.h"\
+ ".\Service_Types.i"\
+ ".\Shared_Object.h"\
+ ".\Shared_Object.i"\
+ ".\Signal.h"\
+ ".\Signal.i"\
+ ".\SString.h"\
+ ".\SString.i"\
+ ".\streams.h"\
+ ".\SV_Semaphore_Complex.h"\
+ ".\SV_Semaphore_Complex.i"\
+ ".\SV_Semaphore_Simple.h"\
+ ".\SV_Semaphore_Simple.i"\
+ ".\Svc_Conf.h"\
+ ".\Svc_Conf_Tokens.h"\
+ ".\Synch.h"\
+ ".\Synch.i"\
+ ".\Synch_T.cpp"\
+ ".\Synch_T.h"\
+ ".\Synch_T.i"\
+ ".\sys_conf.h"\
+ ".\Thread.h"\
+ ".\Thread.i"\
+ ".\Timer_Queue.h"\
+ ".\Timer_Queue_T.cpp"\
+ ".\Timer_Queue_T.h"\
+ ".\Timer_Queue_T.i"\
+ ".\Trace.h"\
+ ".\Version.h"\
+ ".\ws2tcpip.h"\
+
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\Svc_Conf_y.cpp
+
+!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Debug"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Debug"
+
+DEP_CPP_SVC_CO=\
+ ".\ACE.h"\
+ ".\ACE.i"\
+ ".\ARGV.h"\
+ ".\ARGV.i"\
+ ".\Atomic_Op.i"\
+ ".\Auto_Ptr.cpp"\
+ ".\Auto_Ptr.h"\
+ ".\Auto_Ptr.i"\
+ ".\Basic_Types.h"\
+ ".\Basic_Types.i"\
+ ".\config-win32-common.h"\
+ ".\config-win32.h"\
+ ".\config-WinCE.h"\
+ ".\config.h"\
+ ".\Containers.cpp"\
+ ".\Containers.h"\
+ ".\Containers.i"\
+ ".\Event_Handler.h"\
+ ".\Event_Handler.i"\
+ ".\Free_List.cpp"\
+ ".\Free_List.h"\
+ ".\Free_List.i"\
+ ".\Handle_Set.h"\
+ ".\Handle_Set.i"\
+ ".\Hash_Map_Manager.cpp"\
+ ".\Hash_Map_Manager.h"\
+ ".\inc_user_config.h"\
+ ".\IO_Cntl_Msg.h"\
+ ".\iosfwd.h"\
+ ".\Log_Msg.h"\
+ ".\Log_Priority.h"\
+ ".\Log_Record.h"\
+ ".\Log_Record.i"\
+ ".\Malloc.h"\
+ ".\Malloc.i"\
+ ".\Malloc_T.cpp"\
+ ".\Malloc_T.h"\
+ ".\Malloc_T.i"\
+ ".\Managed_Object.cpp"\
+ ".\Managed_Object.h"\
+ ".\Managed_Object.i"\
+ ".\Mem_Map.h"\
+ ".\Mem_Map.i"\
+ ".\Memory_Pool.h"\
+ ".\Memory_Pool.i"\
+ ".\Message_Block.h"\
+ ".\Message_Block.i"\
+ ".\Message_Queue.cpp"\
+ ".\Message_Queue.h"\
+ ".\Message_Queue.i"\
+ ".\Module.cpp"\
+ ".\Module.h"\
+ ".\Module.i"\
+ ".\Object_Manager.h"\
+ ".\Object_Manager.i"\
+ ".\Obstack.h"\
+ ".\OS.h"\
+ ".\OS.i"\
+ ".\Parse_Node.h"\
+ ".\Parse_Node.i"\
+ ".\Reactor.h"\
+ ".\Reactor.i"\
+ ".\Reactor_Impl.h"\
+ ".\Service_Config.h"\
+ ".\Service_Config.i"\
+ ".\Service_Object.h"\
+ ".\Service_Object.i"\
+ ".\Service_Types.h"\
+ ".\Service_Types.i"\
+ ".\Shared_Object.h"\
+ ".\Shared_Object.i"\
+ ".\Signal.h"\
+ ".\Signal.i"\
+ ".\SString.h"\
+ ".\SString.i"\
+ ".\Strategies.h"\
+ ".\Strategies_T.cpp"\
+ ".\Strategies_T.h"\
+ ".\Stream.cpp"\
+ ".\Stream.h"\
+ ".\Stream.i"\
+ ".\Stream_Modules.cpp"\
+ ".\Stream_Modules.h"\
+ ".\Stream_Modules.i"\
+ ".\streams.h"\
+ ".\SV_Semaphore_Complex.h"\
+ ".\SV_Semaphore_Complex.i"\
+ ".\SV_Semaphore_Simple.h"\
+ ".\SV_Semaphore_Simple.i"\
+ ".\Svc_Conf.h"\
+ ".\Svc_Conf_Tokens.h"\
+ ".\Synch.h"\
+ ".\Synch.i"\
+ ".\Synch_Options.h"\
+ ".\Synch_T.cpp"\
+ ".\Synch_T.h"\
+ ".\Synch_T.i"\
+ ".\sys_conf.h"\
+ ".\Task.h"\
+ ".\Task.i"\
+ ".\Task_T.cpp"\
+ ".\Task_T.h"\
+ ".\Task_T.i"\
+ ".\Thread.h"\
+ ".\Thread.i"\
+ ".\Thread_Manager.h"\
+ ".\Thread_Manager.i"\
+ ".\Time_Value.h"\
+ ".\Timer_Queue.h"\
+ ".\Timer_Queue_T.cpp"\
+ ".\Timer_Queue_T.h"\
+ ".\Timer_Queue_T.i"\
+ ".\Trace.h"\
+ ".\Version.h"\
+ ".\WFMO_Reactor.h"\
+ ".\WFMO_Reactor.i"\
+ ".\ws2tcpip.h"\
+
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\Synch.cpp
!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
@@ -7705,6 +8073,127 @@ DEP_CPP_TRACE=\ # End Source File
# Begin Source File
+SOURCE=.\WFMO_Reactor.cpp
+
+!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Debug"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE MIPS) Debug"
+
+DEP_CPP_WFMO_=\
+ ".\ACE.h"\
+ ".\ACE.i"\
+ ".\Atomic_Op.i"\
+ ".\Auto_Ptr.cpp"\
+ ".\Auto_Ptr.h"\
+ ".\Auto_Ptr.i"\
+ ".\Basic_Types.h"\
+ ".\Basic_Types.i"\
+ ".\config-win32-common.h"\
+ ".\config-win32.h"\
+ ".\config-WinCE.h"\
+ ".\config.h"\
+ ".\Containers.cpp"\
+ ".\Containers.h"\
+ ".\Containers.i"\
+ ".\Event_Handler.h"\
+ ".\Event_Handler.i"\
+ ".\Free_List.cpp"\
+ ".\Free_List.h"\
+ ".\Free_List.i"\
+ ".\Handle_Set.h"\
+ ".\Handle_Set.i"\
+ ".\Hash_Map_Manager.cpp"\
+ ".\Hash_Map_Manager.h"\
+ ".\inc_user_config.h"\
+ ".\IO_Cntl_Msg.h"\
+ ".\iosfwd.h"\
+ ".\Log_Msg.h"\
+ ".\Log_Priority.h"\
+ ".\Log_Record.h"\
+ ".\Log_Record.i"\
+ ".\Malloc.h"\
+ ".\Malloc.i"\
+ ".\Malloc_T.cpp"\
+ ".\Malloc_T.h"\
+ ".\Malloc_T.i"\
+ ".\Managed_Object.cpp"\
+ ".\Managed_Object.h"\
+ ".\Managed_Object.i"\
+ ".\Mem_Map.h"\
+ ".\Mem_Map.i"\
+ ".\Memory_Pool.h"\
+ ".\Memory_Pool.i"\
+ ".\Message_Block.h"\
+ ".\Message_Block.i"\
+ ".\Message_Queue.cpp"\
+ ".\Message_Queue.h"\
+ ".\Message_Queue.i"\
+ ".\Object_Manager.h"\
+ ".\Object_Manager.i"\
+ ".\OS.h"\
+ ".\OS.i"\
+ ".\Reactor.h"\
+ ".\Reactor.i"\
+ ".\Reactor_Impl.h"\
+ ".\Service_Config.h"\
+ ".\Service_Config.i"\
+ ".\Service_Object.h"\
+ ".\Service_Object.i"\
+ ".\Service_Types.h"\
+ ".\Service_Types.i"\
+ ".\Shared_Object.h"\
+ ".\Shared_Object.i"\
+ ".\Signal.h"\
+ ".\Signal.i"\
+ ".\SString.h"\
+ ".\SString.i"\
+ ".\Strategies.h"\
+ ".\Strategies_T.cpp"\
+ ".\Strategies_T.h"\
+ ".\streams.h"\
+ ".\SV_Semaphore_Complex.h"\
+ ".\SV_Semaphore_Complex.i"\
+ ".\SV_Semaphore_Simple.h"\
+ ".\SV_Semaphore_Simple.i"\
+ ".\Svc_Conf_Tokens.h"\
+ ".\Synch.h"\
+ ".\Synch.i"\
+ ".\Synch_Options.h"\
+ ".\Synch_T.cpp"\
+ ".\Synch_T.h"\
+ ".\Synch_T.i"\
+ ".\sys_conf.h"\
+ ".\Thread.h"\
+ ".\Thread.i"\
+ ".\Thread_Manager.h"\
+ ".\Thread_Manager.i"\
+ ".\Timer_Heap.h"\
+ ".\Timer_Heap_T.cpp"\
+ ".\Timer_Heap_T.h"\
+ ".\Timer_Queue.h"\
+ ".\Timer_Queue_T.cpp"\
+ ".\Timer_Queue_T.h"\
+ ".\Timer_Queue_T.i"\
+ ".\Trace.h"\
+ ".\Version.h"\
+ ".\WFMO_Reactor.h"\
+ ".\WFMO_Reactor.i"\
+ ".\ws2tcpip.h"\
+
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Release"
+
+!ELSEIF "$(CFG)" == "ace_ce_dll - Win32 (WCE SH) Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\XtReactor.cpp
!IF "$(CFG)" == "ace_ce_dll - Win32 (WCE x86em) Release"
diff --git a/ace/config-WinCE.h b/ace/config-WinCE.h index 2afe2f7e385..4f487393b34 100644 --- a/ace/config-WinCE.h +++ b/ace/config-WinCE.h @@ -103,6 +103,9 @@ typedef long off_t; #define SEEK_CUR FILE_CURRENT #define SEEK_END FILE_END +#define stdin 0 +#define stdout 0 + // @@ This needs to be defined and initialized as a static. (Singleton?) #define ACE_CE_DEFAULT_LOG_STREAM 0 |