diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-10-27 14:16:48 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-10-27 14:16:48 +0100 |
commit | fdfcc663025bcdca7562b2d16211a0588e484927 (patch) | |
tree | 75fc96285c761beaf46e117da46ba26e1193adfb /gcc/ada/adaint.c | |
parent | 477b99b63b10d050198e60bf44d8c1d3d89d5a0b (diff) | |
download | gcc-fdfcc663025bcdca7562b2d16211a0588e484927.tar.gz |
[multiple changes]
2009-10-27 Vincent Celier <celier@adacore.com>
* makeutl.adb (Check_Source_Info_In_ALI): Do not recompile if a subunit
from the runtime is found, except if gnatmake switch -a is used and this
subunit cannot be found.
2009-10-27 Ed Schonberg <schonberg@adacore.com>
* gnatbind.adb (gnatbind): When the -R option is selected, list subunits
as well, for tools that need the complete closure of the main program.
2009-10-27 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Minor updates.
2009-10-27 Emmanuel Briot <briot@adacore.com>
* prj-tree.adb (Free): Fix memory leak.
2009-10-27 Vasiliy Fofanov <fofanov@adacore.com>
* adaint.c, s-os_lib.adb (__gnat_create_output_file_new): New function
that ensures the file that is created is new. Use this function to make
sure there is no race condition if several processes are creating temp
files concurrently.
* s-os_lib.ads: Update comment.
2009-10-27 Thomas Quinot <quinot@adacore.com>
* sem_ch12.adb: Minor reformatting
2009-10-27 Javier Miranda <miranda@adacore.com>
* exp_ch4.ads (Integer_Promotion_Possible): New subprogram.
* exp_ch4.adb (Integer_Promotion_Possible): New subprogram.
(Expand_N_Type_Conversion): Replace code that checks if the integer
promotion of the operands is possible by a call to the new function
Integer_Promotion_Possible. Minor reformating because an enclosing
block is now not needed.
* checks.adb (Apply_Arithmetic_Overflow_Check): Add missing check to
see if the integer promotion is possible; in such case the runtime
checks are not generated.
From-SVN: r153592
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index c3405daaf44..135d3179570 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -923,6 +923,28 @@ __gnat_create_output_file (char *path) } int +__gnat_create_output_file_new (char *path) +{ + int fd; +#if defined (VMS) + fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_TEXT | O_EXCL, PERM, + "rfm=stmlf", "ctx=rec", "rat=none", "rop=nlk", + "shr=del,get,put,upd"); +#elif defined (__MINGW32__) + { + TCHAR wpath[GNAT_MAX_PATH_LEN]; + + S2WSC (wpath, path, GNAT_MAX_PATH_LEN); + fd = _topen (wpath, O_WRONLY | O_CREAT | O_TRUNC | O_TEXT | O_EXCL, PERM); + } +#else + fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_TEXT | O_EXCL, PERM); +#endif + + return fd < 0 ? -1 : fd; +} + +int __gnat_open_append (char *path, int fmode) { int fd; |