Vladlen Popolitov <[email protected]> writes:
> Tom Lane писал(а) 2026-07-31 17:08:
>> Interesting.  I wonder if it'd be sane to put in an explicit mapping
>> for ERROR_INVALID_FUNCTION, although I'm not quite sure whether to
>> prefer ENOTSUP or EOPNOTSUPP.

> We could try other approach - avoid changing zic and _dosmaperr()
> and fix link() like this in src/port/win32link.c:

>               if (returncode == ERROR_INVALID_FUNCTION)
>                       errno = ENOTSUP;
>               else
>                       dosmaperr(returncode);

Yeah, that sounds like the solution with the smallest blast radius.
We know that ERROR_INVALID_FUNCTION means this for link(), but
it's hardly clear that that applies across-the-board; it seems
like EINVAL is probably the best translation in other cases.

Another advantage is that we don't have to sync it with changes in
zic.c: this will still do what we want after Eggert's changes of
today[1] arrive, whereas other answers might not.

I'll go make it so in a bit.  Thanks for the report!

                        regards, tom lane

[1] 
https://lists.iana.org/hyperkitty/list/[email protected]/thread/O5Q2I3GLZIF6GEFZ3MDWRZKG4ENPJVFQ/


Reply via email to