Now that we don't have a linuxolator on alpha anymore:

- unifdef __alpha__
 - revert rev. 1.66 of linux_socket.c
This commit is contained in:
Alexander Leidinger 2006-05-10 20:38:16 +00:00
parent 6ff45b4e35
commit 01e0ffbae8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158415
7 changed files with 33 additions and 342 deletions

View file

@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <compat/linux/linux_util.h>
#ifndef __alpha__
int
linux_creat(struct thread *td, struct linux_creat_args *args)
{
@ -81,7 +80,6 @@ linux_creat(struct thread *td, struct linux_creat_args *args)
LFREEPATH(path);
return (error);
}
#endif /*!__alpha__*/
int
linux_open(struct thread *td, struct linux_open_args *args)
@ -175,7 +173,6 @@ linux_lseek(struct thread *td, struct linux_lseek_args *args)
return error;
}
#ifndef __alpha__
int
linux_llseek(struct thread *td, struct linux_llseek_args *args)
{
@ -203,9 +200,7 @@ linux_llseek(struct thread *td, struct linux_llseek_args *args)
td->td_retval[0] = 0;
return 0;
}
#endif /*!__alpha__*/
#ifndef __alpha__
int
linux_readdir(struct thread *td, struct linux_readdir_args *args)
{
@ -216,7 +211,6 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args)
lda.count = 1;
return linux_getdents(td, &lda);
}
#endif /*!__alpha__*/
/*
* Note that linux_getdents(2) and linux_getdents64(2) have the same
@ -705,7 +699,6 @@ linux_link(struct thread *td, struct linux_link_args *args)
return (error);
}
#ifndef __alpha__
int
linux_fdatasync(td, uap)
struct thread *td;
@ -716,7 +709,6 @@ linux_fdatasync(td, uap)
bsd.fd = uap->fd;
return fsync(td, &bsd);
}
#endif /*!__alpha__*/
int
linux_pread(td, uap)
@ -951,10 +943,6 @@ bsd_to_linux_flock64(struct flock *bsd_flock, struct l_flock64 *linux_flock)
}
#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
#if defined(__alpha__)
#define linux_fcntl64_args linux_fcntl_args
#endif
static int
fcntl_common(struct thread *td, struct linux_fcntl64_args *args)
{

View file

@ -276,15 +276,8 @@ struct linux_termios {
unsigned int c_oflag;
unsigned int c_cflag;
unsigned int c_lflag;
#ifdef __alpha__
unsigned char c_cc[LINUX_NCCS];
unsigned char c_line;
unsigned int c_ispeed;
unsigned int c_ospeed;
#else
unsigned char c_line;
unsigned char c_cc[LINUX_NCCS];
#endif
};
struct linux_winsize {
@ -634,20 +627,7 @@ bsd_to_linux_termio(struct termios *bios, struct linux_termio *lio)
lio->c_cflag = lios.c_cflag;
lio->c_lflag = lios.c_lflag;
lio->c_line = lios.c_line;
#ifdef __alpha__
lio->c_cc[LINUX__VINTR] = lios.c_cc[LINUX_VINTR];
lio->c_cc[LINUX__VQUIT] = lios.c_cc[LINUX_VQUIT];
lio->c_cc[LINUX__VERASE] = lios.c_cc[LINUX_VERASE];
lio->c_cc[LINUX__VKILL] = lios.c_cc[LINUX_VKILL];
lio->c_cc[LINUX__VEOF] =
lios.c_cc[(lios.c_lflag & ICANON) ? LINUX_VEOF : LINUX_VMIN];
lio->c_cc[LINUX__VEOL] =
lios.c_cc[(lios.c_lflag & ICANON) ? LINUX_VEOL : LINUX_VTIME];
lio->c_cc[LINUX__VEOL2] = lios.c_cc[LINUX_VEOL2];
lio->c_cc[LINUX__VSWTC] = lios.c_cc[LINUX_VSWTC];
#else
memcpy(lio->c_cc, lios.c_cc, LINUX_NCC);
#endif
}
static void
@ -660,24 +640,9 @@ linux_to_bsd_termio(struct linux_termio *lio, struct termios *bios)
lios.c_oflag = lio->c_oflag;
lios.c_cflag = lio->c_cflag;
lios.c_lflag = lio->c_lflag;
#ifdef __alpha__
for (i=0; i<LINUX_NCCS; i++)
lios.c_cc[i] = LINUX_POSIX_VDISABLE;
lios.c_cc[LINUX_VINTR] = lio->c_cc[LINUX__VINTR];
lios.c_cc[LINUX_VQUIT] = lio->c_cc[LINUX__VQUIT];
lios.c_cc[LINUX_VERASE] = lio->c_cc[LINUX__VERASE];
lios.c_cc[LINUX_VKILL] = lio->c_cc[LINUX__VKILL];
lios.c_cc[LINUX_VEOL2] = lio->c_cc[LINUX__VEOL2];
lios.c_cc[LINUX_VSWTC] = lio->c_cc[LINUX__VSWTC];
lios.c_cc[(lio->c_lflag & ICANON) ? LINUX_VEOF : LINUX_VMIN] =
lio->c_cc[LINUX__VEOF];
lios.c_cc[(lio->c_lflag & ICANON) ? LINUX_VEOL : LINUX_VTIME] =
lio->c_cc[LINUX__VEOL];
#else
for (i=LINUX_NCC; i<LINUX_NCCS; i++)
lios.c_cc[i] = LINUX_POSIX_VDISABLE;
memcpy(lios.c_cc, lio->c_cc, LINUX_NCC);
#endif
linux_to_bsd_termios(&lios, bios);
}

