Re: [PATCH spice-server 01/33] Use PRIxPTR constant for string formatting

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

 



On Sat, Dec 22, 2018 at 10:02:36AM -0500, Frediano Ziglio wrote:
> > 
> > On Fri, Dec 21, 2018 at 4:03 PM Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> > >
> > > These constants are meant to be used in format string for size_t
> > > types. Use them for portability.
> > 
> > PRI*PTR is for [u]intptr_t.
> > 
> > There are some claims that z is supported since VC2015 on stackoverflow.
> > 
> 
> They are right, msdn states the same. But is up to the CRT you are using,
> MingW without __USE_MINGW_ANSI_STDIO does not accept it.
> On the other hand I64 is always supported.
> 
> > I assume we are mainly interested in mingw, we should set
> > __USE_MINGW_ANSI_STDIO=1 instead.
> > 
> 
> Mainly does not mean only. I suppose here you mean "we could use
> __USE_MINGW_ANSI_STDIO for MingW and assume other compiler uses
> newer CRT libraries supporting 'z' modifier". In that case 'z'
> could be used for size_t. 'l' is not an option for pointers as
> Windows 64 is LLP64 while Linux 64 is LP64 so for pthread_id
> PRIxPTR looks fine for me.
> 
> Is there a specific PRIxxxx constant for size_t type?

I don't think so, I could not find any when I sent
https://lists.freedesktop.org/archives/spice-devel/2018-September/045611.html

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]