From nobody Fri Jul 9 08:27:48 2021 X-Original-To: freebsd-arch@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 5DB9E11E1626 for ; Fri, 9 Jul 2021 08:28:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GLmWN3l3Kz3qTD for ; Fri, 9 Jul 2021 08:28:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id a6so8578749qka.4 for ; Fri, 09 Jul 2021 01:28:00 -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=V4EZf2slcQL1d16PIb8xMdFXO3ordvYLRPgAmIya/v8=; b=NJWl4fXJY8c53peoP9u398AE46lp+MPXot9IRIRXrm4CLPfAlZG6FXI2uj6x0bTB3R MbsR2Zqd8cMzGtYByOdRt/AJvKlrC+lWio5XxY5AJTeBF23n74hpkhPkJfVvWfN86vdB y0F3P2XMW6qHxkaLNs2e3CZZIMjt8KwRsgvOAtp0qQl0pYkRHVBM5SK2bshOq+Oi8eX2 U0D1tc1IZyrqQEkDuLy7FGX0ZbvgQ3EF3LgInMkW0JpVKRyFS1vnj3hHKiAECRJ5NHMM LeNVOtpGI+05dFjgLec9mRNp6XBk/LC+Luuvj+jSP9BJgQfwUb+3dDBTk1E25QprDCk9 ptfg== 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=V4EZf2slcQL1d16PIb8xMdFXO3ordvYLRPgAmIya/v8=; b=plPjl+QVXQuUnORIpARx1GtvuhZ8gJlnYbZcPX1uIn1chsTVPP70fcJ59ZMqOspK3A 1X/8IvqY8BOfYjVbTikk2MIu+WHI0NWdtOcM52QyisR+8c8VTBqaFYTTTjCv7ZcigHzq aW9wNPPpoMScXVn88LI+1VftvaqD2pfjvwaqdWWAwFIcFgV1YxpAl9hrGA0kJHOak96w dlgL7GJ6wF0/I/nuhgSfywDl53A0u2zFyxOsrqBftakq080WvlyRLyy+LJ8HZGtDd8OH mfkBIJ9Trtd2h8jbnBDu6EogEbb894bPakPDKc71jTDGG82GbNsR1V6T7lYLgfhleQZt Zi1Q== X-Gm-Message-State: AOAM53104naBwA3js9oz799gvqJOANW6RPiagsBc6haTtSPxngsODn/+ aeY+wzTV6S3kls+zWipAXerrC0zgkx2eDzSh1BjpOcPNO2Zy6XE/ X-Google-Smtp-Source: ABdhPJzO9AGKMFZIrd99W9JJGpJeFkqXGCmCegNr3q9GYqubyrFCACLYMMUpmnPDP7sIZCeKoARxlGlE3yA5sZ3hfKc= X-Received: by 2002:a05:620a:12b6:: with SMTP id x22mr10071186qki.195.1625819279283; Fri, 09 Jul 2021 01:27:59 -0700 (PDT) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 From: Warner Losh Date: Fri, 9 Jul 2021 02:27:48 -0600 Message-ID: Subject: FreeBSD awk behavior change proposal To: "freebsd-arch@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000009c68a405c6ac8ca7" X-Rspamd-Queue-Id: 4GLmWN3l3Kz3qTD X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=NJWl4fXJ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::734) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [0.95 / 15.00]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::734:from:127.0.2.255]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_SPAM_LONG(0.95)[0.947]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::734:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-arch] X-ThisMailContainsUnwantedMimeParts: Y --0000000000009c68a405c6ac8ca7 Content-Type: text/plain; charset="UTF-8" Greetings, I've posted https://reviews.freebsd.org/D31114 which eliminates the last delta we have from upstream one-true-awk. This delta has basically been rejected by upstream as being a really bad idea. Let me give some background. In 2005, FreeBSD changed one-true-awk to honor the locale's collating order. https://svnweb.freebsd.org/base/head/usr.bin/awk/b.c.diff?annotate=146322&pathrev=201988 This was billed as a temporary patch. It was also compatible with the then-current behavior of gawk. That temporary patch has lasted 16 years now. However, IEEE Std 1003.1-2008 changed the behaivor of ranges in regular expressions outside of the "C" and "POSIX" locales to be undefined. Starting in 2011, gawk 4.0 stopped using the locale for the range regular expressions and used the traditional behavior only. The maintainer had grown weary of answering why '[A-Z]' would sometimes match lower-case expressions. The details about are explained here: https://www.gnu.org/software/gawk/manual/html_node/Ranges-and-Locales.html To restore compatibility with other implementaitons of awk, revert this patch. FreeBSD is the odd-system out. It also has the nice side effect of eliminating the last of our differences with upstream one-true-awk. I'd like to commit the change at least to -current. Ideally, I'd like to MFC the change. I believe better compatibility with gawk and other awk implementations justifies this change in behavior because the current behavior is outside the mainstream enough to be considered a bug. I'd like to solicit input before I do this, however. Warner --0000000000009c68a405c6ac8ca7--