<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40057 >
On Jan 31, 2008 8:35 AM, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=40057 >
> On 27/01/2008, Jason Dorje Short <[EMAIL PROTECTED]> wrote:
> > mystrerror is included in support.c. Two places don't use this but
> > access strerror directly. This patch fixes it (for 2.1).
> That broke compilation.
> mystrerror() takes no arguments, but just uses errno directly. I'll
> fix compilation ASAP.
> I'd vote for changing mystrerror() to take error number as argument,
> so it is possibly for caller to store errno and postpone mystrerror()
> call without risking errno overwrite. All this in a fashion compatible
> with Windows version of mystrerror(), of course.
Wow, quite a typo for a 2-line patch. My bad.
And yes, I agree with you; mystrerror should be a drop-in for
strerror. The drawback is as you can see in mystrerror that windows
does not have the errno token IIRC. At best we'd be looking at
something like myerrno and another poisoned token.
Freeciv-dev mailing list