summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-28 04:28:44 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-28 04:28:44 +0000
commitff780b5ed926be389d9efdb5b6bc4226075f71b6 (patch)
tree20fe3f42c879173ea1fe2025023b1e98fa07041e
parent1672df68c0bdb1181369c641b0482499c51734d2 (diff)
downloadATCD-ff780b5ed926be389d9efdb5b6bc4226075f71b6.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-97a38
-rw-r--r--tests/MM_Shared_Memory_Test.cpp2
-rw-r--r--tests/Naming_Test.cpp43
-rw-r--r--tests/UPIPE_SAP_Test.cpp2
4 files changed, 64 insertions, 21 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index f041a83d431..670dbd26074 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,3 +1,41 @@
+Mon Jan 27 21:33:00 1997 Irfan Pyarali <irfan@flamenco.cs.wustl.edu>
+
+ * tests/Naming_Test.cpp (main): Made modifications to the test to
+ make it more dynamic. Also made it work with UNICODE and
+ ACE_Naming_Context.
+
+ * ace/Local_Name_Space_T.cpp (create_manager_i): Added a better
+ naming scheme for the locks.
+
+ * ace: Changed the calculations of string lengths such that the
+ size of the character type is carefully considered.
+
+ The following were affected:
+
+ ACE.cpp (ACE::ldfind)
+ Local_Token.cpp (ACE_TPQ_Entry::ACE_TPQ_Entry)
+ Log_Msg.cpp (ACE_Log_Msg::msg, ACE_Log_Msg::find)
+ Memory_Pool.cpp (ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool)
+ Naming_Context.cpp (ACE_Naming_Context::open)
+ Parse_Node.cpp (ACE_Location_Node::open_handle)
+ Registry.cpp (ACE_Predefined_Naming_Contexts::is_local_host,
+ ACE_Registry::Binding_Iterator::Object_Iteration::next_n,
+ ACE_Registry::Binding_Iterator::Context_Iteration::next_n)
+
+ * ace/OS.h: Added UNICODE support for ACE_DEFAULT_LOCALNAME.
+
+ * ace/Proactor.cpp: Redid "lost" changes to add UNICODE support to:
+
+ /* Proactor */
+ ACE_Overlapped_File::ACE_Overlapped_File
+ ACE_Overlapped_File::open
+
+ * ace/Registry_Name_Space.h: Changed the order of #include and
+ #define as that the correct set of MACROS are defined for the
+ include files.
+
+ * tests/MM_Shared_Memory_Test.cpp: Added UNICODE support.
+
Mon Jan 27 09:16:03 1997 David L. Levine <levine@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU,
diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp
index 4662fee2274..6ec53ee63dc 100644
--- a/tests/MM_Shared_Memory_Test.cpp
+++ b/tests/MM_Shared_Memory_Test.cpp
@@ -27,7 +27,7 @@
#include "test_config.h"
const int SHMSZ = 27;
-static char shm_key[] = ACE_TEMP_FILE_NAME __TEXT ("XXXXXX");
+static TCHAR shm_key[] = ACE_TEMP_FILE_NAME __TEXT ("XXXXXX");
// Global thread manager.
static ACE_Thread_Manager thr_mgr;
diff --git a/tests/Naming_Test.cpp b/tests/Naming_Test.cpp
index a1ee0ec11c1..f3a4cdc2fd6 100644
--- a/tests/Naming_Test.cpp
+++ b/tests/Naming_Test.cpp
@@ -121,34 +121,37 @@ main (int argc, char *argv[])
TCHAR temp_file [BUFSIZ];
ACE_START_TEST ("Naming_Test");
- ACE_Naming_Context ns_context;
+ ACE_Naming_Context *ns_context = 0;
+ ACE_NEW_RETURN (ns_context, ACE_Naming_Context, -1);
- ACE_Name_Options *name_options = ns_context.name_options ();
+ ACE_Name_Options *name_options = ns_context->name_options ();
name_options->parse_args (argc, argv);
-#if (defined (ACE_WIN32) && defined (UNICODE))
-
- name_options->namespace_dir (__TEXT ("Software\\ACE\\Name Service"));
- name_options->database (__TEXT ("Version 1"));
- name_options->use_registry (1);
-
+#if (defined (ACE_WIN32) && defined (UNICODE))
+ if (name_options->use_registry () == 1)
#else
-
- ACE_OS::strcpy (temp_file, ACE::basename (name_options->process_name (),
- ACE_DIRECTORY_SEPARATOR_CHAR));
- ACE_OS::strcat (temp_file, __TEXT ("XXXXXX"));
-
- // Set the database name using mktemp to generate a unique file name
- name_options->database (ACE_OS::mktemp (temp_file));
-
+ if (0)
#endif /* ACE_WIN32 && UNICODE */
-
- ACE_ASSERT (ns_context.open (ACE_Naming_Context::PROC_LOCAL, 1) != -1);
+ {
+ name_options->namespace_dir (__TEXT ("Software\\ACE\\Name Service"));
+ name_options->database (__TEXT ("Version 1"));
+ }
+ else
+ {
+ ACE_OS::strcpy (temp_file, ACE::basename (name_options->process_name (),
+ ACE_DIRECTORY_SEPARATOR_CHAR));
+ ACE_OS::strcat (temp_file, __TEXT ("XXXXXX"));
+
+ // Set the database name using mktemp to generate a unique file name
+ name_options->database (ACE_OS::mktemp (temp_file));
+
+ ACE_ASSERT (ns_context->open (ACE_Naming_Context::PROC_LOCAL, 1) != -1);
+ }
// Add some bindings to the database
bind (ns_context);
-
+
// Should find the entries
find (ns_context, 1, 0);
@@ -165,6 +168,8 @@ main (int argc, char *argv[])
find (ns_context, 1, -1);
find (ns_context, -1, -1);
+ delete ns_context;
+
ACE_OS::sprintf (temp_file, __TEXT ("%s%s%s"),
name_options->namespace_dir (),
ACE_DIRECTORY_SEPARATOR_STR,
diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp
index 1771575b3cb..7a5d27376fc 100644
--- a/tests/UPIPE_SAP_Test.cpp
+++ b/tests/UPIPE_SAP_Test.cpp
@@ -46,7 +46,7 @@ connector (void *)
ACE_Message_Block *mb;
- ACE_NEW_RETURN (mb, ACE_Message_Block (sizeof "hello thanks"), 0);
+ ACE_NEW_RETURN (mb, ACE_Message_Block (sizeof "hello thanks" * sizeof char), 0);
mb->copy ("hello");