Subversion Repositories Kolibri OS

Rev

Rev 8793 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8687 turbocat 1
#include 
2
#include 
3
#include 
4
 
5
static char buf[FILENAME_MAX + 1];
6
static int static_index = 0;
7
 
8
char *tmpnam(char *name) {
9094 turbocat 9
	ksys_thread_t table;
10
	_ksys_thread_info(&table, -1);
8687 turbocat 11
 
12
	char *out = name ? name : buf;
13
	// PID is also unique for each thread
14
	sprintf(out, "/tmp0/1/%x_%x.tmp", table.pid, static_index++);
15
	return out;
9094 turbocat 16
}