bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63831] src/libs/libxutil/XFontName.c(utoa) conflicts with stdlib.h


From: anonymous
Subject: [bug #63831] src/libs/libxutil/XFontName.c(utoa) conflicts with stdlib.h utoa in non-GNU libc
Date: Thu, 23 Feb 2023 11:56:24 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63831>

                 Summary: src/libs/libxutil/XFontName.c(utoa) conflicts with
stdlib.h utoa in non-GNU libc
                   Group: GNU roff
               Submitter: None
               Submitted: Thu 23 Feb 2023 04:56:22 PM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 23 Feb 2023 04:56:22 PM UTC By: Anonymous
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).






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Thu 23 Feb 2023 04:56:22 PM UTC  Name:
0001-src-libs-libxutil-XFontName.c-utoa-newlib-libc-stdlib.h-conflict.patch 
Size: 2KiB   By: None
utoa defined static only in single file renamed to utoan
<http://savannah.gnu.org/bugs/download.php?file_id=54391>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63831>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]