From patchwork Mon Feb 5 23:34:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 25829 Received: (qmail 79817 invoked by alias); 5 Feb 2018 23:35:06 -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 79681 invoked by uid 89); 5 Feb 2018 23:35:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: l2mail1.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, joseph@codesourcery.com Subject: [PATCH v2 1/5] Pre-cleanup: Remove unnecessary redefinitions of std symbols. Date: Mon, 5 Feb 2018 18:34:56 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: Two files in stdio-common were unnecessarily redefining some standard symbols as their _IO_ aliases, which causes problems for a build with the visibility of libio.h reduced. This changes installed stripped libraries, because the line numbering changes in vfprintf.c, which changes the messages associated with a bunch of assertions. However, if it weren't entangled with a scary change I wouldn't be hesitating to call it an obvious cleanup. * stdio-common/vfprintf.c: Don't redefine FILE, va_list, or BUFSIZ. * stdio-common/tstgetln.c: Don't redefine ssize_t. --- stdio-common/tstgetln.c | 2 -- stdio-common/vfprintf.c | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c index a18f754e354..6960e686200 100644 --- a/stdio-common/tstgetln.c +++ b/stdio-common/tstgetln.c @@ -16,8 +16,6 @@ . */ #include -#undef ssize_t -#define ssize_t _IO_ssize_t int main (int argc, char *argv[]) diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index 3b87740dd99..a2cab306855 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -39,13 +39,8 @@ Beside this it is also shared between the normal and wide character implementation as defined in ISO/IEC 9899:1990/Amendment 1:1995. */ - #include -#define FILE _IO_FILE -#undef va_list -#define va_list _IO_va_list -#undef BUFSIZ -#define BUFSIZ _IO_BUFSIZ + /* In some cases we need extra space for all the output which is not counted in the width of the string. We assume 32 characters is enough. */