patchThe GNU Bourne-Again SHell - Patches: patch #9991, Fix detection of strsignal() and...


You are not allowed to post comments on this tracker with your current authentication level.

patch #9991: Fix detection of strsignal() and snprintf()

Submitter:  FX <fxcoudert>
Submitted:  Sun 08 Nov 2020 09:46:27 AM UTC
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Open

Tue 10 Nov 2020 04:43:36 PM UTC, comment #3: 

It was changed in the devel git branch and is in the 5.1 branch, currently at bash-5.1-rc2.

Chet Ramey <chet>
Group administrator
Tue 10 Nov 2020 04:03:08 PM UTC, comment #2: 

This is still happening on bash 5.0 with all patches (1 to 18) applied.
This is also happening on git master.

FX <fxcoudert>
Mon 09 Nov 2020 02:09:49 PM UTC, comment #1: 

Thanks for the report. This was fixed back in September, 2019.

Chet Ramey <chet>
Group administrator
Sun 08 Nov 2020 09:46:27 AM UTC, original submission:  

On arm64-apple-darwin20, and macOS Big Sur more generally, the detection of strsignal() fails:

checking whether strsignal is declared... yes
checking for the existence of strsignal... no

Although the function exists, it fails to be detected because:

configure:14562: checking for the existence of strsignal
configure:14579: gcc -o conftest -g -O2 -I/usr/local/include  conftest.c -ldl  >&5
conftest.c:333:19: error: implicit declaration of function 'strsignal' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
char s = (char )strsignal(2);

The failure is because POSIX states strsignal() is in <string.h> ( and the configure test does not include that header. The test defined in aclocal.m4 should include that header.


Similarly, the check for "standard-conformant snprintf" is fails on macOS Big Sur, even though the function is present and working on the OS. The reason is that the test uses the exit() function without including the relevant standard header <stdlib.h> ( The test then fails to compile because of that.

The correct fix is to include the header in the test.

FX <fxcoudert>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #50226:  bash.patch added by fxcoudert (695B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by fxcoudert (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-09 chet StatusNone Done
    2020-11-08 fxcoudert Attached File- Added bash.patch, #50226

    Back to the top

    Powered by Savane 3.13-e652.
    Corresponding source code