public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 2/3] Move register_t to system-specific header
  2019-02-13 13:19 [PATCH 1/3] Move RTEMS and XMK specific type definitions Sebastian Huber
  2019-02-13 13:19 ` [PATCH 3/3] RTEMS: Change register_t definition Sebastian Huber
@ 2019-02-13 13:19 ` Sebastian Huber
  2019-02-13 17:06   ` Corinna Vinschen
  1 sibling, 1 reply; 13+ messages in thread
From: Sebastian Huber @ 2019-02-13 13:19 UTC (permalink / raw)
  To: newlib

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/machine/types.h           | 2 ++
 newlib/libc/include/sys/types.h               | 2 +-
 newlib/libc/sys/rtems/include/machine/types.h | 2 ++
 winsup/cygwin/include/machine/types.h         | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h
index 19d0e8560..fab9cf72c 100644
--- a/newlib/libc/include/machine/types.h
+++ b/newlib/libc/include/machine/types.h
@@ -11,3 +11,5 @@ typedef	__uint64_t	u_quad_t;
 typedef	__int64_t	quad_t;
 typedef	quad_t *	qaddr_t;
 #endif
+
+typedef int register_t;
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 2685df654..e05263d4e 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -36,7 +36,7 @@ typedef __uint32_t	u_int32_t;
 #if ___int64_t_defined
 typedef __uint64_t	u_int64_t;
 #endif
-typedef int register_t;
+
 #define __BIT_TYPES_DEFINED__ 1
 
 #ifndef __need_inttypes
diff --git a/newlib/libc/sys/rtems/include/machine/types.h b/newlib/libc/sys/rtems/include/machine/types.h
index c550873d3..54c643016 100644
--- a/newlib/libc/sys/rtems/include/machine/types.h
+++ b/newlib/libc/sys/rtems/include/machine/types.h
@@ -68,6 +68,8 @@ typedef	__int64_t	quad_t;
 typedef	quad_t *	qaddr_t;
 #endif
 
+typedef	int	register_t;
+
 #ifndef _RLIM_T_DECLARED
 typedef	__rlim_t	rlim_t;		/* resource limit */
 #define	_RLIM_T_DECLARED
diff --git a/winsup/cygwin/include/machine/types.h b/winsup/cygwin/include/machine/types.h
index 54b4acf0a..0ef476b17 100644
--- a/winsup/cygwin/include/machine/types.h
+++ b/winsup/cygwin/include/machine/types.h
@@ -51,6 +51,8 @@ struct flock {
 	pid_t	 l_pid;		/* returned with F_GETLK */
 };
 
+typedef int register_t;
+
 #ifndef __BIT_TYPES_DEFINED
 #define __BIT_TYPES_DEFINED__ 1
 
-- 
2.16.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/3] Move RTEMS and XMK specific type definitions
@ 2019-02-13 13:19 Sebastian Huber
  2019-02-13 13:19 ` [PATCH 3/3] RTEMS: Change register_t definition Sebastian Huber
  2019-02-13 13:19 ` [PATCH 2/3] Move register_t to system-specific header Sebastian Huber
  0 siblings, 2 replies; 13+ messages in thread
From: Sebastian Huber @ 2019-02-13 13:19 UTC (permalink / raw)
  To: newlib

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/machine/types.h           |  6 ++++++
 newlib/libc/include/sys/types.h               | 16 ----------------
 newlib/libc/sys/rtems/include/machine/types.h |  6 ++++++
 3 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h
index a5a64e675..19d0e8560 100644
--- a/newlib/libc/include/machine/types.h
+++ b/newlib/libc/include/machine/types.h
@@ -5,3 +5,9 @@
 #ifndef _SYS_TYPES_H
 #error "must be included via <sys/types.h>"
 #endif /* !_SYS_TYPES_H */
+
+#if defined(__XMK__) && defined(___int64_t_defined)
+typedef	__uint64_t	u_quad_t;
+typedef	__int64_t	quad_t;
+typedef	quad_t *	qaddr_t;
+#endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 65ff520c8..2685df654 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -39,22 +39,6 @@ typedef __uint64_t	u_int64_t;
 typedef int register_t;
 #define __BIT_TYPES_DEFINED__ 1
 
-#if defined(__rtems__) || defined(__XMK__)
-/*
- *  The following section is RTEMS specific and is needed to more
- *  closely match the types defined in the BSD sys/types.h.
- *  This is needed to let the RTEMS/BSD TCP/IP stack compile.
- */
-
-/* deprecated */
-#if ___int64_t_defined
-typedef	__uint64_t	u_quad_t;
-typedef	__int64_t	quad_t;
-typedef	quad_t *	qaddr_t;
-#endif
-
-#endif /* __rtems__ || __XMK__ */
-
 #ifndef __need_inttypes
 
 #define _SYS_TYPES_H
diff --git a/newlib/libc/sys/rtems/include/machine/types.h b/newlib/libc/sys/rtems/include/machine/types.h
index ab52e47ed..c550873d3 100644
--- a/newlib/libc/sys/rtems/include/machine/types.h
+++ b/newlib/libc/sys/rtems/include/machine/types.h
@@ -62,6 +62,12 @@ typedef	__lwpid_t	lwpid_t;	/* Thread ID (a.k.a. LWP) */
 #define	_LWPID_T_DECLARED
 #endif
 
+#if ___int64_t_defined
+typedef	__uint64_t	u_quad_t;
+typedef	__int64_t	quad_t;
+typedef	quad_t *	qaddr_t;
+#endif
+
 #ifndef _RLIM_T_DECLARED
 typedef	__rlim_t	rlim_t;		/* resource limit */
 #define	_RLIM_T_DECLARED
-- 
2.16.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 3/3] RTEMS: Change register_t definition
  2019-02-13 13:19 [PATCH 1/3] Move RTEMS and XMK specific type definitions Sebastian Huber
@ 2019-02-13 13:19 ` Sebastian Huber
  2019-02-13 13:33   ` Joel Sherrill
  2019-02-13 17:02   ` Corinna Vinschen
  2019-02-13 13:19 ` [PATCH 2/3] Move register_t to system-specific header Sebastian Huber
  1 sibling, 2 replies; 13+ messages in thread
From: Sebastian Huber @ 2019-02-13 13:19 UTC (permalink / raw)
  To: newlib

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 <sebastian.huber@embedded-brains.de>
---
 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] RTEMS: Change register_t definition
  2019-02-13 13:19 ` [PATCH 3/3] RTEMS: Change register_t definition Sebastian Huber
