From patchwork Fri Nov 9 15:31:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 995610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489531-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=golang.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yWF9yFV6"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=golang-org.20150623.gappssmtp.com header.i=@golang-org.20150623.gappssmtp.com header.b="KqMqI4Fx"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42s3z852rKz9s1x for ; Sat, 10 Nov 2018 02:31:32 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=owdtUb1ONRhX+7pDTLe5QGE8nB0+IOsGGguiRTbIWQkPaL djZYL5XM9ebRyoPYkuVccWwX+OaQmZX5wqk8IWcZj6GxiSO32SawjZj5j8anQwZY HRdFnE2s8x+rpg/XN82YC4qOkN4h/fp+GVSEhuVR0X21BEzh/xccWwW7YP2ck= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=P5SSXnFAviLE9biQsmTuIL17akw=; b=yWF9yFV66mgEHwD0KWQu atzlZ128GSs3pBT0lkuusqj/T6NF1DtqXkyREHQa/E1F0a901w/ZmzMkt4dYyZpJ zwdSRn57xwCE9Lfb3cysCE5muYYDbJHrGAm6aLBHUtiVhEjxLYIXbbglPMSIYxTF ixiuo3BkK9VOMZgumI1yvlQ= Received: (qmail 44805 invoked by alias); 9 Nov 2018 15:31:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 44660 invoked by uid 89); 9 Nov 2018 15:31:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-lj1-f181.google.com Received: from mail-lj1-f181.google.com (HELO mail-lj1-f181.google.com) (209.85.208.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 15:31:09 +0000 Received: by mail-lj1-f181.google.com with SMTP id v1-v6so1951901ljd.0 for ; Fri, 09 Nov 2018 07:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=zbMhXVDI/wklyLKj0PGXIZ+Y+n1yklq6iSZ9D5DIoKg=; b=KqMqI4FxeNq9joDkbLlqzoQ3iPNGkskyUHg1wMAZW0KrmCfrrHglTk6kKPInTx1vWK vbQT5svCu/iGYtffP5vraeZuGdq5IUuFVaLQKVL/VmiE8xJM1EnZvuMpPqMb6BGbTFNc 15geepzZ9fXiS38bXBxoeJ1BNxvZ0GrOv3QILRyKcF7M4rayX5AikzB+G+mUULt8td6i i5AbZeQgql6lnD8VaUsbQyWOt46TdyU+yLDjm+EmYvd0AVyt1rrKD06H42iqbzm1ccmP VSpzq+5fZAZ3p8gko8JS4usqiiuVLm14MOACf5Zq2933MMp1UjUjQZLokLgvXIlQzXW8 ZRKQ== MIME-Version: 1.0 Received: by 2002:a05:6504:497:0:0:0:0 with HTTP; Fri, 9 Nov 2018 07:31:05 -0800 (PST) From: Ian Lance Taylor Date: Fri, 9 Nov 2018 07:31:05 -0800 Message-ID: Subject: libgo patch committed: Change RLIM_INFINITY from 0xffffffffffffffff to -1 To: gcc-patches , gofrontend-dev@googlegroups.com This libgo patch changees RLIM_INFINITY from 0xffffffffffffffff to -1 on GNU/Linux. 0xffffffffffffffff is arguably the correct value, but in the gc toolchain's syscall package the value is -1. So we are compatible. New programs should be using the golang.org/x/sys/unix package anyhow. This fixes https://golang.org/issue/28665. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to trunk and to 7 and 8 branches. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 265820) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -5fcfe352ad91945a4f4d0dcfb6309df9bd072c7d +da8c968474690d1e77442ac3361b2302ea8e1f36 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 265710) +++ libgo/mksysinfo.sh (working copy) @@ -1152,10 +1152,17 @@ grep '^const _RLIMIT_' gen-sysinfo.go | grep '^const _RLIM_' gen-sysinfo.go | grep -v '^const _RLIM_INFINITY ' | sed -e 's/^\(const \)_\(RLIM_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +rliminf="" if test "${rlimit}" = "_rlimit64" && grep '^const _RLIM64_INFINITY ' gen-sysinfo.go > /dev/null 2>&1; then - echo 'const RLIM_INFINITY = _RLIM64_INFINITY' >> ${OUT} -elif grep '^const _RLIM_INFINITY ' gen-sysinfo.go > /dev/null 2>&1; then - echo 'const RLIM_INFINITY = _RLIM_INFINITY' >> ${OUT} + rliminf=`grep '^const _RLIM64_INFINITY ' gen-sysinfo.go | sed -e 's/.* //'` +else + rliminf=`grep '^const _RLIM_INFINITY ' gen-sysinfo.go | sed -e 's/.* //'` +fi +# For compatibility with the gc syscall package, treat 0xffffffffffffffff as -1. +if test "$rliminf" = "0xffffffffffffffff"; then + echo "const RLIM_INFINITY = -1" >> ${OUT} +elif test -n "$rliminf"; then + echo "const RLIM_INFINITY = $rliminf" >> ${OUT} fi # The sysinfo struct.