public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/4886: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h
@ 2001-11-05 0:13 alex
0 siblings, 0 replies; 2+ messages in thread
From: alex @ 2001-11-05 0:13 UTC (permalink / raw)
To: gcc-gnats; +Cc: wilf, pedwards
>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 <cstdio>
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libstdc++/4886: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h
@ 2002-11-06 9:32 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-11-06 9:32 UTC (permalink / raw)
To: alex, gcc-bugs, gcc-prs, nobody, wilf, pedwards
Synopsis: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Nov 6 09:31:35 2002
State-Changed-Why:
Reproduced with 3.0, but compiles cleanly with 3.2
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4886
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-06 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 0:13 libstdc++/4886: Solaris largefile support for fopen removed by include/g++-v3/bits/std_cstdio.h alex
2002-11-06 9:32 bangerth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).