xref: /illumos-gate/usr/src/lib/libipsecutil/common/errfp.h (revision 90221f9148b67fdc90178b67f9600b7bd4e3bc7c)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_ERRFP_H
27 #define	_ERRFP_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * Headers and definitions for support functions that are shared by
33  * the ipsec utilities ipseckey and ikeadm.
34  */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #include <stdio.h>
41 #include <stdarg.h>
42 
43 /*
44  * Function Prototypes
45  */
46 
47 #ifdef	__PRAGMA_REDEFINE_EXTNAME
48 #pragma	redefine_extname	errfp		_errfp
49 #pragma	redefine_extname	verrfp		_verrfp
50 #pragma	redefine_extname	errxfp		_errxfp
51 #pragma	redefine_extname	verrxfp		_verrxfp
52 #pragma	redefine_extname	warnfp		_warnfp
53 #pragma	redefine_extname	vwarnfp		_vwarnfp
54 #pragma	redefine_extname	warnxfp		_warnxfp
55 #pragma	redefine_extname	vwarnxfp	_vwarnxfp
56 #else
57 #define	errfp		_errfp
58 #define	verrfp		_verrfp
59 #define	errxfp		_errxfp
60 #define	verrxfp		_verrxfp
61 #define	warnfp		_warnfp
62 #define	vwarnfp		_vwarnfp
63 #define	warnxfp		_warnxfp
64 #define	vwarnxfp	_vwarnxfp
65 #endif
66 
67 /* Program exit and warning calls */
68 extern void errfp(FILE *, int, const char *, ...);
69 extern void verrfp(FILE *, int, const char *, va_list);
70 extern void errxfp(FILE *, int, const char *, ...);
71 extern void verrxfp(FILE *, int, const char *, va_list);
72 extern void warnfp(FILE *, const char *, ...);
73 extern void vwarnfp(FILE *, const char *, va_list);
74 extern void warnxfp(FILE *, const char *, ...);
75 extern void vwarnxfp(FILE *, const char *, va_list);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif	/* _ERRFP_H */
82