public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/zack/no-nested-includes] Don't include sys/types.h 4/n: sys/mtio.h
@ 2019-05-26 16:37 Zack Weinberg
0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2019-05-26 16:37 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c85db187d07ad9023c1e08b980198ee06fad111
commit 9c85db187d07ad9023c1e08b980198ee06fad111
Author: Zack Weinberg <zackw@panix.com>
Date: Sun May 26 10:43:50 2019 -0400
Don't include sys/types.h 4/n: sys/mtio.h
sys/mtio.h is another header that's unnecessarily in sysdeps/; the
only version we have is sysdeps/gnu/sys/mtio.h. Move to misc, and
remove its unnecessary inclusion of sys/types.h while we're at it.
This header uses the _IO* macros and therefore needs to continue
including sys/ioctl.h for now.
* sysdeps/gnu/sys/mtio.h: Move to misc/sys/mtio.h.
Don't include sys/types.h.
* sysdeps/gnu/Makefile: Don't add anything to sysdep_headers
for the misc directory.
* misc/Makefile (headers): Add sys/mtio.h.
* include/sys/mtio.h: New wrapper.
* scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES): Update.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch zack/no-nested-includes
# Your branch and 'origin/zack/no-nested-includes' have diverged,
# and have 35 and 16 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
# new file: include/sys/mtio.h
# modified: misc/Makefile
# renamed: sysdeps/gnu/sys/mtio.h -> misc/sys/mtio.h
# modified: sysdeps/gnu/Makefile
#
# Changes not staged for commit:
# modified: elf/link.h
# modified: gmon/sys/gmon.h
# modified: gmon/sys/profil.h
# modified: gmon/tst-sprofil.c
# modified: inet/aliases.h
# modified: io/fts.h
# modified: io/sys/sendfile.h
# modified: login/utmp.h
# modified: login/utmpx.h
# modified: misc/sys/xattr.h
# modified: nis/nis_domain_of.c
# modified: nis/yp_xdr.c
# modified: nptl/pthread_join_common.c
# modified: scripts/check-obsolete-constructs.py
# modified: socket/sys/un.h
# modified: stdlib/sys/random.h
# modified: sunrpc/svc.c
# modified: sysdeps/mach/hurd/i386/Makefile
# modified: sysdeps/mach/hurd/sendfile.c
# modified: sysdeps/nptl/proc_service.h
# modified: sysdeps/nptl/sys/procfs.h
# modified: sysdeps/nptl/thread_db.h
# modified: sysdeps/posix/dl-fileid.h
# modified: sysdeps/unix/sysv/linux/aarch64/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/aarch64/sys/user.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/procfs-prregset.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/alpha/sys/acct.h
# modified: sysdeps/unix/sysv/linux/alpha/sys/user.h
# modified: sysdeps/unix/sysv/linux/arm/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/arm/sys/user.h
# modified: sysdeps/unix/sysv/linux/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/csky/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/dl-vdso.h
# modified: sysdeps/unix/sysv/linux/hppa/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/hppa/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/ia64/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/ia64/sys/user.h
# modified: sysdeps/unix/sysv/linux/m68k/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/m68k/sys/user.h
# modified: sysdeps/unix/sysv/linux/microblaze/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/microblaze/sys/user.h
# modified: sysdeps/unix/sysv/linux/mips/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/mips/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/mips/sys/user.h
# modified: sysdeps/unix/sysv/linux/nios2/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/nios2/sys/user.h
# modified: sysdeps/unix/sysv/linux/powerpc/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/powerpc/sys/user.h
# modified: sysdeps/unix/sysv/linux/riscv/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/s390/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/s390/sys/user.h
# modified: sysdeps/unix/sysv/linux/sh/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/sh/sys/user.h
# modified: sysdeps/unix/sysv/linux/sparc/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/sparc/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/sparc/sys/user.h
# modified: sysdeps/unix/sysv/linux/sys/acct.h
# modified: sysdeps/unix/sysv/linux/sys/epoll.h
# modified: sysdeps/unix/sysv/linux/sys/fsuid.h
# modified: sysdeps/unix/sysv/linux/sys/procfs.h
# modified: sysdeps/unix/sysv/linux/sys/quota.h
# modified: sysdeps/unix/sysv/linux/x86/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/x86/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/x86/sys/user.h
#
Diff:
---
include/sys/mtio.h | 1 +
misc/Makefile | 6 +++---
{sysdeps/gnu => misc}/sys/mtio.h | 3 ---
scripts/check-obsolete-constructs.py | 2 +-
sysdeps/gnu/Makefile | 5 -----
5 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/sys/mtio.h b/include/sys/mtio.h
new file mode 100644
index 0000000..f4861bd
--- /dev/null
+++ b/include/sys/mtio.h
@@ -0,0 +1 @@
+#include <misc/sys/mtio.h>
diff --git a/misc/Makefile b/misc/Makefile
index e6c7389..106ce57 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -36,9 +36,9 @@ headers := \
bits/uio-ext.h bits/uio_lim.h bits/xopen_lim.h \
gnu/libc-version.h \
sys/auxv.h sys/cdefs.h sys/dir.h sys/file.h sys/ioctl.h \
- sys/mman.h sys/param.h sys/ptrace.h sys/queue.h sys/reboot.h \
- sys/select.h sys/swap.h sys/syscall.h sys/sysinfo.h \
- sys/syslog.h sys/sysmacros.h sys/uio.h sys/xattr.h
+ sys/mman.h sys/mtio.h sys/param.h sys/ptrace.h sys/queue.h \
+ sys/reboot.h sys/select.h sys/swap.h sys/syscall.h \
+ sys/sysinfo.h sys/syslog.h sys/sysmacros.h sys/uio.h sys/xattr.h
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
diff --git a/sysdeps/gnu/sys/mtio.h b/misc/sys/mtio.h
similarity index 99%
rename from sysdeps/gnu/sys/mtio.h
rename to misc/sys/mtio.h
index 0ce41c5..1387b13 100644
--- a/sysdeps/gnu/sys/mtio.h
+++ b/misc/sys/mtio.h
@@ -21,11 +21,8 @@
#ifndef _SYS_MTIO_H
#define _SYS_MTIO_H 1
-/* Get necessary definitions from system and kernel headers. */
-#include <sys/types.h>
#include <sys/ioctl.h>
-
/* Structure for MTIOCTOP - magnetic tape operation command. */
struct mtop
{
diff --git a/scripts/check-obsolete-constructs.py b/scripts/check-obsolete-constructs.py
index 1548999..4bc4909 100755
--- a/scripts/check-obsolete-constructs.py
+++ b/scripts/check-obsolete-constructs.py
@@ -607,7 +607,7 @@ HEADER_ALLOWED_INCLUDES = {
"sys/inotify.h": [ "stdint.h" ],
"sys/ioctl.h": [ "sys/ttydefaults.h" ],
"sys/mount.h": [ "sys/ioctl.h" ],
- "sys/mtio.h": [ "sys/ioctl.h", "sys/types.h" ],
+ "sys/mtio.h": [ "sys/ioctl.h" ],
"sys/param.h": [ "endian.h", "limits.h", "signal.h",
"sys/types.h" ],
"sys/platform/ppc.h": [ "stdint.h" ],
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index f49f291..fdfbfc4 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -64,11 +64,6 @@ sysdep_headers += netinet/udp.h netinet/ip_icmp.h
endif
-ifeq ($(subdir),misc)
-sysdep_headers += sys/mtio.h
-endif
-
-
ifeq ($(subdir),csu)
routines += unwind-resume
shared-only-routines += unwind-resume
^ permalink raw reply [flat|nested] 2+ messages in thread
* [glibc/zack/no-nested-includes] Don't include sys/types.h 4/n: sys/mtio.h
@ 2019-06-18 15:34 Zack Weinberg
0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2019-06-18 15:34 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5c525ac27dbef621388d9f8dc338aa770265a81c
commit 5c525ac27dbef621388d9f8dc338aa770265a81c
Author: Zack Weinberg <zackw@panix.com>
Date: Sun May 26 10:43:50 2019 -0400
Don't include sys/types.h 4/n: sys/mtio.h
sys/mtio.h is another header that's unnecessarily in sysdeps/; the
only version we have is sysdeps/gnu/sys/mtio.h. Move to misc, and
remove its unnecessary inclusion of sys/types.h while we're at it.
This header uses the _IO* macros and therefore needs to continue
including sys/ioctl.h for now.
* sysdeps/gnu/sys/mtio.h: Move to misc/sys/mtio.h.
Don't include sys/types.h.
* sysdeps/gnu/Makefile: Don't add anything to sysdep_headers
for the misc directory.
* misc/Makefile (headers): Add sys/mtio.h.
* include/sys/mtio.h: New wrapper.
* scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES): Update.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch zack/no-nested-includes
# Your branch and 'origin/zack/no-nested-includes' have diverged,
# and have 35 and 16 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
# Changes to be committed:
# new file: include/sys/mtio.h
# modified: misc/Makefile
# renamed: sysdeps/gnu/sys/mtio.h -> misc/sys/mtio.h
# modified: sysdeps/gnu/Makefile
#
# Changes not staged for commit:
# modified: elf/link.h
# modified: gmon/sys/gmon.h
# modified: gmon/sys/profil.h
# modified: gmon/tst-sprofil.c
# modified: inet/aliases.h
# modified: io/fts.h
# modified: io/sys/sendfile.h
# modified: login/utmp.h
# modified: login/utmpx.h
# modified: misc/sys/xattr.h
# modified: nis/nis_domain_of.c
# modified: nis/yp_xdr.c
# modified: nptl/pthread_join_common.c
# modified: scripts/check-obsolete-constructs.py
# modified: socket/sys/un.h
# modified: stdlib/sys/random.h
# modified: sunrpc/svc.c
# modified: sysdeps/mach/hurd/i386/Makefile
# modified: sysdeps/mach/hurd/sendfile.c
# modified: sysdeps/nptl/proc_service.h
# modified: sysdeps/nptl/sys/procfs.h
# modified: sysdeps/nptl/thread_db.h
# modified: sysdeps/posix/dl-fileid.h
# modified: sysdeps/unix/sysv/linux/aarch64/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/aarch64/sys/user.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/procfs-prregset.h
# modified: sysdeps/unix/sysv/linux/alpha/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/alpha/sys/acct.h
# modified: sysdeps/unix/sysv/linux/alpha/sys/user.h
# modified: sysdeps/unix/sysv/linux/arm/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/arm/sys/user.h
# modified: sysdeps/unix/sysv/linux/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/csky/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/dl-vdso.h
# modified: sysdeps/unix/sysv/linux/hppa/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/hppa/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/ia64/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/ia64/sys/user.h
# modified: sysdeps/unix/sysv/linux/m68k/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/m68k/sys/user.h
# modified: sysdeps/unix/sysv/linux/microblaze/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/microblaze/sys/user.h
# modified: sysdeps/unix/sysv/linux/mips/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/mips/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/mips/sys/user.h
# modified: sysdeps/unix/sysv/linux/nios2/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/nios2/sys/user.h
# modified: sysdeps/unix/sysv/linux/powerpc/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/powerpc/sys/user.h
# modified: sysdeps/unix/sysv/linux/riscv/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/s390/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/s390/sys/user.h
# modified: sysdeps/unix/sysv/linux/sh/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/sh/sys/user.h
# modified: sysdeps/unix/sysv/linux/sparc/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/sparc/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/sparc/sys/user.h
# modified: sysdeps/unix/sysv/linux/sys/acct.h
# modified: sysdeps/unix/sysv/linux/sys/epoll.h
# modified: sysdeps/unix/sysv/linux/sys/fsuid.h
# modified: sysdeps/unix/sysv/linux/sys/procfs.h
# modified: sysdeps/unix/sysv/linux/sys/quota.h
# modified: sysdeps/unix/sysv/linux/x86/bits/epoll.h
# modified: sysdeps/unix/sysv/linux/x86/bits/procfs.h
# modified: sysdeps/unix/sysv/linux/x86/sys/user.h
#
Diff:
---
include/sys/mtio.h | 1 +
misc/Makefile | 6 +++---
{sysdeps/gnu => misc}/sys/mtio.h | 3 ---
scripts/check-obsolete-constructs.py | 2 +-
sysdeps/gnu/Makefile | 5 -----
5 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/sys/mtio.h b/include/sys/mtio.h
new file mode 100644
index 0000000..f4861bd
--- /dev/null
+++ b/include/sys/mtio.h
@@ -0,0 +1 @@
+#include <misc/sys/mtio.h>
diff --git a/misc/Makefile b/misc/Makefile
index e6c7389..106ce57 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -36,9 +36,9 @@ headers := \
bits/uio-ext.h bits/uio_lim.h bits/xopen_lim.h \
gnu/libc-version.h \
sys/auxv.h sys/cdefs.h sys/dir.h sys/file.h sys/ioctl.h \
- sys/mman.h sys/param.h sys/ptrace.h sys/queue.h sys/reboot.h \
- sys/select.h sys/swap.h sys/syscall.h sys/sysinfo.h \
- sys/syslog.h sys/sysmacros.h sys/uio.h sys/xattr.h
+ sys/mman.h sys/mtio.h sys/param.h sys/ptrace.h sys/queue.h \
+ sys/reboot.h sys/select.h sys/swap.h sys/syscall.h \
+ sys/sysinfo.h sys/syslog.h sys/sysmacros.h sys/uio.h sys/xattr.h
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
diff --git a/sysdeps/gnu/sys/mtio.h b/misc/sys/mtio.h
similarity index 99%
rename from sysdeps/gnu/sys/mtio.h
rename to misc/sys/mtio.h
index 0ce41c5..1387b13 100644
--- a/sysdeps/gnu/sys/mtio.h
+++ b/misc/sys/mtio.h
@@ -21,11 +21,8 @@
#ifndef _SYS_MTIO_H
#define _SYS_MTIO_H 1
-/* Get necessary definitions from system and kernel headers. */
-#include <sys/types.h>
#include <sys/ioctl.h>
-
/* Structure for MTIOCTOP - magnetic tape operation command. */
struct mtop
{
diff --git a/scripts/check-obsolete-constructs.py b/scripts/check-obsolete-constructs.py
index 1548999..4bc4909 100755
--- a/scripts/check-obsolete-constructs.py
+++ b/scripts/check-obsolete-constructs.py
@@ -607,7 +607,7 @@ HEADER_ALLOWED_INCLUDES = {
"sys/inotify.h": [ "stdint.h" ],
"sys/ioctl.h": [ "sys/ttydefaults.h" ],
"sys/mount.h": [ "sys/ioctl.h" ],
- "sys/mtio.h": [ "sys/ioctl.h", "sys/types.h" ],
+ "sys/mtio.h": [ "sys/ioctl.h" ],
"sys/param.h": [ "endian.h", "limits.h", "signal.h",
"sys/types.h" ],
"sys/platform/ppc.h": [ "stdint.h" ],
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index f49f291..fdfbfc4 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -64,11 +64,6 @@ sysdep_headers += netinet/udp.h netinet/ip_icmp.h
endif
-ifeq ($(subdir),misc)
-sysdep_headers += sys/mtio.h
-endif
-
-
ifeq ($(subdir),csu)
routines += unwind-resume
shared-only-routines += unwind-resume
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-18 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26 16:37 [glibc/zack/no-nested-includes] Don't include sys/types.h 4/n: sys/mtio.h Zack Weinberg
2019-06-18 15:34 Zack Weinberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).