From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19386 invoked by alias); 7 Feb 2002 21:16:04 -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 19327 invoked by uid 71); 7 Feb 2002 21:16:01 -0000 Resent-Date: 7 Feb 2002 21:16:01 -0000 Resent-Message-ID: <20020207211601.19326.qmail@sources.redhat.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, marka@sea.checkpoint.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, paulf@sea.checkpoint.com Received:(qmail 1347 invoked by uid 61); 7 Feb 2002 21:06:32 -0000 Message-Id:<20020207210631.1345.qmail@sources.redhat.com> Date: Thu, 07 Feb 2002 13:16:00 -0000 From: paulf@sea.checkpoint.com Reply-To: paulf@sea.checkpoint.com To: gcc-gnats@gcc.gnu.org Cc: marka@sea.checkpoint.com X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify:marka@sea.checkpoint.com Subject: libstdc++/5627: cstdio header failes to compile on sparc-sun-solaris2.7 with _FILE_OFFSET_BITS == 64 X-SW-Source: 2002-02/txt/msg00182.txt.bz2 List-Id: >Number: 5627 >Category: libstdc++ >Synopsis: cstdio header failes to compile on sparc-sun-solaris2.7 with _FILE_OFFSET_BITS == 64 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Feb 07 13:16:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Paul Forgey >Release: gcc version 2.95.2 19991024 (release) >Organization: >Environment: sparc-sun-solaris2.7 >Description: when _FILE_OFFSET_BITS is set to `64', the system's stdio.h will actually make the symbols fopen, freopen, tmpfile, fgetpos and fsetpos unavailable at all, even as normal function definitions, if they are #undef'd. This causes the later part of the header file pulling these into namespace std to fail with complaints these symbols are undefined. >How-To-Repeat: attempt to build Berkeley db-3.3.11 after passing --enable-cxx to the configure script. >Fix: This is probably not the best fix, but it got me past the issue. Somebody who knows their way around the solaris headers better than I do could probably come up with a more "real" fix: in $prefix/include/g++-v3/bits/std_cstdio.h, remove the #undef macros for these symbols, and add the following code at line 43 (right after #include ): // The following functions _can not_ be #undef'd if we are using 64 // bit file pointers #if ! (defined (sun) && !defined (_LP64) && _FILE_OFFSET_BITS == 64) #undef fopen #undef freopen #undef tmpfile #undef fgetpos #undef fsetpos #endif // whew >Release-Note: >Audit-Trail: >Unformatted: