From owner-freebsd-arch@freebsd.org Thu Apr 2 11:47:59 2020 Return-Path: Delivered-To: freebsd-arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF65026064E for ; Thu, 2 Apr 2020 11:47:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48tLsY3Z5Pz4Cfd; Thu, 2 Apr 2020 11:47:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 032BYhg2016067 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 2 Apr 2020 14:34:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 032BYhg2016067 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 032BYgKP016066; Thu, 2 Apr 2020 14:34:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Apr 2020 14:34:42 +0300 From: Konstantin Belousov To: Warner Losh Cc: Steve Wills , "freebsd-arch@freebsd.org" Subject: Re: Time to svn rm include/malloc.h Message-ID: <20200402113442.GL1992@kib.kiev.ua> References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48tLsY3Z5Pz4Cfd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.00)[ip: (-3.12), ipnet: 2001:470::/32(-4.66), asn: 6939(-3.60), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 11:48:00 -0000 On Tue, Mar 31, 2020 at 03:48:54PM -0600, Warner Losh wrote: > On Tue, Mar 31, 2020 at 3:03 PM Konstantin Belousov > wrote: > > > On Tue, Mar 31, 2020 at 04:01:23PM -0400, Steve Wills wrote: > > > Yeah, a lot of ports have things like: > > > > > > sed -e 's/malloc.h/stdlib.h/' *.[ch] > > > > > > because they have autotools that check for malloc.h existence and > > include it > > > if it exists, so you end up with things like: > > > > > > ... > > > #include > > > ... > > > #if HAVE_MALLOC_H > > > #include > > > #endif > > > ... > > > > > > which ends up harmless, but sub-optimal. > > > > > So wouldn't it be more useful to remove warning and either include > > stdlib.h or provide some parts of malloc-related defines, esp. the > > non-portable bits from jemalloc ? > > > > We've provided an error for the past 20 years. And a warning for the last > 24 years. Nobody is usefully using it today. In fact, it is getting in the > way, which is why we should just remove it entirely. The file is not useful as provided by us today, sure. But other OSes, namely LInux, do use it for allocator extensions features, and newer Linux-only software tends to include it unconditionally. > > > > We are not in position to teach third-party sw developers good manners. > > > > Autotools would do the right thing if we just remove this file. We're being > bad by having it and having it's inclusion be an error. It's not required > by any standard, and automation out there does the right thing when it's > not present, so we should complete the process started in 1994 by ache and > just remove it. Autotools do the right thing if somebody bothered to add corresponding fragment and than paint the whole source tree with #if HAVE_MALLOC_H. I had to do this for some large unfinished project, and this is not easy to sell to maintainers, generally. > > Warner > > > > > Steve > > > > > > > > > On 3/31/20 3:50 PM, Warner Losh wrote: > > > > We started warning in 1994 that malloc.h was an obsolete relic of a > > bygon > > > > era. It was almost removed from FreeBSD 2.0. It's time to remove it > > because > > > > it causes more harm than good to ports these days. 25 years of advance > > > > warning should be enough, I'd say. > > > > > > > > To that end, I plan on removing it from -current on April 15th. > > > > > > > > Is there any reason I shouldn't do this? > > > > > > > > Warner > > > > _______________________________________________ > > > > freebsd-arch@freebsd.org mailing list > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > > > > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org > > " > > > > > > > _______________________________________________ > > > freebsd-arch@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > > > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > >