From faedd7b4703d646876d938c0c2bee61e39bd8345 Mon Sep 17 00:00:00 2001 From: ysun1 Date: Wed, 3 Apr 2019 10:05:09 +0800 Subject: [PATCH 1/4] bpo-31904: fix VxWorks signalmodule issue The type of sig_atomic_t is 'unsigned char' in VxWorks, so it can't be assigned to -1, so I set the type of fd in struct 'wakeup' to 'int' for VxWorks. --- Modules/signalmodule.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 4590017c170a52..cabf23c98d73ba 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -117,7 +117,11 @@ static volatile struct { #else #define INVALID_FD (-1) static volatile struct { +#ifdef __VXWORKS__ + int fd; +#else sig_atomic_t fd; +#endif int warn_on_full_buffer; } wakeup = {.fd = INVALID_FD, .warn_on_full_buffer = 1}; #endif From 8d05494e2647cba2fa52fca9711f19b6b558d3a4 Mon Sep 17 00:00:00 2001 From: ysun1 Date: Wed, 3 Apr 2019 10:21:09 +0800 Subject: [PATCH 2/4] add news file --- .../NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst diff --git a/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst b/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst new file mode 100644 index 00000000000000..0304bb52a847ce --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst @@ -0,0 +1 @@ +fix VxWorks signalmodule issue From 50ca9f10060ff3b0c71aca54de27d720cded212a Mon Sep 17 00:00:00 2001 From: ysun1 Date: Wed, 10 Apr 2019 11:08:58 +0800 Subject: [PATCH 3/4] set the type of fd in struct 'wakeup' to 'int' in signalmodule --- Modules/signalmodule.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index cabf23c98d73ba..438c02f580b961 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -117,11 +117,7 @@ static volatile struct { #else #define INVALID_FD (-1) static volatile struct { -#ifdef __VXWORKS__ int fd; -#else - sig_atomic_t fd; -#endif int warn_on_full_buffer; } wakeup = {.fd = INVALID_FD, .warn_on_full_buffer = 1}; #endif From a28251c717edfb676303c163576257667ce9360e Mon Sep 17 00:00:00 2001 From: ysun1 Date: Wed, 10 Apr 2019 14:00:20 +0800 Subject: [PATCH 4/4] fix news file --- .../next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst b/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst index 0304bb52a847ce..11bf13cb7c2e5f 100644 --- a/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst +++ b/Misc/NEWS.d/next/Library/2019-04-03-10-14-36.bpo-31904.xd3b78.rst @@ -1 +1 @@ -fix VxWorks signalmodule issue +fix the data type issue in 'wakeup' in signalmodule