bugGNU roff - Bugs: bug #63831, ...

 
 

bug #63831: src/libs/libxutil/XFontName.c(utoa) conflicts with stdlib.h utoa in non-GNU libc

Submitter:  None
Submitted:  Thu 23 Feb 2023 04:56:22 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jul 2023 08:48:31 AM UTC, comment #3: 


commit 3a3c086b47328b21cf2c4ffb332c2404114d8044
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Mar 16 18:28:16 2023 -0500

    [libxutil]: Fix Savannah #63831.

    * src/libs/libxutil/XFontName.c (utoa): Rename function from this...

      (xu_utoa): ...to this, to avoid name collision when using "newlib"
      portability library.

      (XFormatFontName): Update call site.

    * PROBLEMS: Drop item.

    Fixes <https://savannah.gnu.org/bugs/?63831>.  Thanks to Brian Inglis
    for the report.


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Mar 2023 11:46:48 PM UTC, comment #2: 


commit e77bc387c96acc18ed9305afb575977976e9e6af
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Mar 16 18:28:16 2023 -0500

    Fix Savannah #63831.

    * src/libs/libxutil/XFontName.c (utoa): Rename function from this...

      (xu_utoa): ...to this, to avoid name collision when using "newlib"
      portability library.

      (XFormatFontName): Update call site.

    * PROBLEMS: Drop item.

    Fixes <https://savannah.gnu.org/bugs/?63831>.  Thanks to Brian Inglis
    for the report.


G. Branden Robinson <gbranden>
Group administrator
Sat 25 Feb 2023 02:12:42 AM UTC, comment #1: 

[Email thread about this begins at http://lists.gnu.org/r/bug-groff/2023-02/msg00210.html]

Dave <barx>
Group Member
Thu 23 Feb 2023 04:56:22 PM UTC, original submission:  

non-GNU libc newlib (also IBM, QNX, and others) define extern function utoa (also itao, ltoa, ftoa, ultoa, possibly lltoa, ulltoa) in stdlib.h (or unistd.h) which conflicts with src/libs/libxutil/XFontName.c definition of utoa as static and causes build failure requiring a patch (attached):

.../src/libs/libxutil/XFontName.c: At top level:
.../src/libs/libxutil/XFontName.c:122:1: error: static declaration of ‘utoa’ follows non-static declaration
  122 | utoa (unsigned int u, char *s, int size)
      | ^~~~
In file included from ./lib/stdlib.h:28,
                 from ./lib/unistd.h:93,
                 from /usr/include/X11/Xos.h:89,
                 from .../src/libs/libxutil/XFontName.c:27:
/usr/include/stdlib.h:228:9: note: previous declaration of ‘utoa’ with type ‘char *(unsigned int,  char *, int)’
  228 | char *  utoa (unsigned, char *, int);
      |         ^~~~
make[1]: *** [Makefile:8017: src/libs/libxutil/libxutil_a-XFontName.o] Error 1

groff utoa renamed to utoan as groff definition is static with 3rd argument int buffer size, instead of common unistd.h or stdlib.h declarations with 3rd argument int conversion radix 2-36 (like inverse of strtod/l family of functions).

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54391:  0001-src-libs-libxutil-XFontName.c-utoa-newlib-libc-stdlib.h-conflict.patch added by None (2KiB - text/plain - utoa defined static only in single file renamed to utoan)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by gbranden (original reporter)
  • -email is unavailable- added by barx (Posted a comment)
  •  

    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.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-10 gbranden StatusReady for Merge Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-03-16 gbranden StatusIn Progress Ready for Merge
    2023-03-16 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Carbon-Copy- Added -email is unavailable-
    2023-02-23 None Attached File- Added 0001-src-libs-libxutil-XFontName.c-utoa-newlib-libc-stdlib.h-conflict.patch, #54391

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code