summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ChangeLog9
-rw-r--r--ACE/apps/JAWS/ChangeLog6
-rw-r--r--ACE/apps/JAWS/server/IO.cpp3
-rw-r--r--ACE/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp2
-rw-r--r--ACE/examples/Threads/cancel.cpp19
-rw-r--r--ACE/examples/Threads/thread_manager.cpp9
-rw-r--r--ACE/examples/Threads/thread_specific.cpp8
-rw-r--r--ACE/performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp3
8 files changed, 33 insertions, 26 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 209dd6fa4c2..641d0d789db 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,12 @@
+Fri Oct 28 03:23:18 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
+
+ * examples/Threads/thread_manager.cpp:
+ * examples/Threads/cancel.cpp:
+ * examples/Threads/thread_specific.cpp:
+ * examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
+ * performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp
+ Addressed 64-bit conversion warnings.
+
Fri Oct 28 02:49:11 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
* examples/APG/Shared_Memory/Mem_Map.cpp:
diff --git a/ACE/apps/JAWS/ChangeLog b/ACE/apps/JAWS/ChangeLog
index 11d67ef52cd..f0dd0c16bd2 100644
--- a/ACE/apps/JAWS/ChangeLog
+++ b/ACE/apps/JAWS/ChangeLog
@@ -1,3 +1,9 @@
+Fri Oct 28 03:23:18 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
+
+ * server/IO.cpp:
+
+ Addressed 64-bit conversion warnings.
+
Mon Feb 6 01:00:55 UTC 2006 William Otte <wotte@dre.vanderbilt.edu>
* server/HTTP_Server.h
diff --git a/ACE/apps/JAWS/server/IO.cpp b/ACE/apps/JAWS/server/IO.cpp
index e08b7d89f64..8b727a12019 100644
--- a/ACE/apps/JAWS/server/IO.cpp
+++ b/ACE/apps/JAWS/server/IO.cpp
@@ -14,6 +14,7 @@
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_sys_stat.h"
#include "ace/Auto_Ptr.h"
+#include "ace/Basic_Types.h"
ACE_RCSID (server,
IO,
@@ -398,7 +399,7 @@ JAWS_Asynch_IO::send_message (const char *buffer,
ACE_Asynch_Write_Stream aw;
if (aw.open (*this, this->handle_) == -1
- || aw.write (*mb, length, (void *) act) == -1)
+ || aw.write (*mb, length, (void *) static_cast<intptr_t> (act)) == -1)
{
mb->release ();
diff --git a/ACE/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp b/ACE/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
index 54d936962aa..ad6fdc684af 100644
--- a/ACE/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
+++ b/ACE/examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp
@@ -146,7 +146,7 @@ Process_Per_Connection_Logging_Server::run_master (int argc, char *argv[])
int
Process_Per_Connection_Logging_Server::run_worker (int, char *argv[])
{
- int client_handle_i = atoi (argv[2]);
+ intptr_t client_handle_i = atoi (argv[2]);
// Some compilers don't like reinterpret_casting an int to an int, so
// only do reinterpret_cast on Windows.
#if defined (ACE_WIN32)
diff --git a/ACE/examples/Threads/cancel.cpp b/ACE/examples/Threads/cancel.cpp
index f10bb822580..bdcef678670 100644
--- a/ACE/examples/Threads/cancel.cpp
+++ b/ACE/examples/Threads/cancel.cpp
@@ -13,15 +13,9 @@ ACE_RCSID(Threads, cancel, "$Id$")
#if defined (ACE_HAS_THREADS)
static void *
-#if ACE_SIZEOF_VOID_P==8 && ACE_SIZEOF_INT<ACE_SIZEOF_VOID_P
-worker (long iterations)
+worker (intptr_t iterations)
{
- for (long i = 0; i < iterations; i++)
-#else
-worker (int iterations)
-{
- for (int i = 0; i < iterations; i++)
-#endif
+ for (intptr_t i = 0; i < iterations; i++)
{
if ((i % 10) == 0
&& (ACE_Thread_Manager::instance ()->testcancel (ACE_Thread::self ()) != 0))
@@ -35,7 +29,7 @@ worker (int iterations)
}
static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS;
-static const int DEFAULT_ITERATIONS = 100000;
+static const intptr_t DEFAULT_ITERATIONS = 100000;
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
@@ -45,11 +39,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
daemon.open (argv[0]);
int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS;
-#if ACE_SIZEOF_VOID_P==8 && ACE_SIZEOF_INT<ACE_SIZEOF_VOID_P
- long n_iterations = (long)( argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS );
-#else
- int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
-#endif
+ intptr_t n_iterations =
+ argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();
diff --git a/ACE/examples/Threads/thread_manager.cpp b/ACE/examples/Threads/thread_manager.cpp
index e6f12f6c939..b2bee7db4c6 100644
--- a/ACE/examples/Threads/thread_manager.cpp
+++ b/ACE/examples/Threads/thread_manager.cpp
@@ -22,9 +22,9 @@ handler (int signum)
}
static void *
-worker (int iterations)
+worker (intptr_t iterations)
{
- for (int i = 0; i < iterations; i++)
+ for (intptr_t i = 0; i < iterations; i++)
{
if ((i % 1000) == 0)
{
@@ -47,7 +47,7 @@ worker (int iterations)
}
static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS;
-static const int DEFAULT_ITERATIONS = 100000;
+static const intptr_t DEFAULT_ITERATIONS = 100000;
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
@@ -61,7 +61,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_UNUSED_ARG (sa);
int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS;
- int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
+ intptr_t n_iterations =
+ argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS;
ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();
diff --git a/ACE/examples/Threads/thread_specific.cpp b/ACE/examples/Threads/thread_specific.cpp
index 04cb3d94627..3af1501ce4d 100644
--- a/ACE/examples/Threads/thread_specific.cpp
+++ b/ACE/examples/Threads/thread_specific.cpp
@@ -44,9 +44,7 @@ cleanup (void *ptr)
static void *
worker (void *c)
{
- // Cast the arg to a long, first, because a pointer is the same size
- // as a long on all current ACE platforms.
- int count = (int) (long) c;
+ intptr_t count = static_cast<intptr_t> (c);
ACE_thread_key_t key = ACE_OS::NULL_key;
int *ip = 0;
@@ -68,7 +66,7 @@ worker (void *c)
"(%t) %p\n",
"ACE_Thread::setspecific"));
- for (int i = 0; i < count; i++)
+ for (intptr_t i = 0; i < count; i++)
{
if (ACE_Thread::keycreate (&key, cleanup) == -1)
ACE_ERROR ((LM_ERROR,
@@ -194,7 +192,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_Service_Config daemon (argv[0]);
int threads = argc > 1 ? ACE_OS::atoi (argv[1]) : 4;
- int count = argc > 2 ? ACE_OS::atoi (argv[2]) : 10000;
+ intptr_t count = argc > 2 ? ACE_OS::atoi (argv[2]) : 10000;
// Register a signal handler.
ACE_Sig_Action sa ((ACE_SignalHandler) (handler), SIGINT);
diff --git a/ACE/performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp b/ACE/performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp
index 12d240b29fe..48fe88cad2f 100644
--- a/ACE/performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp
+++ b/ACE/performance-tests/Synch-Benchmarks/Perf_Test/Benchmark_Performance.cpp
@@ -2,6 +2,7 @@
#define ACE_BUILD_SVC_DLL
#include "Benchmark_Performance.h"
+#include "ace/Basic_Types.h"
ACE_RCSID(Synch_Benchmarks, Benchmark_Performance, "$Id$")
@@ -53,7 +54,7 @@ Benchmark_Performance::fini (void)
void *
Benchmark_Performance::svc_run (Benchmark_Performance *bp)
{
- return (void *) (bp->svc () == -1 ? (long)-1 : (long)0);
+ return (void *) (bp->svc () == -1 ? (intptr_t) -1 : (intptr_t) 0);
}
#endif /* ACE_HAS_THREADS */