Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-05-19 02:31:29 +00:00
Code Issues Projects Releases Wiki Activity
musl/src/stdio/vdprintf.c

20 lines
384 B
C
Raw Normal View History

initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
#include "stdio_impl.h"
avoid referencing address of extern function from vdprintf this change is in preparation for upcoming PIC/shared library support. the intent is to avoid going through the GOT, mainly so that dprintf is operable immediately, prior to processing of relocations. having dprintf accessible from the dynamic linker will make writing and debugging the dynamic linker much easier.
2011-02-20 22:24:28 -05:00
static size_t wrap_write(FILE *f, const unsigned char *buf, size_t len)
{
return __stdio_write(f, buf, len);
}
initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
int vdprintf(int fd, const char *fmt, va_list ap)
{
int r;
char buf[BUFSIZ];
FILE f = {
avoid referencing address of extern function from vdprintf this change is in preparation for upcoming PIC/shared library support. the intent is to avoid going through the GOT, mainly so that dprintf is operable immediately, prior to processing of relocations. having dprintf accessible from the dynamic linker will make writing and debugging the dynamic linker much easier.
2011-02-20 22:24:28 -05:00
.fd = fd, .lbf = EOF, .write = wrap_write,
initial check-in, version 0.5.0
2011-02-12 00:22:29 -05:00
.buf = buf+UNGET, .buf_size = sizeof buf - UNGET
};
r = vfprintf(&f, fmt, ap);
__oflow(&f);
return r;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 45ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API