summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ChangeLog21
-rw-r--r--ACE/ace/DLL_Manager.cpp4
-rw-r--r--ACE/ace/Dynamic_Service_Base.cpp3
-rw-r--r--ACE/ace/Service_Gestalt.cpp4
-rw-r--r--ACE/ace/os_include/net/os_if.h16
-rw-r--r--ACE/tests/ARGV_Test.cpp22
-rw-r--r--ACE/tests/Time_Value_Test.cpp4
7 files changed, 49 insertions, 25 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 84f600498b6..1e9dec85362 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,24 @@
+Thu Dec 28 12:37:21 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/DLL_Manager.cpp (get_handle):
+ Simplified this method a little
+
+ * ace/Dynamic_Service_Base.cpp:
+ Layout change
+
+ * ace/os_include/net/os_if.h:
+ Include ws2tcpip.h on windows as we do in the other files, this
+ way we don't get redefinitions on windows
+
+ * ace/Service_Gestalt.cpp (process_directive):
+ No need to use an intermediate variable
+
+ * tests/ARGV_Test.cpp:
+ Fixed deprecated conversion warnings
+
+ * tests/Time_Value_Test.cpp:
+ Added another test
+
Thu Dec 28 11:13:21 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-aix-5.x.h:
diff --git a/ACE/ace/DLL_Manager.cpp b/ACE/ace/DLL_Manager.cpp
index 327f48e40fa..4290700b55e 100644
--- a/ACE/ace/DLL_Manager.cpp
+++ b/ACE/ace/DLL_Manager.cpp
@@ -339,8 +339,6 @@ ACE_DLL_Handle::get_handle (int become_owner)
ACE_TRACE ("ACE_DLL_Handle::get_handle");
ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
- ACE_SHLIB_HANDLE handle = ACE_SHLIB_INVALID_HANDLE;
-
if (this->refcount_ == 0 && become_owner != 0)
{
if (ACE::debug ())
@@ -351,7 +349,7 @@ ACE_DLL_Handle::get_handle (int become_owner)
return ACE_SHLIB_INVALID_HANDLE;
}
- handle = this->handle_;
+ ACE_SHLIB_HANDLE handle = this->handle_;
if (become_owner != 0)
{
diff --git a/ACE/ace/Dynamic_Service_Base.cpp b/ACE/ace/Dynamic_Service_Base.cpp
index 7c2bd20fcec..301361a0b2d 100644
--- a/ACE/ace/Dynamic_Service_Base.cpp
+++ b/ACE/ace/Dynamic_Service_Base.cpp
@@ -60,7 +60,7 @@ ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo,
{
// Check the static repo, too if different
if (repo == global)
- break;
+ break;
}
return svc_rec;
@@ -80,7 +80,6 @@ ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo,
const ACE_Service_Type_Impl *type = 0;
const ACE_Service_Gestalt* repo_found = repo;
-
const ACE_Service_Type *svc_rec = find_i (repo_found, name, no_global);
if (svc_rec != 0)
{
diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp
index 0a3a322a3a0..756ac4de993 100644
--- a/ACE/ace/Service_Gestalt.cpp
+++ b/ACE/ace/Service_Gestalt.cpp
@@ -1017,9 +1017,7 @@ ACE_Service_Gestalt::process_directive (const ACE_TCHAR directive[])
ACE_Svc_Conf_Param d (this, directive);
- int result = this->process_directives_i (&d);
-
- return result;
+ return this->process_directives_i (&d);
#else
ACE_DLL dll;
diff --git a/ACE/ace/os_include/net/os_if.h b/ACE/ace/os_include/net/os_if.h
index d4b89ca21dc..c689e07ab7e 100644
--- a/ACE/ace/os_include/net/os_if.h
+++ b/ACE/ace/os_include/net/os_if.h
@@ -49,6 +49,10 @@
# endif /* HPUX && IOR */
#endif /* !ACE_LACKS_NET_IF_H */
+#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
+# include /**/ <ws2tcpip.h>
+#endif /* ACE_HAS_WINSOCK2 */
+
// Place all additions (especially function declarations) within extern "C" {}
#ifdef __cplusplus
extern "C"
@@ -100,17 +104,17 @@ struct ifconf {
};
#endif /* ACE_LACKS_IFCONF */
-#if !defined (IFF_UP) && defined (ACE_LACKS_NETWORKING)
+#if !defined (IFF_UP)
# define IFF_UP 0x1
-#endif /* IFF_UP && ACE_LACKS_NETWORKING */
+#endif /* IFF_UP */
-#if !defined (IFF_LOOPBACK) && defined (ACE_LACKS_NETWORKING)
+#if !defined (IFF_LOOPBACK)
# define IFF_LOOPBACK 0x8
-#endif /* IFF_LOOPBACK && ACE_LACKS_NETWORKING */
+#endif /* IFF_LOOPBACK */
-#if !defined (IFF_BROADCAST) && defined (ACE_LACKS_NETWORKING)
+#if !defined (IFF_BROADCAST)
# define IFF_BROADCAST 0x2
-#endif /* IFF_BROADCAST && ACE_LACKS_NETWORKING */
+#endif /* IFF_BROADCAST */
#ifdef __cplusplus
}
diff --git a/ACE/tests/ARGV_Test.cpp b/ACE/tests/ARGV_Test.cpp
index dbadcadb341..200fa65e630 100644
--- a/ACE/tests/ARGV_Test.cpp
+++ b/ACE/tests/ARGV_Test.cpp
@@ -181,11 +181,11 @@ test_argv_buf (void)
static int
test_argv_quotes (void)
{
- char *argv[] = { "first without quotes",
- "'second in single quotes'",
- "\"third in double quotes\"",
- 0
- };
+ const char *argv[] = { "first without quotes",
+ "'second in single quotes'",
+ "\"third in double quotes\"",
+ 0
+ };
int argc = 3;
// (argc, argv)
@@ -222,12 +222,12 @@ test_argv_quotes (void)
// args2
ACE_ARGV args2;
- for (int i = 0; i < argc; ++i)
+ for (int i = 0; i < argc; ++i)
args2.add (argv[i], true);
args2.add (ACE_TEXT ("'fourth in single quotes'"), true);
args2.add (ACE_TEXT ("\"fifth in double quotes\""), true);
args2.add (ACE_TEXT ("sixth without any quotes"), true);
-
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n*** args-3 ***\n")));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args2.argc ()));
@@ -235,7 +235,7 @@ test_argv_quotes (void)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args[%02d]: %s\n"), i, args2[i]));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args2.argc ()));
-
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n*** args-4 ***\n")));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args2.argc ()));
@@ -244,10 +244,10 @@ test_argv_quotes (void)
i, args2.argv ()[i]));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args2.argc ()));
-
+
// args3
ACE_ARGV args3(argv);
-
+
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n*** args-5 ***\n")));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args3.argc ()));
@@ -255,7 +255,7 @@ test_argv_quotes (void)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args[%02d]: %s\n"), i, args3[i]));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("args.argc (): %d\n"), args3.argc ()));
-
+
return 0;
}
diff --git a/ACE/tests/Time_Value_Test.cpp b/ACE/tests/Time_Value_Test.cpp
index 13fd8fe3bda..764b23f406d 100644
--- a/ACE/tests/Time_Value_Test.cpp
+++ b/ACE/tests/Time_Value_Test.cpp
@@ -227,6 +227,10 @@ run_main (int, ACE_TCHAR *[])
ACE_ASSERT (tv7 == tv8); // That's right! See above . . .
ACE_ASSERT (tv9 == tv6);
+ ACE_Time_Value tv10 (1);
+
+ ACE_ASSERT (tv10.sec() == 1);
+
// test multiplication by double
// test simple multiplication
tv1.set (1, 1);