__UNCONST: use uintptr_t instead of unsigned long.
The width of unsigned long matching the width of a pointer isn't guaranteed by any standard, though it is a requirement of the Linux syscall API. Using uintptr_t directly is always correct.
This commit is contained in:
parent
47df729bcc
commit
0b23de1bec
@ -53,7 +53,7 @@
|
||||
#define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | EXTRACT_FLAGS
|
||||
|
||||
#ifndef __UNCONST
|
||||
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
|
||||
#define __UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
|
||||
#endif
|
||||
|
||||
/* libarchive compat */
|
||||
|
@ -168,7 +168,7 @@ fetchIO *ftp_request(struct url *, const char *, const char *,
|
||||
#define CHECK_FLAG(x) (flags && strchr(flags, (x)))
|
||||
|
||||
#ifndef __UNCONST
|
||||
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
|
||||
#define __UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user