Re: [PATCH 3/3] RTEMS: Change register_t definition

Joel Sherrill <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAF9ehCWNR28o3k9-SS0ii_BteWzZdrpzaeSp=bo=M=6JVbnqkg@mail.gmail.com>
Is RTEMS the only case in newlib that provides register_t?

On Wed, Feb 13, 2019, 7:19 AM Sebastian Huber <
[email protected] wrote:

> On 64-bit targets, the register_t type must be a 64-bit integer.
>
> Add u_register_t definition for FreeBSD comptatibility.
>
> Signed-off-by: Sebastian Huber <[email protected]>
> ---
>  newlib/libc/sys/rtems/include/machine/types.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/newlib/libc/sys/rtems/include/machine/types.h
> b/newlib/libc/sys/rtems/include/machine/types.h
> index 54c643016..0c654f355 100644
> --- a/newlib/libc/sys/rtems/include/machine/types.h
> +++ b/newlib/libc/sys/rtems/include/machine/types.h
> @@ -68,7 +68,7 @@ typedef       __int64_t       quad_t;
>  typedef        quad_t *        qaddr_t;
>  #endif
>
> -typedef        int     register_t;
> +typedef        __intptr_t      register_t;
>
>  #ifndef _RLIM_T_DECLARED
>  typedef        __rlim_t        rlim_t;         /* resource limit */
> @@ -79,6 +79,8 @@ typedef       __uintptr_t     segsz_t;        /* segment
> size (in pages) */
>
>  typedef        __uintptr_t     uintfptr_t;
>
> +typedef        __uintptr_t     u_register_t;
> +
>  typedef        __uintptr_t     kvaddr_t;
>  typedef        size_t          ksize_t;
>
> --
> 2.16.4
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.