@ 2019-02-13 13:33   ` Joel Sherrill
  2019-02-13 13:34     ` Sebastian Huber
  2019-02-13 17:02   ` Corinna Vinschen
  1 sibling, 1 reply; 13+ messages in thread
From: Joel Sherrill @ 2019-02-13 13:33 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: Newlib

Is RTEMS the only case in newlib that provides register_t?

On Wed, Feb 13, 2019, 7:19 AM Sebastian Huber <
sebastian.huber@embedded-brains.de 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 <sebastian.huber@embedded-brains.de>
> ---
>  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
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] RTEMS: Change register_t definition
  2019-02-13 13:33   ` Joel Sherrill
@ 2019-02-13 13:34     ` Sebastian Huber
  0 siblings, 0 replies; 13+ messages in thread
From: Sebastian Huber @ 2019-02-13 13:34 UTC (permalink / raw)
  To: joel; +Cc: Newlib

On 13/02/2019 14:33, Joel Sherrill wrote:
> Is RTEMS the only case in newlib that provides register_t? 

No, this is why I moved the definition to <machine/types.h>.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] RTEMS: Change register_t definition
  2019-02-13 13:19 ` [PATCH 3/3] RTEMS: Change register_t definition Sebastian Huber
  2019-02-13 13:33   ` Joel Sherrill
@ 2019-02-13 17:02   ` Corinna Vinschen
  1 sibling, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2019-02-13 17:02 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Feb 13 14:19, Sebastian Huber wrote:
> On 64-bit targets, the register_t type must be a 64-bit integer.
> 
> Add u_register_t definition for FreeBSD comptatibility.

