This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 08/11] nds32: Linux ABI
On 06/05/2018 11:41, vincentc wrote:
> diff --git a/sysdeps/unix/sysv/linux/nds32/ipc_priv.h b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
> new file mode 100644
> index 0000000..e0732b9
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/nds32/ipc_priv.h
> @@ -0,0 +1,22 @@
> +/* Old SysV permission definition for Linux, Andes nds32 version.
> + Copyright (C) 2018 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#include <sys/ipc.h> /* For __key_t. */
> +
> +#define __IPC_64 0x0
> +
My understanding was generic uapi for Linux expects IPC_64 being 0x100 for
newer ports, but seems for recent ones that 0x0 is the expect values. Is
the case or NDS32 is a outlier?
> diff --git a/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h b/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h
> new file mode 100644
> index 0000000..d7fab19
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/nds32/kernel_sigaction.h
> @@ -0,0 +1,30 @@
> +/* Define struct old_kernel_sigaction and kernel_sigaction for Andes nds32.
> + Copyright (C) 2006-2018 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library. If not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +
> +struct old_kernel_sigaction {
> + __sighandler_t k_sa_handler;
> + unsigned long sa_mask;
> + unsigned long sa_flags;
> +};
> +
> +struct kernel_sigaction {
> + __sighandler_t k_sa_handler;
> + unsigned long sa_flags;
> + sigset_t sa_mask;
> +};
The 'old_kernel_sigaction' is not used anywhere in glibc code and after
sigaction consolidation (b4a5d26d8835d972995f0a0a2f805a8845bafa0b) the
generic Linux kernel_sigactions.h should follow generic uapi. It seems
NDS32 follows this case, so are you sure you need a arch-specific
version?