Replace _getshort() and _getlong() with NS_GET16() and NS_GET32() respectively.

Fixes compilation on cygwin (and possibly other targets).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@148 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2012-02-08 12:53:16 +00:00
parent 7978a87c9f
commit 122849f247
2 changed files with 5 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
[Changes 1.2c01]
* Fix /nslookup command. (caf)
* Fix /nslookup command (including fixing compilation on cygwin). (caf)
* Improve /detach error handling and remove bogus F_SETOWN use, reported
by madsage. (caf)

View File

@@ -2655,14 +2655,10 @@ static int ar_procanswer(struct reslist *rptr, HEADER *hptr, char *buf, char *eo
* the pointer to the right spot. Some of thse are actually
* useful so its not a good idea to skip past in one big jump.
*/
type = (int)_getshort(cp);
cp += sizeof(short);
class = (int)_getshort(cp);
cp += sizeof(short);
ttl = (unsigned int)_getlong(cp);
cp += INT32SZ;
dlen = (int)_getshort(cp);
cp += sizeof(short);
NS_GET16(type, cp);
NS_GET16(class, cp);
NS_GET32(ttl, cp);
NS_GET16(dlen, cp);
rptr->re_type = type;
switch(type)