Throughout Cygwin, use u_intN_t or uintN_t

Don't use u_char, u_short, u_int or u_long in Cygwin, unless it refers
to the Winsock types.  Use u_intN_t in BSD-based sources, unsigned char
where strings are concerned, uintN_t otherwise.  Also:

	* net.cc: Fix comment, we're not using u_long anymore.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-03-24 16:39:15 +01:00
parent 6ba2b53c53
commit acc5f02ce8
16 changed files with 86 additions and 82 deletions

View File

@@ -39,10 +39,12 @@ details. */
#define PUTDOMAIN(d,p)\
{int res = dn_comp(d, p, EndPtr - p, dnptrs, lastdnptr); p += res < 0 ? (int) strlen(d) : res; }
static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char * EndPtr,
unsigned char ** dnptrs, unsigned char ** lastdnptr, int debug)
static unsigned char * write_record(unsigned char * ptr, PDNS_RECORD rr,
unsigned char * EndPtr,
unsigned char ** dnptrs,
unsigned char ** lastdnptr, int debug)
{
u_char * rd_length_ptr;
unsigned char * rd_length_ptr;
PUTDOMAIN(rr->pName, ptr);
@@ -70,7 +72,7 @@ static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char
switch(rr->wType) {
case DNS_TYPE_A:
{
u_char * aptr = (u_char *) & rr->Data.A.IpAddress;
u_int8_t * aptr = (u_int8_t *) & rr->Data.A.IpAddress;
if (ptr + 4 <= EndPtr) {
ptr[0] = aptr[0];
ptr[1] = aptr[1];