Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: [XS] : "snprintf" portability options

by syphilis (Archbishop)
on Sep 15, 2024 at 13:59 UTC ( [id://11161744]=note: print w/replies, xml ) Need Help??


in reply to Re: [XS] : "snprintf" portability options
in thread [XS] : "snprintf" portability options

Surely the UVuf is entirely supposed to give the right format to match the type of UV.

Sounds reasonable and I can't re-create the warnings in an Inline::C script - there might be more to this than I initially realized.
Here's a bit more detail regarding one of those warnings:
XS.xs: In function 'encode_sv': XS.xs:2449:66: warning: format '%u' expects argument of type 'unsigned + int', but argument 4 has type 'long long unsigned int' [-Wformat=] 2449 | enc->cur += snprintf (enc->cur, IVUV_MAXCHAR +S, "%" UVuf, UV_MAX); | + ^~~
(It's getting late over here.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: [XS] : "snprintf" portability options
by NERDVANA (Priest) on Sep 16, 2024 at 03:24 UTC
    I hear a lot about new versions of gcc making it a fatal error to declare "void main", which tends to break short test programs during configure scripts and results in tests coming out false when they should return true. They can be hard to catch if a test is false on a majority of systems anyway. Maybe perl is affected?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11161744]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2025-11-17 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.