diff options
author | msmit <msmit@remedy.nl> | 2009-04-20 09:18:43 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2009-04-20 09:18:43 +0000 |
commit | 8d6958457626dab5e1127b466e613677d951a3a2 (patch) | |
tree | bea99b29a29fc6bfcb82cdbeef8172ab8e7f63f1 | |
parent | a049dec25603b768ecc84a901bc4cd1a52fe9e5a (diff) | |
download | ATCD-8d6958457626dab5e1127b466e613677d951a3a2.tar.gz |
Mon Apr 20 10:17:32 UTC 2009 Marcel Smit <msmit@remedy.nl>
* ace/Basic_Types.h:
* ace/config-WinCE.h:
* ace/OS_NS_stropts.h:
* ace/OS_NS_sys_socket.h:
* ace/OS_NS_Thread.cpp:
Removed WinCE support for versions < 5.0.
* ace/config-win32-cegcc.h:
Removed temporary defines.
* ace/config-win32-common.h:
Replaced UNDER_CE with _WIN32_WCE.
* ace/OS_main.cpp:
* ace/OS_main.h:
Removed CE gcc compiler warning by
adding destructor.
* ace/OS_NS_Thread.inl:
Removed WinCE support for versions before 5.0.
Added ACE_LACKS_CE_THREAD_PRIORITY define in order
to compile on CE gcc.
* ace/Process.cpp:
Removed CE gcc compiler warning by
using ACE_UNUSED_ARG.
* ace/Registry.cpp:
* ace/Registry.h:
Removed CE gcc compiler warning by
adding destructor.
Removed CE gcc compiler warning by
using ACE_UNUSED_ARG.
* ace/SV_Semaphore_Simple.cpp:
Removed pragma's for CE gcc compiler. Removed
check on ACE_WIN64 define.
* include/makeinclude/platform_cegcc.GNU:
Default platform macros for CE gcc compiler.
* include/makeinclude/platform_gnuwin32_common.GNU:
Added support for CE gcc compiler.
-rw-r--r-- | ACE/ChangeLog | 46 | ||||
-rw-r--r-- | ACE/ace/Basic_Types.h | 7 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 49 | ||||
-rw-r--r-- | ACE/ace/OS_NS_stropts.h | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_sys_socket.h | 6 | ||||
-rw-r--r-- | ACE/ace/OS_main.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/OS_main.h | 1 | ||||
-rw-r--r-- | ACE/ace/Process.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Registry.cpp | 8 | ||||
-rw-r--r-- | ACE/ace/Registry.h | 5 | ||||
-rw-r--r-- | ACE/ace/SV_Semaphore_Simple.cpp | 8 | ||||
-rw-r--r-- | ACE/ace/config-WinCE.h | 72 | ||||
-rw-r--r-- | ACE/ace/config-win32-cegcc.h | 6 | ||||
-rw-r--r-- | ACE/ace/config-win32-common.h | 4 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_cegcc.GNU | 40 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_gnuwin32_common.GNU | 21 |
17 files changed, 165 insertions, 122 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index de42ce134b9..ec83a77a599 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,49 @@ +Mon Apr 20 10:17:32 UTC 2009 Marcel Smit <msmit@remedy.nl> + + * ace/Basic_Types.h: + * ace/config-WinCE.h: + * ace/OS_NS_stropts.h: + * ace/OS_NS_sys_socket.h: + * ace/OS_NS_Thread.cpp: + Removed WinCE support for versions < 5.0. + + * ace/config-win32-cegcc.h: + Removed temporary defines. + + * ace/config-win32-common.h: + Replaced UNDER_CE with _WIN32_WCE. + + * ace/OS_main.cpp: + * ace/OS_main.h: + Removed CE gcc compiler warning by + adding destructor. + + * ace/OS_NS_Thread.inl: + Removed WinCE support for versions before 5.0. + Added ACE_LACKS_CE_THREAD_PRIORITY define in order + to compile on CE gcc. + + * ace/Process.cpp: + Removed CE gcc compiler warning by + using ACE_UNUSED_ARG. + + * ace/Registry.cpp: + * ace/Registry.h: + Removed CE gcc compiler warning by + adding destructor. + Removed CE gcc compiler warning by + using ACE_UNUSED_ARG. + + * ace/SV_Semaphore_Simple.cpp: + Removed pragma's for CE gcc compiler. Removed + check on ACE_WIN64 define. + + * include/makeinclude/platform_cegcc.GNU: + Default platform macros for CE gcc compiler. + + * include/makeinclude/platform_gnuwin32_common.GNU: + Added support for CE gcc compiler. + Mon Apr 20 09:01:32 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> * ace/config-vxworks6.6.h: diff --git a/ACE/ace/Basic_Types.h b/ACE/ace/Basic_Types.h index 0643cac467e..37f3481be15 100644 --- a/ACE/ace/Basic_Types.h +++ b/ACE/ace/Basic_Types.h @@ -349,13 +349,6 @@ typedef unsigned char ACE_Byte; # define ACE_SIZEOF_VOID_P ACE_SIZEOF_LONG # endif /* ACE_SIZEOF_VOID_P */ -// Type for doing arithmetic on pointers ... as elsewhere, we assume -// that unsigned versions of a type are the same size as the signed -// version of the same type. -# if defined (ACE_HAS_WINCE) && (_WIN32_WCE < 400) -typedef unsigned long ptrdiff_t; // evc3, PocketPC don't defined ptrdiff_t -# endif - ACE_END_VERSIONED_NAMESPACE_DECL // Byte-order (endian-ness) determination. diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index a7719be8127..f057a42c859 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -33,7 +33,7 @@ ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args) #if !defined(ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400) # define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ (*THR_ID = ::_beginthreadex ((void(_Optlink*)(void*))ENTRY_POINT, STACK, STACKSIZE, ARGS), *THR_ID) -#elif defined (ACE_HAS_WINCE) && defined (UNDER_CE) && (UNDER_CE >= 211) +#elif defined (ACE_HAS_WINCE) # define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \ CreateThread (0, STACKSIZE, (unsigned long (__stdcall *) (void *)) ENTRY_POINT, ARGS, (FLAGS) & (CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION), (unsigned long *) THR_ID) #elif defined(ACE_HAS_WTHREADS) diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index 23058815be6..d07e7320d6b 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -490,30 +490,11 @@ ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, // need to release the lock one fewer times than this thread has acquired // it. Remember how many times, and reacquire it that many more times when // the condition is signaled. - // - // For WinCE, the situation is a bit trickier. CE doesn't have - // RecursionCount, and LockCount has changed semantics over time. - // In CE 3 (and maybe 4?) LockCount is not an indicator of recursion; - // instead, see when it's unlocked by watching the OwnerThread, which will - // change to something other than the current thread when it's been - // unlocked "enough" times. Note that checking for 0 (unlocked) is not - // sufficient. Another thread may acquire the lock between our unlock and - // checking the OwnerThread. So grab our thread ID value first, then - // compare to it in the loop condition. NOTE - the problem with this - // scheme is that we really want to unlock the mutex one _less_ times than - // required to release it for another thread to acquire. With CE 5 we - // can do this by watching LockCount alone. I _think_ it can be done by - // watching LockCount on CE 4 as well (though its meaning is different), - // but I'm leary of changing this code since a user reported success - // with it. - // + // We're using undocumented fields in the CRITICAL_SECTION structure // and they've been known to change across Windows variants and versions./ // So be careful if you need to change these - there may be other // Windows variants that depend on existing values and limits. -# if defined (ACE_HAS_WINCE) && (UNDER_CE < 500) - ACE_thread_t me = ACE_OS::thr_self (); -# endif /* ACE_HAS_WINCE && CE 4 or earlier */ state.relock_count_ = 0; while ( @@ -521,13 +502,8 @@ ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m, m->LockCount > 0 && m->RecursionCount > 1 # else // WinCE doesn't have RecursionCount and the LockCount semantic - // has changed between versions; pre-Mobile 5 the LockCount - // was 0-indexed, and Mobile 5 has it 1-indexed. -# if (UNDER_CE < 500) - m->LockCount > 0 && m->OwnerThread == (HANDLE)me -# else + // Mobile 5 has it 1-indexed. m->LockCount > 1 -# endif /* UNDER_CE < 500 */ # endif /* ACE_HAS_WINCE */ ) { @@ -2705,11 +2681,12 @@ ACE_OS::thr_getprio (ACE_hthread_t ht_id, int &priority, int &policy) ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (ht_id, &priority), result), int, -1); # elif defined (ACE_HAS_WTHREADS) ACE_Errno_Guard error (errno); -# if !defined (ACE_HAS_WINCE) - priority = ::GetThreadPriority (ht_id); -# else + +# if defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) priority = ::CeGetThreadPriority (ht_id); -# endif +# else + priority = ::GetThreadPriority (ht_id); +# endif /* defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) */ # if defined (ACE_HAS_PHARLAP) # if defined (ACE_PHARLAP_LABVIEW_RT) @@ -3136,15 +3113,17 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) result), int, -1); # elif defined (ACE_HAS_WTHREADS) -# if !defined (ACE_HAS_WINCE) - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (ht_id, priority), + +# if defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) + ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CeSetThreadPriority (ht_id, priority), ace_result_), int, -1); -# else - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CeSetThreadPriority (ht_id, priority), +# else + ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (ht_id, priority), ace_result_), int, -1); -# endif /* ACE_HAS_WINCE */ +# endif /* defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_CE_THREAD_PRIORITY) */ + # elif defined (ACE_HAS_VXTHREADS) ACE_OSCALL_RETURN (::taskPrioritySet (ht_id, priority), int, -1); # else diff --git a/ACE/ace/OS_NS_stropts.h b/ACE/ace/OS_NS_stropts.h index 762d0c1fbc2..a17e9052fd0 100644 --- a/ACE/ace/OS_NS_stropts.h +++ b/ACE/ace/OS_NS_stropts.h @@ -126,7 +126,6 @@ namespace ACE_OS { ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func); -#if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) /// QoS-enabled @c ioctl when the I/O control code is either /// SIO_SET_QOS or SIO_GET_QOS. extern ACE_Export @@ -138,7 +137,6 @@ namespace ACE_OS { unsigned long buffer = 0, ACE_OVERLAPPED *overlapped = 0, ACE_OVERLAPPED_COMPLETION_FUNC func = 0); -#endif /* !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) */ ACE_NAMESPACE_INLINE_FUNCTION int isastream (ACE_HANDLE handle); diff --git a/ACE/ace/OS_NS_sys_socket.h b/ACE/ace/OS_NS_sys_socket.h index e1fcaa3c7c7..fb5a47a59a0 100644 --- a/ACE/ace/OS_NS_sys_socket.h +++ b/ACE/ace/OS_NS_sys_socket.h @@ -80,7 +80,6 @@ namespace ACE_OS struct sockaddr *addr, int *addrlen); -#if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) /** * QoS-enabled @c accept, which passes @a qos_params to @c accept. If * the OS platform doesn't support QoS-enabled @c accept then the @@ -91,7 +90,6 @@ namespace ACE_OS struct sockaddr *addr, int *addrlen, const ACE_Accept_QoS_Params &qos_params); -#endif /* !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) */ ACE_NAMESPACE_INLINE_FUNCTION int bind (ACE_HANDLE s, @@ -108,7 +106,6 @@ namespace ACE_OS struct sockaddr *addr, int addrlen); -#if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) /** * QoS-enabled @c connect, which passes @a qos_params to @c connect. * If the OS platform doesn't support QoS-enabled @c connect then the @@ -119,7 +116,6 @@ namespace ACE_OS const sockaddr *addr, int addrlen, const ACE_QoS_Params &qos_params); -#endif /* !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) */ /// Retrieve information about available transport protocols /// installed on the local machine. Windows specific... @@ -144,14 +140,12 @@ namespace ACE_OS char *optval, int *optlen); -#if !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) /// Joins a leaf node into a QoS-enabled multi-point session. extern ACE_Export ACE_HANDLE join_leaf (ACE_HANDLE socket, const sockaddr *name, int namelen, const ACE_QoS_Params &qos_params); -#endif /* !(defined (ACE_HAS_WINCE) && (UNDER_CE < 500)) */ ACE_NAMESPACE_INLINE_FUNCTION int listen (ACE_HANDLE handle, diff --git a/ACE/ace/OS_main.cpp b/ACE/ace/OS_main.cpp index b1fc32ae8dd..dc5728b2184 100644 --- a/ACE/ace/OS_main.cpp +++ b/ACE/ace/OS_main.cpp @@ -108,6 +108,10 @@ ACE_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_Main_Base::~ACE_Main_Base () +{ +} + int ACE_Main_Base::run (HINSTANCE, HINSTANCE, LPWSTR lpCmdLine, diff --git a/ACE/ace/OS_main.h b/ACE/ace/OS_main.h index ec7a43945dd..b338c35287b 100644 --- a/ACE/ace/OS_main.h +++ b/ACE/ace/OS_main.h @@ -238,6 +238,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Main_Base { public: + virtual ~ACE_Main_Base (void); int run (HINSTANCE, HINSTANCE, LPWSTR, int); virtual int run_i (int, ACE_TCHAR *[]) = 0; }; diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index acd4b7c9ab5..901a4e53901 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -838,6 +838,12 @@ ACE_Process_Options::ACE_Process_Options (bool inherit_environment, command_line_buf_[0] = '\0'; process_name_[0] = '\0'; +#if defined (ACE_HAS_WINCE) + ACE_UNUSED_ARG(inherit_environment); + ACE_UNUSED_ARG(env_buf_len); + ACE_UNUSED_ARG(max_env_args); +#endif + #if !defined (ACE_HAS_WINCE) working_directory_[0] = '\0'; ACE_NEW (environment_buf_, diff --git a/ACE/ace/Registry.cpp b/ACE/ace/Registry.cpp index d20913634de..dc60e119788 100644 --- a/ACE/ace/Registry.cpp +++ b/ACE/ace/Registry.cpp @@ -842,11 +842,14 @@ ACE_Registry::Binding_Iterator::Iteration_State::iterator (Binding_Iterator *ite } -ACE_Registry::Binding_Iterator::Iteration_State::Iteration_State () +ACE_Registry::Binding_Iterator::Iteration_State::Iteration_State (void) : index_ (0) { } +ACE_Registry::Binding_Iterator::Iteration_State::~Iteration_State (void) +{ +} // Next entry int @@ -1075,6 +1078,9 @@ ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_co const ACE_TCHAR *machine_name) { #if defined (ACE_HAS_WINCE) + ACE_UNUSED_ARG(naming_context); + ACE_UNUSED_ARG(predefined); + ACE_UNUSED_ARG(machine_name); return -1; #else long result = -1; diff --git a/ACE/ace/Registry.h b/ACE/ace/Registry.h index e7a882ee357..6d54479887f 100644 --- a/ACE/ace/Registry.h +++ b/ACE/ace/Registry.h @@ -460,7 +460,10 @@ public: { public: /// Constructor - Iteration_State (); + Iteration_State (void); + + /// Destructor + virtual ~Iteration_State (void); /// Set the iterator reference. void iterator (Binding_Iterator *iterator); diff --git a/ACE/ace/SV_Semaphore_Simple.cpp b/ACE/ace/SV_Semaphore_Simple.cpp index 64256eb001d..918e55f2a26 100644 --- a/ACE/ace/SV_Semaphore_Simple.cpp +++ b/ACE/ace/SV_Semaphore_Simple.cpp @@ -138,15 +138,15 @@ ACE_SV_Semaphore_Simple::name_2_key (const char *name) // Basically "hash" the values in the <name>. This won't // necessarily guarantee uniqueness of all keys. // But (IMHO) CRC32 is good enough for most purposes (Carlos) -#if defined (ACE_WIN64) || defined (ACE_WIN32) +#if defined (ACE_WIN32) && defined (_MSC_VER) // The cast below is legit... # pragma warning(push) # pragma warning(disable : 4312) -#endif /* ACE_WIN64 */ +#endif /* defined (ACE_WIN32) && defined (_MSC_VER) */ return (key_t) ACE::crc32 (name); -#if defined (ACE_WIN64) || defined (ACE_WIN32) +#if defined (ACE_WIN32) && defined (_MSC_VER) # pragma warning(pop) -#endif /* ACE_WIN64 */ +#endif /* defined (ACE_WIN32) && defined (_MSC_VER) */ } // Open or create a ACE_SV_Semaphore. We return 1 if all is OK, else diff --git a/ACE/ace/config-WinCE.h b/ACE/ace/config-WinCE.h index 9fa49a63018..40a755348fc 100644 --- a/ACE/ace/config-WinCE.h +++ b/ACE/ace/config-WinCE.h @@ -15,26 +15,13 @@ # error Use config-win32.h in config.h instead of this header #endif // ACE_CONFIG_WIN32_H -#if !defined (UNDER_CE) -# error Define UNDER_CE to version (i.e. 300 = 3.0) -#endif // UNDER_CE - -#if (UNDER_CE < 300) -# error ACE requires Windows CE 3.0 and later. -#endif // UNDER_CE - -#if (UNDER_CE < 400) -// CE 3 doesn't have Winsock 2, but CE 4 does. -# if !defined (ACE_HAS_WINSOCK2) -# define ACE_HAS_WINSOCK2 0 -# endif -# define ACE_LACKS_ASSERT_H -# define ACE_LACKS_SEARCH_H -# define ACE_LACKS_WCHAR_H -# define ACE_LACKS_WCTYPE_H -# define ACE_LACKS_STDDEF_H -# define ACE_LACKS_PTRDIFF_T -#endif /* UNDER_CE < 400 */ +#if !defined (_WIN32_WCE) +# error Define _WIN32_WCE to version (i.e. 500 = 5.0) +#endif // _WIN32_WCE + +#if (_WIN32_WCE < 500) +# error ACE requires Windows CE 5.0 and later. +#endif // _WIN32_WCE #if !defined (ACE_HAS_WINCE) # define ACE_HAS_WINCE 1 @@ -50,8 +37,10 @@ #endif // We need these libraries to build: -#pragma comment(lib,"corelibc.lib") -#pragma comment(linker, "/nodefaultlib:oldnames.lib") +#if defined (_MSC_VER) +# pragma comment(lib,"corelibc.lib") +# pragma comment(linker, "/nodefaultlib:oldnames.lib") +#endif // Only DLL version is supported on CE. //#if defined (ACE_HAS_DLL) @@ -104,7 +93,7 @@ # define ACE_LACKS_ERRNO_H # define ACE_LACKS_DUP # define ACE_LACKS_GETSYSTEMTIMEASFILETIME -#endif +#endif /* (_WIN32_WCE < 0x600) */ #define ACE_LACKS_REGNOTIFYCHANGEKEYVALUE @@ -153,23 +142,9 @@ #define _O_TEXT 0x4000 // file mode is text (translated) #define _O_BINARY 0x8000 // file mode is binary (untranslated) -// macro to translate the C 2.0 name used to force binary mode for files -//#define _O_RAW _O_BINARY - -// Open handle inherit bit -//#define _O_NOINHERIT 0x0080 // child process doesn't inherit file - // Temporary file bit - file is deleted when last handle is closed #define _O_TEMPORARY 0x0040 // temporary file bit -// temporary access hint -//#define _O_SHORT_LIVED 0x1000 // temporary storage file, try not to flush - -// sequential/random access hints -//#define _O_SEQUENTIAL 0x0020 // file access is primarily sequential -//#define _O_RANDOM 0x0010 // file access is primarily random - - // Non-ANSI names #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY @@ -181,11 +156,6 @@ #define O_TEXT _O_TEXT #define O_BINARY _O_BINARY #define O_TEMPORARY _O_TEMPORARY -//#define O_RAW _O_BINARY -//#define O_NOINHERIT _O_NOINHERIT -//#define O_SEQUENTIAL _O_SEQUENTIAL -//#define O_RANDOM _O_RANDOM - // @@ NSIG value. This is definitely not correct. #define NSIG 23 @@ -194,16 +164,10 @@ // Need to find out what it is. (Used in MapViewOfFile ().) #define FILE_MAP_COPY 0 -#if (_WIN32_WCE >= 0x400) -# define ACE_HAS_INTERLOCKED_EXCHANGEADD -#endif - +#define ACE_HAS_INTERLOCKED_EXCHANGEADD #define ACE_LACKS_ACCESS #define ACE_LACKS__WACCESS #define ACE_HAS_ACCESS_EMULATION -#if (_WIN32_WCE < 0x500) -# define ACE_LACKS_FILELOCKS -#endif #define ACE_LACKS_EXEC #define ACE_LACKS_MKTEMP #define ACE_LACKS_ISATTY @@ -229,7 +193,7 @@ #endif // _WIN32_WCE_EMULATION #if !defined (BUFSIZ) -# define BUFSIZ 1024 +# define BUFSIZ 1024 #endif #define ACE_LACKS_MALLOC_H // We do have malloc.h, but don't use it. @@ -239,22 +203,22 @@ #define ACE_HAS_STRDUP_EMULATION #if !defined (MAXSYMLINKS) -#define MAXSYMLINKS 0 +# define MAXSYMLINKS 0 #endif // WinCE can't do fixed addresses for memory-mapped files. #if defined (ACE_DEFAULT_BASE_ADDR) -# undef ACE_DEFAULT_BASE_ADDR +# undef ACE_DEFAULT_BASE_ADDR #endif #define ACE_DEFAULT_BASE_ADDR 0 #if (_WIN32_WCE < 0x600) -#define ACE_HAS_TSS_EMULATION +# define ACE_HAS_TSS_EMULATION #endif // WinCE version < 6.0 // CE doesn't support FILE_SHARE_DELETE like regular windows #if !defined (ACE_DEFAULT_FILE_PERMS) -#define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE) +# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE) #endif #define ACE_LACKS_SIGNAL_H diff --git a/ACE/ace/config-win32-cegcc.h b/ACE/ace/config-win32-cegcc.h index fcbb0d8e31a..026807737ad 100644 --- a/ACE/ace/config-win32-cegcc.h +++ b/ACE/ace/config-win32-cegcc.h @@ -35,9 +35,6 @@ #include "ace/config-g++-common.h" -#undef _WIN32_WCE -#define _WIN32_WCE 0x600 - #include /**/ <cegcc.h> #include /**/ <w32api.h> @@ -100,6 +97,7 @@ #undef ACE_HAS_WTOL #define ACE_LACKS_GETSYSTEMTIMEASFILETIME #define ACE_LACKS_FILELOCKS +#define ACE_LACKS_CE_THREAD_PRIORITY #define ACE_INT64_FORMAT_SPECIFIER_ASCII "%I64d" #define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%I64u" @@ -110,5 +108,7 @@ # define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) STATUS) #endif /* _WIN32_WCE */ +#undef ACE_HAS_CUSTOM_EXPORT_MACROS + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_WIN32_CEGCC_H */ diff --git a/ACE/ace/config-win32-common.h b/ACE/ace/config-win32-common.h index b7f821389e9..7955a24b994 100644 --- a/ACE/ace/config-win32-common.h +++ b/ACE/ace/config-win32-common.h @@ -519,7 +519,7 @@ # define EDQUOT WSAEDQUOT # define ESTALE WSAESTALE # define EREMOTE WSAEREMOTE -# endif /* UNDER_CE */ +# endif /* (_WIN32_WCE) && (_WIN32_WCE < 0x600) */ # endif /* _WINSOCK2API */ # if defined (ACE_HAS_FORE_ATM_WS2) @@ -552,7 +552,7 @@ // PharLap ETS has its own winsock lib, so don't grab the one // supplied with the OS. -# if defined (_MSC_VER) && !defined (UNDER_CE) && !defined (ACE_HAS_PHARLAP) +# if defined (_MSC_VER) && !defined (_WIN32_WCE) && !defined (ACE_HAS_PHARLAP) # pragma comment(lib, "wsock32.lib") # endif /* _MSC_VER */ diff --git a/ACE/include/makeinclude/platform_cegcc.GNU b/ACE/include/makeinclude/platform_cegcc.GNU new file mode 100644 index 00000000000..275c1bc67c4 --- /dev/null +++ b/ACE/include/makeinclude/platform_cegcc.GNU @@ -0,0 +1,40 @@ +# $Id$ +# +# This file should allow to build ACE for cygwin32 with cygwin tools. +# +# Edit to change TCPU and w32api defs below. +# +# Don't forget to define the ACE_ROOT environment variable! +# + +# +# Chose your target CPU (by default we set it to ARM. In your +# platform_macros.GNU file you can override this to pentium, i486 or i386 +# +TCPU ?= arm + +cygwin32 = 1 + +# Cygwin doesn't have rwho +rwho = 0 + +# Cygwin doesn't allow to add the version number of ACE to the dll name +# because fe ace.dll.5.2.3 isn't a valid dll name +versioned_so=0 + +# Disable auto-import warnings. The Cygwin linker has a problem with imports +# See https://sourceforge.net/tracker/?func=detail&atid=102435&aid=683455&group_id=2435 +# for the details why to do this. +LDFLAGS += -Wl,--enable-auto-import + +cpumodelflag=0 +tunemodelflag=0 + +#COMPARCH = i386-mingw32ce- +COMPARCH = arm-wince-mingw32ce- + +LIBS += -lcoredll -lmingw32 -lmingwex -lws2 -lsupc++ -liphlpapi + +no_hidden_visibility ?= 1 + +include $(ACE_ROOT)/include/makeinclude/platform_gnuwin32_common.GNU diff --git a/ACE/include/makeinclude/platform_gnuwin32_common.GNU b/ACE/include/makeinclude/platform_gnuwin32_common.GNU index 00750e11752..417e4be26f0 100644 --- a/ACE/include/makeinclude/platform_gnuwin32_common.GNU +++ b/ACE/include/makeinclude/platform_gnuwin32_common.GNU @@ -29,20 +29,29 @@ endif ifeq ($(debug),0) CFLAGS += -DNDEBUG endif - -CC = gcc -CXX = g++ -RC = windres +CC = ${COMPARCH}gcc +CXX = ${COMPARCH}g++ +RC = ${COMPARCH}windres DLLTOOL = dlltool RC_OUTPUT_FLAG = -o ifeq (2.9,$(findstring 2.9,$(GNUWIN32_CXX_VERSION))) - MODEL_FLAGS += -mcpu=$(TCPU) + cpumodelflag ?= 1 + tunemodelflag ?= 0 else + cpumodelflag ?= 0 + tunemodelflag ?= 1 +endif + +ifeq ($(tunemodelflag),1) MODEL_FLAGS += -mtune=$(TCPU) endif +ifeq ($(cpumodelflag),1) + MODEL_FLAGS += -mcpu=$(TCPU) +endif + CFLAGS += -Wpointer-arith ifeq ($(threads),1) CFLAGS += -mthreads @@ -67,7 +76,7 @@ OCFLAGS += -O3 PIC = AR = ar ARFLAGS = rsuv -RANLIB = ranlib +RANLIB = ${COMPARCH}ranlib SOEXT = dll SOFLAGS += $(MODEL_FLAGS) $(CPPFLAGS) SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $< |