Attempt to create .deps directory every time we build objects.
[doas.git] / env.h
blob7ce536a1c94ccab9afe6026b3ad0d2bb3fa2de7d
1 /*
2 * Copyright (c) 2021-2022 Sergey Sushilin <sergeysushilin@protonmail.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef _ENV_H
18 #define _ENV_H 1
20 #include <pwd.h>
22 #include "attributes.h"
23 #include "rule.h"
25 struct env;
27 extern struct env *createenv(void)
28 __returns_nonnull __warn_unused_result;
30 extern void defaultenv(struct env *const restrict env,
31 struct passwd const *const restrict original,
32 struct passwd const *const restrict target)
33 __nonnull((1, 2, 3));
34 extern void inheritenv(struct env *env)
35 __nonnull((1));
36 extern int keepenv(struct env *const restrict env,
37 char const *const restrict *const restrict envlist)
38 __nonnull((1, 2));
39 extern int fillenv(struct env *restrict env,
40 char const *const restrict *const restrict envlist)
41 __nonnull((1, 2));
42 extern int unfillenv(struct env *restrict env,
43 char const *const restrict *const restrict envlist)
44 __nonnull((1, 2));
46 extern char **prepenv(struct env *const restrict env)
47 __malloc __returns_nonnull __nonnull((1));
49 #endif /* _ENV_H */