* [PATCH] Fix RTEMS ioctl() declaration
@ 2017-06-07 9:08 Sebastian Huber
2017-06-07 13:11 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Huber @ 2017-06-07 9:08 UTC (permalink / raw)
To: newlib
Using uint32_t for ioctl_command_t does not work well on 64-bit targets.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
newlib/libc/sys/rtems/include/sys/ioccom.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h
index 9c5350d1e..2c0e9ee71 100644
--- a/newlib/libc/sys/rtems/include/sys/ioccom.h
+++ b/newlib/libc/sys/rtems/include/sys/ioccom.h
@@ -36,7 +36,7 @@
#include <sys/types.h>
#include <stdint.h>
-typedef uint32_t ioctl_command_t;
+typedef unsigned long ioctl_command_t;
/*
* Ioctl's have the command encoded in the lower word, and the size of
@@ -79,7 +79,7 @@ typedef uint32_t ioctl_command_t;
#include <sys/cdefs.h>
__BEGIN_DECLS
-int ioctl(int, unsigned long, ...);
+int ioctl(int, ioctl_command_t, ...);
__END_DECLS
#endif
--
2.12.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix RTEMS ioctl() declaration
2017-06-07 9:08 [PATCH] Fix RTEMS ioctl() declaration Sebastian Huber
@ 2017-06-07 13:11 ` Corinna Vinschen
2017-06-07 13:14 ` Sebastian Huber
0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2017-06-07 13:11 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
On Jun 7 11:08, Sebastian Huber wrote:
> Using uint32_t for ioctl_command_t does not work well on 64-bit targets.
>
> Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
> ---
> newlib/libc/sys/rtems/include/sys/ioccom.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h
> index 9c5350d1e..2c0e9ee71 100644
> --- a/newlib/libc/sys/rtems/include/sys/ioccom.h
> +++ b/newlib/libc/sys/rtems/include/sys/ioccom.h
> @@ -36,7 +36,7 @@
> #include <sys/types.h>
> #include <stdint.h>
>
> -typedef uint32_t ioctl_command_t;
> +typedef unsigned long ioctl_command_t;
Why do you need a ioctl_command_t at all? It's not in FreeBSD either.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix RTEMS ioctl() declaration
2017-06-07 13:11 ` Corinna Vinschen
@ 2017-06-07 13:14 ` Sebastian Huber
2017-06-07 14:27 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Huber @ 2017-06-07 13:14 UTC (permalink / raw)
To: newlib
On 07/06/17 15:11, Corinna Vinschen wrote:
> On Jun 7 11:08, Sebastian Huber wrote:
>> Using uint32_t for ioctl_command_t does not work well on 64-bit targets.
>>
>> Signed-off-by: Sebastian Huber<sebastian.huber@embedded-brains.de>
>> ---
>> newlib/libc/sys/rtems/include/sys/ioccom.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h
>> index 9c5350d1e..2c0e9ee71 100644
>> --- a/newlib/libc/sys/rtems/include/sys/ioccom.h
>> +++ b/newlib/libc/sys/rtems/include/sys/ioccom.h
>> @@ -36,7 +36,7 @@
>> #include <sys/types.h>
>> #include <stdint.h>
>>
>> -typedef uint32_t ioctl_command_t;
>> +typedef unsigned long ioctl_command_t;
> Why do you need a ioctl_command_t at all? It's not in FreeBSD either.
Its used by the legacy network stack in RTEMS (e.g. various device
drivers). I don't know who introduced this type and why. glibc has also
simply "unsigned long".
--
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] 6+ messages in thread
* Re: [PATCH] Fix RTEMS ioctl() declaration
2017-06-07 13:14 ` Sebastian Huber
@ 2017-06-07 14:27 ` Corinna Vinschen
2017-06-08 5:33 ` Sebastian Huber
0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2017-06-07 14:27 UTC (permalink / raw)
To: Sebastian Huber; +Cc: newlib
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
On Jun 7 15:14, Sebastian Huber wrote:
> On 07/06/17 15:11, Corinna Vinschen wrote:
>
> > On Jun 7 11:08, Sebastian Huber wrote:
> > > Using uint32_t for ioctl_command_t does not work well on 64-bit targets.
> > >
> > > Signed-off-by: Sebastian Huber<sebastian.huber@embedded-brains.de>
> > > ---
> > > newlib/libc/sys/rtems/include/sys/ioccom.h | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h
> > > index 9c5350d1e..2c0e9ee71 100644
> > > --- a/newlib/libc/sys/rtems/include/sys/ioccom.h
> > > +++ b/newlib/libc/sys/rtems/include/sys/ioccom.h
> > > @@ -36,7 +36,7 @@
> > > #include <sys/types.h>
> > > #include <stdint.h>
> > > -typedef uint32_t ioctl_command_t;
> > > +typedef unsigned long ioctl_command_t;
> > Why do you need a ioctl_command_t at all? It's not in FreeBSD either.
>
> Its used by the legacy network stack in RTEMS (e.g. various device drivers).
> I don't know who introduced this type and why. glibc has also simply
> "unsigned long".
Ok. At this point I would have replied "please apply", but you
already did that. It's write *after* approval ;)
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix RTEMS ioctl() declaration
2017-06-07 14:27 ` Corinna Vinschen
@ 2017-06-08 5:33 ` Sebastian Huber
2017-06-09 13:36 ` Corinna Vinschen
0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Huber @ 2017-06-08 5:33 UTC (permalink / raw)
To: newlib
On 07/06/17 16:27, Corinna Vinschen wrote:
> [...]
> Ok. At this point I would have replied "please apply", but you
> already did that. It's write *after* approval ;)
Sorry for the rush.
So, you are not particularly fond of having OS port maintainers in
Newlib similar to GCC?
--
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] 6+ messages in thread
* Re: [PATCH] Fix RTEMS ioctl() declaration
2017-06-08 5:33 ` Sebastian Huber
@ 2017-06-09 13:36 ` Corinna Vinschen
0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2017-06-09 13:36 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
On Jun 8 07:32, Sebastian Huber wrote:
> On 07/06/17 16:27, Corinna Vinschen wrote:
>
> > [...]
> > Ok. At this point I would have replied "please apply", but you
> > already did that. It's write *after* approval ;)
>
> Sorry for the rush.
>
> So, you are not particularly fond of having OS port maintainers in Newlib
> similar to GCC?
It's more about timing. From write-after-approval to writing w/o
approval in less than an hour? Talking about rushing things...
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-09 13:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 9:08 [PATCH] Fix RTEMS ioctl() declaration Sebastian Huber
2017-06-07 13:11 ` Corinna Vinschen
2017-06-07 13:14 ` Sebastian Huber
2017-06-07 14:27 ` Corinna Vinschen
2017-06-08 5:33 ` Sebastian Huber
2017-06-09 13:36 ` 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).