From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glenn Maynard Subject: Re: Removal of assert() in alsa-lib Date: Fri, 10 Dec 2004 00:46:08 -0500 Message-ID: <20041210054607.GX14919@zewt.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Thu, Dec 09, 2004 at 05:23:06PM +0100, Takashi Iwai wrote: > +void snd_err_msg(const char *file, int line, const char *function, int err, const char *fmt, ...) __attribute__ ((format (printf, 5, 6))); Can this be a weak symbol, so it can be overridden by user code? If my application causes errors on some version of ALSA, having diagnostic information going to stderr is inconvenient: I centralize all diagnostics for bug reporting in a single file, so I don't have to pull teeth from users to have them copy bits of information from other places. As long as snd_err_msg() is only called on "unexpected" errors (eg. what used to be assertion failures), and made a weak symbol, I can redirect it to my logs. I currently do this with __assert_fail() and __assert_perror_fail(), and I'd like to continue to be able to catch all important diagnostic output automatically. -- Glenn Maynard ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/