View file

@ -278,19 +278,6 @@
/*
* termio
*/
#ifdef __alpha__
#define LINUX_TCGETS 0x7413
#define LINUX_TCSETS 0x7414
#define LINUX_TCSETSW 0x7415
#define LINUX_TCSETSF 0x7416
#define LINUX_TCGETA 0x7417
#define LINUX_TCSETA 0x7418
#define LINUX_TCSETAW 0x7419
#define LINUX_TCSETAF 0x741c
#define LINUX_TCSBRK 0x741d
#define LINUX_TCXONC 0x741e
#define LINUX_TCFLSH 0x741f
#else
#define LINUX_TCGETS 0x5401
#define LINUX_TCSETS 0x5402
#define LINUX_TCSETSW 0x5403
@ -302,30 +289,19 @@
#define LINUX_TCSBRK 0x5409
#define LINUX_TCXONC 0x540A
#define LINUX_TCFLSH 0x540B
#endif
#define LINUX_TIOCEXCL 0x540C
#define LINUX_TIOCNXCL 0x540D
#define LINUX_TIOCSCTTY 0x540E
#ifdef __alpha__
#define LINUX_TIOCSPGRP 0x7476
#define LINUX_TIOCGPGRP 0x7477
#else
#define LINUX_TIOCGPGRP 0x540F
#define LINUX_TIOCSPGRP 0x5410
#endif
#define LINUX_TIOCOUTQ 0x5411
#define LINUX_TIOCSTI 0x5412
#ifdef __alpha__
#define LINUX_TIOCSWINSZ 0x7467
#define LINUX_TIOCGWINSZ 0x7468
#else
#define LINUX_TIOCGWINSZ 0x5413
#define LINUX_TIOCSWINSZ 0x5414
#endif
#define LINUX_TIOCMGET 0x5415
#define LINUX_TIOCMBIS 0x5416
@ -334,11 +310,7 @@
#define LINUX_TIOCGSOFTCAR 0x5419
#define LINUX_TIOCSSOFTCAR 0x541A
#ifdef __alpha__
#define LINUX_FIONREAD 0x667f
#else
#define LINUX_FIONREAD 0x541B
#endif
#define LINUX_TIOCINQ FIONREAD
#define LINUX_TIOCLINUX 0x541C
@ -347,11 +319,7 @@
#define LINUX_TIOCSSERIAL 0x541F
#define LINUX_TIOCPKT 0x5420
#ifdef __alpha__
#define LINUX_FIONBIO 0x667e
#else
#define LINUX_FIONBIO 0x5421
#endif
#define LINUX_TIOCNOTTY 0x5422
#define LINUX_TIOCSETD 0x5423
@ -364,15 +332,9 @@
#define LINUX_TIOCGPTN 0x5430
#ifdef __alpha__
#define LINUX_FIOCLEX 0x6601
#define LINUX_FIONCLEX 0x6602
#define LINUX_FIOASYNC 0x667d
#else
#define LINUX_FIONCLEX 0x5450
#define LINUX_FIOCLEX 0x5451
#define LINUX_FIOASYNC 0x5452
#endif
#define LINUX_TIOCSERCONFIG 0x5453
#define LINUX_TIOCSERGWILD 0x5454
@ -380,13 +342,8 @@
#define LINUX_TIOCGLCKTRMIOS 0x5456
#define LINUX_TIOCSLCKTRMIOS 0x5457
#ifdef __alpha__
#define LINUX_IOCTL_TERMIO_MIN LINUX_TIOCEXCL
#define LINUX_IOCTL_TERMIO_MAX LINUX_TIOCGPGRP
#else
#define LINUX_IOCTL_TERMIO_MIN LINUX_TCGETS
#define LINUX_IOCTL_TERMIO_MAX LINUX_TIOCSLCKTRMIOS
#endif
/* arguments for tcflow() and LINUX_TCXONC */
#define LINUX_TCOOFF 0
@ -406,18 +363,6 @@
#define LINUX_N_PPP 3
/* Linux termio c_cc values */
#ifdef __alpha__
#define LINUX__VINTR 0
#define LINUX__VQUIT 1
#define LINUX__VERASE 2
#define LINUX__VKILL 3
#define LINUX__VEOF 4
#define LINUX__VMIN 4
#define LINUX__VEOL 5
#define LINUX__VTIME 5
#define LINUX__VEOL2 6
#define LINUX__VSWTC 7
#else
#define LINUX_VINTR 0
#define LINUX_VQUIT 1
#define LINUX_VERASE 2
@ -426,29 +371,9 @@
#define LINUX_VTIME 5
#define LINUX_VMIN 6
#define LINUX_VSWTC 7
#endif
#define LINUX_NCC 8
/* Linux termios c_cc values */
#ifdef __alpha__
#define LINUX_VEOF 0
#define LINUX_VEOL 1
#define LINUX_VEOL2 2
#define LINUX_VERASE 3
#define LINUX_VWERASE 4
#define LINUX_VKILL 5
#define LINUX_VREPRINT 6
#define LINUX_VSWTC 7
#define LINUX_VINTR 8
#define LINUX_VQUIT 9
#define LINUX_VSUSP 10
#define LINUX_VSTART 12
#define LINUX_VSTOP 13
#define LINUX_VLNEXT 14
#define LINUX_VDISCARD 15
#define LINUX_VMIN 16
#define LINUX_VTIME 17
#else
/* In addition to the termio values */
#define LINUX_VSTART 8
#define LINUX_VSTOP 9
@ -459,7 +384,6 @@
#define LINUX_VWERASE 14
#define LINUX_VLNEXT 15
#define LINUX_VEOL2 16
#endif
#define LINUX_NCCS 19
#define LINUX_POSIX_VDISABLE '\0'
@ -475,30 +399,18 @@
#define LINUX_IGNCR 0x0000080
#define LINUX_ICRNL 0x0000100
#ifdef __alpha__
#define LINUX_IXON 0x0000200
#define LINUX_IXOFF 0x0000400
#define LINUX_IXANY 0x0000800
#define LINUX_IUCLC 0x0001000
#else
#define LINUX_IUCLC 0x0000200
#define LINUX_IXON 0x0000400
#define LINUX_IXANY 0x0000800
#define LINUX_IXOFF 0x0001000
#endif
#define LINUX_IMAXBEL 0x0002000
/* Linux c_oflag masks */
#define LINUX_OPOST 0x0000001
#ifdef __alpha__
#define LINUX_ONLCR 0x0000002
#define LINUX_OLCUC 0x0000004
#else
#define LINUX_OLCUC 0x0000002
#define LINUX_ONLCR 0x0000004
#endif
#define LINUX_OCRNL 0x0000008
#define LINUX_ONOCR 0x0000010
@ -506,33 +418,6 @@
#define LINUX_OFILL 0x0000040
#define LINUX_OFDEL 0x0000080
#ifdef __alpha__
#define LINUX_NLDLY 0x0000300
#define LINUX_NL0 0x0000000
#define LINUX_NL1 0x0000100
#define LINUX_NL2 0x0000200
#define LINUX_NL3 0x0000300
#define LINUX_TABDLY 0x000C000
#define LINUX_TAB0 0x0000000
#define LINUX_TAB1 0x0004000
#define LINUX_TAB2 0x0008000
#define LINUX_TAB3 0x000C000
#define LINUX_CRDLY 0x0030000
#define LINUX_CR0 0x0000000
#define LINUX_CR1 0x0010000
#define LINUX_CR2 0x0020000
#define LINUX_CR3 0x0030000
#define LINUX_FFDLY 0x0040000
#define LINUX_FF0 0x0000000
#define LINUX_FF1 0x0040000
#define LINUX_BSDLY 0x0080000
#define LINUX_BS0 0x0000000
#define LINUX_BS1 0x0080000
#define LINUX_VTDLY 0x0100000
#define LINUX_VT0 0x0000000
#define LINUX_VT1 0x0100000
#define LINUX_XTABS 0x0200000
#else
#define LINUX_NLDLY 0x0000100
#define LINUX_NL0 0x0000000
#define LINUX_NL1 0x0000100
@ -556,13 +441,8 @@
#define LINUX_FFDLY 0x0008000
#define LINUX_FF0 0x0000000
#define LINUX_FF1 0x0008000
#endif
#ifdef __alpha__
#define LINUX_CBAUD 0x0000001f
#else
#define LINUX_CBAUD 0x0000100f
#endif
#define LINUX_B0 0x00000000
#define LINUX_B50 0x00000001
@ -583,29 +463,10 @@
#define LINUX_EXTA LINUX_B19200
#define LINUX_EXTB LINUX_B38400
#ifdef __alpha__
#define LINUX_CBAUDEX 0x00000000
#define LINUX_B57600 0x00000010
#define LINUX_B115200 0x00000011
#else
#define LINUX_CBAUDEX 0x00001000
#define LINUX_B57600 0x00001001
#define LINUX_B115200 0x00001002
#endif
#ifdef __alpha__
#define LINUX_CSIZE 0x00000300
#define LINUX_CS5 0x00000000
#define LINUX_CS6 0x00000100
#define LINUX_CS7 0x00000200
#define LINUX_CS8 0x00000300
#define LINUX_CSTOPB 0x00000400
#define LINUX_CREAD 0x00000800
#define LINUX_PARENB 0x00001000
#define LINUX_PARODD 0x00002000
#define LINUX_HUPCL 0x00004000
#define LINUX_CLOCAL 0x00008000
#else
#define LINUX_CSIZE 0x00000030
#define LINUX_CS5 0x00000000
#define LINUX_CS6 0x00000010
@ -617,28 +478,10 @@
#define LINUX_PARODD 0x00000200
#define LINUX_HUPCL 0x00000400
#define LINUX_CLOCAL 0x00000800
#endif
#define LINUX_CRTSCTS 0x80000000
/* Linux c_lflag masks */
#ifdef __alpha__
#define LINUX_ECHOKE 0x00000001
#define LINUX_ECHOE 0x00000002
#define LINUX_ECHOK 0x00000004
#define LINUX_ECHO 0x00000008
#define LINUX_ECHONL 0x00000010
#define LINUX_ECHOPRT 0x00000020
#define LINUX_ECHOCTL 0x00000040
#define LINUX_ISIG 0x00000080
#define LINUX_ICANON 0x00000100
#define LINUX_IEXTEN 0x00000400
#define LINUX_XCASE 0x00004000
#define LINUX_TOSTOP 0x00400000
#define LINUX_FLUSHO 0x00800000
#define LINUX_PENDIN 0x20000000
#define LINUX_NOFLSH 0x80000000
#else
#define LINUX_ISIG 0x00000001
#define LINUX_ICANON 0x00000002
#define LINUX_XCASE 0x00000004
@ -654,7 +497,6 @@
#define LINUX_FLUSHO 0x00001000
#define LINUX_PENDIN 0x00002000
#define LINUX_IEXTEN 0x00008000
#endif
/* serial_struct values for TIOC[GS]SERIAL ioctls */
#define LINUX_ASYNC_CLOSING_WAIT_INF 0

