aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-crtl.ads
diff options
context:
space:
mode:
authorPascal Obry <obry@adacore.com>2008-03-26 08:40:18 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2008-03-26 08:40:18 +0100
commitf88ecba0bc8dca1af95ba6ff29de6c2c263c5b76 (patch)
tree28343910375ab6a065b5ea0288fb08858441c855 /gcc/ada/s-crtl.ads
parent4e9f48a126a0812b87a7dba7dfcd11d441c48e80 (diff)
downloadgcc-f88ecba0bc8dca1af95ba6ff29de6c2c263c5b76.zip
gcc-f88ecba0bc8dca1af95ba6ff29de6c2c263c5b76.tar.gz
gcc-f88ecba0bc8dca1af95ba6ff29de6c2c263c5b76.tar.bz2
Makefile.in: Add proper GNAT.Serial_Communications implementation on supported platforms.
2008-03-26 Pascal Obry <obry@adacore.com> * Makefile.in: Add proper GNAT.Serial_Communications implementation on supported platforms. * Makefile.rtl: Add g-sercom.o. * impunit.adb: Add g-sercom.adb. * s-crtl.ads (open): New routine. (close): Likewise. (write): Likewise. * s-osinte-mingw.ads (BYTE): New type. (CHAR): Likewise. (OVERLAPPED): Likewise. (GENERIC_READ): New constant. (GENERIC_WRITE): Likewise. (OPEN_EXISTING): Likewise. (PSECURITY_ATTRIBUTES): Removed this type, use anonymous access type instead. (CreateFile): New routine. (WriteFile): Likewise. (ReadFile): Likewise. (CloseHandle): Move next to the other file oriented routines. * g-sercom.ads: New unit. * g-sercom.adb: Default implementation, calls to this unit will raise a program error exception. * g-sercom-mingw.adb, g-sercom-linux.adb: Windows and GNU/Linux implementations. From-SVN: r133569
Diffstat (limited to 'gcc/ada/s-crtl.ads')
-rw-r--r--gcc/ada/s-crtl.ads14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads
index 30bca62..4ab0e7d 100644
--- a/gcc/ada/s-crtl.ads
+++ b/gcc/ada/s-crtl.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2003-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -148,9 +148,6 @@ package System.CRTL is
function popen (command, mode : System.Address) return System.Address;
pragma Import (C, popen, "popen");
- function read (fd : int; buffer : chars; nbytes : int) return int;
- pragma Import (C, read, "read");
-
function realloc
(Ptr : System.Address; Size : size_t) return System.Address;
pragma Import (C, realloc, "realloc");
@@ -181,6 +178,15 @@ package System.CRTL is
function unlink (filename : chars) return int;
pragma Import (C, unlink, "unlink");
+ function open (filename : chars; oflag : int) return int;
+ pragma Import (C, open, "open");
+
+ function close (fd : int) return int;
+ pragma Import (C, close, "close");
+
+ function read (fd : int; buffer : chars; nbytes : int) return int;
+ pragma Import (C, read, "read");
+
function write (fd : int; buffer : chars; nbytes : int) return int;
pragma Import (C, write, "write");