After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780900 - xmlStrPrintf prototype changed.
xmlStrPrintf prototype changed.
Status: RESOLVED NOTGNOME
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-04 11:55 UTC by PoltoS
Modified: 2017-04-04 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description PoltoS 2017-04-04 11:55:39 UTC
I've found that xmlStrPrintf prototype has changed in 2.9.3

from 

XMLPUBFUN int XMLCALL
                xmlStrPrintf             (xmlChar *buf,
                                         int len,
                                         const xmlChar *msg,
                                         ...);

to

XMLPUBFUN int XMLCALL
                xmlStrPrintf             (xmlChar *buf,
                                         int len,
                                         const char *msg,
                                         ...) LIBXML_ATTR_FORMAT(3,4);


I wanted to use LIBXML_VERSION to distinguish old and new prototypes to correctly cast in my code.

But suddenly I found one platform (OpenWRT) where 2.9.3 still have the old prototype.

Please suggest what to use during C preprocessor to test if the new prototype should be used.

BTW, it is a bad idea to change function prototype ;(
Comment 1 Michael Catanzaro 2017-04-04 13:03:48 UTC
Ah, the problem is just that you got the version number wrong. It changed in 2.9.4, not 2.9.3. See https://git.gnome.org/browse/libxml2/commit/?id=502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b

If you have the newer prototype on 2.9.3, perhaps your distribution backported that patch manually.
Comment 2 PoltoS 2017-04-04 13:16:21 UTC
Oh, this might explain the issue with wrong headers.

I use Ubuntu with 2.9.3+dfsg1-1ubuntu0.2 package. And inside the header is already new with 2.3.9 version.

Thanks for the info, this closes my issue. May be new one should be risen in Ubuntu, but I can workaround it by changing the file on my PC. Till next upgrade this is ok ;)