From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7856 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: time.h define NULL Date: Tue, 2 Jun 2015 13:24:11 +0200 Message-ID: <20150602112410.GC10927@port70.net> References: <1433236180.2010.17.camel@xiaoka.com> <20150602093553.GA10927@port70.net> <1433243791.2010.21.camel@xiaoka.com> 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 1433244485 27943 80.91.229.3 (2 Jun 2015 11:28:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Jun 2015 11:28:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7869-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jun 02 13:28:04 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 1YzkIz-0006tZ-5Y for gllmg-musl@m.gmane.org; Tue, 02 Jun 2015 13:24:25 +0200 Original-Received: (qmail 11818 invoked by uid 550); 2 Jun 2015 11:24:23 -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 11796 invoked from network); 2 Jun 2015 11:24:22 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <1433243791.2010.21.camel@xiaoka.com> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:7856 Archived-At: * Tomasz Sterna [2015-06-02 13:16:31 +0200]: > Dnia 2015-06-02, wto o godzinie 11:35 +0200, Szabolcs Nagy pisze: > > > Why does time.h unconditionally define NULL [1]? > > because it is required > > Required by what? > c11 7.27.1p2 > > > /usr/include/time.h:11:9: warning: 'NULL' macro redefined > > > [-Wmacro-redefined] > > > #define NULL 0L > > > ^ > > what is the previous definition? > > and why is that conflicting? > > Previous definition is: > #define NULL (0) > > it is in one of headers of the application I'm trying to build against > musl. > that's undefined behaviour NULL is reserved for the implementation if time.h is included. c11 7.1.3 > Even if it is required by time.h, shouldn't it be guarded by #ifndef > NULL? time.h is not stand-alone unit and is designed to be included to > other software. no