bugGNU indent - Bugs: bug #64744, Missing a check for locale.h


bug #64744: Missing a check for locale.h

Submitter:  Petr Pisar <petrp>
Submitted:  Wed 04 Oct 2023 12:23:25 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Wed 04 Oct 2023 12:23:25 PM UTC, original submission:  

With autoconf-2.71 and gcc-13.2.1 build fails like this:

gcc -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/local/share/locale\" -I. -I..  -I. -I. -I../intl   -Wall -W -Wredundant-decls -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wcomment -Wbad-function-cast -Wcast-align  -g -O0 -fsanitize=address -MT indent.o -MD -MP -MF .deps/indent.Tpo -c -o indent.o indent.c
indent.c: In function ‘main’:
indent.c:1063:5: error: implicit declaration of function ‘setlocale’
 1063 |     setlocale(LC_ALL, "");
      |     ^~~~~~~~~

This is bacause a use of setlocale() and an inclusion of locale.h, which declares setlocale() are guarded with a different macro.

A fix is attached.

Petr Pisar <petrp>


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

Attach Files:

Attached Files
file #55200:  0001-Check-for-locale.h.patch added by petrp (2KiB - text/x-patch - A proposed fix)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by petrp (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.

    Only logged-in users can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-04 petrp Attached File- Added 0001-Check-for-locale.h.patch, #55200

    Back to the top

    Powered by Savane 3.13-3cd0.
    Corresponding source code