Parcourir la source

Merge branch 'uint' into maint

* uint:
  Convert to uintXX_t types
Bryan Drewery il y a 13 ans
Parent
commit
6c2ed1f3fe
3 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. 3 3
      src/compat/dn_expand.c
  2. 2 2
      src/compat/inet_ntop.c
  3. 2 2
      src/net.h

+ 3 - 3
src/compat/dn_expand.c

@@ -19,9 +19,9 @@
 #define NS_HFIXEDSZ     12      /* #/bytes of fixed data in header */
 #define NS_QFIXEDSZ     4       /* #/bytes of fixed data in query */
 #define NS_RRFIXEDSZ    10      /* #/bytes of fixed data in r record */
-#define NS_INT32SZ      4       /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ      2       /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ       1       /* #/bytes of data in a u_int8_t */
+#define NS_INT32SZ      4       /* #/bytes of data in a uint32_t */
+#define NS_INT16SZ      2       /* #/bytes of data in a uint16_t */
+#define NS_INT8SZ       1       /* #/bytes of data in a uint8_t */
 #define NS_INADDRSZ     4       /* IPv4 T_A */
 #define NS_IN6ADDRSZ    16      /* IPv6 T_AAAA */
 #define NS_CMPRSFLGS    0xc0    /* Flag bits indicating name compression. */

+ 2 - 2
src/compat/inet_ntop.c

@@ -23,7 +23,7 @@
 
 #define NS_INADDRSZ     4       /* IPv4 T_A */
 #define NS_IN6ADDRSZ    16      /* IPv6 T_AAAA */
-#define NS_INT16SZ      2       /* #/bytes of data in a u_int16_t */
+#define NS_INT16SZ      2       /* #/bytes of data in a uint16_t */
 
 /*
  * WARNING: Don't even consider trying to compile this on a system where
@@ -101,7 +101,7 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size)
 	 */
 	char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
 	struct { int base, len; } best, cur;
-	u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
+	unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
 	int i;
 
 	/*

+ 2 - 2
src/net.h

@@ -60,8 +60,8 @@ enum {
 
 #if !defined(IN6_IS_ADDR_V4MAPPED)
 # define IN6_IS_ADDR_V4MAPPED(a) \
-        ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
-         (((u_int32_t *) (a))[2] == htonl (0xffff)))
+        ((((uint32_t *) (a))[0] == 0) && (((uint32_t *) (a))[1] == 0) && \
+         (((uint32_t *) (a))[2] == htonl (0xffff)))
 #endif /* !defined(IN6_IS_ADDR_V4MAPPED) */
 
 union sockaddr_union {			/* replaced by sockname_t */