xref: /freebsd-src/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h (revision 98e0ffaefb0f241cda3a72395d3be04192ae0d47)
1d876124dSJohn Birrell /*
2d876124dSJohn Birrell  * CDDL HEADER START
3d876124dSJohn Birrell  *
4d876124dSJohn Birrell  * The contents of this file are subject to the terms of the
5d876124dSJohn Birrell  * Common Development and Distribution License, Version 1.0 only
6d876124dSJohn Birrell  * (the "License").  You may not use this file except in compliance
7d876124dSJohn Birrell  * with the License.
8d876124dSJohn Birrell  *
9d876124dSJohn Birrell  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10d876124dSJohn Birrell  * or http://www.opensolaris.org/os/licensing.
11d876124dSJohn Birrell  * See the License for the specific language governing permissions
12d876124dSJohn Birrell  * and limitations under the License.
13d876124dSJohn Birrell  *
14d876124dSJohn Birrell  * When distributing Covered Code, include this CDDL HEADER in each
15d876124dSJohn Birrell  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16d876124dSJohn Birrell  * If applicable, add the following below this CDDL HEADER, with the
17d876124dSJohn Birrell  * fields enclosed by brackets "[]" replaced with your own identifying
18d876124dSJohn Birrell  * information: Portions Copyright [yyyy] [name of copyright owner]
19d876124dSJohn Birrell  *
20d876124dSJohn Birrell  * CDDL HEADER END
21d876124dSJohn Birrell  */
22d876124dSJohn Birrell /*
23d876124dSJohn Birrell  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24d876124dSJohn Birrell  * Use is subject to license terms.
25d876124dSJohn Birrell  */
26d876124dSJohn Birrell 
27d876124dSJohn Birrell #ifndef _UTIL_H
28d876124dSJohn Birrell #define	_UTIL_H
29d876124dSJohn Birrell 
30d876124dSJohn Birrell #pragma ident	"%Z%%M%	%I%	%E% SMI"
31d876124dSJohn Birrell 
32d876124dSJohn Birrell #include <libelf.h>
33d876124dSJohn Birrell 
34d876124dSJohn Birrell #ifdef __cplusplus
35d876124dSJohn Birrell extern "C" {
36d876124dSJohn Birrell #endif
37d876124dSJohn Birrell 
38d876124dSJohn Birrell extern int findelfsecidx(Elf *, char *);
39d876124dSJohn Birrell 
40d876124dSJohn Birrell extern void die(char *, ...);
41d876124dSJohn Birrell extern void elfdie(char *, ...);
42d876124dSJohn Birrell 
43*bc96366cSSteven Hartland #ifdef illumos
44d876124dSJohn Birrell extern const char *progname;
450f497243SJohn Birrell #endif
46d876124dSJohn Birrell 
47d876124dSJohn Birrell #ifdef __cplusplus
48d876124dSJohn Birrell }
49d876124dSJohn Birrell #endif
50d876124dSJohn Birrell 
51d876124dSJohn Birrell #endif /* _UTIL_H */
52