mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
In a 64bit-clean environment, blowfish fails:
make[6]: Leaving directory
'/builddir/build/BUILD/xen-4.19.1/tools/tests/x86_emulator'
In file included from /usr/include/features.h:535,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from
/usr/lib/gcc/x86_64-xenserver-linux/12/include/stdint.h:9,
from blowfish.c:18:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such
file or directory
7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [testcase.mk:15: blowfish.bin] Error 1
because of lack of glibc-i386-devel or equivelent. It's non-fatal, but
reduces the content in test_x86_emulator, which we do care about running.
Instead, convert all emulator testcases to being freestanding builds, resuing
the tools/firmware/include/ headers.
This in turn requires making firmware's stdint.h compatible with 64bit builds.
We now have compiler types for every standard type we use.
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
33 lines
867 B
C
33 lines
867 B
C
#ifndef _STDINT_H_
|
|
#define _STDINT_H_
|
|
|
|
typedef __INT8_TYPE__ int8_t;
|
|
typedef __UINT8_TYPE__ uint8_t;
|
|
typedef __INT16_TYPE__ int16_t;
|
|
typedef __UINT16_TYPE__ uint16_t;
|
|
typedef __INT32_TYPE__ int32_t;
|
|
typedef __UINT32_TYPE__ uint32_t;
|
|
typedef __INT64_TYPE__ int64_t;
|
|
typedef __UINT64_TYPE__ uint64_t;
|
|
|
|
#define INT8_MIN (-0x7f-1)
|
|
#define INT16_MIN (-0x7fff-1)
|
|
#define INT32_MIN (-0x7fffffff-1)
|
|
#define INT64_MIN (-0x7fffffffffffffffll-1)
|
|
|
|
#define INT8_MAX 0x7f
|
|
#define INT16_MAX 0x7fff
|
|
#define INT32_MAX 0x7fffffff
|
|
#define INT64_MAX 0x7fffffffffffffffll
|
|
|
|
#define UINT8_MAX 0xff
|
|
#define UINT16_MAX 0xffff
|
|
#define UINT32_MAX 0xffffffffu
|
|
#define UINT64_MAX 0xffffffffffffffffull
|
|
|
|
typedef __UINTPTR_TYPE__ uintptr_t;
|
|
|
|
#define UINTPTR_MAX __UINTPTR_MAX__
|
|
|
|
#endif
|