scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <stdio.h>
 2
 3#include "../../syscall.h"
 4
 5#undef tmpfile
 6
 7FILE *
 8tmpfile(void)
 9{
10	char *fname;
11	FILE *fp;
12
13	for (;;) {
14		if ((fname = tmpnam(NULL)) == NULL)
15			return NULL;
16		if ((fp = fopen(fname, "wbt+")) == NULL)
17			continue;
18		_unlink(fname);
19		return fp;
20	}
21}