fiu-local.h revision 229fce07
1/* Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc.  See LICENSE. */
2
3/* libfiu - Fault Injection in Userspace
4 *
5 * This header, part of libfiu, is meant to be included in your project to
6 * avoid having libfiu as a mandatory build-time dependency.
7 *
8 * You can add it to your project, and #include it instead of fiu.h.
9 * The real fiu.h will be used only when FIU_ENABLE is defined.
10 *
11 * This header, as the rest of libfiu, is in the public domain.
12 *
13 * You can find more information about libfiu at
14 * http://blitiri.com.ar/p/libfiu.
15 */
16
17#ifndef _FIU_LOCAL_H
18#define _FIU_LOCAL_H
19
20/* Only define the stubs when fiu is disabled, otherwise use the real fiu.h
21 * header */
22#ifndef FIU_ENABLE
23
24#define fiu_init(flags) 0
25#define fiu_fail(name) 0
26#define fiu_failinfo() NULL
27#define fiu_do_on(name, action)
28#define fiu_exit_on(name)
29#define fiu_return_on(name, retval)
30
31#else
32
33#include <fiu.h>
34
35#endif /* FIU_ENABLE */
36
37#endif /* _FIU_LOCAL_H */
38
39