From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18252 invoked by alias); 16 Nov 2001 00:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18214 invoked by uid 71); 16 Nov 2001 00:56:00 -0000 Resent-Date: 16 Nov 2001 00:56:00 -0000 Resent-Message-ID: <20011116005600.18213.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, wilf@techco.ab.ca, pedwards@disaster.jaj.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, alex@softgrow.com Received:(qmail 16655 invoked by uid 61); 16 Nov 2001 00:51:05 -0000 Message-Id:<20011116005105.16654.qmail@sourceware.cygnus.com> Date: Mon, 05 Nov 2001 00:13:00 -0000 From: alex@softgrow.com Reply-To: alex@softgrow.com To: gcc-gnats@gcc.gnu.org Cc: wilf@techco.ab.ca, pedwards@disaster.jaj.com X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) X-GNATS-Notify:wilf@techco.ab.ca pedwards@disaster.jaj.com Subject: libstdc++/4886: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h X-SW-Source: 2001-11/txt/msg00119.txt.bz2 List-Id: >Number: 4886 >Category: libstdc++ >Synopsis: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Nov 15 16:56:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Wilf Kruggel >Release: unknown-1.0 >Organization: >Environment: Solaris 8.0 gcc 3.0.2 >Description: When compiling on Solaris for files > 2 Gigs the flag -D_FILE_OFFSET_BITS=64 and -D_LARGEFILE_SOURCE cause the Solaris supplied /usr/include/stdio.h to create define fopen as fopen64 using a macro. This macro is undefined by the gcc include/g++-v3/bits/.std_cstdio.h Thus any attempt to open a largefile in compiled code will fail on execution with an error "Value too large for defined data type". Truss will show fopen being called rather than fopen64. >How-To-Repeat: Try the following code on a large file > 2 Gigs g++ `LFS_CLFAGS` -o junk junk.c #include main() { FILE *fp = fopen("reallybigfile.gen","rb"); if (fp==NULL) perror("fopen"); } You will get when you run fopen: Value too large for defined data type >Fix: remove "#undef fopen" (and same for fgetpos, freopen, fsetpos) in std_cstdio.h but this may break something else. >Release-Note: >Audit-Trail: >Unformatted: