outobj: handle compilers without 64-bit switch() support
OpenWatcom, in particular, doesn't handle switch() statements with 64-bit expressions, sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
4dff757ba5
commit
b714cb27cb
1 changed files with 5 additions and 1 deletions
|
@ -43,6 +43,7 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nasm.h"
|
||||
#include "nasmlib.h"
|
||||
|
@ -1099,7 +1100,10 @@ static void obj_out(int32_t segto, const void *data,
|
|||
ldata -= size;
|
||||
}
|
||||
|
||||
switch (size) {
|
||||
if (size > UINT_MAX)
|
||||
size = 0;
|
||||
|
||||
switch ((unsigned int)size) {
|
||||
default:
|
||||
nasm_error(ERR_NONFATAL, "OBJ format can only handle 16- or "
|
||||
"32-byte relocations");
|
||||
|
|
Loading…
Reference in a new issue