On 1/12/19 12:25 PM, Stefano Garzarella wrote: >>> Better to just pull in qemu/osdep.h >> >> Except that qemu/osdep.h should already have been pulled in by whatever >> .c file is including this header. We specifically document that .h files >> shouldn't need to include osdep.h (and in turn, anything that osdep.h >> already pulls in, like <stdint.h>). > > Since I can't include qemu/osdep.h because this header file is used by > the option roms (bare metal), do you think is better to include > stdint.h in optrom.h or in the .c files that use it? > As Stefan pointed out, I'm including qemu_fw_cfg.h in optrom.h and it > depends on stdint.h. In this case, what is the best approach?
If this is one of the exception files that is used to build files outside of qemu, then its should probably be mentioned as an exception in scripts/clean-includes (okay, I see that pc-bios/ is already exempted) - and thus using osdep.h is not an option, but using <stdint.h> is, because it is the exception to the rule, in relation to files used only for qemu. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature