Skip to contentSkip to conversation

build: Rename all "syscall.h" in target directories to "target_syscall.h"

PATCH Applied Lluís Vilanova 3 participants 7 messages Feb 1, 2016 – Feb 25, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover build: Rename all "syscall.h" in target directories to "target_syscall.h"

This fixes double-definitions in *-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

Changes in v3
=============

* Fix stray new files in generic target code [Peter Maydell].

Changes in v2
=============

* Fix includes for bsd-user too [Peter Maydell].

---

Lluís Vilanova (2):
build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories
build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

 bsd-user/i386/target_syscall.h         |    4 ++++
 bsd-user/qemu.h                        |    2 +-
 bsd-user/sparc/target_syscall.h        |    5 +++++
 bsd-user/sparc64/target_syscall.h      |    5 +++++
 bsd-user/x86_64/target_syscall.h       |    5 +++++
 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/microblaze/target_syscall.h |    0 
 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/tilegx/target_syscall.h     |    0 
 linux-user/unicore32/target_syscall.h  |    0 
 linux-user/x86_64/target_syscall.h     |    5 +++++
 24 files changed, 87 insertions(+), 2 deletions(-)
 rename bsd-user/i386/{syscall.h => target_syscall.h} (97%)
 rename bsd-user/sparc/{syscall.h => target_syscall.h} (62%)
 rename bsd-user/sparc64/{syscall.h => target_syscall.h} (66%)
 rename bsd-user/x86_64/{syscall.h => target_syscall.h} (97%)
 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/microblaze/{syscall.h => target_syscall.h} (100%)
 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/tilegx/{syscall.h => target_syscall.h} (100%)
 rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
 rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)

To: [email protected]
Cc: Peter Maydell <[email protected]>

#1 lore raw

PATCH v3 1/2 build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories

This fixes double-definitions in linux-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

---
 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/microblaze/target_syscall.h |    0 
 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/tilegx/target_syscall.h     |    0 
 linux-user/unicore32/target_syscall.h  |    0 
 linux-user/x86_64/target_syscall.h     |    5 +++++
 19 files changed, 67 insertions(+), 1 deletion(-)
 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/microblaze/{syscall.h => target_syscall.h} (100%)
 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/tilegx/{syscall.h => target_syscall.h} (100%)
 rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
 rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)
linux-user/aarch64/target_syscall.h renamed from linux-user/aarch64/syscall.h +5 -0
similarity index 80%
rename from linux-user/aarch64/syscall.h
rename to linux-user/aarch64/target_syscall.h
index dc72a15..f458018 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
     uint64_t        regs[31];
     uint64_t        sp;
@@ -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 */
linux-user/alpha/target_syscall.h renamed from linux-user/alpha/syscall.h +5 -0
similarity index 98%
rename from linux-user/alpha/syscall.h
rename to linux-user/alpha/target_syscall.h
index 245cff2..3db4b16 100644
@@ -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 */
linux-user/arm/target_syscall.h renamed from linux-user/arm/syscall.h +4 -0
similarity index 93%
rename from linux-user/arm/syscall.h
rename to linux-user/arm/target_syscall.h
index 3844a96..ea863db 100644
@@ -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 */
linux-user/cris/target_syscall.h renamed from linux-user/cris/syscall.h +0 -0
similarity index 100%
rename from linux-user/cris/syscall.h
rename to linux-user/cris/target_syscall.h
linux-user/i386/target_syscall.h renamed from linux-user/i386/syscall.h +5 -0
similarity index 97%
rename from linux-user/i386/syscall.h
rename to linux-user/i386/target_syscall.h
index 906aaac..0ac84dc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_CS	(0x23)
 #define __USER_DS	(0x2B)
