473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How can I found the implemention of the "printf" in glibc

Which file is the "printf" implemention in glibc?
The stdio.c is very small.
It seems using __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
And __printf_chk using __nldbl___vfprintf_chk, but
__nldbl___vfprintf_chk using __printf_chk.
I found the implement as following, I can not understand how it works.
int attribute_hidden __printf_chk (int flag, const char *fmt, ...)
{
va_list arg;
int done;

va_start (arg, fmt);
done = __nldbl___vfprintf_chk (stdout, flag, fmt, arg);
va_end (arg);

return done;
}

int attribute_compat_text_section __nldbl___vfprintf_chk (FILE *s, int
flag, const char *fmt, va_list ap)
{
int res;
set_no_long_double ();
res = __vfprintf_chk (s, flag, fmt, ap);
clear_no_long_double ();
return res;
}
Sep 23 '08 #1
1 4590
mars wrote:
Which file is the "printf" implementation in glibc?
http://sourceware.org/glibc/

Mailing lists

libc-help: The libc-help list is intended for all glibc questions
including build problems, C library usage, and more. No question about
glibc is ever wrong on this list.

http://sourceware.org/cgi-bin/cvsweb...?cvsroot=glibc

Regards.
Sep 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: sugaray | last post by:
does the expression int a=printf("%d\n",a); implementation dependent ? I supposed it would produced the result 2, but i got 4206596 (result may vary on your machine), i wonder if the value produced...
188
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
3
by: Lampa Dario | last post by:
Hello, I hope I am not too OT. How do I write printf("Content-type:%s\r\n\r\n",type) in Pascal ? I am translating a library of mine written in C into Pascal. How do I write \r\n\r\n in...
19
by: v4vijayakumar | last post by:
why the following statement dumps the core(Segmentation fault)? printf("%s\n", __FILE__);
12
by: Zero | last post by:
Hi everybody, i want to write a small program, which shows me the biggest and smallest number in dependance of the data type. For int the command could be: ...
10
by: lovecreatesbeauty | last post by:
Is parameter type conversion required for the 2nd argument on printf("%p", (void *)&i); ? But one would never call memcpy like: memcpy((void *)pi, (void *)pj, sizeof *pj); /*memcpy((void *)pi,...
26
by: Yevgen Muntyan | last post by:
Hey, It was mentioned elsewhere that printf("%d", INT_MAX); is implementation-defined. Why? Is it because INT_MAX value is implementation-defined so output depends on implementation, or is it...
7
by: Rajesh S R | last post by:
printf("%hhd",89);/*Assume char has 8 bits and is signed*/ Is it valid? I know that it has been discussed in comp.std.c. ...
29
by: candy_init | last post by:
Hi all, I just came across the following program: #include <stdio.h> int main() { float a = 12.5; printf("%d\n", a); printf("%d\n", *(int *)&a); return 0;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.