Large memory allocation errors

James_Brister at iengines.com James_Brister at iengines.com
Sun Oct 31 10:22:59 UTC 1999


On 30 Oct 1999 22:08:59 -0800, Russ Allbery <rra at stanford.edu> said:

> James Brister <James_Brister at iengines.com> writes:
>>> I think we should not try to tell things this way to end-users either.
>>> We'd better use the proper %lu and add some extra check that logs the
>>> error.

>> I agree.

> Done.

>> Getting __FILE__ and __LINE__ in the message would be useful too for bug
>> hunting.

> Hm.  That's a good idea.  How does one go about detecting whether a
> compiler supports __FILE__ and __LINE__?  And what data type is __LINE__?

I'll put this in. __FILE__ gets expanded to a string by cpp, and __LINE__
turns into an integer:

	fprintf(stderr, "%s:%d some error message\n", __FILE__, __LINE__);

I never seen a cpp that didn't do this.

James
-- 
James Brister                                            brister at iengines.com
Internet Engines Inc.                                    brister at vix.com



More information about the inn-workers mailing list