From 8c6d4505329f94446084ca93eae10cd796d79a8d Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 26 Jan 2019 22:41:05 -0500 Subject: new framework for building sources after gitlab migration --- nonstd/static/fopen.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 nonstd/static/fopen.h (limited to 'nonstd/static/fopen.h') diff --git a/nonstd/static/fopen.h b/nonstd/static/fopen.h new file mode 100644 index 00000000..64d30f1e --- /dev/null +++ b/nonstd/static/fopen.h @@ -0,0 +1,12 @@ +#include "nonstd/FILE.h" + +static FILE *__common_fopen(struct __fopen_options *opt) +{ + FILE *f = NULL; + if (__libc.stdio.nopen < FOPEN_MAX) { + f = __libc.stdio.files + __libc.stdio.nopen; + __libc.stdio.nopen++; + } + f->fd = opt->fd; + return f; +} -- cgit v1.2.1