changeset 1891:314ff4b264b6

* src/io.cxx (ioctl): Change ioctl to use varargs so that it works on with h8300 who's compiler does not like doing it the other way.
author asl
date Tue, 08 Feb 2005 19:58:54 +0000
parents 8ebde8529dc7
children 59626c067d41
files packages/io/fileio/current/ChangeLog packages/io/fileio/current/src/io.cxx
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/fileio/current/ChangeLog
+++ b/packages/io/fileio/current/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-27  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* src/io.cxx (ioctl): Change ioctl to use varargs so that it works
+	on with h8300 who's compiler does not like doing it the other way.
+	
 2005-01-22  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* src/misc.cxx (cyg_fs_root_lookup): New function to find the mount
--- a/packages/io/fileio/current/src/io.cxx
+++ b/packages/io/fileio/current/src/io.cxx
@@ -252,18 +252,24 @@ readwritev( int fd, const cyg_iovec *_io
 //==========================================================================
 // ioctl
 
-__externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data )
+__externC int ioctl( int fd, CYG_ADDRWORD com, ... )
 {
     FILEIO_ENTRY();
 
     int ret;
     cyg_file *fp;
-    
+    va_list ap;
+    CYG_ADDRWORD data;
+
     fp = cyg_fp_get( fd );
 
     if( fp == NULL )
         FILEIO_RETURN(EBADF);
 
+    va_start(ap, com);
+    data = va_arg(ap, CYG_ADDRWORD);
+    va_end(ap);
+    
     LOCK_FILE( fp );
     
     ret = fp->f_ops->fo_ioctl( fp, com, data );