Do not use enum types for bit flags

Arithmetic operations on enum members do not result in the enum type;
C++ is stricter about this than C.  So using flag enums results in
compile errors when they are OR'd together in a C++ application.

To fix this, replace all flag enum objects with int.  int was selected
to preserve the ABI; we checked that enum types are the same size as
int on at least i386, x86-64, ppc32, ppc64, ia64, and mips, and arm
and sparc also appear compatible with this choice.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
11 files changed