Commit bd56b3fc by Jose Ruiz Committed by Arnaud Charlet

adaint.c (__gnat_tmp_name): Refine the generation of temporary names for RTX.

2008-08-01  Jose Ruiz  <ruiz@adacore.com>

	* adaint.c (__gnat_tmp_name): Refine the generation of temporary names
	for RTX. Adding a suffix that is incremented at each iteration.

From-SVN: r138482
parent 72734842
...@@ -983,8 +983,12 @@ void ...@@ -983,8 +983,12 @@ void
__gnat_tmp_name (char *tmp_filename) __gnat_tmp_name (char *tmp_filename)
{ {
#ifdef RTX #ifdef RTX
/* RTX in RTSS mode does not support tempnam nor tmpnam */ /* Variable used to create a series of unique names */
strcpy (tmp_filename, "c:\\WINDOWS\\Temp\\gnat-XXXXXX"); static int counter = 0;
/* RTX in RTSS mode does not support tempnam nor tmpnam so we emulate it */
strcpy (tmp_filename, "c:\\WINDOWS\\Temp\\gnat-");
sprintf (&tmp_filename[strlen (tmp_filename)], "%d\0", counter++);
#elif defined (__MINGW32__) #elif defined (__MINGW32__)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment