You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@gonzo.ben.algroup.co.uk> on 1997/06/29 22:14:50 UTC
Re: cvs commit: apache/src alloc.c buff.c http_bprintf.c http_log.c http_main.c httpd.h util_script.c
Dean Gaudet wrote:
> void log_assert(const char *szExp,const char *szFile,int nLine)
> {
> ! char buf[1000];
> !
> ! ap_snprintf(buf, sizeof(buf),
> ! "line %d, assertion \"%s\" failed",nLine,szExp);
> ! log_unixerr("assert",szFile,buf,NULL);
> exit(1);
> }
> --- 208,219 ----
>
> void log_assert(const char *szExp,const char *szFile,int nLine)
> {
> ! fprintf(stderr, "[%s] file %s, line %d, assertion \"%s\" failed\n",
> ! get_time(), szFile, nLine, szExp);
> ! #ifndef WIN32
> ! /* unix assert does an abort leading to a core dump */
> ! abort();
> ! #else
> exit(1);
> + #endif
> }
Hmmm ... actually, abort() is probably better under Win32, too (I'll have to
check) - but it needs to be switchable to exit(), or you end up with loadsa
dialog boxes.
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email: ben@algroup.co.uk
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author