diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 10:26:59 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 10:26:59 +0200 |
commit | a0fb8fe8d90fee970854a3e9b72d0c5ba9f4149a (patch) | |
tree | 9ce25e16327608ef6243ca6ccd5339febb356438 /gcc/ada/adaint.c | |
parent | 9534ab171e71fa56c4b384c5984d0d457f2eb55d (diff) | |
download | gcc-a0fb8fe8d90fee970854a3e9b72d0c5ba9f4149a.zip gcc-a0fb8fe8d90fee970854a3e9b72d0c5ba9f4149a.tar.gz gcc-a0fb8fe8d90fee970854a3e9b72d0c5ba9f4149a.tar.bz2 |
[multiple changes]
2011-08-04 Pascal Obry <obry@adacore.com>
* adaint.c (__gnat_tmp_name): Use current process id to create temp
filenames, this ensures unicity of filenames across processes.
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
Raise_Controlled to Raise_From_Controlled_Operation. Update the
signature of Raise_From_Controlled_Operation by adding flag From_Abort.
Add False as the actual to From_Abort in the generated call to
Raise_From_Controlled_Operation.
2011-08-04 Jerome Lambourg <lambourg@adacore.com>
* osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
so that the ali file name can be retrieved from outside of this package.
* back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
doing nothing in the general case, but used to update the object file
timestamp if directly generated by the backend.
* gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
to a later time than the ali file one.
From-SVN: r177329
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index b0fd8c5..471dc2c 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1177,13 +1177,15 @@ __gnat_tmp_name (char *tmp_filename) #elif defined (__MINGW32__) { char *pname; + char prefix[25]; /* tempnam tries to create a temporary file in directory pointed to by TMP environment variable, in c:\temp if TMP is not set, and in directory specified by P_tmpdir in stdio.h if c:\temp does not exist. The filename will be created with the prefix "gnat-". */ - pname = (char *) _tempnam ("c:\\temp", "gnat-"); + sprintf (prefix, "gnat-%d-", (int)getpid()); + pname = (char *) _tempnam ("c:\\temp", prefix); /* if pname is NULL, the file was not created properly, the disk is full or there is no more free temporary files */ |