summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-26 15:46:44 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-26 15:46:44 +0000
commit0bc80fab4dc53994efbd511b22b0c86d59baff8c (patch)
tree3e074e160a2e59a236f10781cfcb0e071b49fac8 /performance-tests
parentcde21c2507ace716fc833231662ff0f85ff13f5a (diff)
downloadATCD-0bc80fab4dc53994efbd511b22b0c86d59baff8c.tar.gz
ChangeLogTag:Wed Dec 26 09:07:45 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/Misc/basic_perf.cpp4
-rw-r--r--performance-tests/Misc/childbirth_time.cpp4
-rw-r--r--performance-tests/Misc/context_switch_time.cpp12
-rw-r--r--performance-tests/Misc/preempt.cpp18
-rw-r--r--performance-tests/Misc/test_guard.cpp2
-rw-r--r--performance-tests/RPC/client.cpp4
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp8
-rw-r--r--performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp12
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp8
-rw-r--r--performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp12
-rw-r--r--performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp2
-rw-r--r--performance-tests/Synch-Benchmarks/Perf_Test/Performance_Test_Options.cpp46
-rw-r--r--performance-tests/TCP/tcp_test.cpp28
-rw-r--r--performance-tests/UDP/udp_test.cpp32
14 files changed, 95 insertions, 97 deletions
diff --git a/performance-tests/Misc/basic_perf.cpp b/performance-tests/Misc/basic_perf.cpp
index 7bfaa43e7f6..ea8a5bd4e16 100644
--- a/performance-tests/Misc/basic_perf.cpp
+++ b/performance-tests/Misc/basic_perf.cpp
@@ -505,7 +505,7 @@ get_options (int argc, ACE_TCHAR *argv [])
{
case 'i':
{
- int temp = ACE_OS::atoi (get_opt.optarg);
+ int temp = ACE_OS::atoi (get_opt.opt_arg ());
if (temp > 0)
iterations = (u_int) temp;
else
@@ -528,7 +528,7 @@ get_options (int argc, ACE_TCHAR *argv [])
}
}
- switch (argc - get_opt.optind)
+ switch (argc - get_opt.opt_ind ())
{
case 0:
// OK
diff --git a/performance-tests/Misc/childbirth_time.cpp b/performance-tests/Misc/childbirth_time.cpp
index f4030d60cf7..a7942bd8966 100644
--- a/performance-tests/Misc/childbirth_time.cpp
+++ b/performance-tests/Misc/childbirth_time.cpp
@@ -346,11 +346,11 @@ main (int argc, ACE_TCHAR* argv[])
switch (c)
{
case 'n':
- iteration = ACE_OS::atoi (get_opt.optarg);
+ iteration = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'l':
MULTIPLY_FACTOR = ACE_static_cast (size_t,
- ACE_OS::atoi (get_opt.optarg));
+ ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'p': // test ACE_Process.spawn ()
profiler = prof_ace_process;
diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp
index b6a793ddd15..44679a8c029 100644
--- a/performance-tests/Misc/context_switch_time.cpp
+++ b/performance-tests/Misc/context_switch_time.cpp
@@ -1088,9 +1088,9 @@ get_options (int argc, ACE_TCHAR *argv[])
while ((opt = get_opt ()) != EOF) {
switch (opt) {
case 'c':
- if (ACE_OS::atoi (get_opt.optarg) >= 0)
+ if (ACE_OS::atoi (get_opt.opt_arg ()) >= 0)
{
- count = ACE_OS::atoi (get_opt.optarg);
+ count = ACE_OS::atoi (get_opt.opt_arg ());
}
else
{
@@ -1113,15 +1113,13 @@ get_options (int argc, ACE_TCHAR *argv[])
}
}
- switch (argc - get_opt.optind) {
+ switch (argc - get_opt.opt_ind ()) {
case 0:
// use default number of iterations
break;
case 1:
- if (ACE_OS::atoi (argv [get_opt.optind]) > 0)
- {
- num_iterations = ACE_OS::atoi (argv [get_opt.optind]);
- }
+ if (ACE_OS::atoi (argv [get_opt.opt_ind ()]) > 0)
+ num_iterations = ACE_OS::atoi (argv [get_opt.opt_ind ()]);
else
{
ACE_DEBUG ((LM_ERROR, "%n: iterations must be > 0\n"));
diff --git a/performance-tests/Misc/preempt.cpp b/performance-tests/Misc/preempt.cpp
index 9b5f618eb18..7a0ee743966 100644
--- a/performance-tests/Misc/preempt.cpp
+++ b/performance-tests/Misc/preempt.cpp
@@ -295,28 +295,28 @@ get_options (int argc, ACE_TCHAR *argv[])
use_fork = 1;
break;
case 'h':
- if (ACE_OS::atoi (get_opt.optarg) >= 2)
- high_iterations = ACE_OS::atoi (get_opt.optarg);
+ if (ACE_OS::atoi (get_opt.opt_arg ()) >= 2)
+ high_iterations = ACE_OS::atoi (get_opt.opt_arg ());
else
ACE_ERROR_RETURN ((LM_ERROR, "%n: high iterations must be >= 2\n"),
-1);
break;
case 'l':
- if (ACE_OS::atoi (get_opt.optarg) >= 2)
- low_iterations = ACE_OS::atoi (get_opt.optarg);
+ if (ACE_OS::atoi (get_opt.opt_arg ()) >= 2)
+ low_iterations = ACE_OS::atoi (get_opt.opt_arg ());
else
ACE_ERROR_RETURN ((LM_ERROR, "%n: low iterations must be >= 2\n"), -1);
break;
case 'n':
- if (ACE_OS::atoi (get_opt.optarg) >= 1)
- high_priority_tasks = ACE_OS::atoi (get_opt.optarg);
+ if (ACE_OS::atoi (get_opt.opt_arg ()) >= 1)
+ high_priority_tasks = ACE_OS::atoi (get_opt.opt_arg ());
else
ACE_ERROR_RETURN ((LM_ERROR, "%n: number of high priority threads "
"must be >= 1\n"), -1);
break;
case 'p':
- if (ACE_OS::atoi (get_opt.optarg) > 0)
- read_period = ACE_OS::atoi (get_opt.optarg);
+ if (ACE_OS::atoi (get_opt.opt_arg ()) > 0)
+ read_period = ACE_OS::atoi (get_opt.opt_arg ());
else
ACE_ERROR_RETURN ((LM_ERROR, "%n: read period > 0\n"), -1);
break;
@@ -333,7 +333,7 @@ get_options (int argc, ACE_TCHAR *argv[])
}
}
- switch (argc - get_opt.optind) {
+ switch (argc - get_opt.opt_ind ()) {
case 0:
// OK, no non-flag arguments.
break;
diff --git a/performance-tests/Misc/test_guard.cpp b/performance-tests/Misc/test_guard.cpp
index 78024742e5f..bbff5602888 100644
--- a/performance-tests/Misc/test_guard.cpp
+++ b/performance-tests/Misc/test_guard.cpp
@@ -72,7 +72,7 @@ main (int argc, char *argv[])
test_function = guard;
break;
case 'n':
- iterations = ACE_OS::atoi (getopt.optarg);
+ iterations = ACE_OS::atoi (getopt.opt_arg ());
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/performance-tests/RPC/client.cpp b/performance-tests/RPC/client.cpp
index 440b623470e..b0f4a476600 100644
--- a/performance-tests/RPC/client.cpp
+++ b/performance-tests/RPC/client.cpp
@@ -20,11 +20,11 @@ int main (int argc, char* argv[])
switch ((char) c)
{
case 'h':
- host = getopt.optarg;
+ host = getopt.opt_arg ();
break;
case 'i':
- nsamples = ACE_OS::atoi (getopt.optarg);
+ nsamples = ACE_OS::atoi (getopt.opt_arg ());
break;
}
}
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp
index 8cf94d33434..47e504591ed 100644
--- a/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp
+++ b/performance-tests/Server_Concurrency/Leader_Follower/RT_CORBA_Leader_Follower.cpp
@@ -251,16 +251,16 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
+ number_of_messages = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't':
- number_of_threads = ACE_OS::atoi (get_opt.optarg);
+ number_of_threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
+ debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
+ message_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
index d03a62194e1..d4beccdae30 100644
--- a/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
+++ b/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp
@@ -197,22 +197,22 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
+ number_of_messages = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
+ message_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'w':
- number_of_threads = ACE_OS::atoi (get_opt.optarg);
+ number_of_threads = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'b':
- burst_size = ACE_OS::atoi (get_opt.optarg);
+ burst_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't':
- timeout_between_bursts = ACE_OS::atoi (get_opt.optarg);
+ timeout_between_bursts = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
+ debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp
index 6a1d739ab3b..1ff045b9b04 100644
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp
+++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/RT_CORBA_Workers.cpp
@@ -402,16 +402,16 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
+ number_of_messages = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't':
- number_of_workers = ACE_OS::atoi (get_opt.optarg);
+ number_of_workers = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
+ debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
+ message_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
index 27b7274826d..729ce9a2692 100644
--- a/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
+++ b/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp
@@ -239,22 +239,22 @@ parse_args (int argc, ACE_TCHAR *argv[])
switch (c)
{
case 'm':
- number_of_messages = ACE_OS::atoi (get_opt.optarg);
+ number_of_messages = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 's':
- message_size = ACE_OS::atoi (get_opt.optarg);
+ message_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'w':
- number_of_workers = ACE_OS::atoi (get_opt.optarg);
+ number_of_workers = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'b':
- burst_size = ACE_OS::atoi (get_opt.optarg);
+ burst_size = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 't':
- timeout_between_bursts = ACE_OS::atoi (get_opt.optarg);
+ timeout_between_bursts = ACE_OS::atoi (get_opt.opt_arg ());
break;
case 'd':
- debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.optarg));
+ debug = ACE_static_cast (DEBUGGING_RANGE, ACE_OS::atoi (get_opt.opt_arg ()));
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp b/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp
index be6e1eaf72f..62fb4297507 100644
--- a/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp
+++ b/performance-tests/Synch-Benchmarks/Base_Test/Baseline_Test.cpp
@@ -42,7 +42,7 @@ Baseline_Test_Base::parse_args (int argc, char *argv[])
{
case 'i': // Total iterations
{
- int tmp = ACE_OS::atoi (getopt.optarg);
+ int tmp = ACE_OS::atoi (getopt.opt_arg ());
if (tmp <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"%d is not a valid value for iteration\n",
diff --git a/performance-tests/Synch-Benchmarks/Perf_Test/Performance_Test_Options.cpp b/performance-tests/Synch-Benchmarks/Perf_Test/Performance_Test_Options.cpp
index 2c39019e811..2eb43501280 100644
--- a/performance-tests/Synch-Benchmarks/Perf_Test/Performance_Test_Options.cpp
+++ b/performance-tests/Synch-Benchmarks/Perf_Test/Performance_Test_Options.cpp
@@ -80,17 +80,17 @@ Performance_Test_Options::parse_args (int argc, char *argv[])
switch (c)
{
case 'a': // Not used. (do_ack ???)
- this->_ack = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_ack = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'A': // Not used. (set rendezvous point.)
- this->pipe_addr (get_opt.optarg);
+ this->pipe_addr (get_opt.opt_arg ());
break;
case 'B': // Create thread with THR_BOUND.
this->t_flags (THR_BOUND);
break;
case 'c': // Not used. (# of connections.)
{
- long connections = ACE_OS::atoi (get_opt.optarg);
+ long connections = ACE_OS::atoi (get_opt.opt_arg ());
if (connections < 0)
this->physical_connections (size_t (-connections));
@@ -102,7 +102,7 @@ Performance_Test_Options::parse_args (int argc, char *argv[])
break;
}
case 'C': // Not used. (Toggle calculate checksum.)
- this->_checksum = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_checksum = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'd': // Not used. (Enable debugging.)
this->_debugging = 1;
@@ -111,58 +111,58 @@ Performance_Test_Options::parse_args (int argc, char *argv[])
this->t_flags (THR_DETACHED);
break;
case 'e': // Perform eager exit (without cleaning up.)
- this->_eager_exit = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_eager_exit = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'F': // Not used.
- this->_free_memory = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_free_memory = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'g': // Not used. (generate data ??)
- this->_generate = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_generate = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'H': // Not used. (set high water mark)
- this->high_water_mark (ACE_OS::atoi (get_opt.optarg));
+ this->high_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'i': // Not used. (# of iterations)
- this->iterations (ACE_OS::atoi (get_opt.optarg));
+ this->iterations (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'L': // Not used. (set low water mark)
- this->low_water_mark (ACE_OS::atoi (get_opt.optarg));
+ this->low_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'l': // Not used. (set initial queue length)
- this->initial_queue_length (ACE_OS::atoi (get_opt.optarg));
+ this->initial_queue_length (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'M': // Set message size in pipe_[proc|thr]_test.
- this->msg_size (ACE_OS::atoi (get_opt.optarg));
+ this->msg_size (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'm': // Not used. (set mapped file name)
- this->mapped_file (get_opt.optarg);
+ this->mapped_file (get_opt.opt_arg ());
break;
case 'N': // Create thread with flag THR_NEW_LWP.
this->t_flags (THR_NEW_LWP);
break;
case 'n': // Set # of lwp's
- this->n_lwps (ACE_OS::atoi (get_opt.optarg));
+ this->n_lwps (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'p': // Toggle whether summary is printed.
- this->_print_summary = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_print_summary = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'P': // Not used.
- this->consecutive_ports (ACE_OS::atoi (get_opt.optarg));
+ this->consecutive_ports (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'S': // Not used (set service_entry ???)
- this->service_entry (get_opt.optarg);
+ this->service_entry (get_opt.opt_arg ());
break;
case 's': // Set testing duration.
- this->sleep_time (ACE_OS::atoi (get_opt.optarg));
+ this->sleep_time (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'T': // Enable/disable tracing.
- if (ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0)
+ if (ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0)
ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (get_opt.optarg, "OFF") == 0)
+ else if (ACE_OS::strcasecmp (get_opt.opt_arg (), "OFF") == 0)
ACE_Trace::stop_tracing ();
break;
case 't': // Set # of threads contending the lock.
- this->thr_count (ACE_OS::atoi (get_opt.optarg));
+ this->thr_count (ACE_OS::atoi (get_opt.opt_arg ()));
break;
case 'u': // Not used. (use udp.)
this->_udp = 1;
@@ -171,10 +171,10 @@ Performance_Test_Options::parse_args (int argc, char *argv[])
this->_verbosity = 1;
break;
case 'X': // Not used. (Use xdr conversion.)
- this->_xdr = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_xdr = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
case 'Z': // Not used. (Do zero copy.)
- this->_zero_copy = ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0;
+ this->_zero_copy = ACE_OS::strcasecmp (get_opt.opt_arg (), "ON") == 0;
break;
default:
ACE_DEBUG ((LM_INFO,
diff --git a/performance-tests/TCP/tcp_test.cpp b/performance-tests/TCP/tcp_test.cpp
index 0f31a960742..af75df3ba12 100644
--- a/performance-tests/TCP/tcp_test.cpp
+++ b/performance-tests/TCP/tcp_test.cpp
@@ -536,7 +536,7 @@ main (int argc, char *argv[])
break;
case 'm':
- bufsz = ACE_OS::atoi (getopt.optarg);
+ bufsz = ACE_OS::atoi (getopt.opt_arg ());
if (bufsz <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -549,7 +549,7 @@ main (int argc, char *argv[])
1);
case 'i':
- nsamples = ACE_OS::atoi (getopt.optarg);
+ nsamples = ACE_OS::atoi (getopt.opt_arg ());
if (nsamples <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"\nIterations must be greater than 0!\n\n"),
@@ -573,7 +573,7 @@ main (int argc, char *argv[])
#endif /* ACE_WIN32 */
case 'b':
- so_bufsz = ACE_OS::atoi (getopt.optarg);
+ so_bufsz = ACE_OS::atoi (getopt.opt_arg ());
if (so_bufsz <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -582,7 +582,7 @@ main (int argc, char *argv[])
break;
case 'I':
- usdelay = ACE_OS::atoi (getopt.optarg);
+ usdelay = ACE_OS::atoi (getopt.opt_arg ());
if (usdelay < 0)
{
@@ -590,20 +590,20 @@ main (int argc, char *argv[])
ACE_ERROR_RETURN ((LM_ERROR,
"%s: bad usdelay: %s\n",
argv[0],
- getopt.optarg),
+ getopt.opt_arg ()),
1);
}
break;
case 'p':
- dstport = ACE_OS::atoi (getopt.optarg);
+ dstport = ACE_OS::atoi (getopt.opt_arg ());
if (dstport <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"\nInvalid port number!\n\n"),
1);
break;
case 't':
- svr_thrno = ACE_OS::atoi (getopt.optarg);
+ svr_thrno = ACE_OS::atoi (getopt.opt_arg ());
if (svr_thrno <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -625,7 +625,7 @@ main (int argc, char *argv[])
}
}
- if (getopt.optind >= argc && client || argc == 1)
+ if (getopt.opt_ind () >= argc && client || argc == 1)
{
usage ();
return 1;
@@ -644,25 +644,25 @@ main (int argc, char *argv[])
ACE_INET_Addr remote_addr;
- if (isdigit(argv[getopt.optind][0]))
+ if (isdigit(argv[getopt.opt_ind ()][0]))
{
if (remote_addr.set (dstport,
(ACE_UINT32) ACE_OS::inet_addr
- (argv[getopt.optind])) == -1)
+ (argv[getopt.opt_ind ()])) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"invalid IP address: %s\n",
- argv[getopt.optind]),
+ argv[getopt.opt_ind ()]),
1);
}
else
{
- if (remote_addr.set (dstport, argv[getopt.optind]) == -1)
+ if (remote_addr.set (dstport, argv[getopt.opt_ind ()]) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"invalid IP address: %s\n",
- argv[getopt.optind]),
+ argv[getopt.opt_ind ()]),
1);
}
- getopt.optind++;
+ getopt.opt_ind ()++;
ACE_DEBUG ((LM_DEBUG, "Connecting to %s:%d\n",
remote_addr.get_host_name (),
diff --git a/performance-tests/UDP/udp_test.cpp b/performance-tests/UDP/udp_test.cpp
index 45fa0988950..b6295291876 100644
--- a/performance-tests/UDP/udp_test.cpp
+++ b/performance-tests/UDP/udp_test.cpp
@@ -608,24 +608,24 @@ main (int argc, char *argv[])
switch ((char) c)
{
case 'x':
- max_allow = ACE_OS::atoi (getopt.optarg);
+ max_allow = ACE_OS::atoi (getopt.opt_arg ());
break;
case 'w':
- window = ACE_OS::atoi (getopt.optarg);
+ window = ACE_OS::atoi (getopt.opt_arg ());
if (window < 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Invalid window!\n\n"),
1);
break;
case 'f':
- ACE_OS::strcpy (datafile, getopt.optarg);
+ ACE_OS::strcpy (datafile, getopt.opt_arg ());
logfile = 1;
break;
case 'v':
VERBOSE = 1;
break;
case 'b':
- bufsz = ACE_OS::atoi (getopt.optarg);
+ bufsz = ACE_OS::atoi (getopt.opt_arg ());
if (bufsz <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -633,7 +633,7 @@ main (int argc, char *argv[])
1);
case 'n':
- nsamples = ACE_OS::atoi (getopt.optarg);
+ nsamples = ACE_OS::atoi (getopt.opt_arg ());
if (nsamples <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"\nIterations must be greater than 0!\n\n"),
@@ -643,7 +643,7 @@ main (int argc, char *argv[])
use_reactor = 1;
break;
case 's':
- so_bufsz = ACE_OS::atoi (getopt.optarg);
+ so_bufsz = ACE_OS::atoi (getopt.opt_arg ());
if (so_bufsz <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -651,17 +651,17 @@ main (int argc, char *argv[])
1);
break;
case 'I':
- usdelay = ACE_OS::atoi (getopt.optarg);
+ usdelay = ACE_OS::atoi (getopt.opt_arg ());
if (usdelay == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"%s: bad usdelay: %s\n",
argv[0],
- getopt.optarg),
+ getopt.opt_arg ()),
1);
break;
case 'p':
- dstport = ACE_OS::atoi (getopt.optarg);
+ dstport = ACE_OS::atoi (getopt.opt_arg ());
if (dstport <= 0)
ACE_ERROR_RETURN ((LM_ERROR,
"\nInvalid port number!\n\n"),
@@ -681,7 +681,7 @@ main (int argc, char *argv[])
}
}
- if (getopt.optind >= argc && client || argc == 1)
+ if (getopt.opt_ind () >= argc && client || argc == 1)
{
usage ();
return 1;
@@ -713,25 +713,25 @@ main (int argc, char *argv[])
1);
ACE_INET_Addr remote_addr;
- if (isdigit(argv[getopt.optind][0]))
+ if (isdigit(argv[getopt.opt_ind ()][0]))
{
if (remote_addr.set (dstport,
(ACE_UINT32) ACE_OS::inet_addr
- (argv[getopt.optind])) == -1)
+ (argv[getopt.opt_ind ()])) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"invalid IP address: %s\n",
- argv[getopt.optind]),
+ argv[getopt.opt_ind ()]),
1);
}
else
{
- if (remote_addr.set (dstport, argv[getopt.optind]) == -1)
+ if (remote_addr.set (dstport, argv[getopt.opt_ind ()]) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"invalid IP address: %s\n",
- argv[getopt.optind]),
+ argv[getopt.opt_ind ()]),
1);
}
- getopt.optind++;
+ getopt.opt_ind ()++;
Client client (addr, remote_addr);