avoid pt_regs clash

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2003-02-18 23:00:51 +00:00
parent 31e31b8a24
commit 01ffc75bc9
3 changed files with 6 additions and 8 deletions

2
elf.h
View File

@ -6,7 +6,7 @@
typedef uint32_t elf_greg_t; typedef uint32_t elf_greg_t;
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) #define ELF_NGREG (sizeof (struct target_pt_regs) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct user_i387_struct elf_fpregset_t; typedef struct user_i387_struct elf_fpregset_t;

View File

@ -20,8 +20,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <elf.h>
#include <endian.h>
#include <errno.h> #include <errno.h>
#include "gemu.h" #include "gemu.h"
@ -210,7 +208,7 @@ void usage(void)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
const char *filename; const char *filename;
struct pt_regs regs1, *regs = &regs1; struct target_pt_regs regs1, *regs = &regs1;
struct image_info info1, *info = &info1; struct image_info info1, *info = &info1;
Interp_ENV *env; Interp_ENV *env;
@ -220,12 +218,12 @@ int main(int argc, char **argv)
filename = argv[1]; filename = argv[1];
/* Zero out regs */ /* Zero out regs */
memset(regs, 0, sizeof(struct pt_regs)); memset(regs, 0, sizeof(struct target_pt_regs));
/* Zero out image_info */ /* Zero out image_info */
memset(info, 0, sizeof(struct image_info)); memset(info, 0, sizeof(struct image_info));
if(elf_exec(filename, argv+1, __environ, regs, info) != 0) { if(elf_exec(filename, argv+1, environ, regs, info) != 0) {
printf("Error loading %s\n", filename); printf("Error loading %s\n", filename);
exit(1); exit(1);
} }

View File

@ -3,7 +3,7 @@
#include "thunk.h" #include "thunk.h"
struct pt_regs { struct target_pt_regs {
long ebx; long ebx;
long ecx; long ecx;
long edx; long edx;
@ -44,7 +44,7 @@ struct image_info {
}; };
int elf_exec(const char * filename, char ** argv, char ** envp, int elf_exec(const char * filename, char ** argv, char ** envp,
struct pt_regs * regs, struct image_info *infop); struct target_pt_regs * regs, struct image_info *infop);
void target_set_brk(char *new_brk); void target_set_brk(char *new_brk);
void syscall_init(void); void syscall_init(void);