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]

Re: FWD: ioctl h8300 specific problem fix


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


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