diff options
-rw-r--r-- | ACE/ChangeLog | 14 | ||||
-rw-r--r-- | ACE/ace/ACE.cpp | 2 | ||||
-rw-r--r-- | ACE/tests/Test_Output.cpp | 22 | ||||
-rw-r--r-- | ACE/tests/test_config.h | 30 |
4 files changed, 40 insertions, 28 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index bcae3aa1925..d7e73f08b4d 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,17 @@ +Thu Oct 30 11:31:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/ACE.cpp: + Const change + + * tests/test_config.h: + Set ACE_LOG_DIRECTORY_FOR_MKDIR for all platforms. Removed the + WinCE different test filename extension. + + * tests/Test_Output.cpp: + Added ACE_DEFAULT_TEST_DIR which can be set in the config.h to + specify a different default testdir then "". This is useful + for WinCE which lacks the concept of a current working directory + Thu Oct 30 10:30:00 UTC 2008 Simon Massey <sma at prismtech dot com> * NEWS diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 16fde5c0f6d..87c50d06d42 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -2328,7 +2328,7 @@ ACE::format_hexdump (const char *buffer, size_t i; - size_t lines = size / 16; + size_t const lines = size / 16; for (i = 0; i < lines; i++) { size_t j; diff --git a/ACE/tests/Test_Output.cpp b/ACE/tests/Test_Output.cpp index 800f8e43abc..bd6cc23a9d1 100644 --- a/ACE/tests/Test_Output.cpp +++ b/ACE/tests/Test_Output.cpp @@ -87,14 +87,15 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) // Ignore the error value since the directory may already exist. const ACE_TCHAR *test_dir = 0; -#if !defined (ACE_HAS_WINCE) -# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) +#if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) test_dir = ACE_OS::getenv (ACE_TEXT ("ACE_TEST_DIR")); -# else +#else ACE_TCHAR tempenv[MAXPATHLEN + 1] = { 0 }; char const * const test_dir_n = ACE_OS::getenv ("ACE_TEST_DIR"); if (test_dir_n == 0) - test_dir = 0; + { + test_dir = 0; + } else { ACE_OS::strncpy (tempenv, @@ -102,11 +103,10 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) MAXPATHLEN); test_dir = tempenv; } -# endif /* ACE_WIN32 || !ACE_USES_WCHAR */ +#endif /* ACE_WIN32 */ if (test_dir == 0) -#endif /* ACE_HAS_WINCE */ - test_dir = ACE_TEXT (""); + test_dir = ACE_DEFAULT_TEST_DIR; // This could be done with ACE_OS::sprintf() but it requires different // format strings for wide-char POSIX vs. narrow-char POSIX and Windows. @@ -135,12 +135,8 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append) // directory does exist, it causes a wierd console error message // about "cat: input error on standard input: Is a directory". So, // VxWorks users must create the directory manually. -# if defined (ACE_HAS_WINCE) - ACE_OS::mkdir (ACE_LOG_DIRECTORY_FOR_MKDIR); -# else - ACE_OS::mkdir (ACE_LOG_DIRECTORY); -# endif // ACE_HAS_WINCE -#endif /* ! ACE_VXWORKS */ + ACE_OS::mkdir (ACE_LOG_DIRECTORY_FOR_MKDIR); +#endif /* ACE_VXWORKS */ # if !defined (ACE_LACKS_IOSTREAM_TOTALLY) this->output_file_->open (ACE_TEXT_ALWAYS_CHAR (temp), diff --git a/ACE/tests/test_config.h b/ACE/tests/test_config.h index 144eaf63928..5b5e6a8de7f 100644 --- a/ACE/tests/test_config.h +++ b/ACE/tests/test_config.h @@ -45,32 +45,34 @@ # define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #elif defined (ACE_WIN32) # define ACE_LOG_DIRECTORY ACE_TEXT ("log\\") +# define ACE_LOG_DIRECTORY_FOR_MKDIR ACE_TEXT ("log\\") # define MAKE_PIPE_NAME(X) ACE_TEXT ("\\\\.\\pipe\\"#X) #else +# define ACE_LOG_DIRECTORY_FOR_MKDIR ACE_TEXT ("log/") # define ACE_LOG_DIRECTORY ACE_TEXT ("log/") # define MAKE_PIPE_NAME(X) ACE_TEXT (X) #endif /* ACE_WIN32 */ -#if defined (ACE_HAS_WINCE) -#define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".txt") -#else +#if !defined (ACE_DEFAULT_TEST_DIR) +# define ACE_DEFAULT_TEST_DIR ACE_TEXT (""); +#endif + #define ACE_LOG_FILE_EXT_NAME ACE_TEXT (".log") -#endif /* ACE_HAS_WINCE */ #if defined (ACE_HAS_WINCE) || defined (ACE_HAS_PHARLAP) -const size_t ACE_MAX_CLIENTS = 4; +size_t const ACE_MAX_CLIENTS = 4; #else -const size_t ACE_MAX_CLIENTS = 30; +size_t const ACE_MAX_CLIENTS = 30; #endif /* ACE_HAS_WINCE */ -const size_t ACE_NS_MAX_ENTRIES = 1000; -const size_t ACE_DEFAULT_USECS = 1000; -const size_t ACE_MAX_TIMERS = 4; -const size_t ACE_MAX_DELAY = 10; -const size_t ACE_MAX_INTERVAL = 0; -const size_t ACE_MAX_ITERATIONS = 10; -const size_t ACE_MAX_PROCESSES = 10; -const size_t ACE_MAX_THREADS = 4; +size_t const ACE_NS_MAX_ENTRIES = 1000; +size_t const ACE_DEFAULT_USECS = 1000; +size_t const ACE_MAX_TIMERS = 4; +size_t const ACE_MAX_DELAY = 10; +size_t const ACE_MAX_INTERVAL = 0; +size_t const ACE_MAX_ITERATIONS = 10; +size_t const ACE_MAX_PROCESSES = 10; +size_t const ACE_MAX_THREADS = 4; #ifndef ACE_START_TEST #define ACE_START_TEST(NAME) \ |