Re: [Qemu-devel] [PATCH] build: Rename all "syscall.h" in target directories to "target_syscall.h".

2016-02-01 Thread Lluís Vilanova
Peter Maydell writes:

> On 29 January 2016 at 18:53, Lluís Vilanova  wrote:
>> This fixes double-definitions in *-user builds when using the UST
>> tracing backend (which indirectly includes the system's "syscall.h").
>> 
>> Signed-off-by: Lluís Vilanova 
>> ---
>> bsd-user/qemu.h   |2 +-
>> linux-user/aarch64/target_syscall.h   |5 +
>> linux-user/alpha/target_syscall.h |5 +
>> linux-user/arm/target_syscall.h   |4 
>> linux-user/cris/target_syscall.h  |0
>> linux-user/i386/target_syscall.h  |5 +
>> linux-user/m68k/target_syscall.h  |4 
>> linux-user/mips/target_syscall.h  |4 
>> linux-user/mips64/target_syscall.h|4 
>> linux-user/openrisc/target_syscall.h  |5 +
>> linux-user/ppc/target_syscall.h   |5 +
>> linux-user/qemu.h |2 +-
>> linux-user/s390x/target_syscall.h |5 +
>> linux-user/sh4/target_syscall.h   |5 +
>> linux-user/sparc/target_syscall.h |5 +
>> linux-user/sparc64/target_syscall.h   |5 +
>> linux-user/unicore32/target_syscall.h |0
>> linux-user/x86_64/target_syscall.h|5 +
>> target-microblaze/target_syscall.h|1 +
>> target-tilegx/target_syscall.h|1 +
>> 20 files changed, 70 insertions(+), 2 deletions(-)
>> rename linux-user/aarch64/{syscall.h => target_syscall.h} (80%)
>> rename linux-user/alpha/{syscall.h => target_syscall.h} (98%)
>> rename linux-user/arm/{syscall.h => target_syscall.h} (93%)
>> rename linux-user/cris/{syscall.h => target_syscall.h} (100%)
>> rename linux-user/i386/{syscall.h => target_syscall.h} (97%)
>> rename linux-user/m68k/{syscall.h => target_syscall.h} (87%)
>> rename linux-user/mips/{syscall.h => target_syscall.h} (99%)
>> rename linux-user/mips64/{syscall.h => target_syscall.h} (99%)
>> rename linux-user/openrisc/{syscall.h => target_syscall.h} (90%)
>> rename linux-user/ppc/{syscall.h => target_syscall.h} (96%)
>> rename linux-user/s390x/{syscall.h => target_syscall.h} (89%)
>> rename linux-user/sh4/{syscall.h => target_syscall.h} (83%)
>> rename linux-user/sparc/{syscall.h => target_syscall.h} (87%)
>> rename linux-user/sparc64/{syscall.h => target_syscall.h} (87%)
>> rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
>> rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)
>> create mode 100644 target-microblaze/target_syscall.h
>> create mode 100644 target-tilegx/target_syscall.h
>> 
>> diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
>> index 735cb40..1a361df 100644
>> --- a/bsd-user/qemu.h
>> +++ b/bsd-user/qemu.h
>> @@ -38,7 +38,7 @@ enum BSDType {
>> extern enum BSDType bsd_type;
>> 
>> #include "syscall_defs.h"
>> -#include "syscall.h"
>> +#include "target_syscall.h"

> If you want to change this you need to rename all the
> bsd-user/*/syscall.h too. Otherwise bsd-user compilation will
> break.

> Personally I think I'd do linux-user in one patch and
> bsd-user in a second patch.

True, my bad (my build did not catch this one). I'll send a v2 series.

Thanks,
  Lluis



[Qemu-devel] [PATCH] build: Rename all "syscall.h" in target directories to "target_syscall.h".

2016-01-29 Thread Lluís Vilanova
This fixes double-definitions in *-user builds when using the UST
tracing backend (which indirectly includes the system's "syscall.h").

Signed-off-by: Lluís Vilanova 
---
 bsd-user/qemu.h   |2 +-
 linux-user/aarch64/target_syscall.h   |5 +
 linux-user/alpha/target_syscall.h |5 +
 linux-user/arm/target_syscall.h   |4 
 linux-user/cris/target_syscall.h  |0 
 linux-user/i386/target_syscall.h  |5 +
 linux-user/m68k/target_syscall.h  |4 
 linux-user/mips/target_syscall.h  |4 
 linux-user/mips64/target_syscall.h|4 
 linux-user/openrisc/target_syscall.h  |5 +
 linux-user/ppc/target_syscall.h   |5 +
 linux-user/qemu.h |2 +-
 linux-user/s390x/target_syscall.h |5 +
 linux-user/sh4/target_syscall.h   |5 +
 linux-user/sparc/target_syscall.h |5 +
 linux-user/sparc64/target_syscall.h   |5 +
 linux-user/unicore32/target_syscall.h |0 
 linux-user/x86_64/target_syscall.h|5 +
 target-microblaze/target_syscall.h|1 +
 target-tilegx/target_syscall.h|1 +
 20 files changed, 70 insertions(+), 2 deletions(-)
 rename linux-user/aarch64/{syscall.h => target_syscall.h} (80%)
 rename linux-user/alpha/{syscall.h => target_syscall.h} (98%)
 rename linux-user/arm/{syscall.h => target_syscall.h} (93%)
 rename linux-user/cris/{syscall.h => target_syscall.h} (100%)
 rename linux-user/i386/{syscall.h => target_syscall.h} (97%)
 rename linux-user/m68k/{syscall.h => target_syscall.h} (87%)
 rename linux-user/mips/{syscall.h => target_syscall.h} (99%)
 rename linux-user/mips64/{syscall.h => target_syscall.h} (99%)
 rename linux-user/openrisc/{syscall.h => target_syscall.h} (90%)
 rename linux-user/ppc/{syscall.h => target_syscall.h} (96%)
 rename linux-user/s390x/{syscall.h => target_syscall.h} (89%)
 rename linux-user/sh4/{syscall.h => target_syscall.h} (83%)
 rename linux-user/sparc/{syscall.h => target_syscall.h} (87%)
 rename linux-user/sparc64/{syscall.h => target_syscall.h} (87%)
 rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
 rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)
 create mode 100644 target-microblaze/target_syscall.h
 create mode 100644 target-tilegx/target_syscall.h

diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 735cb40..1a361df 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -38,7 +38,7 @@ enum BSDType {
 extern enum BSDType bsd_type;
 
 #include "syscall_defs.h"
-#include "syscall.h"
+#include "target_syscall.h"
 #include "target_signal.h"
 #include "exec/gdbstub.h"
 
diff --git a/linux-user/aarch64/syscall.h b/linux-user/aarch64/target_syscall.h
similarity index 80%
rename from linux-user/aarch64/syscall.h
rename to linux-user/aarch64/target_syscall.h
index dc72a15..f458018 100644
--- a/linux-user/aarch64/syscall.h
+++ b/linux-user/aarch64/target_syscall.h
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 uint64_tregs[31];
 uint64_tsp;
@@ -11,3 +14,5 @@ struct target_pt_regs {
 #define TARGET_MINSIGSTKSZ   2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
diff --git a/linux-user/alpha/syscall.h b/linux-user/alpha/target_syscall.h
similarity index 98%
rename from linux-user/alpha/syscall.h
rename to linux-user/alpha/target_syscall.h
index 245cff2..3db4b16 100644
--- a/linux-user/alpha/syscall.h
+++ b/linux-user/alpha/target_syscall.h
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_DS  (1)
 
@@ -255,3 +258,5 @@ struct target_pt_regs {
 #define TARGET_MINSIGSTKSZ  4096
 #define TARGET_MLOCKALL_MCL_CURRENT 0x2000
 #define TARGET_MLOCKALL_MCL_FUTURE  0x4000
+
+#endif  /* TARGET_SYSCALL_H */
diff --git a/linux-user/arm/syscall.h b/linux-user/arm/target_syscall.h
similarity index 93%
rename from linux-user/arm/syscall.h
rename to linux-user/arm/target_syscall.h
index 3844a96..ea863db 100644
--- a/linux-user/arm/syscall.h
+++ b/linux-user/arm/target_syscall.h
@@ -1,3 +1,5 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
 
 /* this struct defines the way the registers are stored on the
stack during a system call. */
@@ -48,3 +50,5 @@ struct target_pt_regs {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
diff --git a/linux-user/cris/syscall.h b/linux-user/cris/target_syscall.h
similarity index 100%
rename from linux-user/cris/syscall.h
rename to linux-user/cris/target_syscall.h
diff --git a/linux-user/i386/syscall.h b/linux-user/i386/target_syscall.h
similarity index 97%
rename from linux-user/i386/syscall.h
rename to linux-user/i386/target_syscall.h
index 906aaac..0ac84dc 100644

Re: [Qemu-devel] [PATCH] build: Rename all "syscall.h" in target directories to "target_syscall.h".

2016-01-29 Thread Peter Maydell
On 29 January 2016 at 18:53, Lluís Vilanova  wrote:
> This fixes double-definitions in *-user builds when using the UST
> tracing backend (which indirectly includes the system's "syscall.h").
>
> Signed-off-by: Lluís Vilanova 
> ---
>  bsd-user/qemu.h   |2 +-
>  linux-user/aarch64/target_syscall.h   |5 +
>  linux-user/alpha/target_syscall.h |5 +
>  linux-user/arm/target_syscall.h   |4 
>  linux-user/cris/target_syscall.h  |0
>  linux-user/i386/target_syscall.h  |5 +
>  linux-user/m68k/target_syscall.h  |4 
>  linux-user/mips/target_syscall.h  |4 
>  linux-user/mips64/target_syscall.h|4 
>  linux-user/openrisc/target_syscall.h  |5 +
>  linux-user/ppc/target_syscall.h   |5 +
>  linux-user/qemu.h |2 +-
>  linux-user/s390x/target_syscall.h |5 +
>  linux-user/sh4/target_syscall.h   |5 +
>  linux-user/sparc/target_syscall.h |5 +
>  linux-user/sparc64/target_syscall.h   |5 +
>  linux-user/unicore32/target_syscall.h |0
>  linux-user/x86_64/target_syscall.h|5 +
>  target-microblaze/target_syscall.h|1 +
>  target-tilegx/target_syscall.h|1 +
>  20 files changed, 70 insertions(+), 2 deletions(-)
>  rename linux-user/aarch64/{syscall.h => target_syscall.h} (80%)
>  rename linux-user/alpha/{syscall.h => target_syscall.h} (98%)
>  rename linux-user/arm/{syscall.h => target_syscall.h} (93%)
>  rename linux-user/cris/{syscall.h => target_syscall.h} (100%)
>  rename linux-user/i386/{syscall.h => target_syscall.h} (97%)
>  rename linux-user/m68k/{syscall.h => target_syscall.h} (87%)
>  rename linux-user/mips/{syscall.h => target_syscall.h} (99%)
>  rename linux-user/mips64/{syscall.h => target_syscall.h} (99%)
>  rename linux-user/openrisc/{syscall.h => target_syscall.h} (90%)
>  rename linux-user/ppc/{syscall.h => target_syscall.h} (96%)
>  rename linux-user/s390x/{syscall.h => target_syscall.h} (89%)
>  rename linux-user/sh4/{syscall.h => target_syscall.h} (83%)
>  rename linux-user/sparc/{syscall.h => target_syscall.h} (87%)
>  rename linux-user/sparc64/{syscall.h => target_syscall.h} (87%)
>  rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
>  rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)
>  create mode 100644 target-microblaze/target_syscall.h
>  create mode 100644 target-tilegx/target_syscall.h
>
> diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
> index 735cb40..1a361df 100644
> --- a/bsd-user/qemu.h
> +++ b/bsd-user/qemu.h
> @@ -38,7 +38,7 @@ enum BSDType {
>  extern enum BSDType bsd_type;
>
>  #include "syscall_defs.h"
> -#include "syscall.h"
> +#include "target_syscall.h"

If you want to change this you need to rename all the
bsd-user/*/syscall.h too. Otherwise bsd-user compilation will
break.

Personally I think I'd do linux-user in one patch and
bsd-user in a second patch.

thanks
-- PMM