summaryrefslogtreecommitdiff
path: root/include/stdio.h
blob: d5a5928971f271cae3c5d1c878119780cb4d2cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __STDIO_H
#define __STDIO_H

#include <stdarg.h>
#include <linux/compiler.h>

/* stdin */
int getc(void);
int tstc(void);

/* stdout */
#if !defined(CONFIG_SPL_BUILD) || \
	(defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_SERIAL_SUPPORT)) || \
	(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \
		defined(CONFIG_SPL_SERIAL_SUPPORT))
int __printf(1, 2) printf(const char *fmt, ...);
int vprintf(const char *fmt, va_list args);
#else

static inline int __printf(1, 2) printf(const char *fmt, ...)
{
	return 0;
}

static inline int vprintf(const char *fmt, va_list args)
{
	return 0;
}
#endif

/*
 * FILE based functions (can only be used AFTER relocation!)
 */
#define stdin		0
#define stdout		1
#define stderr		2
#define MAX_FILES	3

#endif /* __STDIO_H */