summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-04-30 12:31:02 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-04-30 12:31:02 +0000
commit6a49e64da69c48aa6ce7c306a5ae84f319e7eea0 (patch)
tree0918899fe823d8adb5a86c5db91f4bf8e43a1086 /TAO/TAO_IDL
parentf23636bb09a053f540647572b790d7c7ceae437d (diff)
downloadATCD-6a49e64da69c48aa6ce7c306a5ae84f319e7eea0.tar.gz
ChangeLogTag: Wed Apr 30 07:26:37 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/ast/ast_decl.cpp6
-rw-r--r--TAO/TAO_IDL/ast/ast_type.cpp21
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_helper.cpp26
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_interface_strategy.cpp56
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp20
-rw-r--r--TAO/TAO_IDL/be_include/be_helper.h8
-rw-r--r--TAO/TAO_IDL/driver/drv_args.cpp6
-rw-r--r--TAO/TAO_IDL/driver/drv_preproc.cpp6
-rw-r--r--TAO/TAO_IDL/fe/lex.yy.cpp6
-rw-r--r--TAO/TAO_IDL/include/idl_narrow.h40
-rw-r--r--TAO/TAO_IDL/include/utl_string.h2
-rw-r--r--TAO/TAO_IDL/util/utl_string.cpp2
15 files changed, 125 insertions, 82 deletions
diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp
index 9a37e47acf1..cc7a6675925 100644
--- a/TAO/TAO_IDL/ast/ast_decl.cpp
+++ b/TAO/TAO_IDL/ast/ast_decl.cpp
@@ -305,7 +305,7 @@ AST_Decl::compute_full_name (void)
}
else
{
- long namelen = 0;
+ size_t namelen = 0;
long first = I_TRUE;
long second = I_FALSE;
char *name = 0;
@@ -390,7 +390,7 @@ AST_Decl::compute_repoID (void)
return;
}
- long namelen = 4; // for the prefix "IDL:"
+ size_t namelen = 4; // for the prefix "IDL:"
long first = I_TRUE;
long second = I_FALSE;
char *name = 0;
@@ -575,7 +575,7 @@ AST_Decl::compute_flat_name (void)
}
else
{
- long namelen = 0;
+ size_t namelen = 0;
long first = I_TRUE;
long second = I_FALSE;
char *item_name = 0;
diff --git a/TAO/TAO_IDL/ast/ast_type.cpp b/TAO/TAO_IDL/ast/ast_type.cpp
index a9014341a49..a4435b36c4b 100644
--- a/TAO/TAO_IDL/ast/ast_type.cpp
+++ b/TAO/TAO_IDL/ast/ast_type.cpp
@@ -335,17 +335,19 @@ AST_Type::nested_name (const char* local_name,
if (def_next != 0)
{
len_to_match =
- ACE_OS::strlen (def_curr) - ACE_OS::strlen (def_next);
+ ACE_static_cast (int, ACE_OS::strlen (def_curr)) -
+ ACE_static_cast (int, ACE_OS::strlen (def_next));
}
else
{
- len_to_match = ACE_OS::strlen (def_curr);
+ len_to_match = ACE_static_cast (int, ACE_OS::strlen (def_curr));
}
if (use_next != 0)
{
int len =
- ACE_OS::strlen (use_curr) - ACE_OS::strlen (use_next);
+ ACE_static_cast (int, ACE_OS::strlen (use_curr)) -
+ ACE_static_cast (int, ACE_OS::strlen (use_next));
if (len > len_to_match)
{
@@ -354,7 +356,7 @@ AST_Type::nested_name (const char* local_name,
}
else
{
- int len = ACE_OS::strlen (use_curr);
+ int len = ACE_static_cast (int, ACE_OS::strlen (use_curr));
if (len > len_to_match)
{
@@ -391,17 +393,20 @@ AST_Type::nested_name (const char* local_name,
if (def_next != 0)
{
len_to_match =
- ACE_OS::strlen (def_curr) - ACE_OS::strlen (def_next);
+ ACE_static_cast (int, ACE_OS::strlen (def_curr)) -
+ ACE_static_cast (int, ACE_OS::strlen (def_next));
}
else
{
- len_to_match = ACE_OS::strlen (def_curr);
+ len_to_match = ACE_static_cast (int,
+ ACE_OS::strlen (def_curr));
}
if (use_next != 0)
{
int len =
- ACE_OS::strlen (use_curr) - ACE_OS::strlen (use_next);
+ ACE_static_cast (int, ACE_OS::strlen (use_curr)) -
+ ACE_static_cast (int, ACE_OS::strlen (use_next));
if (len > len_to_match)
{
@@ -410,7 +415,7 @@ AST_Type::nested_name (const char* local_name,
}
else
{
- int len = ACE_OS::strlen (use_curr);
+ int len = ACE_static_cast (int, ACE_OS::strlen (use_curr));
if (len > len_to_match)
{
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 60f61b7d43f..522ad02e3b6 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -1317,7 +1317,7 @@ TAO_CodeGen::gen_ifndef_string (const char *fname,
ACE_OS::sprintf (macro_name, prefix);
- int offset = ACE_OS::strlen (prefix);
+ size_t offset = ACE_OS::strlen (prefix);
// Convert letters in fname to upper case.
for (int i = 0; i < (extension - fname); i++)
diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp
index 1ab6b3782ad..dcc78a32075 100644
--- a/TAO/TAO_IDL/be/be_helper.cpp
+++ b/TAO/TAO_IDL/be/be_helper.cpp
@@ -395,6 +395,32 @@ TAO_OutStream::operator<< (const ACE_CDR::Long num)
return *this;
}
+#if defined (ACE_WIN64)
+TAO_OutStream &
+TAO_OutStream::operator<< (const ACE_CDR::ULongLong num)
+{
+ ACE_OS::fprintf (this->fp_,
+ ACE_UINT64_FORMAT_SPECIFIER,
+ num);
+
+ ACE_OS::fflush (this->fp_);
+
+ return *this;
+}
+
+TAO_OutStream &
+TAO_OutStream::operator<< (const ACE_CDR::LongLong num)
+{
+ ACE_OS::fprintf (this->fp_,
+ ACE_INT64_FORMAT_SPECIFIER,
+ num);
+
+ ACE_OS::fflush (this->fp_);
+
+ return *this;
+}
+#endif /* ACE_WIN64 */
+
TAO_OutStream &
TAO_OutStream::operator<< (const unsigned long num)
{
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 9cd69347bf5..4c663f6d508 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -180,7 +180,7 @@ be_interface::compute_full_skel_name (const char *prefix,
}
else
{
- long namelen = ACE_OS::strlen (prefix);
+ size_t namelen = ACE_OS::strlen (prefix);
long first = I_TRUE;
long second = I_FALSE;
char *item_name = 0;
diff --git a/TAO/TAO_IDL/be/be_interface_strategy.cpp b/TAO/TAO_IDL/be/be_interface_strategy.cpp
index f717ef8830e..cb7b4e1571c 100644
--- a/TAO/TAO_IDL/be/be_interface_strategy.cpp
+++ b/TAO/TAO_IDL/be/be_interface_strategy.cpp
@@ -131,9 +131,9 @@ be_interface_strategy::compute_coll_names (int type,
// prefix and the local name and the (optional) "::"
const char *collocated = collocated_names[type];
- int name_len = ACE_OS::strlen (collocated)
- + ACE_OS::strlen (poa)
- + 1;
+ size_t name_len = ACE_OS::strlen (collocated)
+ + ACE_OS::strlen (poa)
+ + 1;
if (prefix)
{
@@ -211,9 +211,9 @@ be_interface_strategy::compute_coll_names (int type,
// Compute the local name for the collocated class.
char *local_name = this->node_->AST_Interface::local_name ()->get_string ();
- int local_len = ACE_OS::strlen (collocated)
- + ACE_OS::strlen (local_name)
- + 1;
+ size_t local_len = ACE_OS::strlen (collocated)
+ + ACE_OS::strlen (local_name)
+ + 1;
if (prefix)
{
local_len += ACE_OS::strlen (prefix);
@@ -257,7 +257,7 @@ be_interface_strategy::compute_names (const char *name,
return;
}
- int name_length = ACE_OS::strlen (name) +
+ size_t name_length = ACE_OS::strlen (name) +
ACE_OS::strlen (prefix) +
ACE_OS::strlen (suffix);
@@ -268,7 +268,7 @@ be_interface_strategy::compute_names (const char *name,
ACE_OS::strcpy (new_name, name);
const char *interface_name = 0;
- int i = ACE_OS::strlen (name);
+ size_t i = ACE_OS::strlen (name);
for (;i >= 1; i--)
{
@@ -663,7 +663,7 @@ be_interface_default_strategy::full_name (void)
{
if (this->full_name_ == 0)
{
- int len = ACE_OS::strlen (node_->be_decl::full_name ());
+ size_t len = ACE_OS::strlen (node_->be_decl::full_name ());
ACE_NEW_RETURN (this->full_name_,
char[len + 1],
@@ -681,7 +681,7 @@ be_interface_default_strategy::local_name (void)
{
if (!this->local_name_)
{
- int len =
+ size_t len =
ACE_OS::strlen (node_->AST_Interface::local_name ()->get_string ());
ACE_NEW_RETURN (this->local_name_,
@@ -700,7 +700,7 @@ be_interface_default_strategy::flat_name (void)
{
if (!this->flat_name_)
{
- int len = ACE_OS::strlen (node_->be_decl::flat_name ());
+ size_t len = ACE_OS::strlen (node_->be_decl::flat_name ());
ACE_NEW_RETURN (this->flat_name_,
char[len + 1],
@@ -718,7 +718,7 @@ be_interface_default_strategy::repoID (void)
{
if (this->repoID_ == 0)
{
- int len = ACE_OS::strlen (node_->be_decl::repoID ());
+ size_t len = ACE_OS::strlen (node_->be_decl::repoID ());
ACE_NEW_RETURN (this->repoID_,
char[len + 1],
@@ -774,7 +774,7 @@ be_interface_default_strategy::create_with_prefix_suffix (
)
{
char *cat_string = 0;
- unsigned int length =
+ size_t length =
ACE_OS::strlen (str) +
ACE_OS::strlen (prefix) +
ACE_OS::strlen (suffix) +
@@ -821,8 +821,8 @@ be_interface_default_strategy::client_scope (void)
const char *full_name = this->full_name ();
const char *name = this->local_name ();
- int offset = ACE_OS::strlen (name);
- int length = ACE_OS::strlen (full_name) - offset;
+ size_t offset = ACE_OS::strlen (name);
+ size_t length = ACE_OS::strlen (full_name) - offset;
ACE_NEW_RETURN (this->client_scope_,
char[length + 1],
0);
@@ -843,8 +843,8 @@ be_interface_default_strategy::flat_client_scope (void)
const char *full_name = this->flat_name ();
const char *name = this->local_name ();
- int offset = ACE_OS::strlen (name);
- int length = ACE_OS::strlen (full_name) - offset;
+ size_t offset = ACE_OS::strlen (name);
+ size_t length = ACE_OS::strlen (full_name) - offset;
ACE_NEW_RETURN (this->flat_client_scope_,
char[length + 1],
0);
@@ -869,8 +869,8 @@ be_interface_default_strategy::server_scope (void)
const char *name = this->node_->local_coll_name (be_interface::DIRECT);
- int offset = ACE_OS::strlen (name);
- int length = ACE_OS::strlen (full_name) - offset;
+ size_t offset = ACE_OS::strlen (name);
+ size_t length = ACE_OS::strlen (full_name) - offset;
ACE_NEW_RETURN (this->server_scope_,
char[length + 1],
0);
@@ -892,8 +892,8 @@ be_interface_default_strategy::flat_server_scope (void)
const char *full_name = this->flat_name ();
const char *name = this->local_name ();
- int offset = ACE_OS::strlen (name);
- int length = ACE_OS::strlen (full_name) - offset;
+ size_t offset = ACE_OS::strlen (name);
+ size_t length = ACE_OS::strlen (full_name) - offset;
ACE_NEW_RETURN (this->flat_client_scope_,
char[length + 1],
0);
@@ -916,7 +916,7 @@ be_interface_default_strategy::full_base_proxy_impl_name (void)
const char *scope = this->client_scope ();
const char *base_name = this->base_proxy_impl_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_base_proxy_impl_name_,
char[length + 1],
0);
@@ -957,7 +957,7 @@ be_interface_default_strategy::full_remote_proxy_impl_name (void)
const char *scope = this->client_scope ();
const char *base_name = this->remote_proxy_impl_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_remote_proxy_impl_name_,
char[length + 1],
0);
@@ -995,7 +995,7 @@ be_interface_default_strategy::full_thru_poa_proxy_impl_name (void)
const char *scope = this->server_scope ();
const char *base_name = this->thru_poa_proxy_impl_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_thruPOA_proxy_impl_name_,
char[length + 1],
0);
@@ -1036,7 +1036,7 @@ be_interface_default_strategy::full_direct_proxy_impl_name (void)
const char *scope = this->server_scope ();
const char *base_name = this->direct_proxy_impl_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_direct_proxy_impl_name_,
char[length + 1],
0);
@@ -1075,7 +1075,7 @@ be_interface_default_strategy::full_base_proxy_broker_name (void)
const char *scope = this->client_scope ();
const char *base_name = this->base_proxy_broker_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_base_proxy_broker_name_,
char[length + 1],
0);
@@ -1114,7 +1114,7 @@ be_interface_default_strategy::full_remote_proxy_broker_name (void)
const char *scope = this->client_scope ();
const char *base_name = this->remote_proxy_broker_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_remote_proxy_broker_name_,
char[length + 1],
0);
@@ -1153,7 +1153,7 @@ be_interface_default_strategy::full_strategized_proxy_broker_name (void)
const char *scope = this->server_scope ();
const char *base_name = this->strategized_proxy_broker_name ();
- int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
+ size_t length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name);
ACE_NEW_RETURN (this->full_strategized_proxy_broker_name_,
char[length + 1],
0);
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
index fb6ed3ae50d..fbe8ee6c270 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -614,7 +614,7 @@ be_visitor_interface_ss::generate_proxy_classes (be_interface *node)
*os << "int" << be_nl
<< node->flat_client_enclosing_scope ()
<< node->base_proxy_broker_name ()
- << "_Factory_Initializer (long)" << be_nl
+ << "_Factory_Initializer (size_t)" << be_nl
<< "{" << be_idt_nl
<< node->flat_client_enclosing_scope ()
<< node->base_proxy_broker_name ()
@@ -634,7 +634,7 @@ be_visitor_interface_ss::generate_proxy_classes (be_interface *node)
<< "_Stub_Factory_Initializer_Scarecrow = " << be_idt_nl
<< node->flat_client_enclosing_scope ()
<< node->base_proxy_broker_name ()
- << "_Factory_Initializer (ACE_reinterpret_cast (long, "
+ << "_Factory_Initializer (ACE_reinterpret_cast (size_t, "
<< node->flat_client_enclosing_scope ()
<< node->base_proxy_broker_name ()
<< "_Factory_Initializer));"
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
index 2efdb6bf546..b73c1d84a24 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
@@ -3523,12 +3523,13 @@ be_visitor_typecode_defn::repoID_encap_len (be_decl *node)
}
else
{
- ACE_CDR::ULong slen = ACE_OS::strlen (node->repoID ()) + 1;
+ size_t slen = ACE_OS::strlen (node->repoID ()) + 1;
// + 1 for NULL terminating char
// the number of bytes to hold the string must be a multiple of 4 since this
// will be represented as an array of longs
- return 4 + 4 * (slen/4 + (slen%4 ? 1:0));
+ return ACE_static_cast (ACE_CDR::ULong,
+ 4 + 4 * (slen/4 + (slen%4 ? 1:0)));
}
}
@@ -3544,12 +3545,13 @@ be_visitor_typecode_defn::name_encap_len (be_decl *node)
}
else
{
- ACE_CDR::ULong slen =
+ size_t slen =
ACE_OS::strlen (node->original_local_name ()->get_string ()) + 1;
// the number of bytes to hold the string must be a multiple of 4 since this
// will be represented as an array of longs
- return 4 + 4 * (slen/4 + (slen%4 ? 1:0));
+ return ACE_static_cast (ACE_CDR::ULong,
+ 4 + 4 * (slen/4 + (slen%4 ? 1:0)));
}
}
@@ -3561,18 +3563,18 @@ be_visitor_typecode_defn::tc_name2long (const char *name,
{
const int bytes_per_word = sizeof (ACE_CDR::ULong);
static ACE_CDR::ULong buf [NAMEBUFSIZE];
- ACE_CDR::ULong i, slen;
-
- slen = ACE_OS::strlen (name) + 1; // 1 for NULL terminating
+ size_t slen = ACE_OS::strlen (name) + 1; // 1 for NULL terminating
// compute the number of bytes necessary to hold the name rounded to
// the next multiple of 4 (i.e., size of long)
- arrlen = slen / bytes_per_word + (slen % bytes_per_word ? 1 : 0);
+ arrlen = ACE_static_cast (
+ ACE_CDR::ULong,
+ slen / bytes_per_word + (slen % bytes_per_word ? 1 : 0));
ACE_OS::memset (buf, 0, sizeof (buf));
larr = buf;
ACE_OS::memcpy (buf, name, slen);
- for (i = 0; i < arrlen; i++)
+ for (size_t i = 0; i < arrlen; i++)
larr [i] = ACE_HTONL (larr [i]);
return 0;
}
diff --git a/TAO/TAO_IDL/be_include/be_helper.h b/TAO/TAO_IDL/be_include/be_helper.h
index 37fe4b20ad7..c98581d6ca1 100644
--- a/TAO/TAO_IDL/be_include/be_helper.h
+++ b/TAO/TAO_IDL/be_include/be_helper.h
@@ -175,6 +175,14 @@ public:
TAO_OutStream &operator<< (const ACE_CDR::Long num);
// output the integer and return a reference to ourselves
+#if defined (ACE_WIN64)
+ TAO_OutStream &operator<< (const ACE_CDR::ULongLong num);
+ // output the integer and return a reference to ourselves
+
+ TAO_OutStream &operator<< (const ACE_CDR::LongLong num);
+ // output the integer and return a reference to ourselves
+#endif /* ACE_WIN64 */
+
TAO_OutStream &operator<< (const unsigned long num);
// output the integer and return a reference to ourselves
diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp
index 5348aabc131..4e0f7902fbb 100644
--- a/TAO/TAO_IDL/driver/drv_args.cpp
+++ b/TAO/TAO_IDL/driver/drv_args.cpp
@@ -1247,9 +1247,9 @@ DRV_parse_args (long ac, char **av)
}
else if (av[i][2] == 'I')
{
- int options = ACE_OS::strlen(av[i]) - 3;
- int j;
- int k = i;
+ size_t options = ACE_OS::strlen(av[i]) - 3;
+ size_t j;
+ size_t k = i;
// optimized typecode support
be_global->gen_impl_files (1);
diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp
index 1ee6c7cbbc0..8fc36c6f2dd 100644
--- a/TAO/TAO_IDL/driver/drv_preproc.cpp
+++ b/TAO/TAO_IDL/driver/drv_preproc.cpp
@@ -148,7 +148,7 @@ DRV_get_line (FILE *f)
char *l = fgets (drv_line,
LINEBUF_SIZE,
f);
- long i = 0;
+ size_t i = 0;
if (l == 0)
{
@@ -565,7 +565,7 @@ static char *
DRV_stripped_name (char *fn)
{
char *n = fn;
- long l;
+ size_t l;
if (n == 0)
{
@@ -810,7 +810,7 @@ DRV_pre_proc (const char *myfile)
{
FILE *preproc = ACE_OS::fopen (tmp_file, "r");
char buffer[ACE_MAXLOGMSGLEN];
- int bytes;
+ size_t bytes;
if (preproc == 0)
{
diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp
index 4e08250a6e9..1bcccd9977d 100644
--- a/TAO/TAO_IDL/fe/lex.yy.cpp
+++ b/TAO/TAO_IDL/fe/lex.yy.cpp
@@ -1002,7 +1002,8 @@ TAO_YY_MALLOC_DECL
TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, tao_yyin )) == 0) \
+ else if ( ((result = ACE_static_cast (int, \
+ fread( buf, 1, max_size, tao_yyin ))) == 0) \
&& ferror( tao_yyin ) ) \
TAO_YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
@@ -1425,7 +1426,8 @@ TAO_YY_RULE_SETUP
if (!idl_global->preserve_cpp_keywords())
{
entry = cpp_key_tbl.lookup (ace_tao_yytext,
- ACE_OS::strlen (ace_tao_yytext));
+ ACE_static_cast (unsigned int,
+ ACE_OS::strlen (ace_tao_yytext)));
}
if (entry)
tao_yylval.strval = ACE_OS::strdup (entry->mapping_);
diff --git a/TAO/TAO_IDL/include/idl_narrow.h b/TAO/TAO_IDL/include/idl_narrow.h
index 1f4592b8bc4..ac390241577 100644
--- a/TAO/TAO_IDL/include/idl_narrow.h
+++ b/TAO/TAO_IDL/include/idl_narrow.h
@@ -99,7 +99,7 @@ extern char *type_id_to_string(long);
#define DEF_NARROW_METHODS0(TYPE)\
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS0(TYPE)\
@@ -109,9 +109,9 @@ TYPE::type_id()\
return 0;\
}\
void * \
-TYPE::narrow(long type_const) {\
+TYPE::narrow(size_t type_const) {\
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
return rval; \
@@ -119,7 +119,7 @@ TYPE::narrow(long type_const) {\
#define DEF_NARROW_METHODS1(TYPE,PARENT) \
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS1(TYPE,PARENT) \
@@ -129,9 +129,9 @@ TYPE::type_id() \
return 0;\
}\
void * \
-TYPE::narrow(long type_const) {\
+TYPE::narrow(size_t type_const) {\
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
if (rval == NULL) \
@@ -141,7 +141,7 @@ TYPE::narrow(long type_const) {\
#define DEF_NARROW_METHODS2(TYPE,PARENT1,PARENT2) \
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS2(TYPE,PARENT1,PARENT2) \
@@ -151,9 +151,9 @@ TYPE::type_id() \
return 0;\
}\
void * \
-TYPE::narrow(long type_const) { \
+TYPE::narrow(size_t type_const) { \
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
if (rval == NULL) \
@@ -165,7 +165,7 @@ TYPE::narrow(long type_const) { \
#define DEF_NARROW_METHODS3(TYPE,PARENT1,PARENT2,PARENT3) \
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS3(TYPE,PARENT1,PARENT2,PARENT3) \
@@ -175,9 +175,9 @@ TYPE::type_id() \
return 0;\
}\
void * \
-TYPE::narrow(long type_const) {\
+TYPE::narrow(size_t type_const) {\
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
if (rval == NULL) \
@@ -191,7 +191,7 @@ TYPE::narrow(long type_const) {\
#define DEF_NARROW_METHODS4(TYPE,PARENT1,PARENT2,PARENT3,PARENT4) \
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS4(TYPE,PARENT1,PARENT2,PARENT3,PARENT4) \
@@ -201,9 +201,9 @@ TYPE::type_id() \
return 0;\
}\
void * \
-TYPE::narrow(long type_const) {\
+TYPE::narrow(size_t type_const) {\
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
if (rval == NULL) \
@@ -219,7 +219,7 @@ TYPE::narrow(long type_const) {\
#define DEF_NARROW_METHODS5(TYPE,PARENT1,PARENT2,PARENT3,PARENT4,PARENT5) \
static int type_id(); \
-virtual void *narrow(long type_const)
+virtual void *narrow(size_t type_const)
#define IMPL_NARROW_METHODS5(TYPE,PARENT1,PARENT2,PARENT3,PARENT4,PARENT5) \
@@ -229,9 +229,9 @@ TYPE::type_id() \
return 0;\
}\
void * \
-TYPE::narrow(long type_const) {\
+TYPE::narrow(size_t type_const) {\
void *rval = NULL; \
- long temp = (long) &TYPE::type_id; \
+ size_t temp = (size_t) &TYPE::type_id; \
if (type_const == temp) \
rval = this; \
if (rval == NULL) \
@@ -254,7 +254,7 @@ static TYPE *narrow_from_decl(AST_Decl *t)
#define IMPL_NARROW_FROM_DECL(TYPE)\
TYPE * \
TYPE::narrow_from_decl(AST_Decl *t) { \
- return (TYPE *)t->narrow((long)&TYPE::type_id);\
+ return (TYPE *)t->narrow((size_t)&TYPE::type_id);\
}
#define DEF_NARROW_FROM_SCOPE(TYPE)\
@@ -264,7 +264,7 @@ static TYPE *narrow_from_scope(UTL_Scope *t)
#define IMPL_NARROW_FROM_SCOPE(TYPE)\
TYPE * \
TYPE::narrow_from_scope(UTL_Scope *t) { \
- return (TYPE *)t->narrow((long)&TYPE::type_id);\
+ return (TYPE *)t->narrow((size_t)&TYPE::type_id);\
}
#endif // _IDL_NARROW_IDL_NARROW_HH
diff --git a/TAO/TAO_IDL/include/utl_string.h b/TAO/TAO_IDL/include/utl_string.h
index b07cb92ad83..56c7217303f 100644
--- a/TAO/TAO_IDL/include/utl_string.h
+++ b/TAO/TAO_IDL/include/utl_string.h
@@ -119,7 +119,7 @@ private:
char *c_str;
// Canonicalized string
- unsigned long len;
+ size_t len;
// How long is string.
void canonicalize (void);
diff --git a/TAO/TAO_IDL/util/utl_string.cpp b/TAO/TAO_IDL/util/utl_string.cpp
index 2b23ce2face..e0fcda07d0d 100644
--- a/TAO/TAO_IDL/util/utl_string.cpp
+++ b/TAO/TAO_IDL/util/utl_string.cpp
@@ -134,7 +134,7 @@ UTL_String::~UTL_String (void)
void
UTL_String::canonicalize (void)
{
- for (unsigned long i = 0; i < this->len; ++i)
+ for (size_t i = 0; i < this->len; ++i)
{
if (isalpha (this->p_str[i]))
{