]> granicus.if.org Git - curl/commitdiff
changed u_int16_t to unsigned short because it is the only place within ares and...
authorGunter Knauf <gk@gknw.de>
Sat, 5 Sep 2009 15:12:30 +0000 (15:12 +0000)
committerGunter Knauf <gk@gknw.de>
Sat, 5 Sep 2009 15:12:30 +0000 (15:12 +0000)
also it broke many autobuilds. We should probably introduce an ares_port_t if we want to use a type here.

ares/Makefile.vc6
ares/ares.h
ares/ares_parse_srv_reply.3
ares/ares_parse_srv_reply.c

index 0c31bd92c8633a7833bf49c3df6fd224c7c1118f..871efa33e8c2576128e0347ed204e040b168a939 100644 (file)
@@ -19,7 +19,7 @@ USE_WATT32  = 0
 
 CC = cl
 
-CFLAGS  = -nologo -$(CFG_MODEL)$(DEBUG_MODEL) -W3 -Yd -Zi -Du_int16_t=u_short
+CFLAGS  = -nologo -$(CFG_MODEL)$(DEBUG_MODEL) -W3 -Yd -Zi
 LDFLAGS = -machine:i386 -map
 
 OBJ_DIR  = VC6_obj
index bfca7dae16deea673b0abceff6f07023278abf8b..ad7c4d57ae51a2be4d99f633d66d1f3233a5d0a0 100644 (file)
@@ -323,9 +323,9 @@ struct addr6ttl {
 };
 
 struct srv_reply {
-  u_int16_t weight;
-  u_int16_t priority;
-  u_int16_t port;
+  unsigned short weight;
+  unsigned short priority;
+  unsigned short port;
   char *host;
 };
 
index 8f3edf4f4204a5c90653a33d9f2b51eb30ae8d11..a83d480a3109a23d2d2ce3666896d76a92220b02 100644 (file)
@@ -49,9 +49,9 @@ contains the following fields:
 .in +4n
 .nf
 struct srv_reply {
-    u_int16_t weight;
-    u_int16_t priority;
-    u_int16_t port;
+    unsigned short weight;
+    unsigned short priority;
+    unsigned short port;
     char *host;
 };
 .fi
index 61f0be1ea7b143e576492a476e3e4ae78b910a6f..5b1e218d40f89dec13e91bb2fb0f70871bacd299 100644 (file)
@@ -120,12 +120,12 @@ ares_parse_srv_reply (const unsigned char *abuf, int alen,
               break;
             }
 
-          srv[i].priority = ntohs (*((u_int16_t *)aptr));
-          aptr += sizeof(u_int16_t);
-          srv[i].weight = ntohs (*((u_int16_t *)aptr));
-          aptr += sizeof(u_int16_t);
-          srv[i].port = ntohs (*((u_int16_t *)aptr));
-          aptr += sizeof(u_int16_t);
+          srv[i].priority = ntohs (*((unsigned short *)aptr));
+          aptr += sizeof(unsigned short);
+          srv[i].weight = ntohs (*((unsigned short *)aptr));
+          aptr += sizeof(unsigned short);
+          srv[i].port = ntohs (*((unsigned short *)aptr));
+          aptr += sizeof(unsigned short);
 
           status = ares_expand_name (aptr, abuf, alen, &srv[i].host, &len);
           if (status != ARES_SUCCESS)