diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 12:33:46 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 12:33:46 +0200 |
commit | 36357cf398c9837313d3d62dbdc1e7b883f47135 (patch) | |
tree | 8ba8aa8762aaf62f07c3ced830e35ac9385e62ca /gcc/ada/adaint.c | |
parent | 48c8c473932813f5d55f5ee3194ea18cf741aacc (diff) | |
download | gcc-36357cf398c9837313d3d62dbdc1e7b883f47135.zip gcc-36357cf398c9837313d3d62dbdc1e7b883f47135.tar.gz gcc-36357cf398c9837313d3d62dbdc1e7b883f47135.tar.bz2 |
[multiple changes]
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
properly type derived from generic formal types, to handle
properly modified version of ACATS 4.1B B611017.
2017-04-25 Javier Miranda <miranda@adacore.com>
* exp_unst.adb (Subp_Index): Adding missing
support for renamings and functions that return a constrained
array type (i.e. functions for which the frontend built a
procedure with an extra out parameter).
2017-04-25 Pascal Obry <obry@adacore.com>
* s-string.adb: Minor code clean-up.
2017-04-25 Bob Duff <duff@adacore.com>
* s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
procedure.
* adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
function for Non_Blocking_Wait_Process.
2017-04-25 Bob Duff <duff@adacore.com>
* prep.adb (Preprocess): Remove incorrect
Assert. Current character can be ASCII.CR.
From-SVN: r247177
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index bff875a..5cc84ca 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -2315,7 +2315,7 @@ __gnat_dup2 (int oldfd ATTRIBUTE_UNUSED, int newfd ATTRIBUTE_UNUSED) RTPs. */ return -1; #elif defined (__PikeOS__) - /* Not supported. */ + /* Not supported. */ return -1; #elif defined (_WIN32) /* Special case when oldfd and newfd are identical and are the standard @@ -2679,6 +2679,26 @@ __gnat_portable_wait (int *process_status) return pid; } +int +__gnat_portable_no_block_wait (int *process_status) +{ + int status = 0; + int pid = 0; + +#if defined (__vxworks) || defined (__PikeOS__) || defined (_WIN32) + /* Not supported. */ + status = -1; + +#else + + pid = waitpid (-1, &status, WNOHANG); + status = status & 0xffff; +#endif + + *process_status = status; + return pid; +} + void __gnat_os_exit (int status) { |