]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/env.h
libmount: fix comment referring to passno field
[thirdparty/util-linux.git] / include / env.h
1 #ifndef UTIL_LINUX_ENV_H
2 #define UTIL_LINUX_ENV_H
3
4 #include "c.h"
5 #include "nls.h"
6
7 extern void sanitize_env(void);
8 extern char *safe_getenv(const char *arg);
9
10
11 #ifndef XSETENV_EXIT_CODE
12 # define XSETENV_EXIT_CODE EXIT_FAILURE
13 #endif
14
15 static inline void xsetenv(char const *name, char const *val, int overwrite)
16 {
17 if (setenv(name, val, overwrite) != 0)
18 err(XSETENV_EXIT_CODE, _("failed to set the %s environment variable"), name);
19 }
20
21 #endif /* UTIL_LINUX_ENV_H */
22