GCC / Cygwin下的InetNtop和ws2tcpip.h

我正在使用cygwin 2.774下的gcc 3.4.4提供的ws2tcpip.h版本

我正在查找InetNtop函数,这是Microsoft的inet_ntop实现,但我找到的两个版本的ws2tcpip.h不包含该函数。 包括arpa/inet.h来获取inet_ntop会导致各种可怕的重复定义。

有没有理由提供gcc / cygwin的版本没有这个function? 是否有(合法?)方式从Microsoft获得具有该定义的版本?

注意:我100%确定我有正确的#include #define#include和链接器选项

注意:请不要建议使用较旧的WSA*function我很清楚它们。

编辑:

今天进行了一些挖掘并得出结论,标题必须缺少条目,因为这里是标题的grep:

 asdf@fdsa ~$ grep -i -B 4 -A 2 -R "inet_ntop" /usr/include/ /usr/include/arpa/inet.h-in_addr_t inet_netof (struct in_addr); /usr/include/arpa/inet.h-in_addr_t inet_network (const char *); /usr/include/arpa/inet.h-char *inet_ntoa (struct in_addr); /usr/include/arpa/inet.h-int inet_pton (int, const char *, void *); /usr/include/arpa/inet.h:const char *inet_ntop (int, const void *, char *, socklen_t); /usr/include/arpa/inet.h-#endif /usr/include/arpa/inet.h- -- /usr/include/cygwin/version.h- 127: Export sigrelese. /usr/include/cygwin/version.h- 128: Export pselect. /usr/include/cygwin/version.h- 129: Export mkdtemp. /usr/include/cygwin/version.h- 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv. /usr/include/cygwin/version.h: 131: Export inet_ntop, inet_pton. /usr/include/cygwin/version.h- 132: Add GLOB_LIMIT flag to glob. /usr/include/cygwin/version.h- 133: Export __getline, __getdelim. asdf@fdsa ~$ grep -i -B 4 -A 2 -R "inetntop" /usr/include/ asdf@fdsa ~$ 

这是库文件中的字符串:

 asdf@fdsa ~$ strings /usr/lib/w32api/libws2_32.a | grep -i 'inet_*ntop' _inet_ntop@16 __imp__inet_ntop@16 _InetNtopW@16 __imp__InetNtopW@16 inet_ntop _inet_ntop@16 __imp__inet_ntop@16 InetNtopW _InetNtopW@16 __imp__InetNtopW@16 

任何人都知道为什么标题错误/我可以获得完整的标题?