mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Add syscalls to Blinkenlights and fix bugs
This commit is contained in:
parent
f6df29cc3d
commit
578cb21591
25 changed files with 187 additions and 108 deletions
|
@ -36,7 +36,8 @@ FILE *tmpfile(void) {
|
|||
tmp = firstnonnull(getenv("TMPDIR"), kTmpPath);
|
||||
sep = !isempty(tmp) && !endswith(tmp, "/") ? "/" : "";
|
||||
if ((snprintf)(tpl, PATH_MAX, "%s%stmp.%s.XXXXXX", tmp, sep,
|
||||
program_invocation_short_name) <= PATH_MAX) {
|
||||
firstnonnull(program_invocation_short_name, "unknown")) <=
|
||||
PATH_MAX) {
|
||||
if ((fd = mkostemps(tpl, 0, 0)) != -1) {
|
||||
return fdopen(fd, "w+");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue