pam_pkcs11
0.6.12
src
common
error.h
Go to the documentation of this file.
1
/*
2
* PKCS #11 PAM Login Module
3
* Copyright (C) 2003 Mario Strasser <mast@gmx.net>,
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* $Id$
16
*/
17
18
#ifndef __ERROR_H_
19
#define __ERROR_H_
20
21
#ifdef HAVE_CONFIG_H
22
#include <config.h>
23
#endif
24
25
#include <config.h>
26
#include <stdarg.h>
27
#ifndef HAVE_NSS
28
#include <openssl/err.h>
29
#endif
30
#include <errno.h>
31
33
#define ERROR_BUFFER_SIZE 512
34
35
#ifndef __ERROR_C_
36
#define ERROR_EXTERN extern
37
#else
38
#define ERROR_EXTERN
39
#endif
40
46
ERROR_EXTERN
void
set_error
(
const
char
*format, ...);
47
52
ERROR_EXTERN
const
char
*
get_error
(
void
);
53
54
#undef ERROR_EXTERN
55
#endif
/* __ERROR_H_ */
set_error
ERROR_EXTERN void set_error(const char *format,...)
store an error message into a temporary buffer, in a similar way as sprintf does
get_error
ERROR_EXTERN const char * get_error(void)
Retrieve error message string from buffer.
ERROR_EXTERN
#define ERROR_EXTERN
Definition
error.h:36
Generated by
1.13.2