| 1 | /* poldi.h - Main include file for PAM Poldi |
| 2 | Copyright (C) 2008 g10 Code GmbH |
| 3 | |
| 4 | This file is part of Poldi. |
| 5 | |
| 6 | Poldi is free software; you can redistribute it and/or modify it |
| 7 | under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 3 of the License, or |
| 9 | (at your option) any later version. |
| 10 | |
| 11 | Poldi is distributed in the hope that it will be useful, but |
| 12 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with this program; if not, see |
| 18 | <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | /* This is the main Poldi include file. It is to be included by all |
| 21 | Poldi components. */ |
| 22 | |
| 23 | #ifndef INCLUDED_POLDI_H |
| 24 | #define INCLUDED_POLDI_H |
| 25 | |
| 26 | #include <config.h> |
| 27 | |
| 28 | /* Throughout Poldi we use the gpg_error_t datatype for error code |
| 29 | propagation. */ |
| 30 | #include <gpg-error.h> |
| 31 | |
| 32 | /* We use the Libgcrypt memory allocator. */ |
| 33 | |
| 34 | #include <gcrypt.h> |
| 35 | #define xtrymalloc(n) gcry_malloc(n) |
| 36 | #define xtrymalloc_secure(n) gcry_malloc_secure(n) |
| 37 | #define xtrystrdup(p) gcry_strdup(p) |
| 38 | #define xtryrealloc(p,n) gcry_realloc(p,n) |
| 39 | #define xfree(p) gcry_free(p) |
| 40 | |
| 41 | /* Poldi allows for NLS. */ |
| 42 | |
| 43 | #include <libintl.h> |
| 44 | #include <locale.h> |
| 45 | #define _(String) dgettext (PACKAGE, String) |
| 46 | #define gettext_noop(String) String |
| 47 | #define N_(String) gettext_noop (String) |
| 48 | |
| 49 | #endif /* INCLUDED_POLDI_H */ |