aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/alpha
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-07-11 16:04:07 +0200
committerFlorian Weimer <fweimer@redhat.com>2025-07-11 16:04:07 +0200
commit3d3572f59059e2b19b8541ea648a6172136ec42e (patch)
tree59beaca069f8cb8cd1f4cc0284a3bc6209d9b02e /sysdeps/unix/sysv/linux/alpha
parent02e7ac5ee3c6d2ef20c024ea7c243d0ae8496608 (diff)
downloadglibc-3d3572f59059e2b19b8541ea648a6172136ec42e.zip
glibc-3d3572f59059e2b19b8541ea648a6172136ec42e.tar.gz
glibc-3d3572f59059e2b19b8541ea648a6172136ec42e.tar.bz2
Linux: Keep termios ioctl constants strictly internal
Undefine TCGETS, TCGETS2, and related ioctl constants in the installed headers. Extract the correct constants (using the kernel type definitions) automatically from the UAPI headers. The kernel constants are available under KERNEL_* names during the glibc build, computed using assembler constant extraction mechanism. Alpha may have to use TCGETS instead of TCGETS2 because TCTGETS2 became available in Linux 4.20 only. Introduce ARCH_TCGETS to make this choice explict. To support emulation on powerpc, glibc versions of the termios constants are added to the emulation code in internal-ioctl.h. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/alpha')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/ioctls.h36
-rw-r--r--sysdeps/unix/sysv/linux/alpha/termios_arch.h26
2 files changed, 0 insertions, 62 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
deleted file mode 100644
index 77dc0c1..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1996-2025 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_IOCTL_H
-# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
-#endif
-
-/* Use the definitions from the kernel header files. */
-#include <asm/ioctls.h>
-
-/* Oh well, this is necessary since the kernel data structure is
- different from the user-level version. */
-#undef TCGETS
-#undef TCSETS
-#undef TCSETSW
-#undef TCSETSF
-#define TCGETS _IOR ('t', 19, char[44])
-#define TCSETS _IOW ('t', 20, char[44])
-#define TCSETSW _IOW ('t', 21, char[44])
-#define TCSETSF _IOW ('t', 22, char[44])
-
-#include <linux/sockios.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/termios_arch.h b/sysdeps/unix/sysv/linux/alpha/termios_arch.h
deleted file mode 100644
index 20025f2..0000000
--- a/sysdeps/unix/sysv/linux/alpha/termios_arch.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Architectural parameters for Linux termios - Alpha/PowerPC version
-
- Copyright (C) 1997-2025 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef TERMIOS_INTERNALS_H
-# error "<termios_arch.h> should only be included from <termios_internals.h>"
-#endif
-
-#define _TERMIOS2_NCCS 19
-#define _HAVE_TERMIOS2_C_CC_BEFORE_C_LINE 1
-#define _HAVE_STRUCT_OLD_TERMIOS 0