From owner-freebsd-arch@freebsd.org Tue Mar 31 19:51:07 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 DC3FA269760 for ; Tue, 31 Mar 2020 19:51:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sKgz0jJpz4fxp for ; Tue, 31 Mar 2020 19:50:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id 139so14575357qkd.9 for ; Tue, 31 Mar 2020 12:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=SJyCf2VSlL35fppmBb/oThYJQgp52pkfBogatmvVBCE=; b=CHGClUgdOGH9Y7J3UMrG9/pnGs2nnRj8/GFHFhad+UzfPoRgr5qta/dHmI1b/B1bn4 dJXpr82qPVHdHB+bNnwxiAPtGamUOziCditSrKJDO5qfZHBure0G5sad8ntxAf70teTn /G2MSm+jcL8tVqg/WodWGNoYhvwXSAL8S2bhS35Mho0NdBtim6uN3qgJJpVyCnGuJnk9 amCKwhTxpFc8D4C6JBkRhjdxI6BCXWXEWP2RMCXeOh3SQIQCsk4xvi0woawvWt2wcSEq rOq5q1nZDeTPopRebe8Z+LppGsNVTI9fpScLQ3Xl8O8xrljSaJauk960jposNuNnYGeH 8T+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SJyCf2VSlL35fppmBb/oThYJQgp52pkfBogatmvVBCE=; b=CD8RE6CkIpF9JpzJzeRLSdYT1qsUdDgUDuHgURu/IOczLozuPhjBkEhfnuqkYI3y1x t3F31325w+x+Xi8nnpe5PP10DptxxbQ/M4WQnV8JeWBGSzA3ncnpCdfTnrx8GWYEdBWM OxWVjyBwRd+XYgmNnotII07kBTfW8hdMwc1PmTErSGfHNe6vc5bILekz/j6DuPsaj1o6 XFdeoj49FJKpykv2NYW8JwNrStXWboyFXpEsxlmsoBLK6BLKZBLDzLmi690TX1cskXT6 055LkACFMKEJkJUxxt9L9yrdthWKU05K1jqbdZEHXeZK2VwnMc+WQDkR1G4v9LRe3bNT BCTg== X-Gm-Message-State: ANhLgQ1/Wg4mNFduObpocsU5Yg/DR5GGZD/dhjtuKiEPIOqhw5WYUfNz 9GTJawhkb7oktg3uXjgs91Z0JxMxrgYtbYsHAlQFoQ/q X-Google-Smtp-Source: ADFU+vt9ztxIssxw9LDm3+wQZ8LVdQnc9OF0bp0mrs7it607urEvQ86NWAxyVawLAHETUVqFgH524Jo+RIlahhZ5Huc= X-Received: by 2002:a05:620a:1f1:: with SMTP id x17mr6108266qkn.60.1585684245919; Tue, 31 Mar 2020 12:50:45 -0700 (PDT) MIME-Version: 1.0 From: Warner Losh Date: Tue, 31 Mar 2020 13:50:34 -0600 Message-ID: Subject: Time to svn rm include/malloc.h To: "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 48sKgz0jJpz4fxp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=CHGClUgd; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.01 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RSPAMD_URIBL_FAIL(0.00)[query timed out]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_ONE(0.00)[1]; DBL_FAIL(0.00)[query timed out]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[a.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.01)[ip: (-9.22), ipnet: 2607:f8b0::/32(-0.35), asn: 15169(-0.45), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 31 Mar 2020 19:51:09 -0000 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 From owner-freebsd-arch@freebsd.org Tue Mar 31 20:01:50 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 937D1269EF4 for ; Tue, 31 Mar 2020 20:01:50 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sKwX5Mkmz3GFs for ; Tue, 31 Mar 2020 20:01:48 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from lrrr.mouf.net (cpe-76-182-16-135.nc.res.rr.com [76.182.16.135]) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id 02VK1SaW065817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 31 Mar 2020 20:01:34 GMT (envelope-from swills@FreeBSD.org) Subject: Re: Time to svn rm include/malloc.h To: Warner Losh , "freebsd-arch@freebsd.org" References: From: Steve Wills Message-ID: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> Date: Tue, 31 Mar 2020 16:01:23 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Tue, 31 Mar 2020 20:01:35 +0000 (UTC) X-Spam-Status: No, score=0.3 required=4.5 tests=KHOP_HELO_FCRDNS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.99.2 at mouf.net X-Virus-Status: Clean X-Rspamd-Queue-Id: 48sKwX5Mkmz3GFs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.76)[-0.756,0]; ASN(0.00)[asn:36236, ipnet:2607:fc50::/36, country:US]; NEURAL_HAM_LONG(-0.73)[-0.729,0] 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: Tue, 31 Mar 2020 20:01:51 -0000 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. 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" > From owner-freebsd-arch@freebsd.org Tue Mar 31 21:03:19 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 7A29026C510 for ; Tue, 31 Mar 2020 21:03:19 +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 48sMHS6dgGz49Hq; Tue, 31 Mar 2020 21:03:15 +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 02VL2wEL057619 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 1 Apr 2020 00:03:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 02VL2wEL057619 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 02VL2wY3057618; Wed, 1 Apr 2020 00:02:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Apr 2020 00:02:58 +0300 From: Konstantin Belousov To: Steve Wills Cc: Warner Losh , "freebsd-arch@freebsd.org" Subject: Re: Time to svn rm include/malloc.h Message-ID: <20200331210258.GJ1992@kib.kiev.ua> References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> 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: 48sMHS6dgGz49Hq X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] 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: Tue, 31 Mar 2020 21:03:19 -0000 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 are not in position to teach third-party sw developers good manners. > 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" From owner-freebsd-arch@freebsd.org Tue Mar 31 21:49:27 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 8D7E026D6EB for ; Tue, 31 Mar 2020 21:49:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sNJW1hvVz4SD1 for ; Tue, 31 Mar 2020 21:49:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id b62so24895360qkf.6 for ; Tue, 31 Mar 2020 14:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2DDTsbY/Sgr9rxJE7+jlHEEj4XjRcbdSteNuOyIUeyU=; b=sTYy2dQz0eoq3B2QIUT20nOKKS1IsKXFZ9Itiduhi+0o8XOi0of7Ax/5ZeeyGCiywK ufHly9NyNyxibU9IvtxE2nWiu0FkwTbzvyAGjVrenX/RhSdk+qt8kYaTuh4qdDq3w7YL VKbKuFFUGB1UFOmKpn+qRI57969A6C3fzE9gjba/BsCX3EBpoF9qR+8mp8Tfrj5CqDiJ Ds0MbKQrWhYlXsFqlBafco25aV8G7UTOclToMcZHnOITRO9VEMfY5C0MoQ34TQvfxtDP vwljfbGGnHLZDx2ylhAxFzV0wORWldXYaAPobmgyyBenzEjGLKpEZsVatuYCjjGXkLA3 HP2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2DDTsbY/Sgr9rxJE7+jlHEEj4XjRcbdSteNuOyIUeyU=; b=MVWZtFldGmYklDl8+b4VzYA7e7p78dNCdVjDmAa4WHZvMoiWenov69YVzuSdAReHMu NsWBA0rAD7aEfQ7qlS4Dq0BohniTgYigjw+ZT9EpbaCD59FEfBaUNRFEQkGNlIjHb+qw baGUw6Il+RY/rKqBU0W5A8OnBPmk4kKHhSHX/YJ0niC3lMxymyGVMMeuUuBHyw9UipF3 tayBxHd7xeJLBYRNoluvHKK7tEqqRpoUoUyLAHj5x4dqsJL491AzV/sPJBcfh2g9AWKK B+aHHqAy8PKudqcEhk4t6Jih5Di8iSAdD6N+Jc+F7m2WcB5k3G7zO+0D8+WASEzVzN15 Jm7A== X-Gm-Message-State: ANhLgQ29LX24dPY8YGiS2WUt7cWBpSQvMMg2xuGr6LX5XGhEWO/iVq9a /3LppRyoKAVTs9NjFTdAma5LgC9SlZaHer6HMswx7w== X-Google-Smtp-Source: ADFU+vt70R16adAX66PLwc/s8dUtyXUmpALEwcLGPW5xYKDvnweVzA4IWwWrj84uIIYAyyKyNe1T+UVcVIZilSIHthw= X-Received: by 2002:a05:620a:1f1:: with SMTP id x17mr6559073qkn.60.1585691345201; Tue, 31 Mar 2020 14:49:05 -0700 (PDT) MIME-Version: 1.0 References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> In-Reply-To: <20200331210258.GJ1992@kib.kiev.ua> From: Warner Losh Date: Tue, 31 Mar 2020 15:48:54 -0600 Message-ID: Subject: Re: Time to svn rm include/malloc.h To: Konstantin Belousov Cc: Steve Wills , "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 48sNJW1hvVz4SD1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=sTYy2dQz; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[c.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.00)[ip: (-9.16), ipnet: 2607:f8b0::/32(-0.35), asn: 15169(-0.45), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 31 Mar 2020 21:49:27 -0000 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. > 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. 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" > From owner-freebsd-arch@freebsd.org Wed Apr 1 01:38:30 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 0E11C276202 for ; Wed, 1 Apr 2020 01:38:30 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sTNx5Htgz44lJ for ; Wed, 1 Apr 2020 01:38:24 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from lrrr.mouf.net (cpe-76-182-16-135.nc.res.rr.com [76.182.16.135]) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id 0311c1ei070275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 1 Apr 2020 01:38:06 GMT (envelope-from swills@FreeBSD.org) Subject: Re: Time to svn rm include/malloc.h To: Warner Losh , Konstantin Belousov Cc: "freebsd-arch@freebsd.org" References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> From: Steve Wills Message-ID: <273ad612-cd05-0bd9-7a48-aaa4c93ddaaa@FreeBSD.org> Date: Tue, 31 Mar 2020 21:37:54 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Wed, 01 Apr 2020 01:38:08 +0000 (UTC) X-Spam-Status: No, score=0.3 required=4.5 tests=KHOP_HELO_FCRDNS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.99.2 at mouf.net X-Virus-Status: Clean X-Rspamd-Queue-Id: 48sTNx5Htgz44lJ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.65 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.91)[-0.915,0]; ASN(0.00)[asn:36236, ipnet:2607:fc50::/36, country:US]; NEURAL_HAM_LONG(-0.74)[-0.740,0] 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: Wed, 01 Apr 2020 01:38:30 -0000 Hi, On 3/31/20 5:48 PM, Warner Losh wrote: > > > On Tue, Mar 31, 2020 at 3:03 PM Konstantin Belousov > wrote: [snip] > 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 ? > > I don't really have a strong opinion either way. > 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. > > 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. But it does seem a bit late to change our minds. Steve 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" > > From owner-freebsd-arch@freebsd.org Sat Apr 4 01:28:04 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 C747B279A32 for ; Sat, 4 Apr 2020 01:28:04 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vK1X4cWXz4gXY; Sat, 4 Apr 2020 01:28:00 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 3B8A4445E; Sat, 4 Apr 2020 01:27:53 +0000 (UTC) From: Jan Beich To: Konstantin Belousov Cc: Warner Losh , Steve Wills , "freebsd-arch@freebsd.org" Subject: Re: Time to svn rm include/malloc.h References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> <20200402113442.GL1992@kib.kiev.ua> Date: Sat, 04 Apr 2020 03:27:53 +0200 In-Reply-To: <20200402113442.GL1992@kib.kiev.ua> (Konstantin Belousov's message of "Thu, 2 Apr 2020 14:34:42 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Sat, 04 Apr 2020 01:28:04 -0000 Konstantin Belousov writes: > 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. Maybe rename to . Other BSDs don't have while GNU libc defines malloc_usable_size in . malloc_usable_size is quite popular e.g., used by Firefox, sqlite3, etc. From owner-freebsd-arch@freebsd.org Sat Apr 4 14:28:30 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 97FED2ADFE0 for ; Sat, 4 Apr 2020 14:28:30 +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 48vfL53Msgz4Sd3; Sat, 4 Apr 2020 14:28:28 +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 034ES415012434 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 4 Apr 2020 17:28:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 034ES415012434 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 034ES4Gl012433; Sat, 4 Apr 2020 17:28:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Apr 2020 17:28:04 +0300 From: Konstantin Belousov To: Jan Beich Cc: Warner Losh , Steve Wills , "freebsd-arch@freebsd.org" Subject: Re: Time to svn rm include/malloc.h Message-ID: <20200404142804.GP1992@kib.kiev.ua> References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> <20200402113442.GL1992@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: 48vfL53Msgz4Sd3 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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: Sat, 04 Apr 2020 14:28:31 -0000 On Sat, Apr 04, 2020 at 03:27:53AM +0200, Jan Beich wrote: > Konstantin Belousov writes: > > > 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. > > Maybe rename to . Other BSDs don't have > while GNU libc defines malloc_usable_size in . > malloc_usable_size is quite popular e.g., used by Firefox, sqlite3, etc. I think the following should be the easiest approach diff --git a/include/malloc.h b/include/malloc.h index 5d7d7e8396d..2ec7e550334 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -1,6 +1,3 @@ /* $FreeBSD$ */ -#if __STDC__ -#error " has been replaced by " -#else #include -#endif +#include From owner-freebsd-arch@freebsd.org Sat Apr 4 16:40:43 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 A35D327971C for ; Sat, 4 Apr 2020 16:40:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vjGS4jl4z4Ktp for ; Sat, 4 Apr 2020 16:40:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x742.google.com with SMTP id o10so11524563qki.10 for ; Sat, 04 Apr 2020 09:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yYANDCliztoV7DDvy6uNfFHWTRCkCd4Xq9wTP9M92Nw=; b=HxIo/Bkk6TPPpfwax3QEGlD5vB++8yGqGYPPJEY91wExWA1CiVJFv0Xh/fFa4HXKb3 h1QtYFgztMr+Su0w3kUscrOOnbzRKal16Uun8a/ZzuvAOnyRseBc+xL9btSkv+u+lW1F x4sXKpUeeNQ6dilQBPOwtTK0EGyn3NCy7ydTmGzVAIB2+h42y6fVEQs/+qo1qLQDca8v MeQrVBt3scc4RBOlhsUVH7o2zWiywKsqM/nyI8nvh9eL9jVqjND3TTeJ8uoUiy2MvP+G 3+GWtAOTSpL5FeIwC5uzV9U5OqeHTFyyhqI1eWV9v82N3qn7rka2ieBwrpSbPCXvB+A3 W25w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yYANDCliztoV7DDvy6uNfFHWTRCkCd4Xq9wTP9M92Nw=; b=ony947X0TxY5yqVq+PT/3eVTr2dDLhFMrq4zfW3YU2SbLazPtdRWOW3yqNPd+31yoV WXMtJAxc+L77e3Hlvu2dlvx3fUviKBe0FE+unXlv7NXxvKpmE6hQY0sZY3x/rjfQgQPP FeFehEdKN8GN1YYTGr7J35/ldM+mVAQqUU/2ivS0McuhAP8Bemk2F587hu7VcDRPahir PA1S0LUsmyFMbXehn+uUFVj8PK4MpMDUU3DdKJb3zF7+dBuhMCJUkZF/RCNV1vEudd0e bJZPdmneL0IVJ0+8tRDPTdnD5SWH6gkX7gtTkZE42TFXFhCmVeOt5mOELDYi4rJfT8eG jVEg== X-Gm-Message-State: AGi0PuaXHnaPqGwjjU/w9GIYSXcWf+ECUyNyvgAOHweNPOOQDlIPmTT+ beIUea11PHB6eqwkZOs5vREFzBvFWzMemKKegNFneg== X-Google-Smtp-Source: APiQypKKdf6GHEG1LVOIJFfGEMYG4V8JtlPYkiHFhXDvXApDqqnZTgbdvpGhBBN1FH5FHAEsR4xJOFqCtaPwhyhMVus= X-Received: by 2002:ae9:d886:: with SMTP id u128mr13020358qkf.240.1586018423860; Sat, 04 Apr 2020 09:40:23 -0700 (PDT) MIME-Version: 1.0 References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> <20200402113442.GL1992@kib.kiev.ua> <20200404142804.GP1992@kib.kiev.ua> In-Reply-To: <20200404142804.GP1992@kib.kiev.ua> From: Warner Losh Date: Sat, 4 Apr 2020 10:40:11 -0600 Message-ID: Subject: Re: Time to svn rm include/malloc.h To: Konstantin Belousov Cc: Jan Beich , Steve Wills , "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 48vjGS4jl4z4Ktp X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=HxIo/Bkk; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::742) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.16 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.16)[ip: (0.02), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sat, 04 Apr 2020 16:40:43 -0000 On Sat, Apr 4, 2020, 8:28 AM Konstantin Belousov wrote: > On Sat, Apr 04, 2020 at 03:27:53AM +0200, Jan Beich wrote: > > Konstantin Belousov writes: > > > > > On Tue, Mar 31, 2020 at 03:48:54PM -0600, Warner Losh wrote: > > > > > >> On Tue, Mar 31, 2020 at 3:03 PM Konstantin Belousov < > kostikbel@gmail.com> > > >> 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. > > > > Maybe rename to . Other BSDs don't have > > while GNU libc defines malloc_usable_size in . > > malloc_usable_size is quite popular e.g., used by Firefox, sqlite3, etc. > > I think the following should be the easiest approach > > diff --git a/include/malloc.h b/include/malloc.h > index 5d7d7e8396d..2ec7e550334 100644 > --- a/include/malloc.h > +++ b/include/malloc.h > @@ -1,6 +1,3 @@ > /* $FreeBSD$ */ > -#if __STDC__ > -#error " has been replaced by " > -#else > #include > -#endif > +#include > Yes. NetBSD did something similar about a year ago. Warner > From owner-freebsd-arch@freebsd.org Sat Apr 4 17:59:32 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 9F51427BD3F for ; Sat, 4 Apr 2020 17:59:32 +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 48vl1P423bz3M1W; Sat, 4 Apr 2020 17:59:21 +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 034Hx2tt016701 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 4 Apr 2020 20:59:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 034Hx2tt016701 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 034Hx2ss016700; Sat, 4 Apr 2020 20:59:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Apr 2020 20:59:02 +0300 From: Konstantin Belousov To: Warner Losh Cc: Jan Beich , Steve Wills , "freebsd-arch@freebsd.org" Subject: Re: Time to svn rm include/malloc.h Message-ID: <20200404175902.GA13449@kib.kiev.ua> References: <6dbfb7cd-b4c8-dea8-8fc5-43e2b89e352d@FreeBSD.org> <20200331210258.GJ1992@kib.kiev.ua> <20200402113442.GL1992@kib.kiev.ua> <20200404142804.GP1992@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: 48vl1P423bz3M1W 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)[4]; 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.11), ipnet: 2001:470::/32(-4.65), 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: Sat, 04 Apr 2020 17:59:33 -0000 On Sat, Apr 04, 2020 at 10:40:11AM -0600, Warner Losh wrote: > On Sat, Apr 4, 2020, 8:28 AM Konstantin Belousov > wrote: > > > On Sat, Apr 04, 2020 at 03:27:53AM +0200, Jan Beich wrote: > > > Konstantin Belousov writes: > > > > > > > On Tue, Mar 31, 2020 at 03:48:54PM -0600, Warner Losh wrote: > > > > > > > >> On Tue, Mar 31, 2020 at 3:03 PM Konstantin Belousov < > > kostikbel@gmail.com> > > > >> 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. > > > > > > Maybe rename to . Other BSDs don't have > > > while GNU libc defines malloc_usable_size in . > > > malloc_usable_size is quite popular e.g., used by Firefox, sqlite3, etc. > > > > I think the following should be the easiest approach > > > > diff --git a/include/malloc.h b/include/malloc.h > > index 5d7d7e8396d..2ec7e550334 100644 > > --- a/include/malloc.h > > +++ b/include/malloc.h > > @@ -1,6 +1,3 @@ > > /* $FreeBSD$ */ > > -#if __STDC__ > > -#error " has been replaced by " > > -#else > > #include > > -#endif > > +#include > > > > > Yes. NetBSD did something similar about a year ago. I put the patch for review at https://reviews.freebsd.org/D24297. I would say that this is not much a review but a vote, please everybody add yourself as reviewer and accept if you agree.