From patchwork Thu Mar 20 19:20:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 199 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (caibbdcaaahb.dreamhost.com [208.113.200.71]) by wilcox.dreamhost.com (Postfix) with ESMTP id B8FAA360108 for ; Thu, 20 Mar 2014 12:20:47 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 62E76CA6120; Thu, 20 Mar 2014 12:20:47 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 28B26CA611A for ; Thu, 20 Mar 2014 12:20:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=DbyjqX4QqI/Py6D+V+xmORFj9gg3S1W1nFdJpjczhdY AuUYQFTtAJ9twTFQE+KPHtv55d8KVLhVr+MOeH3fA68hZjT+gOedC74lSDOZeKHQ qZiXPn7c/UJNgFsxjZIayuwELyWePMOExNS6Kt703oUxDuVEWVRZsTiiFlVCswMc = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=VCiXWuXLTZpVts3E6ubpHdBZK2Q=; b=HM9My4lIrda6w7NFm 5AdKwqSVqrvB3Fx8yJu4c6bY0213YODcfMudAPgIFPF9znYPDZ+2WtsksULAfeyo dXYk+nLMpy6FBkW4fNjvgjuRzIPDyOVw9wUrCuRgMVL+Wor78ST8yX9PSFI5t6RS GOREt6I5ThraY3lBYezDB5CxZk= Received: (qmail 1611 invoked by alias); 20 Mar 2014 19:20:45 -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 1593 invoked by uid 89); 20 Mar 2014 19:20:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e24smtp02.br.ibm.com Message-ID: <532B3F64.6030005@linux.vnet.ibm.com> Date: Thu, 20 Mar 2014 16:20:04 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: libc-alpha@sourceware.org Subject: Re: [PATCH] Remove PRI_MACROS_BROKEN define usage References: <532B3168.2030108@linux.vnet.ibm.com> <532B3750.2030102@linux.vnet.ibm.com> In-Reply-To: X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14032019-2194-0000-0000-000008562965 X-DH-Original-To: glibc@patchwork.siddhesh.in On 20-03-2014 15:51, Joseph S. Myers wrote: > On Thu, 20 Mar 2014, Adhemerval Zanella wrote: > >> Do we still want to keep code that no longer makes sense in our context? >> GLIBC does not even have configure check for PRI_MACROS_BROKEN, so >> should we keep aiming a possible sync? I personally aim for simplicity >> and maintainability in this case, which means get rid of legacy code >> that does not make sense for GLIBC. > We want all files shared with other projects to be identical with the > copies in those projects as far as possible (there may sometimes be cases > where license notices need to be different, as with the files from GMP), > to facilitate merging in both directions. This includes files shared with > gnulib and gettext. > > (This does not necessarily mean a particular conditional is still relevant > to the other projects; they too may remove support for some older systems, > although supporting a much wider range of systems than glibc. But you'd > need to consult with the gettext and gnulib communities to determine > whether a conditional is still relevant there.) > Ok, I check with gettext implementation 'gettext-runtime/intl/loadmsgcat.c' and changed the initial patch based on your suggestion (I also added some changes to make glibc one similar to gettext one). diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index b96a997..d47b903 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -62,6 +62,7 @@ char *alloca (); #ifdef _LIBC # include # include +# define PRI_MACROS_BROKEN 0 #endif #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ @@ -486,8 +487,7 @@ int _nl_msg_cat_cntr; /* Expand a system dependent string segment. Return NULL if unsupported. */ static const char * -get_sysdep_segment_value (name) - const char *name; +get_sysdep_segment_value (const char *name) { /* Test for an ISO C 99 section 7.8.1 format string directive. Syntax: @@ -756,9 +756,8 @@ get_sysdep_segment_value (name) message catalog do nothing. */ void internal_function -_nl_load_domain (domain_file, domainbinding) - struct loaded_l10nfile *domain_file; - struct binding *domainbinding; +_nl_load_domain (struct loaded_l10nfile *domain_file, + struct binding *domainbinding) { __libc_lock_define_initialized_recursive (static, lock); int fd = -1; @@ -821,7 +820,7 @@ _nl_load_domain (domain_file, domainbinding) || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0) || __builtin_expect (size < sizeof (struct mo_file_header), 0)) /* Something went wrong. */ - goto out;; + goto out; #ifdef HAVE_MMAP /* Now we are ready to load the file. If mmap() is available we try @@ -1277,8 +1276,7 @@ _nl_load_domain (domain_file, domainbinding) #ifdef _LIBC void internal_function __libc_freeres_fn_section -_nl_unload_domain (domain) - struct loaded_domain *domain; +_nl_unload_domain (struct loaded_domain *domain) { size_t i; @@ -1289,7 +1287,7 @@ _nl_unload_domain (domain) { struct converted_domain *convd = &domain->conversions[i]; - free ((char *) convd->encoding); + free (convd->encoding); if (convd->conv_tab != NULL && convd->conv_tab != (char **) -1) free (convd->conv_tab); if (convd->conv != (__gconv_t) -1)