Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by NERDVANA (Priest)
on Sep 17, 2024 at 01:34 UTC ( [id://11161782]=note: print w/replies, xml ) Need Help??


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

If it is a bug, it's a bug in perl

Don't you mean a bug in gcc? gcc knows it is building for the MS libc, so it should accept the patterns known to work for that libc.

  • Comment on Re^5: [XS] : "snprintf" portability options

Replies are listed 'Best First'.
Re^6: [XS] : "snprintf" portability options
by tonyc (Friar) on Sep 17, 2024 at 04:41 UTC

    I was looking at it from the point of view that the "%I64u" format is incorrect, though it works and perl's own implementation of formatted output emulates it.

    If I could be sure old MSVCRT supported "%llu" I'd make a PR switching it to the standard form, since it would let us turn on -Wformat and better detect format issues on the specialness that is Win32. And reduce confusion from people wondering what this I64 format business is.

      If I could be sure old MSVCRT supported "%llu" I'd make a PR switching it to the standard form

      Would it be feasible to allow for both models in the source, and then base the decision on which model to implement by information gathered during the early stages of the gmake/nmake stage ?
      For example, would the fact that the toolchain uses UCRT alone imply that "%llu" is supported ?
      Or could a "configure" type C script be run to probe whether "%llu" is supported ?

      Cheers,
      Rob

Log In?
Username:
Password:

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

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





    Results (68 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.