diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-29 21:51:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-29 21:51:33 +0000 |
commit | b0081e6c104679b374e7b7154c187fb48428c672 (patch) | |
tree | 0b65722454a3aa9e12a65e2953d346855ba157a0 /inet/netinet/in.h | |
parent | d09ef153fb3be5aee02d06fb988d48f2cce68656 (diff) | |
download | glibc-b0081e6c104679b374e7b7154c187fb48428c672.tar glibc-b0081e6c104679b374e7b7154c187fb48428c672.tar.gz glibc-b0081e6c104679b374e7b7154c187fb48428c672.tar.bz2 glibc-b0081e6c104679b374e7b7154c187fb48428c672.zip |
Update.
1998-03-29 Ulrich Drepper <drepper@cygnus.com>
* inet/netinet/in.h: Use cast to uint32_t in IPv4 macros.
Reported by Andreas Jaeger.
Diffstat (limited to 'inet/netinet/in.h')
-rw-r--r-- | inet/netinet/in.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/inet/netinet/in.h b/inet/netinet/in.h index 75c299eaea..a856a2976d 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -106,41 +106,41 @@ struct in_addr On subnets, host and network parts are found according to the subnet mask, not these masks. */ -#define IN_CLASSA(a) ((((unsigned) (a)) & 0x80000000) == 0) +#define IN_CLASSA(a) ((((uint32_t) (a)) & 0x80000000) == 0) #define IN_CLASSA_NET 0xff000000 #define IN_CLASSA_NSHIFT 24 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) #define IN_CLASSA_MAX 128 -#define IN_CLASSB(a) ((((unsigned) (a)) & 0xc0000000) == 0x80000000) +#define IN_CLASSB(a) ((((uint32_t) (a)) & 0xc0000000) == 0x80000000) #define IN_CLASSB_NET 0xffff0000 #define IN_CLASSB_NSHIFT 16 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) #define IN_CLASSB_MAX 65536 -#define IN_CLASSC(a) ((((unsigned) (a)) & 0xc0000000) == 0xc0000000) +#define IN_CLASSC(a) ((((uint32_t) (a)) & 0xc0000000) == 0xc0000000) #define IN_CLASSC_NET 0xffffff00 #define IN_CLASSC_NSHIFT 8 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) -#define IN_CLASSD(a) ((((unsigned) (a)) & 0xf0000000) == 0xe0000000) +#define IN_CLASSD(a) ((((uint32_t) (a)) & 0xf0000000) == 0xe0000000) #define IN_MULTICAST(a) IN_CLASSD(a) -#define IN_EXPERIMENTAL(a) ((((unsigned) (a)) & 0xe0000000) == 0xe0000000) -#define IN_BADCLASS(a) ((((unsigned) (a)) & 0xf0000000) == 0xf0000000) +#define IN_EXPERIMENTAL(a) ((((uint32_t) (a)) & 0xe0000000) == 0xe0000000) +#define IN_BADCLASS(a) ((((uint32_t) (a)) & 0xf0000000) == 0xf0000000) /* Address to accept any incoming messages. */ -#define INADDR_ANY ((unsigned) 0x00000000) +#define INADDR_ANY ((uint32_t) 0x00000000) /* Address to send to all hosts. */ -#define INADDR_BROADCAST ((unsigned) 0xffffffff) +#define INADDR_BROADCAST ((uint32_t) 0xffffffff) /* Address indicating an error return. */ -#define INADDR_NONE ((unsigned) 0xffffffff) +#define INADDR_NONE ((uint32_t) 0xffffffff) /* Network number for local host loopback. */ -#define IN_LOOPBACKNET 127 +#define IN_LOOPBACKNET 127 /* Address to loopback in software to local host. */ #ifndef INADDR_LOOPBACK -# define INADDR_LOOPBACK ((unsigned) 0x7f000001) /* Inet 127.0.0.1. */ +# define INADDR_LOOPBACK ((uint32_t) 0x7f000001) /* Inet 127.0.0.1. */ #endif |