[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
- [2.06 RELEASE PATCH v2 0/4] Add XFS bigtime and needsrepair support, Javier Martinez Canillas, 2021/05/12
- [2.06 RELEASE PATCH v2 1/4] types: Define PRI{x, d}GRUB_INT{32, 64}_T format specifiers, Javier Martinez Canillas, 2021/05/12
- Re: [2.06 RELEASE PATCH v2 1/4] types: Define PRI{x,d}GRUB_INT{32,64}_T format specifiers,
Daniel Kiper <=
- [2.06 RELEASE PATCH v2 2/4] fs: Use 64-bit type for filesystem timestamp, Javier Martinez Canillas, 2021/05/12
- [2.06 RELEASE PATCH v2 3/4] fs/xfs: Add bigtime incompat feature support, Javier Martinez Canillas, 2021/05/12
- [2.06 RELEASE PATCH v2 4/4] fs/xfs: Add needsrepair incompat feature support, Javier Martinez Canillas, 2021/05/12