mailing list of musl libc
 help / color / mirror / code / Atom feed
210e768f28a734f92b28b7bc85b0a221d334b090 blob 552 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
#include "stdio_impl.h"

static FILE *volatile dummy_file = 0;
weak_alias(dummy_file, __stdin_used);
weak_alias(dummy_file, __stdout_used);
weak_alias(dummy_file, __stderr_used);

static void close_file(FILE *f)
{
	if (!f) return;
	FFINALLOCK(f);
	if (f->wpos != f->wbase) f->write(f, 0, 0);
	if (f->rpos != f->rend) f->seek(f, f->rpos-f->rend, SEEK_CUR);
}

void __stdio_exit(void)
{
	FILE *f;
	for (f=*__ofl_lock(); f; f=f->next) close_file(f);
	close_file(__stdin_used);
	close_file(__stdout_used);
}

weak_alias(__stdio_exit, __stdio_exit_needed);
debug log:

solving 210e768 ...
found 210e768 in https://inbox.vuxu.org/musl/20160426221815.GA24105@brightrain.aerifal.cx/
found 191b445 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 191b4454a48d3ff4258c2cd6dd5d29738d79620e	src/stdio/__stdio_exit.c

applying [1/1] https://inbox.vuxu.org/musl/20160426221815.GA24105@brightrain.aerifal.cx/
diff --git a/src/stdio/__stdio_exit.c b/src/stdio/__stdio_exit.c
index 191b445..210e768 100644

Checking patch src/stdio/__stdio_exit.c...
Applied patch src/stdio/__stdio_exit.c cleanly.

index at:
100644 210e768f28a734f92b28b7bc85b0a221d334b090	src/stdio/__stdio_exit.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).