Can you fix this for Cygwin as well in the same patch?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-13 13:19 ` [PATCH 2/3] Move register_t to system-specific header Sebastian Huber
@ 2019-02-13 17:06   ` Corinna Vinschen
  2019-02-13 19:01     ` Sebastian Huber
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2019-02-13 17:06 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

On Feb 13 14:19, Sebastian Huber wrote:
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
>  newlib/libc/include/machine/types.h           | 2 ++
>  newlib/libc/include/sys/types.h               | 2 +-
>  newlib/libc/sys/rtems/include/machine/types.h | 2 ++
>  winsup/cygwin/include/machine/types.h         | 2 ++
>  4 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h
> index 19d0e8560..fab9cf72c 100644
> --- a/newlib/libc/include/machine/types.h
> +++ b/newlib/libc/include/machine/types.h
> @@ -11,3 +11,5 @@ typedef	__uint64_t	u_quad_t;
>  typedef	__int64_t	quad_t;
>  typedef	quad_t *	qaddr_t;
>  #endif
> +
> +typedef int register_t;
> diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
> index 2685df654..e05263d4e 100644
> --- a/newlib/libc/include/sys/types.h
> +++ b/newlib/libc/include/sys/types.h
> @@ -36,7 +36,7 @@ typedef __uint32_t	u_int32_t;
>  #if ___int64_t_defined
>  typedef __uint64_t	u_int64_t;
>  #endif
> -typedef int register_t;
> +
>  #define __BIT_TYPES_DEFINED__ 1

Why move this out here?  Sure, it's wrong for 64 bit targets ATM,
but moving it to rtems and Cygwin only means that the type suddenly
disappears for other targets.  Better just fix it here for all targets,
including defining uregister_t if __BSD_VISIBLE.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-13 17:06   ` Corinna Vinschen
@ 2019-02-13 19:01     ` Sebastian Huber
  2019-02-13 20:29       ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Huber @ 2019-02-13 19:01 UTC (permalink / raw)
  To: newlib

----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:

> On Feb 13 14:19, Sebastian Huber wrote:
>> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
>> ---
>>  newlib/libc/include/machine/types.h           | 2 ++
>>  newlib/libc/include/sys/types.h               | 2 +-
>>  newlib/libc/sys/rtems/include/machine/types.h | 2 ++
>>  winsup/cygwin/include/machine/types.h         | 2 ++
>>  4 files changed, 7 insertions(+), 1 deletion(-)
>> 
>> diff --git a/newlib/libc/include/machine/types.h
>> b/newlib/libc/include/machine/types.h
>> index 19d0e8560..fab9cf72c 100644
>> --- a/newlib/libc/include/machine/types.h
>> +++ b/newlib/libc/include/machine/types.h
>> @@ -11,3 +11,5 @@ typedef	__uint64_t	u_quad_t;
>>  typedef	__int64_t	quad_t;
>>  typedef	quad_t *	qaddr_t;
>>  #endif
>> +
>> +typedef int register_t;
>> diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
>> index 2685df654..e05263d4e 100644
>> --- a/newlib/libc/include/sys/types.h
>> +++ b/newlib/libc/include/sys/types.h
>> @@ -36,7 +36,7 @@ typedef __uint32_t	u_int32_t;
>>  #if ___int64_t_defined
>>  typedef __uint64_t	u_int64_t;
>>  #endif
>> -typedef int register_t;
>> +
>>  #define __BIT_TYPES_DEFINED__ 1
> 
> Why move this out here?  Sure, it's wrong for 64 bit targets ATM,
> but moving it to rtems and Cygwin only means that the type suddenly
> disappears for other targets.  Better just fix it here for all targets,
> including defining uregister_t if __BSD_VISIBLE.

I found three <machine/types.h> in Newlib, one for Cygwin, one for RTEMS and one for the rest. I moved the definition of register_t to the <machine/types.h> which is included by <sys/types.h> at the end.

If I change the type to __intptr_t wounldn't this break ABI compatibility on Cygwin?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-13 19:01     ` Sebastian Huber
@ 2019-02-13 20:29       ` Corinna Vinschen
  2019-02-14 10:15         ` Sebastian Huber
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2019-02-13 20:29 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

