I think what Ben is saying is that we want some way to verify that no
one uses the old "%zu" macro accidentally.  Basically, make should do
a grep for it, and fail if it's used.

Ethan

On Fri, Nov 22, 2013 at 2:25 PM, Alin Serdean
<aserd...@cloudbasesolutions.com> wrote:
>
>> PRI_ZU is a bad name because it doesn't follow the existing pattern.
>> The name PRIuSIZE fits the pattern, so that is what I would suggest.
>
>> The existing PRI* macros only include a type modifier, not the format
>> specifier, so PRIuSIZE should not include the format specifier either.
>
> Is this what you mean?
>
> #ifdef _WIN32
> #define _PFX_SIZE "I"
> #else
> #define _PFX_SIZE "z"
> #endif
>
> #ifdef _WIN32
> #define PRIuSIZE _PFX_SIZE "u"
> #else
> #define PRIuSIZE _PFX_SIZE "u"
> #endif
>
>> The Autoconf philosophy is to test for features, not for system type.
>
>> This does not appear to include anything to enforce use of the macro.  I
>> will not apply a change that lacks such enforcement.
>
> I do not want to step on any toes with this, but the way I see it is:
> 1. Use autoconf to generate the macro(and use the fact <config.h> is included 
> in every file)
> 2. We define a header that is included in every source file
> 3. We define a wrapper over the <inttypes.h> (like the ./lib/string.h) and 
> whenever they want to use the PRIuSIZE macro they have to include in 
> <inttypes.h> .
>
> Kind Regards,
> Alin.
> ________________________________________
> From: Ben Pfaff [b...@nicira.com]
> Sent: Friday, November 22, 2013 4:33 AM
> To: Alin Serdean
> Cc: Alessandro Pilotti; dev@openvswitch.org
> Subject: Re: [ovs-dev] Windows port status
>
> On Fri, Nov 22, 2013 at 02:23:11AM +0000, Alin Serdean wrote:
>> Bellow the whole patch required for the PRI_ZU macro:
>
> PRI_ZU is a bad name because it doesn't follow the existing pattern.
> The name PRIuSIZE fits the pattern, so that is what I would suggest.
>
> The existing PRI* macros only include a type modifier, not the format
> specifier, so PRIuSIZE should not include the format specifier either.
>
> The Autoconf philosophy is to test for features, not for system type.
>
> This does not appear to include anything to enforce use of the macro.  I
> will not apply a change that lacks such enforcement.
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to