View file

@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/blist.h>
#include <sys/fcntl.h>
#if defined(__i386__) || defined(__alpha__)
#if defined(__i386__)
#include <sys/imgact_aout.h>
#endif
#include <sys/jail.h>
@ -90,20 +90,14 @@ __FBSDID("$FreeBSD$");
#include <machine/cputypes.h>
#endif
#ifdef __alpha__
#define BSD_TO_LINUX_SIGNAL(sig) (sig)
#else
#define BSD_TO_LINUX_SIGNAL(sig) \
(((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig)
#endif
#ifndef __alpha__
static unsigned int linux_to_bsd_resource[LINUX_RLIM_NLIMITS] = {
RLIMIT_CPU, RLIMIT_FSIZE, RLIMIT_DATA, RLIMIT_STACK,
RLIMIT_CORE, RLIMIT_RSS, RLIMIT_NPROC, RLIMIT_NOFILE,
RLIMIT_MEMLOCK, -1
};
#endif /*!__alpha__*/
struct l_sysinfo {
l_long uptime; /* Seconds since boot */
@ -121,7 +115,6 @@ struct l_sysinfo {
l_uint mem_unit;
char _f[6]; /* Pads structure to 64 bytes */
};
#ifndef __alpha__
int
linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
{
@ -166,9 +159,7 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
return copyout(&sysinfo, args->info, sizeof(sysinfo));
}
#endif /*!__alpha__*/
#ifndef __alpha__
int
linux_alarm(struct thread *td, struct linux_alarm_args *args)
{
@ -197,7 +188,6 @@ linux_alarm(struct thread *td, struct linux_alarm_args *args)
}
return (0);
}
#endif /*!__alpha__*/
int
linux_brk(struct thread *td, struct linux_brk_args *args)
@ -223,7 +213,8 @@ linux_brk(struct thread *td, struct linux_brk_args *args)
return 0;
}
#if defined(__i386__) || defined(__alpha__)
#if defined(__i386__)
/* XXX: what about amd64/linux32? */
int
linux_uselib(struct thread *td, struct linux_uselib_args *args)
@ -473,7 +464,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
return error;
}
#endif /* __i386__ || __alpha__ */
#endif /* __i386__ */
int
linux_select(struct thread *td, struct linux_select_args *args)
@ -626,7 +617,6 @@ linux_msync(struct thread *td, struct linux_msync_args *args)
return msync(td, &bsd_args);
}
#ifndef __alpha__
int
linux_time(struct thread *td, struct linux_time_args *args)
{
@ -646,7 +636,6 @@ linux_time(struct thread *td, struct linux_time_args *args)
td->td_retval[0] = tm;
return 0;
}
#endif /*!__alpha__*/
struct l_times_argv {
l_long tms_utime;
@ -655,11 +644,7 @@ struct l_times_argv {
l_long tms_cstime;
};
#ifdef __alpha__
#define CLK_TCK 1024 /* Linux uses 1024 on alpha */
#else
#define CLK_TCK 100 /* Linux uses 100 */
#endif
#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
@ -796,7 +781,6 @@ linux_utime(struct thread *td, struct linux_utime_args *args)
#define __WCLONE 0x80000000
#ifndef __alpha__
int
linux_waitpid(struct thread *td, struct linux_waitpid_args *args)
{
@ -830,7 +814,6 @@ linux_waitpid(struct thread *td, struct linux_waitpid_args *args)
return 0;
}
#endif /*!__alpha__*/
int
linux_wait4(struct thread *td, struct linux_wait4_args *args)
@ -912,10 +895,8 @@ linux_personality(struct thread *td, struct linux_personality_args *args)
if (ldebug(personality))
printf(ARGS(personality, "%lu"), (unsigned long)args->per);
#endif
#ifndef __alpha__
if (args->per != 0)
return EINVAL;
#endif
/* Yes Jim, it's still a Linux... */
td->td_retval[0] = 0;
@ -989,7 +970,6 @@ linux_getitimer(struct thread *td, struct linux_getitimer_args *uap)
return (copyout(&ls, uap->itv, sizeof(ls)));
}
#ifndef __alpha__
int
linux_nice(struct thread *td, struct linux_nice_args *args)
{
@ -1000,7 +980,6 @@ linux_nice(struct thread *td, struct linux_nice_args *args)
bsd_args.prio = args->inc;
return setpriority(td, &bsd_args);
}
#endif /*!__alpha__*/
int
linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
@ -1095,7 +1074,6 @@ linux_getgroups(struct thread *td, struct linux_getgroups_args *args)
return (0);
}
#ifndef __alpha__
int
linux_setrlimit(struct thread *td, struct linux_setrlimit_args *args)
{
@ -1198,7 +1176,6 @@ linux_getrlimit(struct thread *td, struct linux_getrlimit_args *args)
rlim.rlim_max = (l_ulong)bsd_rlim.rlim_max;
return (copyout(&rlim, args->rlim, sizeof(rlim)));
}
#endif /*!__alpha__*/
int
linux_sched_setscheduler(struct thread *td,
@ -1334,7 +1311,6 @@ linux_reboot(struct thread *td, struct linux_reboot_args *args)
return (reboot(td, &bsd_args));
}
#ifndef __alpha__
/*
* The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify
@ -1372,7 +1348,6 @@ linux_getuid(struct thread *td, struct linux_getuid_args *args)
return (0);
}
#endif /*!__alpha__*/
int
linux_getsid(struct thread *td, struct linux_getsid_args *args)

