mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
* include/arpa/nameser.h (NS_GET16): Use const pointer.
(NS_GET32): Likewise.
This commit is contained in:
parent
7e1b29c64a
commit
144bfa86e2
@ -1,5 +1,8 @@
|
|||||||
2008-08-01 Ulrich Drepper <drepper@redhat.com>
|
2008-08-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* include/arpa/nameser.h (NS_GET16): Use const pointer.
|
||||||
|
(NS_GET32): Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/kernel-features.h: s390 has the new
|
* sysdeps/unix/sysv/linux/kernel-features.h: s390 has the new
|
||||||
syscalls, too.
|
syscalls, too.
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#ifndef _ARPA_NAMESER_H_
|
||||||
|
|
||||||
#include <resolv/arpa/nameser.h>
|
#include <resolv/arpa/nameser.h>
|
||||||
|
|
||||||
/* If the machine allows unaligned access we can do better than using
|
/* If the machine allows unaligned access we can do better than using
|
||||||
@ -14,7 +16,7 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden;
|
|||||||
# undef NS_GET16
|
# undef NS_GET16
|
||||||
# define NS_GET16(s, cp) \
|
# define NS_GET16(s, cp) \
|
||||||
do { \
|
do { \
|
||||||
uint16_t *t_cp = (uint16_t *) (cp); \
|
const uint16_t *t_cp = (const uint16_t *) (cp); \
|
||||||
(s) = ntohs (*t_cp); \
|
(s) = ntohs (*t_cp); \
|
||||||
(cp) += NS_INT16SZ; \
|
(cp) += NS_INT16SZ; \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -22,7 +24,7 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden;
|
|||||||
# undef NS_GET32
|
# undef NS_GET32
|
||||||
# define NS_GET32(l, cp) \
|
# define NS_GET32(l, cp) \
|
||||||
do { \
|
do { \
|
||||||
uint32_t *t_cp = (uint32_t *) (cp); \
|
const uint32_t *t_cp = (const uint32_t *) (cp); \
|
||||||
(l) = ntohl (*t_cp); \
|
(l) = ntohl (*t_cp); \
|
||||||
(cp) += NS_INT32SZ; \
|
(cp) += NS_INT32SZ; \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -71,3 +73,5 @@ libresolv_hidden_proto (ns_samedomain)
|
|||||||
libresolv_hidden_proto (ns_samename)
|
libresolv_hidden_proto (ns_samename)
|
||||||
libresolv_hidden_proto (ns_makecanon)
|
libresolv_hidden_proto (ns_makecanon)
|
||||||
libresolv_hidden_proto (ns_format_ttl)
|
libresolv_hidden_proto (ns_format_ttl)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user