11 char *__mktemp(char *template)
14 size_t i, l = strlen(template);
18 if (l < 6 || strcmp(template+l-6, "XXXXXX")) {
24 clock_gettime(CLOCK_REALTIME, &ts);
25 r = ts.tv_nsec + (uintptr_t)&ts / 16 + (uintptr_t)template;
26 for (i=1; i<=6; i++, r>>=4)
27 template[l-i] = 'A'+(r&15);
28 if (access(template, F_OK) < 0) return template;
35 weak_alias(__mktemp, mktemp);