summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--ace/ACE.cpp6
-rw-r--r--ace/ACE.h17
-rw-r--r--docs/CE-status.txt61
-rw-r--r--tests/ACE_Test.cpp79
-rw-r--r--tests/ACE_Test.dsp162
-rw-r--r--tests/Makefile3
-rw-r--r--tests/Makefile.bor1
-rw-r--r--tests/run_test.lst1
-rw-r--r--tests/tests.dsw12
-rw-r--r--tests/tests.mpc9
11 files changed, 330 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 805a543edd7..ed4c86a92e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+Tue Mar 4 17:39:31 2003 Steve Huston <shuston@riverace.com>
+
+ * docs/CE-status.txt: Updated to reflect the ACE 5.3 status of CE.
+
+ * ace/ACE.cpp (execname): Try to locate ".exe" suffix without
+ case sensitivity. Thanks to Kelly F. Hickel <kfh@mqsoftware.com>
+ for reporting this. Also, when appending a suffix, append it to
+ the name, not after the name's nul terminator.
+
+ * ace/ACE.h: Clarified that the pointer returned, if allocated, is
+ allocated using new[] and should be freed with delete[].
+
+ * tests/ACE_Test.cpp:
+ * tests/ACE_Test.dsp: New test for ACE methods. At this time, it tests
+ the ACE::execname() method fixed above.
+
+ * tests/Makefile:
+ * tests/Makefile.bor:
+ * tests/tests.dsw:
+ * tests/tests.mpc:
+ * tests/run_test.lst: Added ACE_Test.
+
Tue Mar 4 13:54:52 2003 Phil Mesnier <mesnier_p@ociweb.com>
* ace/Codeset_Registry.cpp:
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index adea0874652..f1c924305a4 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -254,7 +254,8 @@ const ACE_TCHAR *
ACE::execname (const ACE_TCHAR *old_name)
{
#if defined (ACE_WIN32)
- if (ACE_OS::strstr (old_name, ACE_LIB_TEXT (".exe")) == 0)
+ const ACE_TCHAR *suffix = ACE_OS::strrchr (old_name, ACE_LIB_TEXT ('.'));
+ if (suffix == 0 || ACE_OS::strcasecmp (suffix, ACE_LIB_TEXT (".exe")) != 0)
{
ACE_TCHAR *new_name;
@@ -271,7 +272,8 @@ ACE::execname (const ACE_TCHAR *old_name)
end = ACE_OS::strecpy (new_name, old_name);
// Concatenate the .exe suffix onto the end of the executable.
- ACE_OS::strcpy (end, ACE_LIB_TEXT (".exe"));
+ // end points _after_ the terminating nul.
+ ACE_OS::strcpy (end - 1, ACE_LIB_TEXT (".exe"));
return new_name;
}
diff --git a/ace/ACE.h b/ace/ACE.h
index 21a0a35fafb..1972b3e679f 100644
--- a/ace/ACE.h
+++ b/ace/ACE.h
@@ -407,9 +407,20 @@ public:
#endif /* ACE_HAS_WCHAR */
/**
- * On Win32 returns <pathname> if it already ends in ".exe,"
- * otherwise returns a dynamically allocated buffer containing
- * "<pathname>.exe". Always returns <pathname> on UNIX.
+ * On Windows, determines if a specified pathname ends with ".exe"
+ * (not case sensitive). If on Windows and there is no ".exe" suffix,
+ * a new ACE_TCHAR array is allocated and a copy of @c pathname with
+ * the ".exe" suffix is copied into it. In this case, the caller is
+ * responsible for calling delete [] on the returned pointer.
+ *
+ * @param pathname The name to check for a proper suffix.
+ *
+ * @retval @c pathname if there is a proper suffix for Windows. This is
+ * always the return value for non-Windows platforms.
+ * @retval If a suffix needs to be added, returns a pointer to new[]
+ * allocated memory containing the original @c pathname plus
+ * a ".exe" suffix. The caller is responsible for freeing the
+ * memory using delete [].
*/
static const ACE_TCHAR *execname (const ACE_TCHAR *pathname);
diff --git a/docs/CE-status.txt b/docs/CE-status.txt
index deb56d64fa8..f3f77f1c32c 100644
--- a/docs/CE-status.txt
+++ b/docs/CE-status.txt
@@ -1,54 +1,41 @@
/**
@page wince ACE on Windows CE status
-By me, Darrell Brunsch <brunsch@cs.wustl.edu>
+Last updated Tuesday 04-March-2003 by Steve Huston <shuston@riverace.com>
@subsection ce_status Status
-Been a while since I updated this file. Where to begin. Well, as of the next
-beta kit of ACE (5.1.11), it should be compiling for the PocketPC. And it
-will have new eMbedded Visual C++ project files (*.vcw and *.vcp). Even
-though it does not have all of ACE, the stuff it has should still make it
-useful.
-
-I have shifted off of Windows CE though, so the updates aren't going to come
-in as I once planned. Although I did get the library to compile and link, I
-don't have any tests ready for it.
-
-I'm planning on getting the ACE tests re-ported to Windows CE again. I say
-re-ported because I'm planning on dealing with the lack of stdout a bit
-differently than Nanbor did. Instead of making a GUI front end for each
-test (which I believe is what the WindozeCE stuff is), I'm going to let them
-remain GUI-less and perhaps write an application to read the log files after
-running the tests.
+As of ACE 5.3, Riverace supports ACE on Windows CE 3 with the
+PocketPC 2002 SDK and on Windows CE 4 with the Standard SDK.
+OCI supports TAO 1.3 on at least Windows CE 3 with the PocketPC 2002 SDK.
+Contact the individual support provider for complete information regarding
+these platforms as well as the supported hardware targets.
@subsection ce_evc eMbedded Visual C++ Projects
-ACE now uses the eMbedded Visual C++ project files (instead of the older
-Windows CE Toolkit for Visual C++ project files). EVC is free from MS, either
-it can be found in the MSDN subscriptions (not free) or a CD from MS
--- which isn't completely free either, since you still have to pay for the
-shipping and handling.
-
-@subsection ce_subsets Subsets
-
-ACE on CE is currently split into two libraries, ace_os.dll and ace.dll.
-The ace_os library contains the files which are considered part of the ACE_OS
-subset. The ace library contains everything else. If ACE becomes more
-splittable, ace.dll will probably be broken apart even more.
+Whereas previous ACE versions had separate ACE and ACE_OS eMbedded Visual C++
+project files, the project and workspace arrangement is now the same as
+for other Windows versions. The project and workspace files themselves are
+generated using the MakeProjectCreator tool when the ACE kit is prepared.
+Both EVC3 and EVC4 use the same project and workspace files.
-And unlike the current *nix subsets, these two libraries are truly separate
-and do not require recompilation when the subsets required are changed.
-
-@subsection ce_tao TAO
-
-While it would be nice to get TAO working on CE, I doubt I'll get a chance to
-work on it before graduating. OCI has said there has been some interest in
-it, but I don't know how that is going right now.
+Developers working with sources checked out from CVS must generate the
+project and workspace files locally using MPC. The autobuild system's
+generate_makefile and generate_workspace commands can be used for this.
@subsection ce_wchar Unicode/WChar
ACE on WindowsCE automatically has ACE_HAS_WCHAR and ACE_USES_WCHAR turned
on. Thus ACE_TCHAR and ACE_TEXT() are the wide char versions.
+@subsection ce_tests Running the Test Suite on Windows CE
+
+The ACE test suite in ACE_wrappers/tests is used on Windows CE as well as
+on dekstop Windows. The test suite tools are being extended to use a
+product called Pocket Controller, Enterprise edition from Soft Object
+Technologies, Inc. (www.soti.net) that can script the actions needed to
+copy the test files to a PocketPC device, run the test, and copy the log
+files back to the build machine for analysis and reporting to the
+scoreboard.
+
*/ \ No newline at end of file
diff --git a/tests/ACE_Test.cpp b/tests/ACE_Test.cpp
new file mode 100644
index 00000000000..b9962c753c0
--- /dev/null
+++ b/tests/ACE_Test.cpp
@@ -0,0 +1,79 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// tests
+//
+// = DESCRIPTION
+// This simple test exercises and illustrates use of ACE value-added
+// functions.
+//
+// = AUTHOR
+// Steve Huston <shuston@riverace.com>
+//
+// ============================================================================
+
+#include "ace/ACE.h"
+#include "test_config.h"
+
+ACE_RCSID(tests, ACE_Test, "$Id$")
+
+// Test ACE::execname to be sure it finds .exe without regard to case.
+int
+execname_test (void)
+{
+ int error_count = 0;
+
+ // This test is only interesting on Win32
+#if defined (ACE_WIN32)
+ const ACE_TCHAR *newname;
+ const ACE_TCHAR *prog1 = ACE_TEXT ("myprog.exe");
+ const ACE_TCHAR *prog2 = ACE_TEXT ("myprog.EXE");
+ const ACE_TCHAR *prog3 = ACE_TEXT ("myprog");
+
+ newname = ACE::execname (prog1);
+ if (newname != prog1) // Didn't find .exe correctly
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Name %s, not %s\n"), newname, prog1));
+ delete [] newname;
+ ++error_count;
+ }
+
+ newname = ACE::execname (prog2);
+ if (newname != prog2) // Didn't find .exe correctly
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Name %s, not %s\n"), newname, prog2));
+ delete [] newname;
+ ++error_count;
+ }
+
+ newname = ACE::execname (prog3);
+ if (newname == prog3) // Thought the name didn't need .exe
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Says .exe not needed for %s\n"),
+ newname));
+ ++error_count;
+ }
+ else
+ delete [] newname;
+#endif /* ACE_WIN32 */
+
+ return error_count;
+}
+
+
+int
+ACE_TMAIN (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("ACE_Test"));
+
+ int status = 0;
+ int result;
+
+ if ((result = execname_test ()) != 0)
+ status = result;
+
+ ACE_END_TEST;
+ return status;
+}
diff --git a/tests/ACE_Test.dsp b/tests/ACE_Test.dsp
new file mode 100644
index 00000000000..c80a47c413e
--- /dev/null
+++ b/tests/ACE_Test.dsp
@@ -0,0 +1,162 @@
+# Microsoft Developer Studio Project File - Name="ACE_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ACE_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ACE_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ACE_Test.mak" CFG="ACE_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ACE_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ACE_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "ACE_Test - Win32 Static Debug"
+# Name "ACE_Test - Win32 Static Release"
+# Name "ACE_Test - Win32 Release"
+# Name "ACE_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\ACE_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/Makefile b/tests/Makefile
index e61079f3ba6..e2f577021c2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -10,7 +10,8 @@
#----------------------------------------------------------------------------
DIRS_PARALLEL = 1
-BIN = Aio_Platform_Test \
+BIN = ACE_Test \
+ Aio_Platform_Test \
Arg_Shifter_Test \
ARGV_Test \
Atomic_Op_Test \
diff --git a/tests/Makefile.bor b/tests/Makefile.bor
index 59c411770d7..7c8cb325366 100644
--- a/tests/Makefile.bor
+++ b/tests/Makefile.bor
@@ -4,6 +4,7 @@
#
NAMES = \
+ ACE_Test \
Aio_Platform_Test \
Arg_Shifter_Test \
ARGV_Test \
diff --git a/tests/run_test.lst b/tests/run_test.lst
index ff225f8dc6b..69d6e02392f 100644
--- a/tests/run_test.lst
+++ b/tests/run_test.lst
@@ -16,6 +16,7 @@
# configurations.
ACE_Init_Test: MSVC
+ACE_Test
Arg_Shifter_Test
Atomic_Op_Test
Auto_IncDec_Test
diff --git a/tests/tests.dsw b/tests/tests.dsw
index 47a6f8d263e..05ad7ad180b 100644
--- a/tests/tests.dsw
+++ b/tests/tests.dsw
@@ -15,6 +15,18 @@ Package=<4>
###############################################################################
+Project: "ACE_Test"=".\ACE_Test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "ARGV_Test"=".\ARGV_Test.dsp" - Package Owner=<4>
Package=<5>
diff --git a/tests/tests.mpc b/tests/tests.mpc
index d077c53c4a3..4f480670eee 100644
--- a/tests/tests.mpc
+++ b/tests/tests.mpc
@@ -36,6 +36,15 @@ project(Service Config DLL) : acelib {
}
}
+project(ACE Test) : aceexe {
+ exename = ACE_Test
+ Source_Files {
+ ACE_Test.cpp
+ }
+ Header_Files {
+ }
+}
+
project(Aio Platform Test) : aceexe {
exename = Aio_Platform_Test
Source_Files {