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-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 633EC1F4C0 for ; Sun, 13 Oct 2019 19:50:40 +0000 (UTC) Received: from localhost ([::1]:41956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJjt0-0002tQ-UO for normalperson@yhbt.net; Sun, 13 Oct 2019 15:50:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36605) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJjsq-0002tC-V3 for bug-gnulib@gnu.org; Sun, 13 Oct 2019 15:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJjso-0001Wq-P5 for bug-gnulib@gnu.org; Sun, 13 Oct 2019 15:50:28 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::5]:30644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJjsn-0001IJ-JE for bug-gnulib@gnu.org; Sun, 13 Oct 2019 15:50:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1570996221; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=IXL4k8HhslX3Ncu2louxbZa49gaQX1y1FJFIXvXrkfY=; b=apRnlegABwer3HdSbDBBIH7BPWxUvBk70RBT9KMDD9S6FJqDHbcYxwe89ZvJyuecQI LinKmAa5n52D7hRktTYjVzS9AgoFuC3R6Cp46Owvo1wQfIHUgQnXlPXOAJRhLKTDpMNN CJ5LfN4COsvU7ja2DogmAeQYJllUxLcE9981h69vY0V+jgD1cx0rJcMhq8ruqZbq8MQr qiOqqRIh3i4S0SAfHS1TyYFb8dhCnjnObgkg3VSTvmPd9md3Hn/Xr6CRBYTVGjrjbRaT BT6x2QknOwrhtL6NtBNSLPKJftxS96GnNE/ZoyiM9BXfE6DjSHiwie9SGjlqlxCRH5ro WXqg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0zJZW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.28.0 DYNA|AUTH) with ESMTPSA id N06099v9DJoKomH (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sun, 13 Oct 2019 21:50:20 +0200 (CEST) From: Bruno Haible To: Paul Eggert Subject: Re: supporting strings > 2 GB Date: Sun, 13 Oct 2019 21:50:19 +0200 Message-ID: <1779544.eJvvWEHBEu@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-165-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <749e79a7-0c0b-74d9-dbda-9a4676a931d2@cs.ucla.edu> References: <15256545.f1uGFDiRv1@omega> <749e79a7-0c0b-74d9-dbda-9a4676a931d2@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::5 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" Hi Paul, Probably I didn't explain it well. Let me try again. > Gnulib may need something like printf_len_t, PRIdPRINTF etc., but I don't quite > see why POSIX and/or the C standard would need them. The code will consist of two layers: 1) A layer that defines functions. Example: ptrdiff_t lprintf (const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2); 2) A layer that may redefine functions and types through aliases. Example: #if _PRINTF_LARGE #undef printf #define printf lprintf #define printf_len_t ptrdiff_t #else #define printf_len_t int #endif This is similar to how the large file support was implemented in two layers: 1) A function off64_t lseek64(int fd, off64_t offset, int whence); 2) A layer that redefines functions and types: #if _FILE_OFFSET_BITS == 64 #define lseek lseek64 #define off_t off64_t #endif The C or POSIX standards deal only with layer 1). However, layer 2) is essential for programs, to make the use of the new APIs easy. Bruno