bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach] Use mig_support.h prototypes instead of duplicating


From: Samuel Thibault
Subject: Re: [PATCH gnumach] Use mig_support.h prototypes instead of duplicating them.
Date: Tue, 2 May 2023 07:54:17 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le lun. 01 mai 2023 21:10:42 -0400, a ecrit:
> * include/mach/mig_support.h: Drop the ifndef because this file is only
>   used internally to compile gnumach. We export mig_support.h from glibc
>   already.
> * kern/ipc_mig.c: len should be vm_size_t.
> * kern/ipc_mig.h: Drop duplicate prototypes.
> ---
>  include/mach/mig_support.h | 4 +---
>  kern/ipc_mig.c             | 3 ++-
>  kern/ipc_mig.h             | 9 ---------
>  3 files changed, 3 insertions(+), 13 deletions(-)
> 
> diff --git a/include/mach/mig_support.h b/include/mach/mig_support.h
> index 0794a5fb..ed871c0f 100644
> --- a/include/mach/mig_support.h
> +++ b/include/mach/mig_support.h
> @@ -52,8 +52,6 @@ extern mach_port_name_t     mig_get_reply_port(void);
>  extern void          mig_reply_setup(const mach_msg_header_t *_request,
>                                       mach_msg_header_t *reply);
>  
> -#ifndef MACH_KERNEL
> -extern vm_size_t             mig_strncpy(char *_dest, const char *_src, 
> vm_size_t _len);
> -#endif
> +extern vm_size_t     mig_strncpy(char *_dest, const char *_src, vm_size_t 
> _len);
>  
>  #endif       /* not defined(_MACH_MIG_SUPPORT_H_) */
> diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
> index cb0b2c83..d6171877 100644
> --- a/kern/ipc_mig.c
> +++ b/kern/ipc_mig.c
> @@ -27,6 +27,7 @@
>  #include <mach/boolean.h>
>  #include <mach/port.h>
>  #include <mach/message.h>
> +#include <mach/mig_support.h>
>  #include <mach/thread_status.h>
>  #include <machine/locore.h>
>  #include <machine/copy_user.h>
> @@ -285,7 +286,7 @@ mig_put_reply_port(
>   *     len - Length of destination buffer.
>   */
>  vm_size_t
> -mig_strncpy(char *dest, const char *src, int len)
> +mig_strncpy(char *dest, const char *src, vm_size_t len)
>  {
>       char *dest_ = dest;
>       int i;
> diff --git a/kern/ipc_mig.h b/kern/ipc_mig.h
> index cd298efe..a8ee7869 100644
> --- a/kern/ipc_mig.h
> +++ b/kern/ipc_mig.h
> @@ -139,13 +139,4 @@ io_return_t syscall_device_writev_request(
>                       rpc_io_buf_vec_t        *iovec,
>                       rpc_vm_size_t   iocount);
>  
> -mach_port_name_t mig_get_reply_port(void);
> -
> -void mig_dealloc_reply_port(mach_port_t reply_port);
> -
> -void mig_put_reply_port(mach_port_t reply_port);
> -
> -vm_size_t
> -mig_strncpy(char *dest, const char *src, int len);
> -
>  #endif /* _IPC_MIG_H_ */
> -- 
> 2.39.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]