stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r544910 - in /incubator/stdcxx/trunk/etc/config/src: GLOBAL_BAD_ALLOC.cpp STD_BAD_ALLOC.cpp
Date Wed, 06 Jun 2007 18:27:18 GMT
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 <Farid_Zaripov@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;



Mime
View raw message