lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 06c62c780be55944365bbf81a377e2878383974e
parent efe8f27cf969b27f17657d5d3c8208dd39a30749
Author: Duncaen <mail@duncano.de>
Date:   Thu, 25 May 2017 19:57:04 +0200

{lib/libopenbsd,usr.bin/sort}: remove __unused macro

musl has some variables in its headers named __unused, they conflict
with this macro and therefor break building.

Diffstat:
include/compat.h | 3+--
usr.bin/sort/coll.c | 10+++++-----
usr.bin/sort/sort.c | 2+-
3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/include/compat.h b/include/compat.h @@ -11,8 +11,7 @@ #define ALIGN(p) (((size_t)(p) + ALIGNBYTES) &~ ALIGNBYTES) #endif -#define __UNUSED __attribute__ ((unused)) -#define __unused __attribute__ ((unused)) +#define __UNUSED __attribute__ ((unused)) #define __dead __attribute__((__noreturn__)) diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c @@ -782,7 +782,7 @@ cmpsuffix(unsigned char si1, unsigned char si2) */ static int numcoll_impl(struct key_value *kv1, struct key_value *kv2, - size_t offset __unused, bool use_suffix) + size_t offset __UNUSED, bool use_suffix) { struct bwstring *s1, *s2; wchar_t sfrac1[MAX_NUM_SIZE + 1], sfrac2[MAX_NUM_SIZE + 1]; @@ -955,7 +955,7 @@ hnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) */ static int randomcoll(struct key_value *kv1, struct key_value *kv2, - size_t offset __unused) + size_t offset __UNUSED) { struct bwstring *s1, *s2; MD5_CTX ctx1, ctx2; @@ -1008,7 +1008,7 @@ randomcoll(struct key_value *kv1, struct key_value *kv2, */ static int versioncoll(struct key_value *kv1, struct key_value *kv2, - size_t offset __unused) + size_t offset __UNUSED) { struct bwstring *s1, *s2; @@ -1081,7 +1081,7 @@ cmp_nans(double d1, double d2) */ static int gnumcoll(struct key_value *kv1, struct key_value *kv2, - size_t offset __unused) + size_t offset __UNUSED) { double d1, d2; int err1, err2; @@ -1237,7 +1237,7 @@ gnumcoll(struct key_value *kv1, struct key_value *kv2, * Implements month sort (-M). */ static int -monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __unused) +monthcoll(struct key_value *kv1, struct key_value *kv2, size_t offset __UNUSED) { int val1, val2; bool key1_read, key2_read; diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c @@ -402,7 +402,7 @@ invalid: * Signal handler that clears the temporary files. */ static void -sig_handler(int sig __unused) +sig_handler(int sig __UNUSED) { clear_tmp_files(); _exit(2);