From nobody Sun Nov 21 20:51:00 2021 X-Original-To: freebsd-toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 468A918A2DBD for ; Sun, 21 Nov 2021 20:51:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hy2ck1mFxz3M4c for ; Sun, 21 Nov 2021 20:51:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x935.google.com with SMTP id w23so32487336uao.5 for ; Sun, 21 Nov 2021 12:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=ZAeqpnxnJfoFX4GZN2s+xHvVaJlSfhKlsbVVLLE5TRw=; b=SZgMZqLuUOwqE8HW6p9evoRueIxjslTbVqng/soPPAmAV6lvHA/ppTuBUeWNyIsVHD lZfX+c2CT4/vPjD0cj6+5BWiMQ7mlFSzWIOsksvmB/JXO9Ezcyd0BDYLiHybSEB24sEs EmF7NsG0AmnHnRjfDEoE7uiCD1FB2RmnpsWhMl2oFKbfgPVHRxaoGqHq7MvTggRQwi2r +RBracyNeZzknoaw7WUdqrNY0iM2xvANagb3M6N72CoQtSf3geDTzj0oP08dxeLgi+vF CdyFe/oPB2SYgKbjgw0mDsU8zIBFLfaNizvFUc7i7MR1nVsWBTrAAA1JLaleRB6iC3u2 iF3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZAeqpnxnJfoFX4GZN2s+xHvVaJlSfhKlsbVVLLE5TRw=; b=hEfmLyjY9d/Fgp0hoYd6PIV27cz8GEcdPhtJk3zWdDeOPJgKHiqA0/WD72FdrrWmke QGnPJ0YsXv7ZLaZ3HifGZ7z7NPFOKSp0ym5dvbqjc9KHN5grOk/HxnmnEPt1WOVz6se7 G91wwvy/NKWlvT1mKoNtEk5PimDw2MtE+vBykwXN8C5Aky1kRj9wmbkTkJxUo0mQhXij PgdZLU/Lo7jJtjMf5LiwKBWs237B0kKfs3m1ZbPDe7sJPsujPkycHJSccInIsL1Bx35p hngMW//X10YCDRq2o5wr95gmJeT98pKrvV0rk/sjnn/KZPVgB3Wman10Rh9IFPKCJDPj zUTw== X-Gm-Message-State: AOAM531nFxI/hudfTVMKA76ZYxQOsIt/eSeKjYVi5eaDdcroxyjleeoa 4rpRkL1vIwWl2jxmW9Zk2gDDDUZoat1kP3fnmg1RbmRFT9rHiA== X-Google-Smtp-Source: ABdhPJyoFLYxEcHK40RvgvtbY4bEINi8w987kDEAqauerIjTCqW/fufUsfeMx6oVY4pTA/110F1cduxn2hnwy/WC7DY= X-Received: by 2002:a67:fdc3:: with SMTP id l3mr121893567vsq.42.1637527871333; Sun, 21 Nov 2021 12:51:11 -0800 (PST) List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 From: Warner Losh Date: Sun, 21 Nov 2021 13:51:00 -0700 Message-ID: Subject: How to enable BSD defined names / functions To: "freebsd-toolchain@FreeBSD.org" Content-Type: multipart/alternative; boundary="00000000000014bd1b05d152abc8" X-Rspamd-Queue-Id: 4Hy2ck1mFxz3M4c X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=SZgMZqLu; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::935) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [3.00 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-toolchain@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::935:from]; TO_DN_EQ_ADDR_ALL(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; 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] X-ThisMailContainsUnwantedMimeParts: N --00000000000014bd1b05d152abc8 Content-Type: text/plain; charset="UTF-8" There's rather a lot of software that defines _POSIX_C_SOURCE to some value (usually 200809L for POSIX-1.2008), but also wants to use other things. One can generally work around this issue by defining __BSD_VISIBLE=1, but most other systems have something more specific. NetBSD has _NETBSD_SOURCE. OpenBSD has _OPENBSD_SOURCE as well. There's also some expectation that _BSD_SOURCE can be defined, but none of the currently active BSDs has that. It appears from casual inspection that _NETBSD_SOURCE=1 means approximately the same as __BSD_VISIBLE=1 in FreeBSD. Would it make sense to add a _FREEBSD_SOURCE=1 case and have it include __BSD_VISIBLE=1 regardless of what other macros (especially _POSIX_C_SOURCE) are defined to be a more regimented and defined way to expand the namespace when multiple namespaces are defined? Warner --00000000000014bd1b05d152abc8--