Commit 01ffc75bc95e2a7ea7c00dc3d7637b20f02efdef

Authored by bellard
1 parent 31e31b8a

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,7 +6,7 @@
6 6
7 typedef uint32_t elf_greg_t; 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 typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 10 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
11 11
12 typedef struct user_i387_struct elf_fpregset_t; 12 typedef struct user_i387_struct elf_fpregset_t;
linux-user/main.c
@@ -20,8 +20,6 @@ @@ -20,8 +20,6 @@
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <stdio.h> 21 #include <stdio.h>
22 #include <stdarg.h> 22 #include <stdarg.h>
23 -#include <elf.h>  
24 -#include <endian.h>  
25 #include <errno.h> 23 #include <errno.h>
26 24
27 #include "gemu.h" 25 #include "gemu.h"
@@ -210,7 +208,7 @@ void usage(void) @@ -210,7 +208,7 @@ void usage(void)
210 int main(int argc, char **argv) 208 int main(int argc, char **argv)
211 { 209 {
212 const char *filename; 210 const char *filename;
213 - struct pt_regs regs1, *regs = &regs1; 211 + struct target_pt_regs regs1, *regs = &regs1;
214 struct image_info info1, *info = &info1; 212 struct image_info info1, *info = &info1;
215 Interp_ENV *env; 213 Interp_ENV *env;
216 214
@@ -220,12 +218,12 @@ int main(int argc, char **argv) @@ -220,12 +218,12 @@ int main(int argc, char **argv)
220 filename = argv[1]; 218 filename = argv[1];
221 219
222 /* Zero out regs */ 220 /* Zero out regs */
223 - memset(regs, 0, sizeof(struct pt_regs)); 221 + memset(regs, 0, sizeof(struct target_pt_regs));
224 222
225 /* Zero out image_info */ 223 /* Zero out image_info */
226 memset(info, 0, sizeof(struct image_info)); 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 printf("Error loading %s\n", filename); 227 printf("Error loading %s\n", filename);
230 exit(1); 228 exit(1);
231 } 229 }
linux-user/qemu.h
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 #include "thunk.h" 4 #include "thunk.h"
5 5
6 -struct pt_regs { 6 +struct target_pt_regs {
7 long ebx; 7 long ebx;
8 long ecx; 8 long ecx;
9 long edx; 9 long edx;
@@ -44,7 +44,7 @@ struct image_info { @@ -44,7 +44,7 @@ struct image_info {
44 }; 44 };
45 45
46 int elf_exec(const char * filename, char ** argv, char ** envp, 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 void target_set_brk(char *new_brk); 49 void target_set_brk(char *new_brk);
50 void syscall_init(void); 50 void syscall_init(void);