Skip to contentSkip to conversation

accessibility/speakup/speakup_acnt: Add header file macro definition

PATCH In review Li zeming 2 participants 3 messages Jul 5, 2022 – Jul 6, 2022 Speakup console speech driver

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 accessibility/speakup/speakup_acnt: Add header file macro definition

I think the header file could avoid redefinition errors.
at compile time by adding macro definitions.

---
 drivers/accessibility/speakup/speakup_acnt.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/accessibility/speakup/speakup_acnt.h +3 -0
index cffa938ae580..cea05d770f6d 100644
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /* speakup_acntpc.h - header file for speakups Accent-PC driver. */
+#ifndef _SPEAKUP_ACNT_H
+#define _SPEAKUP_ACNT_H
 
 #define SYNTH_IO_EXTENT	0x02
 
@@ -17,3 +19,4 @@
 #define SYNTH_FULL	'F' /* synth is full. */
 #define SYNTH_ALMOST_EMPTY 'M' /* synth has less than 2 seconds of text left */
 #define SYNTH_SPEAKING	's' /* synth is speaking and has a fare way to go */
+#endif
Signature · 1 line
2.18.2
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hello,

Li zeming, le mar. 05 juil. 2022 18:19:55 +0800, a ecrit:

Quoted 2 lines

I think the header file could avoid redefinition errors.
at compile time by adding macro definitions.

Redefining a macro to the same value is not a problem, but better have it indeed.

Quoted 1 line

Could you also patch speakup_dtlk.h the same way? Thanks.

Samuel

Quoted 24 lines
---
 drivers/accessibility/speakup/speakup_acnt.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/accessibility/speakup/speakup_acnt.h +3 -0
index cffa938ae580..cea05d770f6d 100644
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /* speakup_acntpc.h - header file for speakups Accent-PC driver. */
+#ifndef _SPEAKUP_ACNT_H
+#define _SPEAKUP_ACNT_H
 
 #define SYNTH_IO_EXTENT	0x02
 
@@ -17,3 +19,4 @@
 #define SYNTH_FULL	'F' /* synth is full. */
 #define SYNTH_ALMOST_EMPTY 'M' /* synth has less than 2 seconds of text left */
 #define SYNTH_SPEAKING	's' /* synth is speaking and has a fare way to go */
+#endif
Signature · 1 line
2.18.2
author
#2 lore raw

Thank you very much for your approval.
I continue to add macros to speakup_dtlk.h and any header files I could add.