From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from condef-08.nifty.com (condef-08.nifty.com [202.248.20.73]) by sourceware.org (Postfix) with ESMTPS id 7CD71385843B for ; Tue, 28 Sep 2021 08:54:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7CD71385843B Received: from conssluserg-02.nifty.com ([10.126.8.81])by condef-08.nifty.com with ESMTP id 18S8E60V013864 for ; Tue, 28 Sep 2021 17:14:06 +0900 Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 18S8DgLL025190 for ; Tue, 28 Sep 2021 17:13:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 18S8DgLL025190 X-Nifty-SrcIP: [110.4.221.123] Date: Tue, 28 Sep 2021 17:13:42 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: Incompatible clipboard format between 32bit and 64bit cygwin Message-Id: <20210928171342.c720a327eeaf5ab97241d7f6@nifty.ne.jp> In-Reply-To: <82c34eff-3913-785c-7e77-aadc9d257d60@SystematicSw.ab.ca> References: <20210926103325.5c17eb11c3c8a56c377199a8@nifty.ne.jp> <584f536c-b108-b562-b940-798ec2847c68@maxrnd.com> <0b13b9ac-583f-ab72-4202-f8b187946d93@towo.net> <498f0cfb-c6c1-cb61-2e88-fcb9ce61f4d4@maxrnd.com> <731c8611-4ed2-29fd-0b9c-33e221d6451e@SystematicSw.ab.ca> <20210928151936.2e644c2ebc717dc367e63003@nifty.ne.jp> <82c34eff-3913-785c-7e77-aadc9d257d60@SystematicSw.ab.ca> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2021 08:54:44 -0000 On Tue, 28 Sep 2021 00:46:15 -0600 Brian Inglis wrote: > On 2021-09-28 00:19, Takashi Yano via Cygwin wrote: > > On Mon, 27 Sep 2021 23:22:30 -0600 > > Brian Inglis wrote: > >> Would it perhaps make sense to include struct stat with appropriate > >> entries rather than a couple of adhoc members unrelated to much else? > > > > struct stat also has different size between 32 and 64 bit environment, > > therefore, it does not resolve the issue. > > I didn't think any of those types varied by architecture, given the same > underlying file systems are supported, except the trailing long > st_spare4[2]; if it does, your proposal is better. I have checked the size of struct stat using: #include #include int main() { intptr_t offset0, offset_atime, offset_mtime, offset_ctime; struct stat t0; printf("sizeof stat=%ld\n", sizeof(struct stat)); offset0 = (intptr_t) &t0; offset_atime = (intptr_t) &t0.st_atime; offset_mtime = (intptr_t) &t0.st_mtime; offset_ctime = (intptr_t) &t0.st_ctime; printf("offset st_atime=%ld\n", offset_atime - offset0); printf("offset st_mtime=%ld\n", offset_mtime - offset0); printf("offset st_ctime=%ld\n", offset_ctime - offset0); return 0; } In 32bit environment, the output is: sizeof stat=96 offset st_atime=48 offset st_mtime=56 offset st_ctime=64 In 64bit environment, the output is: sizeof stat=128 offset st_atime=48 offset st_mtime=64 offset st_ctime=80 It seems that the size of struct timespec is different. -- Takashi Yano