2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 coresystems GmbH
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __CONSOLE_VTXPRINTF_H
21 #define __CONSOLE_VTXPRINTF_H
23 /* With GCC we use -nostdinc -ffreestanding to keep out system includes.
24 * Unfortunately this also gets us rid of the _compiler_ includes, like
25 * stdarg.h. To work around the issue, we define varargs directly here.
26 * On LLVM we can still just include stdarg.h.
29 #define va_start(v,l) __builtin_va_start(v,l)
30 #define va_end(v) __builtin_va_end(v)
31 #define va_arg(v,l) __builtin_va_arg(v,l)
32 typedef __builtin_va_list va_list;
37 int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args);