From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124307 invoked by alias); 17 Sep 2018 13:52:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 124262 invoked by uid 89); 17 Sep 2018 13:52:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*joseph X-HELO: EUR02-HE1-obe.outbound.protection.outlook.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wvXGzWOOH7SD1M/13IvmTE5sFckaIzLBNXsKQDaP46I=; b=jrRMYuy4bTwZmuDwb4vze/lhACDFRJy9c9Rnzy5d2d7MrdZjX2gADV0qLuP6IM2W1C+mdIqZn5NxAq5sQvW1RyOKnasTLntftxVQ7FMxHADOuxi3FymoppLjQc8W8FMRirFUr/s4HcYxki5k7TubvzkJtBoLMOGXG65YCWU2jdU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs.Nagy@arm.com; Cc: nd@arm.com Subject: Re: Unify many bits/mman.h headers To: Joseph Myers , libc-alpha@sourceware.org References: From: Szabolcs Nagy Message-ID: <86790112-abc9-3d82-4fd1-d923e8cbb1d5@arm.com> Date: Mon, 17 Sep 2018 13:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-Path: szabolcs.nagy@arm.com Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-SW-Source: 2018-09/txt/msg00237.txt.bz2 On 13/09/18 16:53, Joseph Myers wrote: > Many bits/mman.h headers for Linux architectures have exactly the same > contents, up to whitespace, comments and the number of leading 0s on > constants. Specifically, this applies to architectures that, in the > Linux kernel, either have no uapi/asm/mman.h, or have one that > includes asm-generic/mman.h without any changes or additions relevant > to glibc (this last case is the one that applies to Arm). > > It's not useful to have to duplicate the set of MAP_* constants in > glibc for all such architectures and any new architectures with that > property. Thus, this patch creates a generic > sysdeps/unix/sysv/linux/bits/mman.h and removes all the > architecture-specific versions that become unnecessary. > > Further unification remains possible after this patch. For example, > the new bits/mman.h could become bits/mman-map-flags-generic.h so that > it could also be used by architecture-specific bits/mman.h headers on > architectures that use the generic flags but add architecture-specific > ones to them. That would allow this common set of MAP_* definitions > to be used on ia64 and x86 as well (architectures that include > asm-generic/mman.h from their own uapi/asm/mman.h but define > additional MAP_* values of their own). > > Tested with build-many-glibcs.py. > > 2018-09-13 Joseph Myers > > * sysdeps/unix/sysv/linux/bits/mman.h: New file. > * sysdeps/unix/sysv/linux/aarch64/bits/mman.h: Remove. The aarch64 changes are OK. > * sysdeps/unix/sysv/linux/arm/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/microblaze/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/nios2/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/riscv/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. > * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. >