From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8493 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Why musl define PAGE_SIZE Date: Fri, 11 Sep 2015 12:44:02 -0700 Message-ID: <20150911194359.GB1965@newbook> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1442000660 28976 80.91.229.3 (11 Sep 2015 19:44:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2015 19:44:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8505-gllmg-musl=m.gmane.org@lists.openwall.com Fri Sep 11 21:44:19 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZaUF6-0005oV-Eh for gllmg-musl@m.gmane.org; Fri, 11 Sep 2015 21:44:16 +0200 Original-Received: (qmail 3982 invoked by uid 550); 11 Sep 2015 19:44:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3953 invoked from network); 11 Sep 2015 19:44:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=q7NAVs71wPeTmD3fPqTzdFPP4VxLli5WCBrfRqTATAc=; b=gHKaiVBQ9MWjII2bcRdrw7x0DuoQhmX8/DSG7Pa9sXV+4XiwX+MDbW/ExwBPpCTDKF TyvlVC8YgA2PtQWHvmMQHuEhfTA7E+FwxmvgWToScLuw4TtRK9K2gKqrVxSQTcxzSEaE BxFjUEn5K8ePFpIqM0YUehL1xa4icT0eQGvbm54dH58W1mZyzVMfsq6EW86Wrg3J+hgF gorYpe/lZudYd5qCqCnq9GuvbBHdH8fq6aQg7lXZVqLCb8eNwhdUvX+A5NYR5g5arvEr bYQXTRp0kNF1wJ4WB70EkiuL+Aqldin4rfV9VVBULfAdy4cc1WosvkyADRDgcWtPrLuR wpcQ== X-Received: by 10.66.122.97 with SMTP id lr1mr1062958pab.76.1442000642148; Fri, 11 Sep 2015 12:44:02 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:8493 Archived-At: On Fri, Sep 11, 2015 at 03:28:52PM -0400, Yuxin Ren wrote: > Hi, > > I found in the bits/limits.h file, musl defines PAGE_SIZE macro . > I think this macro is always defined by operating system, not libc. > > Why does musl define this marco? It's required to be in limits.h, which has to be provided by libc for a full implementation. Hypothetically, we could get it from the Linux headers. But the Linux headers can and sometimes do introduce definitions and structs that violate the header namespaces, resulting in collisions (ie, kernel header defines struct foo, application defines struct foo without including any headers that *should* define it, application fails to compile.) HTH, Isaac Dunham