getlong()/getshort()/ns_get16()/ns_get32()
Václav Haisman
v.haisman@sh.cvut.cz
Sun May 16 14:42:00 GMT 2010
Dennis Yurichev wrote, On 16.5.2010 8:19:
> Hi.
>
> I have a software using getlong()/getshort() functions which are also
> synonyms to ns_get32()/ns_get16().
> But they are removed from cygwin?
> Why and what to use instead of?
Wow. Having so badly named functions in public name space...
You cold reimplement the missing functions like this:
unsigned short
_getshort(unsigned char *ptr)
{
unsigned short x;
memcpy (&x, ptr, sizeof (x));
return x; // or return ntohs (x); if the data are in network byte order.
}
...
Actually, if you do grep over header files you will find that arpa/nameser.h
contains ns_get32() etc.
--
VH
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list