xref: /illumos-gate/usr/src/lib/libipsecutil/common/errfp.h (revision f37b3cbb6f67aaea5eec1c335bdc7bf432867d64)
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 /*
30  * Headers and definitions for support functions that are shared by
31  * the ipsec utilities ipseckey and ikeadm.
32  */
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <stdio.h>
39 #include <stdarg.h>
40 
41 /*
42  * Function Prototypes
43  */
44 
45 #ifdef	__PRAGMA_REDEFINE_EXTNAME
46 #pragma	redefine_extname	errfp		_errfp
47 #pragma	redefine_extname	verrfp		_verrfp
48 #pragma	redefine_extname	errxfp		_errxfp
49 #pragma	redefine_extname	verrxfp		_verrxfp
50 #pragma	redefine_extname	warnfp		_warnfp
51 #pragma	redefine_extname	vwarnfp		_vwarnfp
52 #pragma	redefine_extname	warnxfp		_warnxfp
53 #pragma	redefine_extname	vwarnxfp	_vwarnxfp
54 #else
55 #define	errfp		_errfp
56 #define	verrfp		_verrfp
57 #define	errxfp		_errxfp
58 #define	verrxfp		_verrxfp
59 #define	warnfp		_warnfp
60 #define	vwarnfp		_vwarnfp
61 #define	warnxfp		_warnxfp
62 #define	vwarnxfp	_vwarnxfp
63 #endif
64 
65 /* Program exit and warning calls */
66 extern void errfp(FILE *, int, const char *, ...);
67 extern void verrfp(FILE *, int, const char *, va_list);
68 extern void errxfp(FILE *, int, const char *, ...);
69 extern void verrxfp(FILE *, int, const char *, va_list);
70 extern void warnfp(FILE *, const char *, ...);
71 extern void vwarnfp(FILE *, const char *, va_list);
72 extern void warnxfp(FILE *, const char *, ...);
73 extern void vwarnxfp(FILE *, const char *, va_list);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif	/* _ERRFP_H */
80