Skip to contentSkip to conversation

linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition

PATCH Applied Thomas Huth 5 participants 9 messages Mar 30, 2022 – Apr 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

 # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
          ^
 /usr/include/sys/ioctl.h:50:9: note: previous definition is here
 #define TIOCSER_TEMT 1
         ^
 1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
 linux-user/sh4/termbits.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/sh4/termbits.h +1 -1
index f91b5c51cf..eeabd2d7a9 100644
@@ -273,7 +273,7 @@ ebugging only */
 #define TARGET_TIOCSERGETLSR   TARGET_IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line sta
 tus register */
   /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+# define TARGET_TIOCSER_TEMT   0x01   /* Transmitter physically empty */
 #define TARGET_TIOCSERGETMULTI TARGET_IOR('T', 90, int) /* 0x545A
 */ /* Get multiport config  */
 #define TARGET_TIOCSERSETMULTI TARGET_IOW('T', 91, int) /* 0x545B
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Thomas Huth

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.
Quoted 6 lines

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 14 lines · Thomas Huth

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.
Quoted 6 lines

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by on v1 1/1
#3 lore raw
In reply to Thomas Huth

Le 30/03/2022 à 15:43, Thomas Huth a écrit :

Quoted 26 lines

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/sh4/termbits.h +0 -0
index f91b5c51cf..eeabd2d7a9 100644

linux-user/sh4/termbits.h ebugging only */ · line 279

Quoted 8 lines
linux-user/sh4/termbits.h +1 -1
@@ -273,7 +273,7 @@ ebugging only */
  #define TARGET_TIOCSERGETLSR   TARGET_IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line sta
  tus register */
    /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+# define TARGET_TIOCSER_TEMT   0x01   /* Transmitter physically empty */
  #define TARGET_TIOCSERGETMULTI TARGET_IOR('T', 90, int) /* 0x545A
  */ /* Get multiport config  */
  #define TARGET_TIOCSERSETMULTI TARGET_IOW('T', 91, int) /* 0x545B
Reviewed-by on v1 1/1
#4 lore raw
In reply to Thomas Huth
Quoted 38 lines · Thomas Huth

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

 # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
          ^
 /usr/include/sys/ioctl.h:50:9: note: previous definition is here
 #define TIOCSER_TEMT 1
         ^
 1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
 linux-user/sh4/termbits.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/sh4/termbits.h +1 -1
index f91b5c51cf..eeabd2d7a9 100644
@@ -273,7 +273,7 @@ ebugging only */
 #define TARGET_TIOCSERGETLSR   TARGET_IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line sta
 tus register */
   /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+# define TARGET_TIOCSER_TEMT   0x01   /* Transmitter physically empty */
 #define TARGET_TIOCSERGETMULTI TARGET_IOR('T', 90, int) /* 0x545A
 */ /* Get multiport config  */
 #define TARGET_TIOCSERSETMULTI TARGET_IOW('T', 91, int) /* 0x545B
Signature · 1 line
2.27.0
Signature · 1 line
Yosinori Sato
#5 lore raw
In reply to Thomas Huth

Le 30/03/2022 à 15:43, Thomas Huth a écrit :

Quoted 14 lines

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.
Quoted 6 lines

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thomas,

do you think it can wait 7.1?

Thanks,
Laurent

#6 lore raw
Quoted 17 lines · Laurent Vivier

Le 30/03/2022 à 15:43, Thomas Huth a écrit :

Quoted 16 lines

Seen while compiling on Alpine:

  In file included from ../linux-user/strace.c:17:
  In file included from ../linux-user/qemu.h:11:
  In file included from ../linux-user/syscall_defs.h:1247:
  ../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined [-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

Quoted 8 lines
Quoted 4 lines

---
  linux-user/sh4/termbits.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)

Thomas,

do you think it can wait 7.1?

It fixes a build problem, so I'd suggest putting it in for 7.0.

r~

#7 lore raw
Quoted 23 lines · Richard Henderson
Quoted 22 lines · Laurent Vivier

Le 30/03/2022 à 15:43, Thomas Huth a écrit :

Quoted 20 lines

Seen while compiling on Alpine:

  In file included from ../linux-user/strace.c:17:
  In file included from ../linux-user/qemu.h:11:
  In file included from ../linux-user/syscall_defs.h:1247:
  ../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined [-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines
Quoted 3 lines

Thomas,

do you think it can wait 7.1?

It fixes a build problem, so I'd suggest putting it in for 7.0.

It's just a warning, so unless the user compiles with --enable-werror, it should be harmless. Anyway, I see that Laurent already picked it up (thanks!).

Thomas

#8 lore raw
In reply to Thomas Huth

Le 30/03/2022 à 15:43, Thomas Huth a écrit :

Quoted 26 lines

Seen while compiling on Alpine:

In file included from ../linux-user/strace.c:17:
In file included from ../linux-user/qemu.h:11:
In file included from ../linux-user/syscall_defs.h:1247:
../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
[-Wmacro-redefined]

  # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
           ^
  /usr/include/sys/ioctl.h:50:9: note: previous definition is here
  #define TIOCSER_TEMT 1
          ^
  1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

---
  linux-user/sh4/termbits.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/sh4/termbits.h +0 -0
index f91b5c51cf..eeabd2d7a9 100644

linux-user/sh4/termbits.h ebugging only */ · line 279

Quoted 8 lines
linux-user/sh4/termbits.h +1 -1
@@ -273,7 +273,7 @@ ebugging only */
  #define TARGET_TIOCSERGETLSR   TARGET_IOR('T', 89, unsigned int) /* 0x5459 */ /* Get line sta
  tus register */
    /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+# define TARGET_TIOCSER_TEMT   0x01   /* Transmitter physically empty */
  #define TARGET_TIOCSERGETMULTI TARGET_IOR('T', 90, int) /* 0x545A
  */ /* Get multiport config  */
  #define TARGET_TIOCSERSETMULTI TARGET_IOW('T', 91, int) /* 0x545B

Applied to my trivial-patches branch.

Thanks,
Laurent