This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to read environment variable in Glibc code
- From: naveen yadav <yad dot naveen at gmail dot com>
- To: libc-help at sourceware dot org, gcc-help at gcc dot gnu dot org, gcc-help at gnu dot org
- Date: Mon, 9 Jan 2012 17:59:06 +0530
- Subject: How to read environment variable in Glibc code
- References: <CAJ8eaTw=DxFEPDJ_zUra6LvoAa1cn9v1Ls+6pyGJQ4PDyXyi8w@mail.gmail.com>
Dear All,
I want to disable/enable printf out put to screen by reading
environment variable similar to LD_DEBUG.
I want to control ./stdio-common/printf.c.
So if in environment variable says disable printf it call
int
__printf (const char *format, ...)
{
return done;
}
else it execute original code.
Thanks