Xenomai 3.3.2
Loading...
Searching...
No Matches
stdio.h
1/*
2 * Copyright (C) 2006 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>.
3 * Copyright (C) 2007 Jan Kiszka <jan.kiszka@web.de>.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18 */
19#pragma GCC system_header
20#include_next <stdio.h>
21
22#ifndef _COBALT_STDIO_H
23#define _COBALT_STDIO_H
24
25#include <stddef.h>
26#include <stdarg.h>
27#include <xeno_config.h>
28#include <cobalt/wrappers.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
34COBALT_DECL(int, vfprintf, (FILE *stream, const char *fmt, va_list args));
35
36#ifdef CONFIG_XENO_FORTIFY
37
38COBALT_DECL(int, __vfprintf_chk,
39 (FILE *stream, int level, const char *fmt, va_list ap));
40
41COBALT_DECL(int, __vprintf_chk, (int flag, const char *fmt, va_list ap));
42
43COBALT_DECL(int, __printf_chk, (int flag, const char *fmt, ...));
44
45COBALT_DECL(int, __fprintf_chk, (FILE *fp, int flag, const char *fmt, ...));
46
47int __rt_vfprintf_chk(FILE *stream, int level,
48 const char *fmt, va_list args);
49
50void __rt_vsyslog_chk(int priority, int level,
51 const char *fmt, va_list args);
52
53#endif /* CONFIG_XENO_FORTIFY */
54
55COBALT_DECL(int, vprintf, (const char *fmt, va_list args));
56
57COBALT_DECL(int, fprintf, (FILE *stream, const char *fmt, ...));
58
59COBALT_DECL(int, printf, (const char *fmt, ...));
60
61COBALT_DECL(int, puts, (const char *s));
62
63COBALT_DECL(int, fputs, (const char *s, FILE *stream));
64
65#ifndef putchar
66COBALT_DECL(int, putchar, (int c));
67#else
68static inline int __real_putchar(int c)
69{
70 return putchar(c);
71}
72int __wrap_putchar(int c);
73int __cobalt_putchar(int c);
74#undef putchar
75#define putchar putchar
76#endif
77
78#ifndef fputc
79COBALT_DECL(int, fputc, (int c, FILE *stream));
80#else
81static inline int __real_fputc(int c, FILE *stream)
82{
83 return fputc(c, stream);
84}
85int __wrap_fputc(int c, FILE *stream);
86int __cobalt_fputc(int c, FILE *stream);
87#undef fputc
88#define fputc fputc
89#endif
90
91COBALT_DECL(size_t, fwrite,
92 (const void *ptr, size_t sz, size_t nmemb, FILE *stream));
93
94COBALT_DECL(int, fclose, (FILE *stream));
95
96int rt_vfprintf(FILE *stream, const char *format, va_list args);
97
98int rt_vprintf(const char *format, va_list args);
99
100int rt_fprintf(FILE *stream, const char *format, ...);
101
102int rt_printf(const char *format, ...);
103
104int rt_puts(const char *s);
105
106int rt_fputs(const char *s, FILE *stream);
107
108int rt_fputc(int c, FILE *stream);
109
110int rt_putchar(int c);
111
112size_t rt_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
113
114void rt_syslog(int priority, const char *format, ...);
115
116void rt_vsyslog(int priority, const char *format, va_list args);
117
118int rt_print_init(size_t buffer_size, const char *name);
119
120const char *rt_print_buffer_name(void);
121
122void rt_print_flush_buffers(void);
123
124#ifdef __cplusplus
125}
126#endif /* __cplusplus */
127
128#endif /* !_COBALT_STDIO_H */