public inbox for ecos-maintainers@sourceware.org
 help / color / mirror / Atom feed
* 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

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).