Changeset 1221


Ignore:
Timestamp:
01/14/10 12:31:41 (12 years ago)
Author:
dingo35
Message:

Fix compiler errors on tuxbox and mipsel platforms

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/icc_async.c

    r1220 r1221  
    4444static void ICC_Async_Clear (ICC_Async * icc);
    4545
     46int fdmc=(-1);
    4647
    4748/*
     
    7172   
    7273#if defined(SCI_DEV) || defined(COOL)
    73     if (reader_type==R_INTERNAL)
     74    if (reader[ridx].typ==R_INTERNAL)
    7475#ifdef SH4
    7576        reader[ridx].handle = open (reader[ridx].device, O_RDWR|O_NONBLOCK|O_NOCTTY);
     
    8889
    8990#if defined(TUXBOX) && defined(PPC)
    90     if ((reader_type == R_DB2COM1) || (reader_type == R_DB2COM2))
     91    if ((reader[ridx].typ == R_DB2COM1) || (reader[ridx].typ == R_DB2COM2))
    9192        if ((fdmc = open(DEV_MULTICAM, O_RDWR)) < 0)
    9293        {
     
    126127
    127128#if defined(TUXBOX) && defined(PPC)
    128     if ((reader[ridx].typ==R_DB2COM1) || (ifd->reader[ridx].typ==R_DB2COM2))
     129    if ((reader[ridx].typ==R_DB2COM1) || (reader[ridx].typ==R_DB2COM2))
    129130    {
    130131        ushort msr=1;
    131132        extern int fdmc;
    132         IO_Serial_Ioctl_Lock(ifd->io, 1);
     133        IO_Serial_Ioctl_Lock(1);
    133134        ioctl(fdmc, GET_PCDAT, &msr);
    134135        if (reader[ridx].typ==R_DB2COM2)
     
    136137        else
    137138            in=((msr & 0x0f00) == 0x0f00);
    138         IO_Serial_Ioctl_Lock(ifd->io, 0);
     139        IO_Serial_Ioctl_Lock(0);
    139140    }
    140141    else
     
    223224    /* Reset ICC */
    224225#ifdef SCI_DEV
    225     if (ifd->reader[ridx].typ == R_INTERNAL) {
     226    if (reader[ridx].typ == R_INTERNAL) {
    226227        if (!Sci_Reset(ifd, &(icc->atr)))
    227228        {
     
    326327#include "sci_global.h"
    327328#include "sci_ioctl.h"
    328     if (icc->ifd->reader[ridx].typ == R_INTERNAL) {
     329    if (reader[ridx].typ == R_INTERNAL) {
    329330        SCI_PARAMETERS params;
    330         if (ioctl(icc->reader[ridx].handle, IOCTL_GET_PARAMETERS, &params) < 0 )
     331        if (ioctl(reader[ridx].handle, IOCTL_GET_PARAMETERS, &params) < 0 )
    331332            return ICC_ASYNC_IFD_ERROR;
    332333        switch (icc->protocol_type) {
     
    342343                break;
    343344        }
    344         if (ioctl(icc->reader[ridx].handle, IOCTL_SET_PARAMETERS, &params)!=0)
     345        if (ioctl(reader[ridx].handle, IOCTL_SET_PARAMETERS, &params)!=0)
    345346            return ICC_ASYNC_IFD_ERROR;
    346347           
  • trunk/csctapi/ifd_sci.c

    r1216 r1221  
    1414#include "sci_ioctl.h"
    1515#include "atr.h"
     16#include "string.h"
    1617#ifdef SH4
    1718#include <fcntl.h>
  • trunk/csctapi/ifd_towitoko.c

    r1220 r1221  
    445445            ret = IFD_TOWITOKO_IO_ERROR;
    446446
    447             IO_Serial_Ioctl_Lock(ifd->io, 1);
     447            IO_Serial_Ioctl_Lock(1);
    448448#ifdef USE_GPIO
    449449            if (gpio_detect)
     
    471471                IO_Serial_RTS_Clr(ifd->io);
    472472           
    473             IO_Serial_Ioctl_Lock(ifd->io, 0);
     473            IO_Serial_Ioctl_Lock(0);
    474474
    475475            (*atr) = ATR_New ();
  • trunk/csctapi/io_serial.c

    r1220 r1221  
    7373int io_serial_need_dummy_char = 0;
    7474
    75 int fdmc=(-1);
     75extern int fdmc;
    7676
    7777#if defined(TUXBOX) && defined(PPC)
    78 void IO_Serial_Ioctl_Lock(IO_Serial * io, int flag)
     78void IO_Serial_Ioctl_Lock(int flag)
    7979{
    8080  extern int *oscam_sem;
    81   if ((io->reader_type!=R_DB2COM1) && (io->reader_type!=R_DB2COM2)) return;
     81  if ((reader[ridx].typ!=R_DB2COM1) && (reader[ridx].typ!=R_DB2COM2)) return;
    8282  if (!flag)
    8383    *oscam_sem=0;
    84   else while (*oscam_sem!=io->reader_type)
     84  else while (*oscam_sem!=reader[ridx].typ)
    8585  {
    8686    while (*oscam_sem)
    87     usleep((io->reader_type)*2000);
    88     *oscam_sem=io->reader_type;
     87    usleep((reader[ridx].typ)*2000); //FIXME is this right ?!?!
     88    *oscam_sem=reader[ridx].typ;
    8989    usleep(1000);
    9090  }
     
    570570//      return FALSE;
    571571
    572     IO_Serial_Ioctl_Lock(io, 1);
     572    IO_Serial_Ioctl_Lock(1);
    573573    IO_Serial_DTR_RTS(io, 0, io->rts == IO_SERIAL_HIGH);
    574574    IO_Serial_DTR_RTS(io, 1, io->dtr == IO_SERIAL_HIGH);
    575     IO_Serial_Ioctl_Lock(io, 0);
     575    IO_Serial_Ioctl_Lock(0);
    576576   
    577577#ifdef DEBUG_IO
  • trunk/csctapi/io_serial.h

    r1208 r1221  
    9393extern bool IO_Serial_DTR_RTS(IO_Serial * io, int, int);
    9494#if defined(TUXBOX) && defined(PPC)
    95 extern void IO_Serial_Ioctl_Lock(IO_Serial *, int);
     95extern void IO_Serial_Ioctl_Lock(int);
    9696#else
    97 #define IO_Serial_Ioctl_Lock(a, b) {}
     97#define IO_Serial_Ioctl_Lock(b) {} //FIXME ugly !!
    9898#endif
    9999
  • trunk/reader-common.c

    r1209 r1221  
    4242      }
    4343  }
     44    reader[ridx].typ = rc;
    4445  return(rc);
    4546}
Note: See TracChangeset for help on using the changeset viewer.