From patchwork Mon Feb 5 23:34:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 869638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-90022-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ymOacmyE"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zb3q24HL5z9sBW for ; Tue, 6 Feb 2018 10:35:10 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=suO UN7Sat/BTmCoaa9PBNZA9kA7w0o0Ayb2yTXdA5m7VQiDLjbTmMSgoT2aK5utcdon tD5ENfKOcqF9JqkdvPeXfl535gBJkLQxBXCu+qy1yANDTmpEBmodYcJCUymI+dFm OGl8J5j8I9t76agD5emtxdOkh/LjCLjFLXMwWG78= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=6QIVovgvC 3gwEIbCnWzEMIRgFMg=; b=ymOacmyEfqw9TKyD9a4BsgfTT+AQD0wGYJmfWhbZu R+Zcm5kXNWq74j1Isc9B/2v/4HraliCYWoezO+FmP69HgVI7PGDUfbo20z6el0gw lYVBdb31IcNFJaT/kzAz3F1wRgW7djLEyszxDXHqo6PoCkuuWpq6iTXrzhXXoUnn 3o= Received: (qmail 79383 invoked by alias); 5 Feb 2018 23:35:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 79349 invoked by uid 89); 5 Feb 2018 23:35:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=ambitious X-HELO: mailbackend.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, joseph@codesourcery.com Subject: [PATCH v2 0/5] Don't install libio.h or _G_config.h. Date: Mon, 5 Feb 2018 18:34:55 -0500 Message-Id: MIME-Version: 1.0 We shipped 2.27 with libio.h and _G_config.h still installed but issuing warnings when used. Let's stop installing them early in 2.28 so that we have plenty of time to think of another plan if there are problems. This patch series consists of one pre-cleanup, two changes with user-visible effects, and two post-cleanups. The pre-cleanup and the first user-visible change affect the contents of installed shipped libraries, in ways described clearly in those patches' commit messages; the latter three patches leave installed stripped libraries on x86_64-linux-gnu unchanged. The post-cleanups are not very ambitious. We can't go very far with libio cleanups as long as we still have _IO_MTSAFE_IO, and I am not tackling that in this patch series, but we can at least make the maze of stdio-related headers a little less complicated. I'm not going to have time to work on this anymore in the near future. If anyone else feels like following up, but not tackling _IO_MTSAFE_IO, a good next step would be to remove _IO_ symbols that are not used at all anymore, or whose uses can trivially be replaced with public or __ symbols. All patches have been individually test-compiled on x86_64-linux-gnu and test-installed. The complete test suite has been run for the patchset as a whole. In addition, for the patchset as a whole, I verified that a simple program that uses stdio.h could be compiled and run against the installation tree. zw Zack Weinberg (5): Pre-cleanup: Remove unnecessary redefinitions of std symbols. Remove getc and putc macros from the public stdio.h. Don't install libio.h or _G_config.h. Post-cleanup 1: move libio.h back out of bits/. Post-cleanup 2: minimize _G_config.h. NEWS | 11 +- bits/_G_config.h | 62 ---- conform/data/stdio.h-data | 2 +- csu/init.c | 13 +- include/bits/libio.h | 45 --- include/bits/types/__fpos64_t.h | 1 + include/bits/types/__fpos_t.h | 1 + include/bits/types/cookie_io_functions_t.h | 1 + include/bits/types/struct_FILE.h | 1 + include/stdio.h | 33 +- libio/Makefile | 9 +- libio/_G_config.h | 25 -- libio/bits/libio-ldbl.h | 29 -- libio/bits/libio.h | 527 ----------------------------- libio/bits/stdio.h | 33 +- libio/bits/stdio2.h | 35 +- libio/bits/types/__fpos64_t.h | 16 + libio/bits/types/__fpos_t.h | 16 + libio/bits/types/cookie_io_functions_t.h | 46 +++ libio/bits/types/struct_FILE.h | 120 +++++++ libio/filedoalloc.c | 2 +- libio/fileops.c | 2 +- libio/iofdopen.c | 4 +- libio/iofopen.c | 2 +- libio/iolibio.h | 6 + libio/libio.h | 404 +++++++++++++++++++++- libio/libioP.h | 27 +- libio/stdio.h | 103 +++--- scripts/check-installed-headers.sh | 5 - stdio-common/tstgetln.c | 2 - stdio-common/vfprintf.c | 7 +- sysdeps/generic/_G_config.h | 15 + sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 13 +- sysdeps/unix/sysv/linux/_G_config.h | 15 + sysdeps/unix/sysv/linux/bits/_G_config.h | 63 ---- 35 files changed, 798 insertions(+), 898 deletions(-) delete mode 100644 bits/_G_config.h delete mode 100644 include/bits/libio.h create mode 100644 include/bits/types/__fpos64_t.h create mode 100644 include/bits/types/__fpos_t.h create mode 100644 include/bits/types/cookie_io_functions_t.h create mode 100644 include/bits/types/struct_FILE.h delete mode 100644 libio/_G_config.h delete mode 100644 libio/bits/libio-ldbl.h delete mode 100644 libio/bits/libio.h create mode 100644 libio/bits/types/__fpos64_t.h create mode 100644 libio/bits/types/__fpos_t.h create mode 100644 libio/bits/types/cookie_io_functions_t.h create mode 100644 libio/bits/types/struct_FILE.h create mode 100644 sysdeps/generic/_G_config.h create mode 100644 sysdeps/unix/sysv/linux/_G_config.h delete mode 100644 sysdeps/unix/sysv/linux/bits/_G_config.h