parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header
authorHelge Deller <deller@gmx.de>
Sat, 28 Jan 2017 10:52:02 +0000 (11:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:16 +0000 (14:04 +0200)
commit485f99073ea17248d3938859e7d87e59406dbb8a
treee83083c5c4c88a38d6e85d65c69dee36ec752d18
parentb5882ec2fe3c937c863aab441e96b3f47f72f035
parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header

commit 2ad5d52d42810bed95100a3d912679d8864421ec upstream.

In swab.h the "#if BITS_PER_LONG > 32" breaks compiling userspace programs if
BITS_PER_LONG is #defined by userspace with the sizeof() compiler builtin.

Solve this problem by using __BITS_PER_LONG instead.  Since we now
#include asm/bitsperlong.h avoid further potential userspace pollution
by moving the #define of SHIFT_PER_LONG to bitops.h which is not
exported to userspace.

This patch unbreaks compiling qemu on hppa/parisc.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/parisc/include/asm/bitops.h
arch/parisc/include/uapi/asm/bitsperlong.h
arch/parisc/include/uapi/asm/swab.h