View file

@ -60,11 +60,7 @@ linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss)
bss->__bits[1] = lss->__bits[1];
for (l = 1; l <= LINUX_SIGTBLSZ; l++) {
if (LINUX_SIGISMEMBER(*lss, l)) {
#ifdef __alpha__
b = _SIG_IDX(l);
#else
b = linux_to_bsd_signal[_SIG_IDX(l)];
#endif
if (b)
SIGADDSET(*bss, b);
}
@ -81,11 +77,7 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss)
lss->__bits[1] = bss->__bits[1];
for (b = 1; b <= LINUX_SIGTBLSZ; b++) {
if (SIGISMEMBER(*bss, b)) {
#ifdef __alpha__
l = _SIG_IDX(b);
#else
l = bsd_to_linux_signal[_SIG_IDX(b)];
#endif
if (l)
LINUX_SIGADDSET(*lss, l);
}
@ -160,11 +152,9 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa,
} else
nsa = NULL;
#ifndef __alpha__
if (linux_sig <= LINUX_SIGTBLSZ)
sig = linux_to_bsd_signal[_SIG_IDX(linux_sig)];
else
#endif
sig = linux_sig;
error = kern_sigaction(td, sig, nsa, osa, 0);
@ -178,7 +168,6 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa,
}
#ifndef __alpha__
int
linux_signal(struct thread *td, struct linux_signal_args *args)
{
@ -200,7 +189,6 @@ linux_signal(struct thread *td, struct linux_signal_args *args)
return (error);
}
#endif /*!__alpha__*/
int
linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args)
@ -270,7 +258,6 @@ linux_do_sigprocmask(struct thread *td, int how, l_sigset_t *new,
return (error);
}
#ifndef __alpha__
int
linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args)
{
@ -302,7 +289,6 @@ linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args)
return (error);
}
#endif /*!__alpha__*/
int
linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args)
@ -337,7 +323,6 @@ linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args)
return (error);
}
#ifndef __alpha__
int
linux_sgetmask(struct thread *td, struct linux_sgetmask_args *args)
{
@ -434,7 +419,6 @@ linux_rt_sigpending(struct thread *td, struct linux_rt_sigpending_args *args)
bsd_to_linux_sigset(&bset, &lset);
return (copyout(&lset, args->set, args->sigsetsize));
}
#endif /*!__alpha__*/
int
linux_kill(struct thread *td, struct linux_kill_args *args)
@ -455,11 +439,9 @@ linux_kill(struct thread *td, struct linux_kill_args *args)
if (args->signum < 0 || args->signum > LINUX_NSIG)
return EINVAL;
#ifndef __alpha__
if (args->signum > 0 && args->signum <= LINUX_SIGTBLSZ)
tmp.signum = linux_to_bsd_signal[_SIG_IDX(args->signum)];
else
#endif
tmp.signum = args->signum;
tmp.pid = args->pid;

