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, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23/*	  All Rights Reserved  	*/
24
25
26/*
27 * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28 * Use is subject to license terms.
29 */
30
31#ifndef _SYS_ELFTYPES_H
32#define	_SYS_ELFTYPES_H
33
34#pragma ident	"@(#)elftypes.h	1.24	05/06/08 SMI"	/* SVr4.0 1.1	*/
35
36#if !defined(__APPLE__)
37#include <sys/feature_tests.h>
38#else /* is Apple Mac OS X */
39/* NOTHING */ /* In lieu of Solaris <sys/feature_tests.h> */
40
41#if defined(__LP64__)
42#if !defined(_LP64)
43#define _LP64 /* Solaris vs. Darwin */
44#endif
45#else
46#if !defined(_ILP32)
47#define _ILP32 /* Solaris vs. Darwin */
48#endif
49#endif
50
51#if !defined(_LONGLONG_TYPE)
52#define _LONGLONG_TYPE
53#endif
54
55#endif /* __APPLE__ */
56
57#ifdef	__cplusplus
58extern "C" {
59#endif
60
61#if defined(_LP64) || defined(_I32LPx)
62typedef unsigned int		Elf32_Addr;
63typedef unsigned short		Elf32_Half;
64typedef unsigned int		Elf32_Off;
65typedef int			Elf32_Sword;
66typedef unsigned int		Elf32_Word;
67#else
68typedef unsigned long		Elf32_Addr;
69typedef unsigned short		Elf32_Half;
70typedef unsigned long		Elf32_Off;
71typedef long			Elf32_Sword;
72typedef unsigned long		Elf32_Word;
73#endif
74
75#if defined(_LP64)
76typedef unsigned long		Elf64_Addr;
77typedef unsigned short		Elf64_Half;
78typedef unsigned long		Elf64_Off;
79typedef int			Elf64_Sword;
80typedef long			Elf64_Sxword;
81typedef	unsigned int		Elf64_Word;
82typedef	unsigned long		Elf64_Xword;
83typedef unsigned long		Elf64_Lword;
84typedef unsigned long		Elf32_Lword;
85#elif defined(_LONGLONG_TYPE)
86typedef unsigned long long	Elf64_Addr;
87typedef unsigned short		Elf64_Half;
88typedef unsigned long long	Elf64_Off;
89typedef int			Elf64_Sword;
90typedef long long		Elf64_Sxword;
91typedef	unsigned int		Elf64_Word;
92typedef	unsigned long long	Elf64_Xword;
93typedef	unsigned long long	Elf64_Lword;
94typedef unsigned long long	Elf32_Lword;
95#endif
96
97#ifdef	__cplusplus
98}
99#endif
100
101#endif	/* _SYS_ELFTYPES_H */
102