2011/8/28 Paolo Carlini <paolo.carl...@oracle.com>:
> On 08/28/2011 10:05 PM, Kai Tietz wrote:
>>
>> 2011/8/28 Paolo Carlini<paolo.carl...@oracle.com>:
>>>
>>> Hi,
>>>>
>>>> Hello,
>>>>
>>>> this patch adds some errno values supported by newer runtime-version.
>>>> To keep backward compatibility
>>>> this patch checks for their definition before trying to use them.
>>>
>>> Any particular reason for not using [GLIBCXX_CHECK_SYSTEM_ERROR] for
>>> mingw
>>> too (by extending the list of checked syserr appropriately)?
>>>
>>> Paolo.
>>
>> Well, I see here a possible clash for EOVERFLOW, which is defined for
>> Windows crt to E2BIG. So we would have in list a double enumerator
>> value for value_too_large and argument_list_too_long.  Additionally we
>> might want to include the socket-errors from WSA-equivalents.  Well,
>> not sure about the later, but at least I found this comment in header.
>
> I don't understand: I only suggested using for mingw too the
> [GLIBCXX_CHECK_SYSTEM_ERROR] machinery (which is run *anyway* on mingw too),
> for the constants you are interested in, by adding those to the m4_foreach
> list.
>
> Paolo.

Ah, now I got you.  Hmm, well, I see here no advantage in adding
another macro to check for an macro.  As in code of libstdc++ there is
actual no use for those new ones.
But if you insist on that, I can add them and replace #if guards by
#if HAVE_.... style.
Nevertheless, for some error-numbers (eg. EAFNOSUPPORT, EBADMSG, etc)
- which are socket API related - there is no constant define in
errno.h (and never will be).  So code to emulate this would be still a
manual thing in error_constants.h header AFAICS (if we plan to support
them for mingw targets).

Kai

Reply via email to