xref: /third_party/ltp/include/tst_safe_stdio.h (revision f08c3bdf)
1/* SPDX-License-Identifier: GPL-2.0-or-later
2 * Copyright (c) 2013-2016 Cyril Hrubis <chrubis@suse.cz>
3 */
4
5#ifndef TST_SAFE_STDIO_H__
6#define TST_SAFE_STDIO_H__
7
8#include <stdio.h>
9
10#include "safe_stdio_fn.h"
11
12#define SAFE_FOPEN(path, mode) \
13	safe_fopen(__FILE__, __LINE__, NULL, path, mode)
14
15#define SAFE_FCLOSE(f) \
16	safe_fclose(__FILE__, __LINE__, NULL, f)
17
18#define SAFE_ASPRINTF(strp, fmt, ...) \
19	safe_asprintf(__FILE__, __LINE__, NULL, strp, fmt, __VA_ARGS__)
20
21#define SAFE_POPEN(command, type) \
22	safe_popen(__FILE__, __LINE__, NULL, command, type)
23
24#endif /* TST_SAFE_STDIO_H__ */
25