View file

@ -72,12 +72,6 @@ static int do_sa_get(struct sockaddr **, const struct osockaddr *, int *,
struct malloc_type *);
static int linux_to_bsd_domain(int);
#ifdef __alpha__
#define STATIC
#else
#define STATIC static
#endif
/*
* Reads a linux sockaddr and does any necessary translation.
* Linux sockaddrs don't have a length field, only a family.
@ -244,7 +238,6 @@ bsd_to_linux_sockopt_level(int level)
return (level);
}
#ifndef __alpha__
static int
linux_to_bsd_ip_sockopt(int opt)
{
@ -302,7 +295,6 @@ linux_to_bsd_so_sockopt(int opt)
}
return (-1);
}
#endif /* !__alpha__*/
static int
linux_to_bsd_msg_flags(int flags)
@ -454,7 +446,6 @@ linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags,
return (error);
}
#ifndef __alpha__
/* Return 0 if IP_HDRINCL is set for the given socket. */
static int
linux_check_hdrincl(struct thread *td, int s)
@ -620,33 +611,25 @@ linux_bind(struct thread *td, struct linux_bind_args *args)
return (kern_bind(td, linux_args.s, sa));
}
#endif /* !__alpha__*/
struct l_connect_args {
struct linux_connect_args {
int s;
l_uintptr_t name;
int namelen;
};
#ifndef __alpha__
#define linux_connect_args l_connect_args
int linux_connect(struct thread *, struct linux_connect_args *);
#endif /* !__alpha__*/
int
linux_connect(struct thread *td, struct linux_connect_args *args)
{
struct l_connect_args linux_args;
struct linux_connect_args linux_args;
struct socket *so;
struct sockaddr *sa;
u_int fflag;
int error;
#ifdef __alpha__
bcopy(args, &linux_args, sizeof(linux_args));
#else
if ((error = copyin(args, &linux_args, sizeof(linux_args))))
return (error);
#endif /* __alpha__ */
error = linux_getsockaddr(&sa,
(struct osockaddr *)PTRIN(linux_args.name),
@ -684,7 +667,6 @@ linux_connect(struct thread *td, struct linux_connect_args *args)
return (error);
}
#ifndef __alpha__
struct linux_listen_args {
int s;
int backlog;
@ -707,22 +689,17 @@ linux_listen(struct thread *td, struct linux_listen_args *args)
bsd_args.backlog = linux_args.backlog;
return (listen(td, &bsd_args));
}
#endif /* !__alpha__*/
struct l_accept_args {
struct linux_accept_args {
int s;
l_uintptr_t addr;
l_uintptr_t namelen;
};
#ifndef __alpha__
#define linux_accept_args l_accept_args
#endif
STATIC int
static int
linux_accept(struct thread *td, struct linux_accept_args *args)
{
struct l_accept_args linux_args;
struct linux_accept_args linux_args;
struct accept_args /* {
int s;
struct sockaddr * __restrict name;
@ -764,20 +741,16 @@ linux_accept(struct thread *td, struct linux_accept_args *args)
return (0);
}
struct l_getsockname_args {
struct linux_getsockname_args {
int s;
l_uintptr_t addr;
l_uintptr_t namelen;
};
#ifndef __alpha__
#define linux_getsockname_args l_getsockname_args
#endif
STATIC int
static int
linux_getsockname(struct thread *td, struct linux_getsockname_args *args)
{
struct l_getsockname_args linux_args;
struct linux_getsockname_args linux_args;
struct getsockname_args /* {
int fdes;
struct sockaddr * __restrict asa;
@ -802,20 +775,16 @@ linux_getsockname(struct thread *td, struct linux_getsockname_args *args)
return (0);
}
struct l_getpeername_args {
struct linux_getpeername_args {
int s;
l_uintptr_t addr;
l_uintptr_t namelen;
};
#ifndef __alpha__
#define linux_getpeername_args l_getpeername_args
#endif
STATIC int
static int
linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
{
struct l_getpeername_args linux_args;
struct linux_getpeername_args linux_args;
struct getpeername_args /* {
int fdes;
caddr_t asa;
@ -839,21 +808,17 @@ linux_getpeername(struct thread *td, struct linux_getpeername_args *args)
return (0);
}
struct l_socketpair_args {
struct linux_socketpair_args {
int domain;
int type;
int protocol;
l_uintptr_t rsv;
};
#ifndef __alpha__
#define linux_socketpair_args l_socketpair_args
#endif
STATIC int
static int
linux_socketpair(struct thread *td, struct linux_socketpair_args *args)
{
struct l_socketpair_args linux_args;
struct linux_socketpair_args linux_args;
struct socketpair_args /* {
int domain;
int type;
@ -875,21 +840,17 @@ linux_socketpair(struct thread *td, struct linux_socketpair_args *args)
return (socketpair(td, &bsd_args));
}
struct l_send_args {
struct linux_send_args {
int s;
l_uintptr_t msg;
int len;
int flags;
};
#ifndef __alpha__
#define linux_send_args l_send_args
#endif
STATIC int
static int
linux_send(struct thread *td, struct linux_send_args *args)
{
struct l_send_args linux_args;
struct linux_send_args linux_args;
struct sendto_args /* {
int s;
caddr_t buf;
@ -912,21 +873,17 @@ linux_send(struct thread *td, struct linux_send_args *args)
return sendto(td, &bsd_args);
}
struct l_recv_args {
struct linux_recv_args {
int s;
l_uintptr_t msg;
int len;
int flags;
};
#ifndef __alpha__
#define linux_recv_args l_recv_args
#endif
STATIC int
static int
linux_recv(struct thread *td, struct linux_recv_args *args)
{
struct l_recv_args linux_args;
struct linux_recv_args linux_args;
struct recvfrom_args /* {
int s;
caddr_t buf;
@ -949,7 +906,6 @@ linux_recv(struct thread *td, struct linux_recv_args *args)
return (recvfrom(td, &bsd_args));
}
#ifndef __alpha__
static int
linux_sendto(struct thread *td, struct linux_sendto_args *args)
{
@ -977,9 +933,8 @@ linux_sendto(struct thread *td, struct linux_sendto_args *args)
UIO_USERSPACE);
return (error);
}
#endif /* !__alpha__*/
struct l_recvfrom_args {
struct linux_recvfrom_args {
int s;
l_uintptr_t buf;
int len;
@ -988,14 +943,10 @@ struct l_recvfrom_args {
l_uintptr_t fromlen;
};
#ifndef __alpha__
#define linux_recvfrom_args l_recvfrom_args
#endif
STATIC int
static int
linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args)
{
struct l_recvfrom_args linux_args;
struct linux_recvfrom_args linux_args;
struct recvfrom_args /* {
int s;
caddr_t buf;
@ -1036,20 +987,16 @@ linux_recvfrom(struct thread *td, struct linux_recvfrom_args *args)
return (0);
}
struct l_sendmsg_args {
struct linux_sendmsg_args {
int s;
l_uintptr_t msg;
int flags;
};
#ifndef __alpha__
#define linux_sendmsg_args l_sendmsg_args
#endif
STATIC int
static int
linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args)
{
struct l_sendmsg_args linux_args;
struct linux_sendmsg_args linux_args;
struct msghdr msg;
struct iovec *iov;
int error;
@ -1073,20 +1020,16 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args)
return (error);
}
struct l_recvmsg_args {
struct linux_recvmsg_args {
int s;
l_uintptr_t msg;
int flags;
};
#ifndef __alpha__
#define linux_recvmsg_args l_recvmsg_args
#endif
STATIC int
static int
linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args)
{
struct l_recvmsg_args linux_args;
struct linux_recvmsg_args linux_args;
struct recvmsg_args /* {
int s;
struct msghdr *msg;
@ -1128,7 +1071,6 @@ linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args)
return (error);
}
#ifndef __alpha__
struct linux_shutdown_args {
int s;
int how;
@ -1313,4 +1255,3 @@ linux_socketcall(struct thread *td, struct linux_socketcall_args *args)
uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);
return (ENOSYS);
}
#endif /*!__alpha__*/

View file

@ -233,7 +233,6 @@ linux_newfstat(struct thread *td, struct linux_newfstat_args *args)
return (error);
}
#ifndef __alpha__
static int
stat_copyout(struct stat *buf, void *ubuf)
{
@ -294,7 +293,6 @@ linux_lstat(struct thread *td, struct linux_lstat_args *args)
translate_path_major_minor(td, args->path, &buf);
return(stat_copyout(&buf, args->up));
}
#endif
/* XXX - All fields of type l_int are defined as l_long on i386 */
struct l_statfs {