This is the mail archive of the ecos-maintainers@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FWD: ioctl h8300 specific problem fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]