Hi/2. Bruno Haible wrote: > KO Myung-Hun wrote: >> These are the patches to support AI_NUMERICSERV and AI_NUMERICHOST flag >> to getaddrinfo(). >> >> Review, please... >> >> [PATCH 1/2] getaddrinfo: Add AI_NUMERICSERV to the supported flags >> [PATCH 2/2] getaddrinfo: Add AI_NUMERICHOST flag support > > Your patches don't contain actual portable support for these flags > (on platforms where the native function does not implement it). >
In case of AI_NUMERICSERV, getaddrinfo.c already has codes for it. In case of AI_NUMERICHOST, gethostbyname() will do it. But, some error checks are necessary. > POSIX [1] specifies the meaning of these two flags. So, if you encountered > a program which uses them, that is OK and I have no objection to Gnulib > supporting them. > > But the way to do so is in several steps, for each of the flags: > 1) Prepare a patch to tests/test-getaddrinfo.c that verifies the behaviour > of the flag. > 2) Send us this patch, so that we can run the modified test on many > platforms (including native Windows). > Also, run the modified test yourself, on OS/2. > 3) Then it will be clear which parts of lib/getaddrinfo.c need to be > extended. > > Bruno > > [1] > https://pubs.opengroup.org/onlinepubs/9799919799/functions/getaddrinfo.html > > Ok, I'll try. Thanks! -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/
