Project

General

Profile

Bug #4555 » 0001-4555-remove-STDC-conditionals-from-libelf.h-fixing-s.patch

Richard PALO, 2014-03-01 10:58 PM

View differences:

usr/src/head/libelf.h
42 42
#error "large files are not supported by libelf"
43 43
#endif
44 44

  
45

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

  
45
typedef void	Elf_Void;
57 46

  
58 47
/*
59 48
 * Commands
......
166 155
/*
167 156
 * Function declarations
168 157
 */
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));
158
Elf		*elf_begin(int, Elf_Cmd, Elf *);
159
int		elf_cntl(Elf *, Elf_Cmd);
160
int		elf_end(Elf *);
161
const char	*elf_errmsg(int);
162
int		elf_errno(void);
163
void		elf_fill(int);
164
unsigned	elf_flagdata(Elf_Data *, Elf_Cmd, unsigned);
165
unsigned	elf_flagehdr(Elf *, Elf_Cmd,  unsigned);
166
unsigned	elf_flagelf(Elf *, Elf_Cmd, unsigned);
167
unsigned	elf_flagphdr(Elf *, Elf_Cmd, unsigned);
168
unsigned	elf_flagscn(Elf_Scn *, Elf_Cmd, unsigned);
169
unsigned	elf_flagshdr(Elf_Scn *, Elf_Cmd, unsigned);
170
size_t		elf32_fsize(Elf_Type, size_t, unsigned);
171
Elf_Arhdr	*elf_getarhdr(Elf *);
172
Elf_Arsym	*elf_getarsym(Elf *, size_t *);
173
off_t		elf_getbase(Elf *);
174
Elf_Data	*elf_getdata(Elf_Scn *, Elf_Data *);
175
Elf32_Ehdr	*elf32_getehdr(Elf *);
176
char		*elf_getident(Elf *, size_t *);
177
Elf32_Phdr	*elf32_getphdr(Elf *);
178
Elf_Scn		*elf_getscn(Elf *elf, size_t);
179
Elf32_Shdr	*elf32_getshdr(Elf_Scn *);
180
int		elf_getphnum(Elf *, size_t *);
181
int		elf_getphdrnum(Elf *, size_t *);
182
int		elf_getshnum(Elf *, size_t *);
183
int		elf_getshdrnum(Elf *, size_t *);
184
int		elf_getshstrndx(Elf *, size_t *);
185
int		elf_getshdrstrndx(Elf *, size_t *);
186
unsigned long	elf_hash(const char *);
187
uint_t		elf_sys_encoding(void);
188
long		elf32_checksum(Elf *);
189
Elf_Kind	elf_kind(Elf *);
190
Elf		*elf_memory(char *, size_t);
191
size_t		elf_ndxscn(Elf_Scn *);
192
Elf_Data	*elf_newdata(Elf_Scn *);
193
Elf32_Ehdr	*elf32_newehdr(Elf *);
194
Elf32_Phdr	*elf32_newphdr(Elf *, size_t);
195
Elf_Scn		*elf_newscn(Elf *);
196
Elf_Scn		*elf_nextscn(Elf *, Elf_Scn *);
197
Elf_Cmd		elf_next(Elf *);
198
size_t		elf_rand(Elf *, size_t);
199
Elf_Data	*elf_rawdata(Elf_Scn *, Elf_Data *);
200
char		*elf_rawfile(Elf *, size_t *);
201
char		*elf_strptr(Elf *, size_t, size_t);
202
off_t		elf_update(Elf *, Elf_Cmd);
203
unsigned	elf_version(unsigned);
204
Elf_Data	*elf32_xlatetof(Elf_Data *, const Elf_Data *, unsigned);
205
Elf_Data	*elf32_xlatetom(Elf_Data *, const Elf_Data *, unsigned);
217 206

  
218 207
#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));
208
size_t		elf64_fsize(Elf_Type, size_t, unsigned);
209
Elf64_Ehdr	*elf64_getehdr(Elf *);
210
Elf64_Phdr	*elf64_getphdr(Elf *);
211
Elf64_Shdr	*elf64_getshdr(Elf_Scn *);
212
long		elf64_checksum(Elf *);
213
Elf64_Ehdr	*elf64_newehdr(Elf *);
214
Elf64_Phdr	*elf64_newphdr(Elf *, size_t);
215
Elf_Data	*elf64_xlatetof(Elf_Data *, const Elf_Data *, unsigned);
216
Elf_Data	*elf64_xlatetom(Elf_Data *, const Elf_Data *, unsigned);
228 217
#endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */
229 218

  
230
#undef	_
231

  
232 219
#ifdef	__cplusplus
233 220
}
234 221
#endif
235
- 
(4-4/4)