diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-05-06 06:58:20 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-05-06 06:58:20 +0000 |
commit | 9245f24aebd8df12ab140df33934d3532a0f280c (patch) | |
tree | 9df1a29ac21a781b59df6e463d0dc1d22d70d4d6 /ACE/tests/Bug_3943_Regression_Test.cpp | |
parent | 617e3687711e2b32d27d8f7c7c6e0c91f4e7bb09 (diff) | |
download | ATCD-9245f24aebd8df12ab140df33934d3532a0f280c.tar.gz |
Tue May 6 06:59:38 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Bug_3943_Regression_Test.cpp:
This threads needs threads, so when that is not available
just exit by returning 0
Diffstat (limited to 'ACE/tests/Bug_3943_Regression_Test.cpp')
-rw-r--r-- | ACE/tests/Bug_3943_Regression_Test.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/ACE/tests/Bug_3943_Regression_Test.cpp b/ACE/tests/Bug_3943_Regression_Test.cpp index 2d3d0baf029..24811c906c3 100644 --- a/ACE/tests/Bug_3943_Regression_Test.cpp +++ b/ACE/tests/Bug_3943_Regression_Test.cpp @@ -34,7 +34,6 @@ #include "ace/OS_NS_unistd.h" #include "ace/os_include/os_netdb.h" - // The following works around bugs with some operating systems, which // don't allow multiple threads/process to call accept() on the same // listen-mode port/socket. Also, note that since timed accept is @@ -1104,7 +1103,8 @@ run_main (int , ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Bug_3943_Regression_Test")); int status = 0; -#if !defined (ACE_WIN32) || ((defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || !defined (ACE_LACKS_SEND)) +#if defined (ACE_HAS_THREADS) +# if !defined (ACE_WIN32) || ((defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || !defined (ACE_LACKS_SEND)) // Acceptor ACCEPTOR acceptor; ACE_INET_Addr server_addr; @@ -1124,24 +1124,21 @@ run_main (int , ACE_TCHAR *[]) ACE_TEXT ("(%P|%t) starting server at port %d\n"), server_addr.get_port_number ())); -#if defined (ACE_HAS_THREADS) if (spawn_threads (&acceptor, &server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("spawn_threads")), 1); -#else /* !ACE_HAS_THREADS */ - ACE_ERROR ((LM_INFO, - ACE_TEXT ("(%P|%t) ") - ACE_TEXT ("only one thread may be run") - ACE_TEXT (" in a process on this platform"))); -#endif /* ACE_HAS_THREADS */ } if (!client_complete || !server_complete) status = 1; -#endif /* ACE_HAS_WINSOCK2 && (ACE_HAS_WINSOCK2 != 0)) || !ACE_LACKS_SEND */ +# endif /* ACE_HAS_WINSOCK2 && (ACE_HAS_WINSOCK2 != 0)) || !ACE_LACKS_SEND */ +#else /* !ACE_HAS_THREADS */ + ACE_ERROR ((LM_INFO, + ACE_TEXT ("threads not supported on this platform\n"))); +#endif /* ACE_HAS_THREADS */ ACE_END_TEST; return status; |