• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision01ffc75bc95e2a7ea7c00dc3d7637b20f02efdef (tree)
Time2003-02-19 08:00:51
Authorbellard <bellard@c046...>
Commiterbellard

Log Message

avoid pt_regs clash

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5 c046a42c-6fe2-441c-8c8c-71466251a162

Change Summary

Incremental Difference

--- a/elf.h
+++ b/elf.h
@@ -6,7 +6,7 @@
66
77 typedef uint32_t elf_greg_t;
88
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))
1010 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
1111
1212 typedef struct user_i387_struct elf_fpregset_t;
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -20,8 +20,6 @@
2020 #include <stdlib.h>
2121 #include <stdio.h>
2222 #include <stdarg.h>
23-#include <elf.h>
24-#include <endian.h>
2523 #include <errno.h>
2624
2725 #include "gemu.h"
@@ -210,7 +208,7 @@ void usage(void)
210208 int main(int argc, char **argv)
211209 {
212210 const char *filename;
213- struct pt_regs regs1, *regs = &regs1;
211+ struct target_pt_regs regs1, *regs = &regs1;
214212 struct image_info info1, *info = &info1;
215213 Interp_ENV *env;
216214
@@ -220,12 +218,12 @@ int main(int argc, char **argv)
220218 filename = argv[1];
221219
222220 /* Zero out regs */
223- memset(regs, 0, sizeof(struct pt_regs));
221+ memset(regs, 0, sizeof(struct target_pt_regs));
224222
225223 /* Zero out image_info */
226224 memset(info, 0, sizeof(struct image_info));
227225
228- if(elf_exec(filename, argv+1, __environ, regs, info) != 0) {
226+ if(elf_exec(filename, argv+1, environ, regs, info) != 0) {
229227 printf("Error loading %s\n", filename);
230228 exit(1);
231229 }
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -3,7 +3,7 @@
33
44 #include "thunk.h"
55
6-struct pt_regs {
6+struct target_pt_regs {
77 long ebx;
88 long ecx;
99 long edx;
@@ -44,7 +44,7 @@ struct image_info {
4444 };
4545
4646 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);
4848
4949 void target_set_brk(char *new_brk);
5050 void syscall_init(void);