From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kate-mail.whsl206.com ([49.50.249.113]) by ewsd; Sat Mar 7 18:14:59 EST 2020 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qs.co.nz; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=KHE3827qiW6AxH7JWvYWv0Y1WsolFuOck+ZxzTSf9Ac=; b=ozmDDTz3SXD9/yhvlzOhxS1c02 4f0bIpt1ocXGBhcGHhTK8F3BQRgWXjj4nrgEXrKkcEoDWIbkIW8+5slPfIgxvNDPLnkmSvnUYKVi2 dyGQFAoHA+wNtlnsmPUKCz28wZ3AVQ9mAiejMnkIeIyFFPLaszABCZlhvd59DHEMJKa9uvUJifa1j ZmSKze+JROOnsM6CTxzQ+Zfr8NzOcKfHwlpMb/e4EjqZLklFW7b1My62C516TpKiYQ8ok/YeaUKH0 0GDddUs9LVlGOIl0dTqf+C9DiFfbEXIA7i50gh5EdtbZZs2clsJevwwoVd+j4OtY7NIEWVcte3hot 2aUvXcGA==; Received: from [118.149.174.138] (port=1850 helo=[192.168.43.110]) by kate.whsl206.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jAidx-00Bxtb-AQ for 9front@9front.org; Sun, 08 Mar 2020 12:14:05 +1300 Subject: Re: [9front] APE stddef.h ptrdiff_t should it be 8? To: 9front@9front.org References: From: Trevor Higgins Message-ID: <8b63d3cf-0fda-1e69-a40f-32322b400548@qs.co.nz> Date: Sun, 8 Mar 2020 12:14:01 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kate.whsl206.com X-AntiAbuse: Original Domain - 9front.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - qs.co.nz X-Get-Message-Sender-Via: kate.whsl206.com: authenticated_id: phil@qs.co.nz X-Authenticated-Sender: kate.whsl206.com: phil@qs.co.nz X-Source: X-Source-Args: X-Source-Dir: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: open ACPI service grid hypervisor general-purpose framework On 03/08/2020 04:55 AM, ori@eigenstate.org wrote: >> I ran into a fustercluck trying to get tcl to run on amd64. just random memory corruptions as would be expected. >> Can you be more specific? What failed? >> >> Turns out it is due to APE ptrdiff_t being defined as long and not long >> long (which it is on *nix). >> >> What is the correct definition of ptrdiff_t on amd64? > The definition should be a vlong, since that's what subtracting > two pointers yields. If you want to submit a patch, the system > dependent location for this is: > > /$objtype/include/ape/stdint.h Not wishing to be picky, but vlong would not be APE , correct or not? it would be typedef long long. Also this change still requires patching /sys/include/ape/stddef.h to prevent attempt to duplicately define the structure and Probably for good measure in both files: #ifndef _PTRDIFF_T #define _PTRDIFF_T typedef ptrdiff_t /*** long long in amd64 and just long in sys/include/ape/stddef.h **/ #endif Or maybe , ptrdiff_t should be removed from stddef.h -- We need another plan