Project

General

Profile

Bug #4555 » 0001-4555-fix-side-effects-of-macro-redefinitions-in-libe.patch

Richard PALO, 2014-02-08 08:29 AM

View differences:

usr/src/head/libelf.h
43 43
#endif
44 44

  
45 45

  
46
#undef _
47 46
#ifdef __STDC__
48 47
typedef void		Elf_Void;
49
#define	_(a)		a
48
#define	__ELF_(a)	a
49
#define	__ELF_CONST	const
50 50
#else
51 51
typedef char		Elf_Void;
52
#define	_(a)		()
53
#undef const
54
#define	const
52
#define	__ELF_(a)	()
53
#define	__ELF_CONST
55 54
#endif
56 55

  
57 56

  
......
166 165
/*
167 166
 * Function declarations
168 167
 */
169
Elf		*elf_begin	_((int, Elf_Cmd, Elf *));
170
int		elf_cntl	_((Elf *, Elf_Cmd));
171
int		elf_end		_((Elf *));
172
const char	*elf_errmsg	_((int));
173
int		elf_errno	_((void));
174
void		elf_fill	_((int));
175
unsigned	elf_flagdata	_((Elf_Data *, Elf_Cmd, unsigned));
176
unsigned	elf_flagehdr	_((Elf *, Elf_Cmd,  unsigned));
177
unsigned	elf_flagelf	_((Elf *, Elf_Cmd, unsigned));
178
unsigned	elf_flagphdr	_((Elf *, Elf_Cmd, unsigned));
179
unsigned	elf_flagscn	_((Elf_Scn *, Elf_Cmd, unsigned));
180
unsigned	elf_flagshdr	_((Elf_Scn *, Elf_Cmd, unsigned));
181
size_t		elf32_fsize	_((Elf_Type, size_t, unsigned));
182
Elf_Arhdr	*elf_getarhdr	_((Elf *));
183
Elf_Arsym	*elf_getarsym	_((Elf *, size_t *));
184
off_t		elf_getbase	_((Elf *));
185
Elf_Data	*elf_getdata	_((Elf_Scn *, Elf_Data *));
186
Elf32_Ehdr	*elf32_getehdr	_((Elf *));
187
char		*elf_getident	_((Elf *, size_t *));
188
Elf32_Phdr	*elf32_getphdr	_((Elf *));
189
Elf_Scn		*elf_getscn	_((Elf *elf, size_t));
190
Elf32_Shdr	*elf32_getshdr	_((Elf_Scn *));
191
int		elf_getphnum	_((Elf *, size_t *));
192
int		elf_getphdrnum	_((Elf *, size_t *));
193
int		elf_getshnum	_((Elf *, size_t *));
194
int		elf_getshdrnum	_((Elf *, size_t *));
195
int		elf_getshstrndx	_((Elf *, size_t *));
196
int		elf_getshdrstrndx _((Elf *, size_t *));
197
unsigned long	elf_hash	_((const char *));
198
uint_t		elf_sys_encoding _((void));
199
long		elf32_checksum	_((Elf *));
200
Elf_Kind	elf_kind	_((Elf *));
201
Elf		*elf_memory	_((char *, size_t));
202
size_t		elf_ndxscn	_((Elf_Scn *));
203
Elf_Data	*elf_newdata	_((Elf_Scn *));
204
Elf32_Ehdr	*elf32_newehdr	_((Elf *));
205
Elf32_Phdr	*elf32_newphdr	_((Elf *, size_t));
206
Elf_Scn		*elf_newscn	_((Elf *));
207
Elf_Scn		*elf_nextscn	_((Elf *, Elf_Scn *));
208
Elf_Cmd		elf_next	_((Elf *));
209
size_t		elf_rand	_((Elf *, size_t));
210
Elf_Data	*elf_rawdata	_((Elf_Scn *, Elf_Data *));
211
char		*elf_rawfile	_((Elf *, size_t *));
212
char		*elf_strptr	_((Elf *, size_t, size_t));
213
off_t		elf_update	_((Elf *, Elf_Cmd));
214
unsigned	elf_version	_((unsigned));
215
Elf_Data	*elf32_xlatetof	_((Elf_Data *, const Elf_Data *, unsigned));
216
Elf_Data	*elf32_xlatetom	_((Elf_Data *, const Elf_Data *, unsigned));
168
Elf		*elf_begin	__ELF_((int, Elf_Cmd, Elf *));
169
int		elf_cntl	__ELF_((Elf *, Elf_Cmd));
170
int		elf_end		__ELF_((Elf *));
171
__ELF_CONST char	*elf_errmsg	__ELF_((int));
172
int		elf_errno	__ELF_((void));
173
void		elf_fill	__ELF_((int));
174
unsigned	elf_flagdata	__ELF_((Elf_Data *, Elf_Cmd, unsigned));
175
unsigned	elf_flagehdr	__ELF_((Elf *, Elf_Cmd,  unsigned));
176
unsigned	elf_flagelf	__ELF_((Elf *, Elf_Cmd, unsigned));
177
unsigned	elf_flagphdr	__ELF_((Elf *, Elf_Cmd, unsigned));
178
unsigned	elf_flagscn	__ELF_((Elf_Scn *, Elf_Cmd, unsigned));
179
unsigned	elf_flagshdr	__ELF_((Elf_Scn *, Elf_Cmd, unsigned));
180
size_t		elf32_fsize	__ELF_((Elf_Type, size_t, unsigned));
181
Elf_Arhdr	*elf_getarhdr	__ELF_((Elf *));
182
Elf_Arsym	*elf_getarsym	__ELF_((Elf *, size_t *));
183
off_t		elf_getbase	__ELF_((Elf *));
184
Elf_Data	*elf_getdata	__ELF_((Elf_Scn *, Elf_Data *));
185
Elf32_Ehdr	*elf32_getehdr	__ELF_((Elf *));
186
char		*elf_getident	__ELF_((Elf *, size_t *));
187
Elf32_Phdr	*elf32_getphdr	__ELF_((Elf *));
188
Elf_Scn		*elf_getscn	__ELF_((Elf *elf, size_t));
189
Elf32_Shdr	*elf32_getshdr	__ELF_((Elf_Scn *));
190
int		elf_getphnum	__ELF_((Elf *, size_t *));
191
int		elf_getphdrnum	__ELF_((Elf *, size_t *));
192
int		elf_getshnum	__ELF_((Elf *, size_t *));
193
int		elf_getshdrnum	__ELF_((Elf *, size_t *));
194
int		elf_getshstrndx	__ELF_((Elf *, size_t *));
195
int		elf_getshdrstrndx __ELF_((Elf *, size_t *));
196
unsigned long	elf_hash	__ELF_((__ELF_CONST char *));
197
uint_t		elf_sys_encoding __ELF_((void));
198
long		elf32_checksum	__ELF_((Elf *));
199
Elf_Kind	elf_kind	__ELF_((Elf *));
200
Elf		*elf_memory	__ELF_((char *, size_t));
201
size_t		elf_ndxscn	__ELF_((Elf_Scn *));
202
Elf_Data	*elf_newdata	__ELF_((Elf_Scn *));
203
Elf32_Ehdr	*elf32_newehdr	__ELF_((Elf *));
204
Elf32_Phdr	*elf32_newphdr	__ELF_((Elf *, size_t));
205
Elf_Scn		*elf_newscn	__ELF_((Elf *));
206
Elf_Scn		*elf_nextscn	__ELF_((Elf *, Elf_Scn *));
207
Elf_Cmd		elf_next	__ELF_((Elf *));
208
size_t		elf_rand	__ELF_((Elf *, size_t));
209
Elf_Data	*elf_rawdata	__ELF_((Elf_Scn *, Elf_Data *));
210
char		*elf_rawfile	__ELF_((Elf *, size_t *));
211
char		*elf_strptr	__ELF_((Elf *, size_t, size_t));
212
off_t		elf_update	__ELF_((Elf *, Elf_Cmd));
213
unsigned	elf_version	__ELF_((unsigned));
214
Elf_Data	*elf32_xlatetof	__ELF_((Elf_Data *, __ELF_CONST Elf_Data *, unsigned));
215
Elf_Data	*elf32_xlatetom	__ELF_((Elf_Data *, __ELF_CONST Elf_Data *, unsigned));
217 216

  
218 217
#if defined(_LP64) || defined(_LONGLONG_TYPE)
219
size_t		elf64_fsize	_((Elf_Type, size_t, unsigned));
220
Elf64_Ehdr	*elf64_getehdr	_((Elf *));
221
Elf64_Phdr	*elf64_getphdr	_((Elf *));
222
Elf64_Shdr	*elf64_getshdr	_((Elf_Scn *));
223
long		elf64_checksum	_((Elf *));
224
Elf64_Ehdr	*elf64_newehdr	_((Elf *));
225
Elf64_Phdr	*elf64_newphdr	_((Elf *, size_t));
226
Elf_Data	*elf64_xlatetof	_((Elf_Data *, const Elf_Data *, unsigned));
227
Elf_Data	*elf64_xlatetom	_((Elf_Data *, const Elf_Data *, unsigned));
218
size_t		elf64_fsize	__ELF_((Elf_Type, size_t, unsigned));
219
Elf64_Ehdr	*elf64_getehdr	__ELF_((Elf *));
220
Elf64_Phdr	*elf64_getphdr	__ELF_((Elf *));
221
Elf64_Shdr	*elf64_getshdr	__ELF_((Elf_Scn *));
222
long		elf64_checksum	__ELF_((Elf *));
223
Elf64_Ehdr	*elf64_newehdr	__ELF_((Elf *));
224
Elf64_Phdr	*elf64_newphdr	__ELF_((Elf *, size_t));
225
Elf_Data	*elf64_xlatetof	__ELF_((Elf_Data *, __ELF_CONST Elf_Data *, unsigned));
226
Elf_Data	*elf64_xlatetom	__ELF_((Elf_Data *, __ELF_CONST Elf_Data *, unsigned));
228 227
#endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */
229 228

  
230
#undef	_
229
#undef	__ELF_
231 230

  
232 231
#ifdef	__cplusplus
233 232
}
234
- 
(2-2/4)