* FWD: ioctl h8300 specific problem fix
@ 2005-01-30 22:46 Andrew Lunn
2005-01-31 1:25 ` Gary Thomas
2005-01-31 11:36 ` Bart Veer
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Lunn @ 2005-01-30 22:46 UTC (permalink / raw)
To: eCos Maintainers
Hi Folks
Any suggests as to what we should do this with patch for ioctl. I
don't like target specific #define in a generic file like this. We
could just make varargs the standard solution.
Thanks
Andrew
Index: io/fileio/current/ChangeLog
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/io/fileio/current/ChangeLog,v
retrieving revision 1.1.1.13
retrieving revision 1.2
diff -u -r1.1.1.13 -r1.2
--- io/fileio/current/ChangeLog 27 Jan 2005 02:38:13 -0000 1.1.1.13
+++ io/fileio/current/ChangeLog 27 Jan 2005 14:10:56 -0000 1.2
@@ -1,3 +1,10 @@
+2005-01-27 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * src/io.cxx (ioctl): Change a receipt of argument in variable length
+ with h8300.
+ Because it is a register normally, cannot get argument rightly
+ that don't agree with prototype.
+
2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
* src/misc.cxx (cyg_fs_root_lookup): New function to find the mount
Index: io/fileio/current/src/io.cxx
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/io/fileio/current/src/io.cxx,v
retrieving revision 1.1.1.5
retrieving revision 1.2
diff -u -r1.1.1.5 -r1.2
--- io/fileio/current/src/io.cxx 4 Mar 2004 05:17:58 -0000 1.1.1.5
+++ io/fileio/current/src/io.cxx 27 Jan 2005 14:10:56 -0000 1.2
@@ -252,12 +252,29 @@
//==========================================================================
// ioctl
+#include <cyg/infra/diag.h>
+#if !defined(__H8300H__) && !defined(__H8300S__)
__externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data )
{
FILEIO_ENTRY();
int ret;
cyg_file *fp;
+#else
+#include <stdarg.h>
+__externC int ioctl( int fd, CYG_ADDRWORD com, ... )
+{
+ FILEIO_ENTRY();
+
+ int ret;
+ cyg_file *fp;
+ CYG_ADDRWORD data;
+ va_list ap;
+
+ va_start(ap, com);
+ data = va_arg(ap, CYG_ADDRWORD);
+ va_end(ap);
+#endif
fp = cyg_fp_get( fd );
--
Yoshinori Sato
<ysato@users.sourceforge.jp>
----- End forwarded message -----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FWD: ioctl h8300 specific problem fix
2005-01-30 22:46 FWD: ioctl h8300 specific problem fix Andrew Lunn
@ 2005-01-31 1:25 ` Gary Thomas
2005-01-31 9:57 ` Nick Garnett
2005-01-31 11:36 ` Bart Veer
1 sibling, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2005-01-31 1:25 UTC (permalink / raw)
To: Andrew Lunn; +Cc: eCos Maintainers
On Sun, 2005-01-30 at 23:46 +0100, Andrew Lunn wrote:
> Hi Folks
>
> Any suggests as to what we should do this with patch for ioctl. I
> don't like target specific #define in a generic file like this. We
> could just make varargs the standard solution.
I think so - having platform/architecture code is not acceptable.
>
> Thanks
> Andrew
>
> Index: io/fileio/current/ChangeLog
> ===================================================================
> RCS file: /cvsroot/ecos-h8/ecos/packages/io/fileio/current/ChangeLog,v
> retrieving revision 1.1.1.13
> retrieving revision 1.2
> diff -u -r1.1.1.13 -r1.2
> --- io/fileio/current/ChangeLog 27 Jan 2005 02:38:13 -0000 1.1.1.13
> +++ io/fileio/current/ChangeLog 27 Jan 2005 14:10:56 -0000 1.2
> @@ -1,3 +1,10 @@
> +2005-01-27 Yoshinori Sato <ysato@users.sourceforge.jp>
> +
> + * src/io.cxx (ioctl): Change a receipt of argument in variable length
> + with h8300.
> + Because it is a register normally, cannot get argument rightly
> + that don't agree with prototype.
> +
> 2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
>
> * src/misc.cxx (cyg_fs_root_lookup): New function to find the mount
> Index: io/fileio/current/src/io.cxx
> ===================================================================
> RCS file: /cvsroot/ecos-h8/ecos/packages/io/fileio/current/src/io.cxx,v
> retrieving revision 1.1.1.5
> retrieving revision 1.2
> diff -u -r1.1.1.5 -r1.2
> --- io/fileio/current/src/io.cxx 4 Mar 2004 05:17:58 -0000 1.1.1.5
> +++ io/fileio/current/src/io.cxx 27 Jan 2005 14:10:56 -0000 1.2
> @@ -252,12 +252,29 @@
> //==========================================================================
> // ioctl
>
> +#include <cyg/infra/diag.h>
> +#if !defined(__H8300H__) && !defined(__H8300S__)
> __externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data )
> {
> FILEIO_ENTRY();
>
> int ret;
> cyg_file *fp;
> +#else
> +#include <stdarg.h>
> +__externC int ioctl( int fd, CYG_ADDRWORD com, ... )
> +{
> + FILEIO_ENTRY();
> +
> + int ret;
> + cyg_file *fp;
> + CYG_ADDRWORD data;
> + va_list ap;
> +
> + va_start(ap, com);
> + data = va_arg(ap, CYG_ADDRWORD);
> + va_end(ap);
> +#endif
>
> fp = cyg_fp_get( fd );
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FWD: ioctl h8300 specific problem fix
2005-01-31 1:25 ` Gary Thomas
@ 2005-01-31 9:57 ` Nick Garnett
0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2005-01-31 9:57 UTC (permalink / raw)
To: Gary Thomas; +Cc: Andrew Lunn, eCos Maintainers
Gary Thomas <gary@mlbassoc.com> writes:
> On Sun, 2005-01-30 at 23:46 +0100, Andrew Lunn wrote:
> > Hi Folks
> >
> > Any suggests as to what we should do this with patch for ioctl. I
> > don't like target specific #define in a generic file like this. We
> > could just make varargs the standard solution.
>
> I think so - having platform/architecture code is not acceptable.
Agreed. I don't now recall why the H8300 has problems with this, but
if the change will work for all platforms, then it should be made.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
Besuchen Sie uns vom 22.-24.02.05 auf der Embedded World 2005, Stand 11-124
Visit us at Embedded World 2005, Nürnberg, Germany, 22-24 Feb, Stand 11-124
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FWD: ioctl h8300 specific problem fix
2005-01-30 22:46 FWD: ioctl h8300 specific problem fix Andrew Lunn
2005-01-31 1:25 ` Gary Thomas
@ 2005-01-31 11:36 ` Bart Veer
1 sibling, 0 replies; 4+ messages in thread
From: Bart Veer @ 2005-01-31 11:36 UTC (permalink / raw)
To: andrew; +Cc: ecos-maintainers
>>>>> "Andrew" == Andrew Lunn <andrew@lunn.ch> writes:
Andrew> Hi Folks
Andrew> Any suggests as to what we should do this with patch for
Andrew> ioctl. I don't like target specific #define in a generic
Andrew> file like this. We could just make varargs the standard
Andrew> solution.
We should make the varargs version the standard solution. ioctl() has
not been well-standardized in the past, but these days the varargs
version seems to be ubiquitous and is listed @
http://www.opengroup.org/onlinepubs/009695399/functions/ioctl.html
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-31 11:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-30 22:46 FWD: ioctl h8300 specific problem fix Andrew Lunn
2005-01-31 1:25 ` Gary Thomas
2005-01-31 9:57 ` Nick Garnett
2005-01-31 11:36 ` Bart Veer
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).