aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2025-07-10 09:19:38 +0200
committerAndreas Schwab <schwab@suse.de>2025-07-10 11:39:43 +0200
commitd6c2760ef7f7cdeab912767f04db4b14632fbb5f (patch)
tree6d681f5ef77759b69452173c50ab0d230b9865cc /sysdeps/unix/sysv/linux
parentc559a6190e397b315fdd98d9369f15d2914d8248 (diff)
downloadglibc-d6c2760ef7f7cdeab912767f04db4b14632fbb5f.zip
glibc-d6c2760ef7f7cdeab912767f04db4b14632fbb5f.tar.gz
glibc-d6c2760ef7f7cdeab912767f04db4b14632fbb5f.tar.bz2
Remove termios2 ioctl defintions from public headers
The use of the termios2 ioctl interface is an implementation detail which should not bleed into public headers. Remove the PowerPC version of <bits/ioctls.h> and define the termios2 ioctl numbers in <termios_arch.h> instead. Also remove the include check from there which is unneeded in an internal header.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h36
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/termios_arch.h17
2 files changed, 12 insertions, 41 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h b/sysdeps/unix/sysv/linux/powerpc/bits/ioctls.h
deleted file mode 100644
index e1921df..0000000
--- a/sysdeps/unix/sysv/linux/powerpc/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>
-
-/* PowerPC quirk: on PowerPC only, ioctl() emulates the TCGETS/TCSETS*
- ioctls with tcgetattr/tcsetattr using the glibc struct termios.
- As struct termios2 is the same as the kernel struct termios on PowerPC,
- simply consider the kernel ones as the termios2 interface, even
- though the kernel doesn't call it that. */
-
-#define TCGETS2 _IOR ('t', 19, struct termios2)
-#define TCSETS2 _IOW ('t', 20, struct termios2)
-#define TCSETSW2 _IOW ('t', 21, struct termios2)
-#define TCSETSF2 _IOW ('t', 22, struct termios2)
-
-#include <linux/sockios.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/termios_arch.h b/sysdeps/unix/sysv/linux/powerpc/termios_arch.h
index 20025f2..919b437 100644
--- a/sysdeps/unix/sysv/linux/powerpc/termios_arch.h
+++ b/sysdeps/unix/sysv/linux/powerpc/termios_arch.h
@@ -1,4 +1,4 @@
-/* Architectural parameters for Linux termios - Alpha/PowerPC version
+/* Architectural parameters for Linux termios - PowerPC version
Copyright (C) 1997-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,10 +17,17 @@
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
+
+/* PowerPC quirk: on PowerPC only, ioctl() emulates the TCGETS/TCSETS*
+ ioctls with tcgetattr/tcsetattr using the glibc struct termios.
+ As struct termios2 is the same as the kernel struct termios on PowerPC,
+ simply consider the kernel ones as the termios2 interface, even
+ though the kernel doesn't call it that. */
+
+#define TCGETS2 _IOR ('t', 19, struct termios2)
+#define TCSETS2 _IOW ('t', 20, struct termios2)
+#define TCSETSW2 _IOW ('t', 21, struct termios2)
+#define TCSETSF2 _IOW ('t', 22, struct termios2)