On Feb 13 20:01, Sebastian Huber wrote:
> ----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:
> 
> > On Feb 13 14:19, Sebastian Huber wrote:
> >> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> >> ---
> >>  newlib/libc/include/machine/types.h           | 2 ++
> >>  newlib/libc/include/sys/types.h               | 2 +-
> >>  newlib/libc/sys/rtems/include/machine/types.h | 2 ++
> >>  winsup/cygwin/include/machine/types.h         | 2 ++
> >>  4 files changed, 7 insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/newlib/libc/include/machine/types.h
> >> b/newlib/libc/include/machine/types.h
> >> index 19d0e8560..fab9cf72c 100644
> >> --- a/newlib/libc/include/machine/types.h
> >> +++ b/newlib/libc/include/machine/types.h
> >> @@ -11,3 +11,5 @@ typedef	__uint64_t	u_quad_t;
> >>  typedef	__int64_t	quad_t;
> >>  typedef	quad_t *	qaddr_t;
> >>  #endif
> >> +
> >> +typedef int register_t;
> >> diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
> >> index 2685df654..e05263d4e 100644
> >> --- a/newlib/libc/include/sys/types.h
> >> +++ b/newlib/libc/include/sys/types.h
> >> @@ -36,7 +36,7 @@ typedef __uint32_t	u_int32_t;
> >>  #if ___int64_t_defined
> >>  typedef __uint64_t	u_int64_t;
> >>  #endif
> >> -typedef int register_t;
> >> +
> >>  #define __BIT_TYPES_DEFINED__ 1
> > 
> > Why move this out here?  Sure, it's wrong for 64 bit targets ATM,
> > but moving it to rtems and Cygwin only means that the type suddenly
> > disappears for other targets.  Better just fix it here for all targets,
> > including defining uregister_t if __BSD_VISIBLE.
> 
> I found three <machine/types.h> in Newlib, one for Cygwin, one for
> RTEMS and one for the rest. I moved the definition of register_t to
> the <machine/types.h> which is included by <sys/types.h> at the end.

Oh, right, I missed the non-rtems, non-Cygwin case.

> If I change the type to __intptr_t wounldn't this break ABI
> compatibility on Cygwin?

In how far?  Cygwin's 64 bit ABI is LP64.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-13 20:29       ` Corinna Vinschen
@ 2019-02-14 10:15         ` Sebastian Huber
  2019-02-14 14:02           ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Huber @ 2019-02-14 10:15 UTC (permalink / raw)
  To: newlib



----- Am 13. Feb 2019 um 21:28 schrieb Corinna Vinschen vinschen@redhat.com:

> On Feb 13 20:01, Sebastian Huber wrote:
>> ----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:
>> 
>> > On Feb 13 14:19, Sebastian Huber wrote:
[...]
>> If I change the type to __intptr_t wounldn't this break ABI
>> compatibility on Cygwin?
> 
> In how far?  Cygwin's 64 bit ABI is LP64.

The type for register_t changes from int to __intptr_to, so 32-bit to 64-bit on LP64.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-14 10:15         ` Sebastian Huber
@ 2019-02-14 14:02           ` Corinna Vinschen
  2019-02-14 18:49             ` Sebastian Huber
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2019-02-14 14:02 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

On Feb 14 11:15, Sebastian Huber wrote:
> 
> 
> ----- Am 13. Feb 2019 um 21:28 schrieb Corinna Vinschen vinschen@redhat.com:
> 
> > On Feb 13 20:01, Sebastian Huber wrote:
> >> ----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:
> >> 
> >> > On Feb 13 14:19, Sebastian Huber wrote:
> [...]
> >> If I change the type to __intptr_t wounldn't this break ABI
> >> compatibility on Cygwin?
> > 
> > In how far?  Cygwin's 64 bit ABI is LP64.
> 
> The type for register_t changes from int to __intptr_to, so 32-bit to 64-bit on LP64.

