shithub: scc

Download patch

ref: c0eb41837bdc0ae78cfab986ee867945917d915f
parent: bb0648aa26ff0187dfcd632fc82da4a36ce0fd57
parent: bdb679b87123bfd001006f45c317e1e6832b791a
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat May 16 16:14:14 EDT 2020

Merge branch 'master' of ssh://simple-cc.org:/var/gitrepos/scc

--- a/src/libc/arch/amd64/linux/.gitignore
+++ b/src/libc/arch/amd64/linux/.gitignore
@@ -9,3 +9,4 @@
 _sigaction.s
 _sys_errlist.c
 _write.s
+_unlink.s
--- a/src/libc/stdio/vfprintf.c
+++ b/src/libc/stdio/vfprintf.c
@@ -350,7 +350,8 @@
 				goto wstrout;
 			} else {
 				s = va_arg(va2, char *);
-				len = strnlen(s, conv.prec);
+				if ((len = strlen(s)) > conv.prec)
+					len = conv.prec;
 				goto strout;
 			}
 		wstrout:
--- a/src/libc/syscall.h
+++ b/src/libc/syscall.h
@@ -6,3 +6,4 @@
 extern int _lseek(int fd, long off, int whence);
 extern void _Exit(int status);
 extern int _access(char *path, int mode);
+extern int _unlink(const char *path);