Tom Lane wrote:
> "Magnus Hagander" <mha@sollentuna.net> writes:
>
>> /* Unable to get shared memory */
>>+ errno = GetLastError();
>
>
> Aren't you going to need a mapping function to convert Windows error
> codes to errno numbers? Don't tell me Microsoft was smart enough to
> make them the same ;-)
How about the idea to set errno to a special value after all non-posix
calls, which makes ereport examine/preserve GetLastError() instead?
Regards,
Andreas