coreboot/src/include
Joel Kitching a1b15172d7 create stdio.h and stdarg.h for {,v}snprintf
Sometimes coreboot needs to compile external code (e.g.
vboot_reference) using its own set of system header files.
When these headers don't line up with C Standard Library,
it causes problems.

Create stdio.h and stdarg.h header files.  Relocate snprintf
into stdio.h and vsnprintf into stdarg.h from string.h.
Chain include these header files from string.h, since coreboot
doesn't care so much about the legacy POSIX location of these
functions.

Also move va_* definitions from vtxprintf.h into stdarg.h where
they belong (in POSIX).  Just use our own definitions regardless
of GCC or LLVM.

Add string.h header to a few C files which should have had it
in the first place.

BUG=b:124141368
TEST=make clean && make test-abuild
BRANCH=none

Change-Id: I7223cb96e745e11c82d4012c6671a51ced3297c2
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39468
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-03-25 23:38:46 +00:00
..
boot src: Use 'include <boot/coreboot_tables.h>' when appropriate 2019-10-27 17:48:30 +00:00
console create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
cpu src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
device Rework map_oprom_vendev to add revision check and mapping 2020-03-25 10:49:08 +00:00
efi src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
pc80 src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
smp coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
superio src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
sys src/include: Add guards on all header files 2017-08-01 23:04:15 +00:00
adainit.h src/include: Fix typos 2020-01-08 12:57:31 +00:00
assert.h assert.h: add assertions with descriptive failures 2020-03-18 22:14:46 +00:00
b64_decode.h src/include: Fix typos 2020-01-08 12:57:31 +00:00
base3.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bcd.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
boardid.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
boot_device.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bootblock_common.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bootmem.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bootmode.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bootsplash.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
bootstate.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
cbfs.h src/device: Add option to look at revision in option roms 2020-03-25 10:48:21 +00:00
cbmem.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
cper.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
crc_byte.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
ctype.h add ctype.h header 2019-06-24 21:15:14 +00:00
delay.h cpu/x86/lapic: Refactor timer_fsb() 2019-09-19 09:28:55 +00:00
device_tree.h src/include: Fix typos 2020-01-18 10:55:45 +00:00
dimm_info_util.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
edid.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
elog.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
endian.h Drop ROMCC code and header guards 2019-12-19 03:25:05 +00:00
fallback.h drivers/pc80/rtc: Clean up some headers 2020-01-07 18:40:02 +00:00
fit.h fit: Add overlay support 2019-06-21 09:22:31 +00:00
fit_payload.h lib: Add FIT payload support 2018-06-19 18:10:05 +00:00
fmap.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
gic.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
gpio.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
halt.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
imd.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
inttypes.h include, lib: Add <inttypes.h> printf macros 2019-08-10 08:47:08 +00:00
ip_checksum.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
kconfig.h kconfig: Drop IS_ENABLED() macro 2019-06-04 13:33:40 +00:00
lib.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
list.h lib/devicetree: Integrate flattened devicetree support 2018-04-30 09:33:32 +00:00
main_decl.h arches: lib: add main_decl.h for main() declaration 2016-02-11 23:29:08 +01:00
memlayout.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
memory_info.h src/soc/intel/common/smbios: Add addtional infos to dimm_info 2019-06-06 11:32:52 +00:00
memrange.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
mrc_cache.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
nhlt.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
option.h drivers/pc80/rtc: Move sanitize_cmos() 2020-01-10 15:28:41 +00:00
program_loading.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
ramdetect.h lib: ramdetect: Register exception handlers for ARMv8 2019-08-26 07:14:03 +00:00
random.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
reg_script.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
region_file.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
reset.h reset: Finalize move to new API 2018-10-31 15:29:42 +00:00
rmodule.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
romstage_handoff.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
rtc.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
rules.h kill CAR_GLOBAL_MIGRATION leftovers 2019-11-30 16:12:04 +00:00
sar.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
sdram_mode.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
smbios.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
smmstore.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
spd.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
spd_bin.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
spd_ddr2.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
spi-generic.h src/include: Fix typos 2020-01-18 10:55:45 +00:00
spi_bitbang.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
spi_flash.h drivers/spi/spi_flash: remove spi flash names 2020-01-28 14:44:37 +00:00
spi_sdcard.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
stage_cache.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
stdarg.h create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
stdbool.h Drop ROMCC code and header guards 2019-12-19 03:25:05 +00:00
stddef.h Drop ROMCC code and header guards 2019-12-19 03:25:05 +00:00
stdint.h include/stdint.h: Remove old reference to ROMCC 2020-02-25 10:17:49 +00:00
stdio.h create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
stdlib.h lib/malloc: Implement a simple free() only for last malloc() 2020-01-02 18:22:53 +00:00
string.h create stdio.h and stdarg.h for {,v}snprintf 2020-03-25 23:38:46 +00:00
swab.h Drop ROMCC code and header guards 2019-12-19 03:25:05 +00:00
symbols.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
thread.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
timer.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
timestamp.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
trace.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
types.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
uuid.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00
vbe.h src: Use 'include <boot/coreboot_tables.h>' when appropriate 2019-10-27 17:48:30 +00:00
version.h ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
watchdog.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
wrdd.h src (minus soc and mainboard): Remove copyright notices 2020-03-17 18:26:34 +00:00