bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Provide intptr_t and uintptr_t as default types


From: Samuel Thibault
Subject: Re: [PATCH] Provide intptr_t and uintptr_t as default types
Date: Wed, 21 Dec 2022 12:35:57 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le lun. 19 déc. 2022 10:18:25 -0500, a ecrit:
> ---
>  cpu.sym | 3 +++
>  type.c  | 6 ++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/cpu.sym b/cpu.sym
> index 5e34074..ea7511f 100644
> --- a/cpu.sym
> +++ b/cpu.sym
> @@ -30,6 +30,7 @@
>   * Fetch values from the Mach header.
>   */
>  #include <mach/message.h>
> +#include <stdint.h>
>  
>  /*
>   *   Known values for the msgt_name field.
> @@ -103,6 +104,8 @@ expr sizeof(int)                  sizeof_int
>  expr sizeof(long)                    sizeof_long
>  expr sizeof(float)                   sizeof_float
>  expr sizeof(double)                  sizeof_double
> +expr sizeof(uintptr_t)                  sizeof_uintptr_t
> +expr sizeof(intptr_t)                   sizeof_intptr_t
>  expr sizeof(mach_msg_header_t)               sizeof_mach_msg_header_t
>  expr sizeof(mach_msg_type_long_t)    sizeof_mach_msg_type_long_t
>  expr sizeof(mach_msg_type_t)         sizeof_mach_msg_type_t
> diff --git a/type.c b/type.c
> index f954de4..b104c66 100644
> --- a/type.c
> +++ b/type.c
> @@ -57,6 +57,8 @@ ipc_type_t *itWaitTimeType; /* used for dummy WaitTime args 
> */
>  ipc_type_t *itMsgOptionType; /* used for dummy MsgOption args */
>  ipc_type_t *itShortType;        /* used for the short type */
>  ipc_type_t *itIntType;          /* used for the int type */
> +ipc_type_t *itUintPtrType;      /* used for the uintptr_t type */
> +ipc_type_t *itIntPtrType;       /* used for the intptr_t type */
>  static bool types_initialized = false;
>  
>  static ipc_type_t *list = itNULL;
> @@ -960,6 +962,10 @@ init_type(void)
>      itInsert("short", itShortType);
>      itIntType = itCIntTypeDecl("int", sizeof_int);
>      itInsert("int", itIntType);
> +    itUintPtrType = itCIntTypeDecl("uintptr_t", sizeof_uintptr_t);
> +    itInsert("uintptr_t", itUintPtrType);
> +    itIntPtrType = itCIntTypeDecl("intptr_t", sizeof_intptr_t);
> +    itInsert("intptr_t", itIntPtrType);
>  }
>  
>  /******************************************************
> -- 
> 2.37.2
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

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