Revision | 01ffc75bc95e2a7ea7c00dc3d7637b20f02efdef (tree) |
---|---|
Time | 2003-02-19 08:00:51 |
Author | bellard <bellard@c046...> |
Commiter | bellard |
avoid pt_regs clash
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5 c046a42c-6fe2-441c-8c8c-71466251a162
@@ -6,7 +6,7 @@ | ||
6 | 6 | |
7 | 7 | typedef uint32_t elf_greg_t; |
8 | 8 | |
9 | -#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) | |
9 | +#define ELF_NGREG (sizeof (struct target_pt_regs) / sizeof(elf_greg_t)) | |
10 | 10 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
11 | 11 | |
12 | 12 | typedef struct user_i387_struct elf_fpregset_t; |
@@ -20,8 +20,6 @@ | ||
20 | 20 | #include <stdlib.h> |
21 | 21 | #include <stdio.h> |
22 | 22 | #include <stdarg.h> |
23 | -#include <elf.h> | |
24 | -#include <endian.h> | |
25 | 23 | #include <errno.h> |
26 | 24 | |
27 | 25 | #include "gemu.h" |
@@ -210,7 +208,7 @@ void usage(void) | ||
210 | 208 | int main(int argc, char **argv) |
211 | 209 | { |
212 | 210 | const char *filename; |
213 | - struct pt_regs regs1, *regs = ®s1; | |
211 | + struct target_pt_regs regs1, *regs = ®s1; | |
214 | 212 | struct image_info info1, *info = &info1; |
215 | 213 | Interp_ENV *env; |
216 | 214 |
@@ -220,12 +218,12 @@ int main(int argc, char **argv) | ||
220 | 218 | filename = argv[1]; |
221 | 219 | |
222 | 220 | /* Zero out regs */ |
223 | - memset(regs, 0, sizeof(struct pt_regs)); | |
221 | + memset(regs, 0, sizeof(struct target_pt_regs)); | |
224 | 222 | |
225 | 223 | /* Zero out image_info */ |
226 | 224 | memset(info, 0, sizeof(struct image_info)); |
227 | 225 | |
228 | - if(elf_exec(filename, argv+1, __environ, regs, info) != 0) { | |
226 | + if(elf_exec(filename, argv+1, environ, regs, info) != 0) { | |
229 | 227 | printf("Error loading %s\n", filename); |
230 | 228 | exit(1); |
231 | 229 | } |
@@ -3,7 +3,7 @@ | ||
3 | 3 | |
4 | 4 | #include "thunk.h" |
5 | 5 | |
6 | -struct pt_regs { | |
6 | +struct target_pt_regs { | |
7 | 7 | long ebx; |
8 | 8 | long ecx; |
9 | 9 | long edx; |
@@ -44,7 +44,7 @@ struct image_info { | ||
44 | 44 | }; |
45 | 45 | |
46 | 46 | int elf_exec(const char * filename, char ** argv, char ** envp, |
47 | - struct pt_regs * regs, struct image_info *infop); | |
47 | + struct target_pt_regs * regs, struct image_info *infop); | |
48 | 48 | |
49 | 49 | void target_set_brk(char *new_brk); |
50 | 50 | void syscall_init(void); |