@@ -150,3 +153,5 @@ struct target_vm86plus_struct {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/m68k/target_syscall.h renamed from linux-user/m68k/syscall.h +4 -0
similarity index 87%
rename from linux-user/m68k/syscall.h
rename to linux-user/m68k/target_syscall.h
index 9218493..97a4cc0 100644
@@ -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. */
@@ -23,3 +25,5 @@ struct target_pt_regs {
 #define TARGET_MLOCKALL_MCL_FUTURE  2
 
 void do_m68k_simcall(CPUM68KState *, int);
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/microblaze/target_syscall.h renamed from linux-user/microblaze/syscall.h +0 -0
similarity index 100%
rename from linux-user/microblaze/syscall.h
rename to linux-user/microblaze/target_syscall.h
linux-user/mips/target_syscall.h renamed from linux-user/mips/syscall.h +4 -0
similarity index 99%
rename from linux-user/mips/syscall.h
rename to linux-user/mips/target_syscall.h
index 35ca23b..68db160 100644
@@ -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. */
@@ -231,3 +233,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 */
linux-user/mips64/target_syscall.h renamed from linux-user/mips64/syscall.h +4 -0
similarity index 99%
rename from linux-user/mips64/syscall.h
rename to linux-user/mips64/target_syscall.h
index 6733107..0e0c2d2 100644
@@ -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. */
@@ -228,3 +230,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 */
linux-user/openrisc/target_syscall.h renamed from linux-user/openrisc/syscall.h +5 -0
similarity index 90%
rename from linux-user/openrisc/syscall.h
rename to linux-user/openrisc/target_syscall.h
index 8ac0365..19aeffc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
     union {
         struct {
@@ -27,3 +30,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 */
linux-user/ppc/target_syscall.h renamed from linux-user/ppc/syscall.h +5 -0
similarity index 96%
rename from linux-user/ppc/syscall.h
rename to linux-user/ppc/target_syscall.h
index 0daf5cd..35cab59 100644
@@ -17,6 +17,9 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* XXX: ABSOLUTELY BUGGY:
  * for now, this is quite just a cut-and-paste from i386 target...
  */
@@ -73,3 +76,5 @@ struct target_revectored_struct {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 0x2000
 #define TARGET_MLOCKALL_MCL_FUTURE  0x4000
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/qemu.h +1 -1
index bd90cc3..1be04e2 100644
@@ -16,7 +16,7 @@
 
 #include "exec/user/thunk.h"
 #include "syscall_defs.h"
-#include "syscall.h"
+#include "target_syscall.h"
 #include "exec/gdbstub.h"
 #include "qemu/queue.h"
 
linux-user/s390x/target_syscall.h renamed from linux-user/s390x/syscall.h +5 -0
similarity index 89%
rename from linux-user/s390x/syscall.h
rename to linux-user/s390x/target_syscall.h
index 35f170a..02061ef 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* this typedef defines how a Program Status Word looks like */
 typedef struct {
     abi_ulong mask;
@@ -27,3 +30,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 */
linux-user/sh4/target_syscall.h renamed from linux-user/sh4/syscall.h +5 -0
similarity index 83%
rename from linux-user/sh4/syscall.h
rename to linux-user/sh4/target_syscall.h
index 7aa4f23..9f3381b 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
         unsigned long regs[16];
         unsigned long pc;
@@ -15,3 +18,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 */
linux-user/sparc/target_syscall.h renamed from linux-user/sparc/syscall.h +5 -0
similarity index 87%
rename from linux-user/sparc/syscall.h
rename to linux-user/sparc/target_syscall.h
index 58573b9..a73fa6d 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong psr;
 	abi_ulong pc;
@@ -18,3 +21,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 */
linux-user/sparc64/target_syscall.h renamed from linux-user/sparc64/syscall.h +5 -0
similarity index 87%
rename from linux-user/sparc64/syscall.h
rename to linux-user/sparc64/target_syscall.h
index 8398d3f..eb827fc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong u_regs[16];
 	abi_ulong tstate;
@@ -19,3 +22,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 */
linux-user/tilegx/target_syscall.h renamed from linux-user/tilegx/syscall.h +0 -0
similarity index 100%
rename from linux-user/tilegx/syscall.h
rename to linux-user/tilegx/target_syscall.h
linux-user/unicore32/target_syscall.h renamed from linux-user/unicore32/syscall.h +0 -0
similarity index 100%
rename from linux-user/unicore32/syscall.h
rename to linux-user/unicore32/target_syscall.h
linux-user/x86_64/target_syscall.h renamed from linux-user/x86_64/syscall.h +5 -0
similarity index 96%
rename from linux-user/x86_64/syscall.h
rename to linux-user/x86_64/target_syscall.h
index 88b3c3f..feecd32 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 #define __USER_CS	(0x33)
 #define __USER_DS	(0x2B)
 
@@ -100,3 +103,5 @@ struct target_msqid64_ds {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
Reviewed-by on v3 1/2
#2 lore raw

Re: [Qemu-devel] [PATCH v3 1/2] build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories

Quoted 5 lines · Lluís Vilanova

This fixes double-definitions in linux-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

---

thanks
-- PMM

Applied
#3 lore raw

Re: [Qemu-devel] [PATCH v3 1/2] build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories

In reply to Lluís Vilanova
Quoted 2 lines · Lluís Vilanova

This fixes double-definitions in linux-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

Applied to linux-user, thanks

Quoted 353 lines
---
 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/microblaze/target_syscall.h |    0 
 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/tilegx/target_syscall.h     |    0 
 linux-user/unicore32/target_syscall.h  |    0 
 linux-user/x86_64/target_syscall.h     |    5 +++++
 19 files changed, 67 insertions(+), 1 deletion(-)
 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/microblaze/{syscall.h => target_syscall.h} (100%)
 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/tilegx/{syscall.h => target_syscall.h} (100%)
 rename linux-user/unicore32/{syscall.h => target_syscall.h} (100%)
 rename linux-user/x86_64/{syscall.h => target_syscall.h} (96%)
linux-user/aarch64/target_syscall.h renamed from linux-user/aarch64/syscall.h +5 -0
similarity index 80%
rename from linux-user/aarch64/syscall.h
rename to linux-user/aarch64/target_syscall.h
index dc72a15..f458018 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
     uint64_t        regs[31];
     uint64_t        sp;
@@ -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 */
linux-user/alpha/target_syscall.h renamed from linux-user/alpha/syscall.h +5 -0
similarity index 98%
rename from linux-user/alpha/syscall.h
rename to linux-user/alpha/target_syscall.h
index 245cff2..3db4b16 100644
@@ -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 */
linux-user/arm/target_syscall.h renamed from linux-user/arm/syscall.h +4 -0
similarity index 93%
rename from linux-user/arm/syscall.h
rename to linux-user/arm/target_syscall.h
index 3844a96..ea863db 100644
@@ -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 */
linux-user/cris/target_syscall.h renamed from linux-user/cris/syscall.h +0 -0
similarity index 100%
rename from linux-user/cris/syscall.h
rename to linux-user/cris/target_syscall.h
linux-user/i386/target_syscall.h renamed from linux-user/i386/syscall.h +5 -0
similarity index 97%
rename from linux-user/i386/syscall.h
rename to linux-user/i386/target_syscall.h
index 906aaac..0ac84dc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_CS	(0x23)
 #define __USER_DS	(0x2B)
@@ -150,3 +153,5 @@ struct target_vm86plus_struct {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/m68k/target_syscall.h renamed from linux-user/m68k/syscall.h +4 -0
similarity index 87%
rename from linux-user/m68k/syscall.h
rename to linux-user/m68k/target_syscall.h
index 9218493..97a4cc0 100644
@@ -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. */
@@ -23,3 +25,5 @@ struct target_pt_regs {
 #define TARGET_MLOCKALL_MCL_FUTURE  2
 
 void do_m68k_simcall(CPUM68KState *, int);
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/microblaze/target_syscall.h renamed from linux-user/microblaze/syscall.h +0 -0
similarity index 100%
rename from linux-user/microblaze/syscall.h
rename to linux-user/microblaze/target_syscall.h
linux-user/mips/target_syscall.h renamed from linux-user/mips/syscall.h +4 -0
similarity index 99%
rename from linux-user/mips/syscall.h
rename to linux-user/mips/target_syscall.h
index 35ca23b..68db160 100644
@@ -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. */
@@ -231,3 +233,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 */
linux-user/mips64/target_syscall.h renamed from linux-user/mips64/syscall.h +4 -0
similarity index 99%
rename from linux-user/mips64/syscall.h
rename to linux-user/mips64/target_syscall.h
index 6733107..0e0c2d2 100644
@@ -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. */
@@ -228,3 +230,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 */
linux-user/openrisc/target_syscall.h renamed from linux-user/openrisc/syscall.h +5 -0
similarity index 90%
rename from linux-user/openrisc/syscall.h
rename to linux-user/openrisc/target_syscall.h
index 8ac0365..19aeffc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
     union {
         struct {
@@ -27,3 +30,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 */
linux-user/ppc/target_syscall.h renamed from linux-user/ppc/syscall.h +0 -0
similarity index 96%
rename from linux-user/ppc/syscall.h
rename to linux-user/ppc/target_syscall.h
index 0daf5cd..35cab59 100644
@@ -17,6 +17,9 @@
  * License along with this library; if not, see 

<http://www.gnu.org/licenses/>.
*/

linux-user/ppc/target_syscall.h renamed from linux-user/ppc/syscall.h +5 -0
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* XXX: ABSOLUTELY BUGGY:
  * for now, this is quite just a cut-and-paste from i386 target...
  */
@@ -73,3 +76,5 @@ struct target_revectored_struct {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 0x2000
 #define TARGET_MLOCKALL_MCL_FUTURE  0x4000
+
+#endif  /* TARGET_SYSCALL_H */
linux-user/qemu.h +1 -1
index bd90cc3..1be04e2 100644
@@ -16,7 +16,7 @@
 
 #include "exec/user/thunk.h"
 #include "syscall_defs.h"
-#include "syscall.h"
+#include "target_syscall.h"
 #include "exec/gdbstub.h"
 #include "qemu/queue.h"
 
linux-user/s390x/target_syscall.h renamed from linux-user/s390x/syscall.h +5 -0
similarity index 89%
rename from linux-user/s390x/syscall.h
rename to linux-user/s390x/target_syscall.h
index 35f170a..02061ef 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* this typedef defines how a Program Status Word looks like */
 typedef struct {
     abi_ulong mask;
@@ -27,3 +30,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 */
linux-user/sh4/target_syscall.h renamed from linux-user/sh4/syscall.h +5 -0
similarity index 83%
rename from linux-user/sh4/syscall.h
rename to linux-user/sh4/target_syscall.h
index 7aa4f23..9f3381b 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
         unsigned long regs[16];
         unsigned long pc;
@@ -15,3 +18,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 */
linux-user/sparc/target_syscall.h renamed from linux-user/sparc/syscall.h +5 -0
similarity index 87%
rename from linux-user/sparc/syscall.h
rename to linux-user/sparc/target_syscall.h
index 58573b9..a73fa6d 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong psr;
 	abi_ulong pc;
@@ -18,3 +21,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 */
linux-user/sparc64/target_syscall.h renamed from linux-user/sparc64/syscall.h +5 -0
similarity index 87%
rename from linux-user/sparc64/syscall.h
rename to linux-user/sparc64/target_syscall.h
index 8398d3f..eb827fc 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong u_regs[16];
 	abi_ulong tstate;
@@ -19,3 +22,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 */
linux-user/tilegx/target_syscall.h renamed from linux-user/tilegx/syscall.h +0 -0
similarity index 100%
rename from linux-user/tilegx/syscall.h
rename to linux-user/tilegx/target_syscall.h
linux-user/unicore32/target_syscall.h renamed from linux-user/unicore32/syscall.h +0 -0
similarity index 100%
rename from linux-user/unicore32/syscall.h
rename to linux-user/unicore32/target_syscall.h
linux-user/x86_64/target_syscall.h renamed from linux-user/x86_64/syscall.h +5 -0
similarity index 96%
rename from linux-user/x86_64/syscall.h
rename to linux-user/x86_64/target_syscall.h
index 88b3c3f..feecd32 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 #define __USER_CS	(0x33)
 #define __USER_DS	(0x2B)
 
@@ -100,3 +103,5 @@ struct target_msqid64_ds {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_MLOCKALL_MCL_CURRENT 1
 #define TARGET_MLOCKALL_MCL_FUTURE  2
+
+#endif  /* TARGET_SYSCALL_H */
#4 lore raw

PATCH v3 2/2 build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

In reply to Lluís Vilanova

This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

---
 bsd-user/i386/target_syscall.h    |    4 ++++
 bsd-user/qemu.h                   |    2 +-
 bsd-user/sparc/target_syscall.h   |    5 +++++
 bsd-user/sparc64/target_syscall.h |    5 +++++
 bsd-user/x86_64/target_syscall.h  |    5 +++++
 5 files changed, 20 insertions(+), 1 deletion(-)
 rename bsd-user/i386/{syscall.h => target_syscall.h} (97%)
 rename bsd-user/sparc/{syscall.h => target_syscall.h} (62%)
 rename bsd-user/sparc64/{syscall.h => target_syscall.h} (66%)
 rename bsd-user/x86_64/{syscall.h => target_syscall.h} (97%)
bsd-user/i386/target_syscall.h renamed from bsd-user/i386/syscall.h +4 -0
similarity index 97%
rename from bsd-user/i386/syscall.h
rename to bsd-user/i386/target_syscall.h
index 9b34c61..82d1c58 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_CS	(0x23)
 #define __USER_DS	(0x2B)
@@ -159,3 +162,4 @@ struct target_vm86plus_struct {
 
 #define UNAME_MACHINE "i386"
 
+#endif  /* TARGET_SYSCALL_H */
bsd-user/qemu.h +1 -1
index 735cb40..1a361df 100644
@@ -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"
 
bsd-user/sparc/target_syscall.h renamed from bsd-user/sparc/syscall.h +5 -0
similarity index 62%
rename from bsd-user/sparc/syscall.h
rename to bsd-user/sparc/target_syscall.h
index 5a9bb7e..c7eec6b 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong psr;
 	abi_ulong pc;
@@ -7,3 +10,5 @@ struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4"
+
+#endif  /* TARGET_SYSCALL_H */
bsd-user/sparc64/target_syscall.h renamed from bsd-user/sparc64/syscall.h +5 -0
similarity index 66%
rename from bsd-user/sparc64/syscall.h
rename to bsd-user/sparc64/target_syscall.h
index 81a816d..2f06100 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong u_regs[16];
 	abi_ulong tstate;
@@ -8,3 +11,5 @@ struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4u"
+
+#endif  /* TARGET_SYSCALL_H */
bsd-user/x86_64/target_syscall.h renamed from bsd-user/x86_64/syscall.h +5 -0
similarity index 97%
rename from bsd-user/x86_64/syscall.h
rename to bsd-user/x86_64/target_syscall.h
index 630514a..85a9766 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 #define __USER_CS	(0x33)
 #define __USER_DS	(0x2B)
 
@@ -114,3 +117,5 @@ struct target_msqid64_ds {
 #define TARGET_ARCH_SET_FS 0x1002
 #define TARGET_ARCH_GET_FS 0x1003
 #define TARGET_ARCH_GET_GS 0x1004
+
+#endif  /* TARGET_SYSCALL_H */
#5 lore raw

Re: [Qemu-devel] [PATCH v3 2/2] build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

Quoted 5 lines · Lluís Vilanova

This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

ping

Quoted 104 lines
---
 bsd-user/i386/target_syscall.h    |    4 ++++
 bsd-user/qemu.h                   |    2 +-
 bsd-user/sparc/target_syscall.h   |    5 +++++
 bsd-user/sparc64/target_syscall.h |    5 +++++
 bsd-user/x86_64/target_syscall.h  |    5 +++++
 5 files changed, 20 insertions(+), 1 deletion(-)
 rename bsd-user/i386/{syscall.h => target_syscall.h} (97%)
 rename bsd-user/sparc/{syscall.h => target_syscall.h} (62%)
 rename bsd-user/sparc64/{syscall.h => target_syscall.h} (66%)
 rename bsd-user/x86_64/{syscall.h => target_syscall.h} (97%)
bsd-user/i386/target_syscall.h renamed from bsd-user/i386/syscall.h +4 -0
similarity index 97%
rename from bsd-user/i386/syscall.h
rename to bsd-user/i386/target_syscall.h
index 9b34c61..82d1c58 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_CS	(0x23)
 #define __USER_DS	(0x2B)
@@ -159,3 +162,4 @@ struct target_vm86plus_struct {
 
 #define UNAME_MACHINE "i386"
 
+#endif  /* TARGET_SYSCALL_H */
bsd-user/qemu.h +1 -1
index 735cb40..1a361df 100644
@@ -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"
 
bsd-user/sparc/target_syscall.h renamed from bsd-user/sparc/syscall.h +5 -0
similarity index 62%
rename from bsd-user/sparc/syscall.h
rename to bsd-user/sparc/target_syscall.h
index 5a9bb7e..c7eec6b 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong psr;
 	abi_ulong pc;
@@ -7,3 +10,5 @@ struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4"
+
+#endif  /* TARGET_SYSCALL_H */
bsd-user/sparc64/target_syscall.h renamed from bsd-user/sparc64/syscall.h +5 -0
similarity index 66%
rename from bsd-user/sparc64/syscall.h
rename to bsd-user/sparc64/target_syscall.h
index 81a816d..2f06100 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong u_regs[16];
 	abi_ulong tstate;
@@ -8,3 +11,5 @@ struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4u"
+
+#endif  /* TARGET_SYSCALL_H */
bsd-user/x86_64/target_syscall.h renamed from bsd-user/x86_64/syscall.h +5 -0
similarity index 97%
rename from bsd-user/x86_64/syscall.h
rename to bsd-user/x86_64/target_syscall.h
index 630514a..85a9766 100644
@@ -1,3 +1,6 @@
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 #define __USER_CS	(0x33)
 #define __USER_DS	(0x2B)
 
@@ -114,3 +117,5 @@ struct target_msqid64_ds {
 #define TARGET_ARCH_SET_FS 0x1002
 #define TARGET_ARCH_GET_FS 0x1003
 #define TARGET_ARCH_GET_GS 0x1004
+
+#endif  /* TARGET_SYSCALL_H */
#6 lore raw

Re: [Qemu-devel] [PATCH v3 2/2] build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

Quoted 9 lines · Lluís Vilanova
Quoted 5 lines · Lluís Vilanova

This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h").

ping

Applied to master, thanks.

-- PMM