From cac0b393028873c8a39dfadf8658c9dac1ee3340 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Jan 2001 01:40:38 +0000 Subject: [PATCH] Added Linux compatibility support for powerpc ports --- sys/compat/linux/common/linux_exec.h | 15 ++++++++++++++- sys/compat/linux/common/linux_fcntl.h | 4 +++- sys/compat/linux/common/linux_ioctl.h | 4 +++- sys/compat/linux/common/linux_machdep.h | 4 +++- sys/compat/linux/common/linux_siginfo.h | 4 +++- sys/compat/linux/common/linux_signal.h | 4 +++- sys/compat/linux/common/linux_socket.h | 4 +++- sys/compat/linux/common/linux_termios.h | 4 +++- sys/compat/linux/common/linux_types.h | 6 +++--- 9 files changed, 38 insertions(+), 11 deletions(-) diff --git a/sys/compat/linux/common/linux_exec.h b/sys/compat/linux/common/linux_exec.h index 5f8ab7b54dda..7428b1a0c902 100644 --- a/sys/compat/linux/common/linux_exec.h +++ b/sys/compat/linux/common/linux_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.h,v 1.13 2000/11/21 00:37:54 jdolecek Exp $ */ +/* $NetBSD: linux_exec.h,v 1.14 2001/01/19 01:40:38 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -45,6 +45,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_exec.h machine type. #endif @@ -74,6 +76,17 @@ #define LINUX_N_BSSADDR(x,m) (LINUX_N_DATADDR(x,m) + (x).a_data) +/* + * From Linux's include/linux/elf.h + */ + #define LINUX_AT_UID 11 /* real uid */ + #define LINUX_AT_EUID 12 /* effective uid */ + #define LINUX_AT_GID 13 /* real gid */ + #define LINUX_AT_EGID 14 /* effective gid */ + #define LINUX_AT_PLATFORM 15 /* string identifying CPU for optimizations */ + #define LINUX_AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ + #define LINUX_AT_CLKTCK 17 /* frequency at which times() increments */ + #ifdef _KERNEL __BEGIN_DECLS extern const struct emul emul_linux; diff --git a/sys/compat/linux/common/linux_fcntl.h b/sys/compat/linux/common/linux_fcntl.h index 9bc151a55b9a..cecb2e1ed7be 100644 --- a/sys/compat/linux/common/linux_fcntl.h +++ b/sys/compat/linux/common/linux_fcntl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_fcntl.h,v 1.5 1998/12/15 19:31:39 itohy Exp $ */ +/* $NetBSD: linux_fcntl.h,v 1.6 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -64,6 +64,8 @@ struct linux_flock { #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_fcntl.h machine type. #endif diff --git a/sys/compat/linux/common/linux_ioctl.h b/sys/compat/linux/common/linux_ioctl.h index 105e3bafa57c..4dfe4459f061 100644 --- a/sys/compat/linux/common/linux_ioctl.h +++ b/sys/compat/linux/common/linux_ioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ioctl.h,v 1.13 2001/01/10 02:28:38 fvdl Exp $ */ +/* $NetBSD: linux_ioctl.h,v 1.14 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -65,6 +65,8 @@ __END_DECLS #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_ioctl.h machine type. #endif diff --git a/sys/compat/linux/common/linux_machdep.h b/sys/compat/linux/common/linux_machdep.h index 029d968b5b72..1c08f506588f 100644 --- a/sys/compat/linux/common/linux_machdep.h +++ b/sys/compat/linux/common/linux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.h,v 1.2 1998/12/15 19:31:39 itohy Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.3 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -45,6 +45,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_machdep.h machine type. #endif diff --git a/sys/compat/linux/common/linux_siginfo.h b/sys/compat/linux/common/linux_siginfo.h index 6506e6af4bcb..e2cf4267035c 100644 --- a/sys/compat/linux/common/linux_siginfo.h +++ b/sys/compat/linux/common/linux_siginfo.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_siginfo.h,v 1.2 1998/12/15 19:31:39 itohy Exp $ */ +/* $NetBSD: linux_siginfo.h,v 1.3 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -46,6 +46,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_siginfo.h machine type. #endif diff --git a/sys/compat/linux/common/linux_signal.h b/sys/compat/linux/common/linux_signal.h index 229991eb05f9..02309e7ad6a4 100644 --- a/sys/compat/linux/common/linux_signal.h +++ b/sys/compat/linux/common/linux_signal.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_signal.h,v 1.12 2001/01/18 20:28:26 jdolecek Exp $ */ +/* $NetBSD: linux_signal.h,v 1.13 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -45,6 +45,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_signal.h machine type. #endif diff --git a/sys/compat/linux/common/linux_socket.h b/sys/compat/linux/common/linux_socket.h index 2b2cc7b7b2e7..f4a8b13b56ef 100644 --- a/sys/compat/linux/common/linux_socket.h +++ b/sys/compat/linux/common/linux_socket.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.h,v 1.7 1998/12/15 19:31:40 itohy Exp $ */ +/* $NetBSD: linux_socket.h,v 1.8 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -129,6 +129,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_socket.h machine type. #endif diff --git a/sys/compat/linux/common/linux_termios.h b/sys/compat/linux/common/linux_termios.h index 10d952306c85..ea95c39d1a68 100644 --- a/sys/compat/linux/common/linux_termios.h +++ b/sys/compat/linux/common/linux_termios.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_termios.h,v 1.6 2000/12/10 14:12:17 fvdl Exp $ */ +/* $NetBSD: linux_termios.h,v 1.7 2001/01/19 01:40:39 manu Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -126,6 +126,8 @@ struct linux_termios { #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include #else #error Undefined linux_termios.h machine type. #endif diff --git a/sys/compat/linux/common/linux_types.h b/sys/compat/linux/common/linux_types.h index 560e78d435b3..ea90ee75480a 100644 --- a/sys/compat/linux/common/linux_types.h +++ b/sys/compat/linux/common/linux_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_types.h,v 1.10 2000/12/29 21:07:17 fvdl Exp $ */ +/* $NetBSD: linux_types.h,v 1.11 2001/01/19 01:40:40 manu Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -43,6 +43,8 @@ #include #elif defined(__alpha__) #include +#elif defined(__powerpc__) +#include /* * The rest are not written yet: */ @@ -52,8 +54,6 @@ #include #elif defined(__mips__) #include -#elif defined(__powerpc__) -#include #endif /*