summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog25
-rw-r--r--ace/Functor.inl6
-rw-r--r--ace/OS_NS_stdio.inl18
-rw-r--r--ace/OS_NS_sys_socket.inl2
-rw-r--r--ace/OS_NS_unistd.inl2
-rw-r--r--ace/Time_Value.inl2
-rw-r--r--ace/ace_wchar.inl8
-rw-r--r--include/makeinclude/platform_sunos5_sunc++.GNU4
8 files changed, 53 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 72827734659..8cf60072f30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+Thu Aug 11 12:29:39 2005 Steve Huston <shuston@riverace.com>
+
+ * ace/Time_Value.inl (msec): When moving tv_sec to ACE_UINT64,
+ static cast it to the desired ACE_UINT64, not ACE_UINT32.
+
+ * ace/ace_wchar.inl (convert):
+ * ace/OS_NS_unistd.inl (read):
+ * ace/OS_NS_stdio.inl (fread, fwrite):
+ * ace/OS_NS_sys_socket.inl (sendto): Use proper types portable to
+ 64 bits.
+
+ * ace/Functor.inl (ACE_Hash<ACE_UINT64>): If unsigned long is
+ not 4 bytes, don't try to cast 64 bits down to 4 bytes.
+
+ * ace/OS_NS_stdio.inl (ACE_HAS_WCHAR vsnprintf): This is the same
+ situation as ACE_OS::vsprintf - the X/Open/XPG folks got it right
+ and added the maxlen argument when defining wide-char *printf
+ functions, so just use vswprintf() - there's no such thing as
+ vswnprintf().
+
Thu Aug 11 06:44:44 2005 Chad Elliott <elliott_c@ociweb.com>
* bin/depgen.pl:
@@ -291,8 +311,9 @@ Fri Jul 29 09:28:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Global_Macros.h:
When ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS is defined, define
- a special version of ACE_DES_FREE_TEMPLATE3 and ACE_DES_FREE_TEMPLATE4
- just as we do for ACE_DES_FREE_TEMPLATE and ACE_DES_FREE_TEMPLATE2.
+ a special version of ACE_DES_FREE_TEMPLATE3 and
+ ACE_DES_FREE_TEMPLATE4 just as we do for ACE_DES_FREE_TEMPLATE and
+ ACE_DES_FREE_TEMPLATE2.
Thanks to Olivier Gu�in <guerin35 at hotmail dot com>
for reporting this.
diff --git a/ace/Functor.inl b/ace/Functor.inl
index 9f83a563079..4d32149257b 100644
--- a/ace/Functor.inl
+++ b/ace/Functor.inl
@@ -88,7 +88,7 @@ ACE_Hash<ACE_UINT16>::operator () (ACE_UINT16 t) const
ACE_INLINE unsigned long
ACE_Hash<ACE_INT32>::operator () (ACE_INT32 t) const
{
- return t;
+ return static_cast<unsigned long> (t);
}
ACE_INLINE unsigned long
@@ -100,7 +100,11 @@ ACE_Hash<ACE_UINT32>::operator () (ACE_UINT32 t) const
ACE_INLINE unsigned long
ACE_Hash<ACE_UINT64>::operator () (ACE_UINT64 t) const
{
+#if (ACE_SIZEOF_LONG == 4)
return ACE_U64_TO_U32 (t);
+#else
+ return static_cast<unsigned long> (t);
+#endif /* ACE_SIZEOF_LONG */
}
diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl
index fdfa562ebed..d9f443afe5c 100644
--- a/ace/OS_NS_stdio.inl
+++ b/ace/OS_NS_stdio.inl
@@ -762,7 +762,9 @@ ACE_INLINE size_t
ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fread");
- ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fread (ptr, size, nelems, fp), int, 0);
+ ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fread (ptr, size, nelems, fp),
+ size_t,
+ 0);
}
ACE_INLINE FILE *
@@ -822,7 +824,9 @@ ACE_INLINE size_t
ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp)
{
ACE_OS_TRACE ("ACE_OS::fwrite");
- ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fwrite (ptr, size, nitems, fp), int, 0);
+ ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::fwrite (ptr, size, nitems, fp),
+ size_t,
+ 0);
}
ACE_INLINE void
@@ -1089,11 +1093,21 @@ ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr)
ACE_INLINE int
ACE_OS::vsnprintf (wchar_t *buffer, size_t maxlen, const wchar_t *format, va_list ap)
{
+# if (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500) || \
+ (defined (sun) && !(defined(_XOPEN_SOURCE) && (_XOPEN_VERSION-0==4))) || \
+ (defined (ACE_HAS_DINKUM_STL) || defined (__DMC__))
+
+ return vswprintf (buffer, maxlen, format, argptr);
+
+# else
+
ACE_UNUSED_ARG (buffer);
ACE_UNUSED_ARG (maxlen);
ACE_UNUSED_ARG (format);
ACE_UNUSED_ARG (ap);
ACE_NOTSUP_RETURN (-1);
+
+# endif /* platforms with a variant of vswprintf */
}
#endif /* ACE_HAS_WCHAR */
diff --git a/ace/OS_NS_sys_socket.inl b/ace/OS_NS_sys_socket.inl
index f66f8a09558..10a32444697 100644
--- a/ace/OS_NS_sys_socket.inl
+++ b/ace/OS_NS_sys_socket.inl
@@ -721,7 +721,7 @@ ACE_OS::sendto (ACE_HANDLE handle,
addrlen);
if (result == -1)
break;
- number_of_bytes_sent += result;
+ number_of_bytes_sent += static_cast<size_t> (result);
}
return result;
diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl
index 44244f85f83..0fe449e0cc9 100644
--- a/ace/OS_NS_unistd.inl
+++ b/ace/OS_NS_unistd.inl
@@ -861,7 +861,7 @@ ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len)
# endif /* defined (ACE_PSOS_LACKS_PHILE */
#else
- int result;
+ ssize_t result;
# if defined (ACE_HAS_CHARPTR_SOCKOPT)
ACE_OSCALL (::read (handle, (char *) buf, len), ssize_t, -1, result);
diff --git a/ace/Time_Value.inl b/ace/Time_Value.inl
index 317165e7364..fa62899d242 100644
--- a/ace/Time_Value.inl
+++ b/ace/Time_Value.inl
@@ -133,7 +133,7 @@ ACE_INLINE void
ACE_Time_Value::msec (ACE_UINT64 &ms) const
{
// ACE_OS_TRACE ("ACE_Time_Value::msec");
- ms = static_cast<ACE_UINT32> (this->tv_.tv_sec);
+ ms = static_cast<ACE_UINT64> (this->tv_.tv_sec);
ms *= 1000;
ms += (this->tv_.tv_usec / 1000);
}
diff --git a/ace/ace_wchar.inl b/ace/ace_wchar.inl
index f1aa325452a..21bb4068cac 100644
--- a/ace/ace_wchar.inl
+++ b/ace/ace_wchar.inl
@@ -46,7 +46,7 @@ ACE_Wide_To_Ascii::convert (const wchar_t *wstr)
int len = wtemp - wstr + 1;
# else /* ACE_WIN32 */
- int len = ::wcslen (wstr) + 1;
+ size_t len = ::wcslen (wstr) + 1;
# endif /* ACE_WIN32 */
char *str = new char[len];
@@ -56,7 +56,7 @@ ACE_Wide_To_Ascii::convert (const wchar_t *wstr)
# elif defined (VXWORKS)
::wcstombs (str, wstr, len);
# else /* ACE_WIN32 */
- for (int i = 0; i < len; i++)
+ for (size_t i = 0; i < len; i++)
{
wchar_t *t = const_cast <wchar_t *> (wstr);
str[i] = static_cast<char> (*(t + i));
@@ -94,7 +94,7 @@ ACE_Ascii_To_Wide::convert (const char *str)
UINT cp = GetACP ();
int len = ::MultiByteToWideChar (cp, 0, str, -1, 0, 0);
# else /* ACE_WIN32 */
- int len = strlen (str) + 1;
+ size_t len = strlen (str) + 1;
# endif /* ACE_WIN32 */
wchar_t *wstr = new wchar_t[len];
@@ -104,7 +104,7 @@ ACE_Ascii_To_Wide::convert (const char *str)
# elif defined (VXWORKS)
::mbstowcs (wstr, str, len);
# else /* ACE_WIN32 */
- for (int i = 0; i < len; i++)
+ for (size_t i = 0; i < len; i++)
{
char *t = const_cast<char *> (str);
wstr[i] = static_cast<wchar_t> (*(t + i));
diff --git a/include/makeinclude/platform_sunos5_sunc++.GNU b/include/makeinclude/platform_sunos5_sunc++.GNU
index f01fb8fd53c..a01da30b283 100644
--- a/include/makeinclude/platform_sunos5_sunc++.GNU
+++ b/include/makeinclude/platform_sunos5_sunc++.GNU
@@ -20,8 +20,8 @@
# the target CPU. The /opt/SUNWspro/ Sun C++ installation directory
# is site-specific.
#
-# To build 64-bit binaries with Forte 6, build with the "buildbits=64"
-# option (make buildbits=64).
+# To build 64-bit binaries with Forte 6 and later, build with the
+# "buildbits=64" option (make buildbits=64).
#
# With slight modification, this file could be used with Sun C++ 4.1.
# However, it's likely that you won't be able to build all of ACE