public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: naveen yadav <yad.naveen@gmail.com>
To: libc-help@sourceware.org, gcc-help@gcc.gnu.org, gcc-help@gnu.org
Subject: How to read environment variable in Glibc code
Date: Mon, 09 Jan 2012 20:55:00 -0000	[thread overview]
Message-ID: <CAJ8eaTwxT6DQZRPb=JHoieTDHbdBO63t80ejbGVo5hXjO2p5xw@mail.gmail.com> (raw)
In-Reply-To: <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

WARNING: multiple messages have this Message-ID
From: naveen yadav <yad.naveen@gmail.com>
To: libc-help@sourceware.org, gcc-help@gcc.gnu.org, gcc-help@gnu.org
Subject: How to read environment variable in Glibc code
Date: Tue, 10 Jan 2012 10:24:00 -0000	[thread overview]
Message-ID: <CAJ8eaTwxT6DQZRPb=JHoieTDHbdBO63t80ejbGVo5hXjO2p5xw@mail.gmail.com> (raw)
Message-ID: <20120110102400.aeQaB0rOUeg5oLqLr-YmXNhsrnBPX-7hU8g8BLFe968@z> (raw)
In-Reply-To: <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

       reply	other threads:[~2012-01-09 12:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJ8eaTw=DxFEPDJ_zUra6LvoAa1cn9v1Ls+6pyGJQ4PDyXyi8w@mail.gmail.com>
2012-01-09 20:55 ` naveen yadav [this message]
2012-01-10 10:24   ` naveen yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ8eaTwxT6DQZRPb=JHoieTDHbdBO63t80ejbGVo5hXjO2p5xw@mail.gmail.com' \
    --to=yad.naveen@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc-help@gnu.org \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).