From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8A5681F4B4 for ; Mon, 28 Dec 2020 21:35:07 +0000 (UTC) Received: from localhost ([::1]:37420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku0AU-0004tX-Bu for normalperson@yhbt.net; Mon, 28 Dec 2020 16:35:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku0AQ-0004sQ-E1 for bug-gnulib@gnu.org; Mon, 28 Dec 2020 16:35:02 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:54649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ku0AO-0006Au-Ar for bug-gnulib@gnu.org; Mon, 28 Dec 2020 16:35:02 -0500 Received: by mail-pj1-x102d.google.com with SMTP id f14so308700pju.4 for ; Mon, 28 Dec 2020 13:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=At0xRR6GrT4XAcNkLHkmO5vczeBGYJG8FPNMjiYY/1Y=; b=fHKEL22aGoZ3daz57VL2ioCvcJp58rC9vyrJA1wpd2rTvaL7LwSJT5brjDomXHvZ48 W0viVbKWTXH2rNKNpJZJ4jYl/4P1jOqAG3T+1xBtIubYHi9ec6v4VtzovxOUEXQeThrw 1P3ow9d0sXEw+HxFgFRYS3kPt0RusjEg6nL/jQY0FvKuZy33F9MsPCJWbx9mlvnSarMs yRcBeqcg6g/NyP0yPCwkVqfqxgwO9m5Ae+9gie9efMsXLv0omveT4DQmmWf5J6mxH7fW ULZRG4Kad20YJ9q06ik6b5/r+fZQkG6FK691Gvd55S9xrB+ji/IxGQSub/sjUYW2zJjw bTvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=At0xRR6GrT4XAcNkLHkmO5vczeBGYJG8FPNMjiYY/1Y=; b=Y1nosnbWtSuvTnBLe8G9HbRZxIpRm7JWqVoOQVcUhlFfoE4I+Qnl1VFGTfKNdRSW7g 0xEJQM51ria3qC2BofwDL5GH7H5HrP6REC2CyiXFomvvwK58o2/H1oWcVF7yzn/APgdP OX2aH49CHupcM9Bc0C2rOXnNyPJHSKWm647poFC7IE8Tlr+z1hX0Sga06bd/GFAzzc4T 9aqNITfVMOEfSzP9i9cTCEI8iYWEgpfpvED7y5BwahvFPNiielM4+JA3snEvzSxV8s2m u4X4gqO9pgFHuJPH/Q8J8lZLaJ0dt4WHiHWLqLVvZLLCMCy18uc2hlcOPtAs66NZ/9wf lBYQ== X-Gm-Message-State: AOAM533a3qr+6HCeXs74l+MXvxE8jGhpr83xtSmXatFcWSRz0S1IM0rn R3KCy2qixFbsSpW+jhe/r5xCSDw/vL8rUA== X-Google-Smtp-Source: ABdhPJz/lPDZCob26Hg2ppbZbuCQRY2JxEvwuP0PHNzVycTz8GzzQObFfVOa0XUjDFzxMBs27OQe9g== X-Received: by 2002:a17:90a:f68c:: with SMTP id cl12mr789258pjb.213.1609191297057; Mon, 28 Dec 2020 13:34:57 -0800 (PST) Received: from [192.168.1.222] (S01069483c4016a90.vc.shawcable.net. [70.79.36.17]) by smtp.gmail.com with ESMTPSA id b4sm352392pju.33.2020.12.28.13.34.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Dec 2020 13:34:56 -0800 (PST) Subject: Re: port freadahead.c & fseeko.c To: Paul Eggert References: From: Ron Eggler Message-ID: Date: Mon, 28 Dec 2020 13:34:32 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------A759DF8C03237378D7BA09D2" Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=ron.eggler@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NICE_REPLY_A=-2.698, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --------------A759DF8C03237378D7BA09D2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2020-12-23 4:17 p.m., Paul Eggert wrote: > On 12/23/20 1:56 PM, Ron Eggler wrote: >> How can I patch these files to work with my platform? > > Look in your stdio.h (commonly /usr/include/stdio.h), and the files it > includes, to see how it defines ungetc etc. Then use that knowledge to > update lib/freadahead.c and lib/fseeko.c. It'll require some expertise > in low-level C hacking. I'm having troubles with finding the correct definition, when I grep the sources for ungetc I get the following: x86_64-linux$ grep -rn --include \*.h ungetc m4-native/1.4.17-r0/m4-1.4.17/lib/stdio-impl.h:65: struct  __sbuf _ub; /* ungetc buffer */ m4-native/1.4.17-r0/m4-1.4.17/lib/freadahead.h:23: source and the bytes that have been pushed back through 'ungetc'. m4-native/1.4.17-r0/build/lib/config.h:96:/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ binutils-native/2.27-r0/git/zlib/zconf.h:91:#    define gzungetc              z_gzungetc binutils-native/2.27-r0/git/zlib/zlib.h:1400:ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); binutils-native/2.27-r0/git/zlib/zlib.h:1404: gzungetc() returns the character pushed, or -1 on failure. gzungetc() will binutils-native/2.27-r0/git/zlib/zlib.h:1406:   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the ron@ENGDEV:~/novax-prs/tmp/work/x86_64-linux$ and I'm not exactly sure how I should adjust the definitions in fseeko.c & freadaheaed.c accordingly. As for: On 12/28/20 9:39 AM, Ron Eggler wrote: > I cannot find any function that is called "rpl_fseeko" Presumably an earlier "#define fseeko rpl_fseeko" means that when you see a definition of the fseeko function, it's really defining rpl_fseeko. That's correct, I missed to see this! Thanks for all! --------------A759DF8C03237378D7BA09D2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 2020-12-23 4:17 p.m., Paul Eggert wrote:
On 12/23/20 1:56 PM, Ron Eggler wrote:
How can I patch these files to work with my platform?

Look in your stdio.h (commonly /usr/include/stdio.h), and the files it includes, to see how it defines ungetc etc. Then use that knowledge to update lib/freadahead.c and lib/fseeko.c. It'll require some expertise in low-level C hacking.

I'm having troubles with finding the correct definition, when I grep the sources for ungetc I get the following:

x86_64-linux$ grep -rn --include \*.h ungetc
m4-native/1.4.17-r0/m4-1.4.17/lib/stdio-impl.h:65:      struct  __sbuf _ub; /* ungetc buffer */
m4-native/1.4.17-r0/m4-1.4.17/lib/freadahead.h:23:   source and the bytes that have been pushed back through 'ungetc'.
m4-native/1.4.17-r0/build/lib/config.h:96:/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
binutils-native/2.27-r0/git/zlib/zconf.h:91:#    define gzungetc              z_gzungetc
binutils-native/2.27-r0/git/zlib/zlib.h:1400:ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
binutils-native/2.27-r0/git/zlib/zlib.h:1404:   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
binutils-native/2.27-r0/git/zlib/zlib.h:1406:   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
ron@ENGDEV:~/novax-prs/tmp/work/x86_64-linux$

and I'm not exactly sure how I should adjust the definitions in fseeko.c & freadaheaed.c accordingly.

As for:

On 12/28/20 9:39 AM, Ron Eggler wrote:

I cannot find any function that is called "rpl_fseeko"

Presumably an earlier "#define fseeko rpl_fseeko" means that when you see a definition of the fseeko function, it's really defining rpl_fseeko.


That's correct, I missed to see this!


Thanks for all!



--------------A759DF8C03237378D7BA09D2--