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