]> git.proxmox.com Git - mirror_qemu.git/commit
bswap: improve gluing
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 13 Jan 2013 16:35:41 +0000 (16:35 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 17 Jan 2013 01:31:18 +0000 (19:31 -0600)
commita4cbfe24e4d9f86622ba81b8c5b599c92c682fbc
treeb266a42b9e012290b7100cf3481a10b879d6a8ed
parent47f4dac3fde809e3da4e60d9eb699f1d4b378249
bswap: improve gluing

OpenBSD system compiler (gcc 4.2.1) has problems with concatenation
of macro arguments in macro functions:
  CC    aes.o
In file included from /src/qemu/include/qemu-common.h:126,
                 from /src/qemu/aes.c:30:
/src/qemu/include/qemu/bswap.h: In function 'leul_to_cpu':
/src/qemu/include/qemu/bswap.h:461: warning: implicit declaration of function 'bswapHOST_LONG_BITS'
/src/qemu/include/qemu/bswap.h:461: warning: nested extern declaration of 'bswapHOST_LONG_BITS'

Function leul_to_cpu() is only used in kvm-all.c, so the warnings
are not fatal on OpenBSD without -Werror.

Fix by applying glue(). Also add do {} while(0) wrapping and fix
semicolon use while at it.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/qemu/bswap.h