public inbox for ecos-maintainers@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: eCos Maintainers <ecos-maintainers@ecos.sourceware.org>
Subject: Re: FWD: ioctl h8300 specific problem fix
Date: Mon, 31 Jan 2005 01:25:00 -0000	[thread overview]
Message-ID: <1107134690.12134.267.camel@hermes> (raw)
In-Reply-To: <20050130224621.GS23679@lunn.ch>

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

  reply	other threads:[~2005-01-31  1:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 22:46 Andrew Lunn
2005-01-31  1:25 ` Gary Thomas [this message]
2005-01-31  9:57   ` Nick Garnett
2005-01-31 11:36 ` Bart Veer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1107134690.12134.267.camel@hermes \
    --to=gary@mlbassoc.com \
    --cc=andrew@lunn.ch \
    --cc=ecos-maintainers@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).