Changeset 54


Ignore:
Timestamp:
04/05/09 03:24:04 (12 years ago)
Author:
smurzch2
Message:

Preliminary support for Mac OS X.

Now, it compile, but it will not work with the serial port.
Thanks rorothetroll for this patch

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r45 r54  
    1     SHELL   = /bin/sh
     1SHELL   = /bin/sh
    22
    33VER = $(subst ",,$(filter-out \#define CS_VERSION,$(shell grep CS_VERSION globals.h)))
     
    99win:    cross-i386-pc-cygwin
    1010cygwin: i386-pc-cygwin
     11macosx: macosx-native
    1112
    1213std:    linux \
     14   macosx \
    1315    cross-i386-pc-cygwin \
    1416    cross-powerpc-tuxbox-linux \
     
    6870######################################################################
    6971#
     72#       MacOSX native
     73#
     74######################################################################
     75macosx-native:
     76    @-$(MAKE) --no-print-directory \
     77        -f Maketype TYP=$(subst cross-,,$@) \
     78        OS_LIBS="-lcrypto" \
     79        OS_CULI="-lncurses" \
     80        OS_PTLI="-lpthread" \
     81        DS_OPTS="-O2 -DOS_MACOSX" \
     82        DS_CFLAGS="-c" \
     83        DS_LDFLAGS="" \
     84        DS_ARFLAGS="-rvsl" \
     85        DS_CC=gcc \
     86        DS_AR=ar \
     87        DS_LD=ld \
     88        DS_RL=ranlib \
     89        DS_ST=strip
     90
     91
     92######################################################################
     93#
    7094#   FreeBSD native
    7195#
  • trunk/csctapi/io_serial.c

    r45 r54  
    4646#include "mc_global.h"
    4747
    48 #ifndef OS_CYGWIN32
     48#ifdef OS_LINUX
    4949#include <linux/serial.h>
    5050#endif
     
    515515            cfsetispeed(&newtio, IO_Serial_Bitrate(props->input_bitrate));
    516516        } else {
    517 #ifndef OS_CYGWIN32
     517#ifdef OS_LINUX
    518518            struct serial_struct nuts;
    519519            ioctl(io->fd, TIOCGSERIAL, &nuts);
     
    525525            cfsetispeed(&newtio, IO_Serial_Bitrate(38400));
    526526#else
    527             cfsetospeed(&newtio, IO_Serial_Bitrate(9600 / 3.57 * 6));
    528             cfsetispeed(&newtio, IO_Serial_Bitrate(9600 / 3.57 * 6));
     527            cfsetospeed(&newtio, IO_Serial_Bitrate(props->output_bitrate));
     528            cfsetispeed(&newtio, IO_Serial_Bitrate(props->input_bitrate));
    529529#endif
    530530        }
     
    532532        /* for 3.57 MHz */
    533533        if (reader_irdeto_mode) {
    534 #ifndef OS_CYGWIN32
     534#ifdef OS_LINUX
    535535            struct serial_struct nuts;
    536536            ioctl(io->fd, TIOCGSERIAL, &nuts);
     
    542542            cfsetispeed(&newtio, IO_Serial_Bitrate(38400));
    543543#else
    544             cfsetospeed(&newtio, IO_Serial_Bitrate(5713));
    545             cfsetispeed(&newtio, IO_Serial_Bitrate(5713));
     544            cfsetospeed(&newtio, IO_Serial_Bitrate(props->output_bitrate));
     545            cfsetispeed(&newtio, IO_Serial_Bitrate(props->input_bitrate));
    546546#endif
    547547        } else {
  • trunk/oscam-types.h

    r21 r54  
    88//typedef unsigned short ushort;
    99
    10 #if defined(OS_CYGWIN32) || defined(OS_HPUX) || defined(OS_FREEBSD)
     10#if defined(OS_CYGWIN32) || defined(OS_HPUX) || defined(OS_FREEBSD)  || defined(OS_MACOSX)
    1111typedef unsigned long ulong;
    1212#endif
     
    1717
    1818#ifndef NO_ENDIAN_H
    19 #include <endian.h>
    20 #include <byteswap.h>
     19 #ifdef OS_MACOSX
     20    #include <machine/endian.h>
     21 #else
     22    #include <endian.h>
     23    #include <byteswap.h>
     24 #endif
    2125#endif
    2226
  • trunk/reader-videoguard2.c

    r45 r54  
    44#include <termios.h>
    55#include <unistd.h>
    6 #ifndef OS_CYGWIN32
     6#ifdef OS_LINUX
    77#include <linux/serial.h>
    88#endif
     
    475475  }
    476476
    477 #ifndef OS_CYGWIN32
     477#ifdef OS_LINUX
    478478  int bconst=B38400;
    479479  int baud=64516;
Note: See TracChangeset for help on using the changeset viewer.