register_t is not used in Cygwin itself.  I don't know its purpose,
actually.  If it has been defined as 32 bit type on 64 bit, wasn't that
a bug and thus unusable before?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-14 14:02           ` Corinna Vinschen
@ 2019-02-14 18:49             ` Sebastian Huber
  2019-02-14 19:19               ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Huber @ 2019-02-14 18:49 UTC (permalink / raw)
  To: newlib

----- Am 14. Feb 2019 um 15:02 schrieb Corinna Vinschen vinschen@redhat.com:

> On Feb 14 11:15, Sebastian Huber wrote:
>> 
>> 
>> ----- Am 13. Feb 2019 um 21:28 schrieb Corinna Vinschen vinschen@redhat.com:
>> 
>> > On Feb 13 20:01, Sebastian Huber wrote:
>> >> ----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:
>> >> 
>> >> > On Feb 13 14:19, Sebastian Huber wrote:
>> [...]
>> >> If I change the type to __intptr_t wounldn't this break ABI
>> >> compatibility on Cygwin?
>> > 
>> > In how far?  Cygwin's 64 bit ABI is LP64.
>> 
>> The type for register_t changes from int to __intptr_to, so 32-bit to 64-bit on
>> LP64.
> 
> register_t is not used in Cygwin itself.  I don't know its purpose,
> actually.  If it has been defined as 32 bit type on 64 bit, wasn't that
> a bug and thus unusable before?

Yes, a 32-bit register_t type on an LP64 system is a bug. It is used in some situations like intptr_t in FreeBSD.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] Move register_t to system-specific header
  2019-02-14 18:49             ` Sebastian Huber
@ 2019-02-14 19:19               ` Corinna Vinschen
  0 siblings, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2019-02-14 19:19 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

On Feb 14 19:50, Sebastian Huber wrote:
> ----- Am 14. Feb 2019 um 15:02 schrieb Corinna Vinschen vinschen@redhat.com:
> 
> > On Feb 14 11:15, Sebastian Huber wrote:
> >> 
> >> 
> >> ----- Am 13. Feb 2019 um 21:28 schrieb Corinna Vinschen vinschen@redhat.com:
> >> 
> >> > On Feb 13 20:01, Sebastian Huber wrote:
> >> >> ----- Am 13. Feb 2019 um 18:06 schrieb Corinna Vinschen vinschen@redhat.com:
> >> >> 
> >> >> > On Feb 13 14:19, Sebastian Huber wrote:
> >> [...]
> >> >> If I change the type to __intptr_t wounldn't this break ABI
> >> >> compatibility on Cygwin?
> >> > 
> >> > In how far?  Cygwin's 64 bit ABI is LP64.
> >> 
> >> The type for register_t changes from int to __intptr_to, so 32-bit to 64-bit on
> >> LP64.
> > 
> > register_t is not used in Cygwin itself.  I don't know its purpose,
> > actually.  If it has been defined as 32 bit type on 64 bit, wasn't that
> > a bug and thus unusable before?
> 
> Yes, a 32-bit register_t type on an LP64 system is a bug. It is used
> in some situations like intptr_t in FreeBSD.

Then it's ok to change it generically in just one spot.  Adding
uregister_t under BSD_VISIBLE as well.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-14 19:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 13:19 [PATCH 1/3] Move RTEMS and XMK specific type definitions Sebastian Huber
2019-02-13 13:19 ` [PATCH 3/3] RTEMS: Change register_t definition Sebastian Huber
2019-02-13 13:33   ` Joel Sherrill
2019-02-13 13:34     ` Sebastian Huber
2019-02-13 17:02   ` Corinna Vinschen
2019-02-13 13:19 ` [PATCH 2/3] Move register_t to system-specific header Sebastian Huber
2019-02-13 17:06   ` Corinna Vinschen
2019-02-13 19:01     ` Sebastian Huber
2019-02-13 20:29       ` Corinna Vinschen
2019-02-14 10:15         ` Sebastian Huber
2019-02-14 14:02           ` Corinna Vinschen
2019-02-14 18:49             ` Sebastian Huber
2019-02-14 19:19               ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).