[BACK]Return to compat_linux.h CVS log [TXT][DIR] Up to [local] / sys / arch / zaurus / stand / zboot

Annotation of sys/arch/zaurus/stand/zboot/compat_linux.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: compat_linux.h,v 1.8 2007/06/16 00:26:33 deraadt Exp $        */
                      2:
                      3: /*
                      4:  * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
                      5:  *
                      6:  * Permission to use, copy, modify, and distribute this software for any
                      7:  * purpose with or without fee is hereby granted, provided that the above
                      8:  * copyright notice and this permission notice appear in all copies.
                      9:  *
                     10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     11:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     12:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     13:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     14:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     15:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     16:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     17:  */
                     18:
                     19: /* This file must be included late, for redefinitions to take effect. */
                     20:
                     21: #ifndef _LOCORE
                     22:
                     23: #include <compat/linux/linux_types.h>
                     24: #include <compat/linux/linux_fcntl.h>
                     25: #include <compat/linux/linux_termios.h>
                     26: struct proc;
                     27: #include <compat/linux/linux_ioctl.h>
                     28:
                     29: #define        INT_LIMIT(x)            (~((x)1 << (sizeof(x)*8 - 1)))
                     30: #define        OFFSET_MAX              INT_LIMIT(long long)
                     31: #define        OFFT_OFFSET_MAX         INT_LIMIT(long)
                     32:
                     33: #undef O_RDONLY
                     34: #undef O_WRONLY
                     35: #undef O_RDWR
                     36: #undef SEEK_SET
                     37: #undef SEEK_CUR
                     38:
                     39: #define O_RDONLY               LINUX_O_RDONLY
                     40: #define O_WRONLY               LINUX_O_WRONLY
                     41: #define O_RDWR                 LINUX_O_RDWR
                     42: #define SEEK_SET               0
                     43: #define SEEK_CUR               1
                     44:
                     45: #define        LINUX_EOVERFLOW         75
                     46:
                     47: #define termios                        linux_termios
                     48:
                     49: #define IMAXBEL                        LINUX_IMAXBEL
                     50: #define IGNBRK                 LINUX_IGNBRK
                     51: #define BRKINT                 LINUX_BRKINT
                     52: #define PARMRK                 LINUX_PARMRK
                     53: #define ISTRIP                 LINUX_ISTRIP
                     54: #define INLCR                  LINUX_INLCR
                     55: #define IGNCR                  LINUX_IGNCR
                     56: #define ICRNL                  LINUX_ICRNL
                     57: #define IXON                   LINUX_IXON
                     58: #define OPOST                  LINUX_OPOST
                     59: #define ECHO                   LINUX_ECHO
                     60: #define ECHONL                 LINUX_ECHONL
                     61: #define ICANON                 LINUX_ICANON
                     62: #define ISIG                   LINUX_ISIG
                     63: #define IEXTEN                 LINUX_IEXTEN
                     64: #define CSIZE                  LINUX_CSIZE
                     65: #define PARENB                 LINUX_PARENB
                     66: #define CS8                    LINUX_CS8
                     67:
                     68: #define TIOCGETA               LINUX_TCGETS
                     69: #define TIOCSETA               LINUX_TCGETS
                     70: #define TIOCSETAW              LINUX_TCSETSW
                     71: #define TIOCSETAF              LINUX_TCSETSF
                     72:
                     73: #define TCSANOW                        LINUX_TCSANOW
                     74: #define TCSADRAIN              LINUX_TCSADRAIN
                     75: #define TCSAFLUSH              LINUX_TCSAFLUSH
                     76:
                     77: typedef unsigned int speed_t;
                     78:
                     79: void   cfmakeraw(struct termios *);
                     80: int    cfsetspeed(struct termios *, speed_t);
                     81: int    tcgetattr(int, struct termios *);
                     82: int    tcsetattr(int, int, struct termios *);
                     83:
                     84: #endif /* !_LOCORE */
                     85:
                     86: #include <compat/linux/linux_syscall.h>
                     87:
                     88: /* linux/asm/unistd.h */
                     89: #define __NR_SYSCALL_BASE      0x900000
                     90: #define __NR_exit              (__NR_SYSCALL_BASE+LINUX_SYS_exit)
                     91: #define __NR_read              (__NR_SYSCALL_BASE+LINUX_SYS_read)
                     92: #define __NR_write             (__NR_SYSCALL_BASE+LINUX_SYS_write)
                     93: #define __NR_open              (__NR_SYSCALL_BASE+LINUX_SYS_open)
                     94: #define __NR_close             (__NR_SYSCALL_BASE+LINUX_SYS_close)
                     95: #define __NR_time              (__NR_SYSCALL_BASE+LINUX_SYS_time)
                     96: #define __NR_lseek32           (__NR_SYSCALL_BASE+LINUX_SYS_lseek)
                     97: #define __NR_ioctl             (__NR_SYSCALL_BASE+LINUX_SYS_ioctl)
                     98: #define __NR_select            (__NR_SYSCALL_BASE+LINUX_SYS_select)
                     99: #define __NR_stat              (__NR_SYSCALL_BASE+LINUX_SYS_stat)
                    100: #define __NR_syscall           (__NR_SYSCALL_BASE+113)
                    101:
                    102: #undef SYS_select
                    103: #define SYS_select             __NR_select

CVSweb