1 /* init.h - Definitions for init fucntions.
2 * Copyright (C) 2007, 2012 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of either
9 * - the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at
11 * your option) any later version.
15 * - the GNU General Public License as published by the Free
16 * Software Foundation; either version 2 of the License, or (at
17 * your option) any later version.
19 * or both in parallel, as here.
21 * This file is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see <https://www.gnu.org/licenses/>.
30 #ifndef GNUPG_COMMON_INIT_H
31 #define GNUPG_COMMON_INIT_H
33 #ifndef GPG_ERR_SOURCE_DEFAULT
34 # error GPG_ERR_SOURCE_DEFAULT is not defined
35 #elseif GPG_ERR_SOURCE_DEFAULT == GPG_ERR_SOURCE_UNKNOWN
36 # error GPG_ERR_SOURCE_DEFAULT has default value
39 void register_mem_cleanup_func (void (*func)(void));
41 void early_system_init (void);
42 void _init_common_subsystems (gpg_err_source_t errsource,
43 int *argcp, char ***argvp);
44 #define init_common_subsystems(a,b) \
45 _init_common_subsystems (GPG_ERR_SOURCE_DEFAULT, (a), (b))
47 #endif /*GNUPG_COMMON_INIT_H*/