You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2007/06/06 20:27:18 UTC
svn commit: r544910 - in /incubator/stdcxx/trunk/etc/config/src:
GLOBAL_BAD_ALLOC.cpp STD_BAD_ALLOC.cpp
Author: faridz
Date: Wed Jun 6 11:27:17 2007
New Revision: 544910
URL: http://svn.apache.org/viewvc?view=rev&rev=544910
Log:
2007-06-06 Farid Zaripov <Fa...@epam.com>
* GLOBAL_BAD_ALLOC.cpp: Use size_t type in new() instead of unsigned long.
* STD_BAD_ALLOC.cpp: Ditto.
Modified:
incubator/stdcxx/trunk/etc/config/src/GLOBAL_BAD_ALLOC.cpp
incubator/stdcxx/trunk/etc/config/src/STD_BAD_ALLOC.cpp
Modified: incubator/stdcxx/trunk/etc/config/src/GLOBAL_BAD_ALLOC.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/GLOBAL_BAD_ALLOC.cpp?view=diff&rev=544910&r1=544909&r2=544910
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/GLOBAL_BAD_ALLOC.cpp (original)
+++ incubator/stdcxx/trunk/etc/config/src/GLOBAL_BAD_ALLOC.cpp Wed Jun 6 11:27:17 2007
@@ -2,6 +2,10 @@
#include "config.h"
+#if !defined (_RWSTD_NO_NEW_THROWS) && !defined (_RWSTD_NO_NEW_OFLOW_SAFE)
+# include <stddef.h> // for size_t
+#endif // !_RWSTD_NO_NEW_THROWS && !_RWSTD_NO_NEW_OFLOW_SAFE
+
#ifndef _RWSTD_NO_SETRLIMIT
# include <sys/resource.h> // for setrlimit()
#endif
@@ -63,7 +67,7 @@
#ifndef _RWSTD_NO_NEW_THROWS
# ifndef _RWSTD_NO_NEW_OFLOW_SAFE
- void *p = ::operator new ((unsigned long)-1);
+ void *p = ::operator new (size_t (-1));
if (!p)
return 1;
Modified: incubator/stdcxx/trunk/etc/config/src/STD_BAD_ALLOC.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/STD_BAD_ALLOC.cpp?view=diff&rev=544910&r1=544909&r2=544910
==============================================================================
--- incubator/stdcxx/trunk/etc/config/src/STD_BAD_ALLOC.cpp (original)
+++ incubator/stdcxx/trunk/etc/config/src/STD_BAD_ALLOC.cpp Wed Jun 6 11:27:17 2007
@@ -2,6 +2,10 @@
#include "config.h"
+#if !defined (_RWSTD_NO_NEW_THROWS) && !defined (_RWSTD_NO_NEW_OFLOW_SAFE)
+# include <stddef.h> // for size_t
+#endif // !_RWSTD_NO_NEW_THROWS && !_RWSTD_NO_NEW_OFLOW_SAFE
+
#ifndef _RWSTD_NO_SETRLIMIT
# include <sys/resource.h> // for setrlimit()
#endif
@@ -70,7 +74,7 @@
#ifndef _RWSTD_NO_NEW_THROWS
# ifndef _RWSTD_NO_NEW_OFLOW_SAFE
- void *p = ::operator new ((unsigned long)-1);
+ void *p = ::operator new (size_t (-1));
if (!p)
return 1;