summaryrefslogtreecommitdiff
path: root/gcc/ada/s-memory.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-15 11:51:01 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-15 11:51:01 +0000
commit9e0ecfab1d8fa100f78d23060cd15b5c34a449a7 (patch)
tree1a02b34983bc3ac002967364fb841e53d5f9fc47 /gcc/ada/s-memory.adb
parentc974e0ffe8c1ecfaafef45dc8a723120fbe469ee (diff)
downloadgcc-9e0ecfab1d8fa100f78d23060cd15b5c34a449a7.tar.gz
2003-12-15 Robert Dewar <dewar@gnat.com>
* exp_ch6.adb (Expand_Thread_Body): Fix error in picking up default sec stack size. 2003-12-15 Vincent Celier <celier@gnat.com> * gnatchop.adb: (Error_Msg): Do not exit on error for a warning (Gnatchop): Do not set failure status when reporting the number of warnings. 2003-12-15 Doug Rupp <rupp@gnat.com> * s-ctrl.ads: New file. * Makefile.rtl (GNAT_RTL_NONTASKING_OBJS): Add s-crtl$(objext). * Make-lang.in: (GNAT_ADA_OBJS): Add ada/s-crtl.o. (GNATBIND_OBJS): Add ada/s-crtl.o. * Makefile.in [VMS]: Clean up ifeq rules. * gnatlink.adb, 6vcstrea.adb, a-direio.adb, a-sequio.adb, a-ststio.adb, a-textio.adb, g-os_lib.adb, a-witeio.adb, g-os_lib.ads, i-cstrea.adb, i-cstrea.ads, s-direio.adb, s-fileio.adb, s-memcop.ads, s-memory.adb, s-stache.adb, s-tasdeb.adb: Update copyright. Import System.CRTL. Make minor modifications to use System.CRTL declared functions instead of importing locally. 2003-12-15 GNAT Script <nobody@gnat.com> * Make-lang.in: Makefile automatically updated git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-memory.adb')
-rw-r--r--gcc/ada/s-memory.adb21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ada/s-memory.adb b/gcc/ada/s-memory.adb
index cdbb22e8908..66637c7291b 100644
--- a/gcc/ada/s-memory.adb
+++ b/gcc/ada/s-memory.adb
@@ -46,21 +46,22 @@
with Ada.Exceptions;
with System.Soft_Links;
with System.Parameters;
+with System.CRTL;
package body System.Memory is
use Ada.Exceptions;
use System.Soft_Links;
- function c_malloc (Size : size_t) return System.Address;
- pragma Import (C, c_malloc, "malloc");
+ function c_malloc (Size : System.CRTL.size_t) return System.Address
+ renames System.CRTL.malloc;
- procedure c_free (Ptr : System.Address);
- pragma Import (C, c_free, "free");
+ procedure c_free (Ptr : System.Address)
+ renames System.CRTL.free;
function c_realloc
- (Ptr : System.Address; Size : size_t) return System.Address;
- pragma Import (C, c_realloc, "realloc");
+ (Ptr : System.Address; Size : System.CRTL.size_t) return System.Address
+ renames System.CRTL.realloc;
-----------
-- Alloc --
@@ -85,10 +86,10 @@ package body System.Memory is
end if;
if Parameters.No_Abort then
- Result := c_malloc (Actual_Size);
+ Result := c_malloc (System.CRTL.size_t (Actual_Size));
else
Abort_Defer.all;
- Result := c_malloc (Actual_Size);
+ Result := c_malloc (System.CRTL.size_t (Actual_Size));
Abort_Undefer.all;
end if;
@@ -132,10 +133,10 @@ package body System.Memory is
end if;
if Parameters.No_Abort then
- Result := c_realloc (Ptr, Actual_Size);
+ Result := c_realloc (Ptr, System.CRTL.size_t (Actual_Size));
else
Abort_Defer.all;
- Result := c_realloc (Ptr, Actual_Size);
+ Result := c_realloc (Ptr, System.CRTL.size_t (Actual_Size));
Abort_Undefer.all;
end if;