grub-devel
[Top][All Lists]
Advanced

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

Re: [2.06 RELEASE PATCH v2 1/4] types: Define PRI{x,d}GRUB_INT{32,64}_T


From: Daniel Kiper
Subject: Re: [2.06 RELEASE PATCH v2 1/4] types: Define PRI{x,d}GRUB_INT{32,64}_T format specifiers
Date: Thu, 13 May 2021 15:57:38 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, May 12, 2021 at 05:46:13PM +0200, Javier Martinez Canillas wrote:
> There are already constant macros defined for unsigned integers but no for
> signed integers. Add macro constants for format specifiers of the latter.
>
> Suggested-by: Daniel Kiper <daniel.kiper@oracle.com>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> except...

> ---
>
> (no changes since v1)
>
>  include/grub/types.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/grub/types.h b/include/grub/types.h
> index b36b26a79d4..f460ef18c71 100644
> --- a/include/grub/types.h
> +++ b/include/grub/types.h
> @@ -86,10 +86,16 @@
>  typedef signed char          grub_int8_t;
>  typedef short                        grub_int16_t;
>  typedef int                  grub_int32_t;
> +# define PRIxGRUB_INT32_T    "x"
> +# define PRIuGRUB_INT32_T    "d"
               ^ <---- s/u/d/

Though I can fix it before commiting...

>  #if GRUB_CPU_SIZEOF_LONG == 8
>  typedef long                 grub_int64_t;
> +# define PRIxGRUB_INT64_T    "lx"
> +# define PRIdGRUB_INT64_T    "ld"
>  #else
>  typedef long long            grub_int64_t;
> +# define PRIxGRUB_INT64_T    "llx"
> +# define PRIdGRUB_INT64_T    "lld"
>  #endif

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]