public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-27 19:39 ` pogma at gcc dot gnu.org
  0 siblings, 0 replies; 21+ messages in thread
From: pogma at gcc dot gnu.org @ 2010-12-27 19:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366

Peter O'Gorman <pogma at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #21 from Peter O'Gorman <pogma at gcc dot gnu.org> 2010-12-27 19:38:47 UTC ---
Fixed since 4.4.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2008-03-07  6:55 ` rwild at gcc dot gnu dot org
@ 2008-04-04  5:32 ` pogma at gcc dot gnu dot org
  17 siblings, 0 replies; 21+ messages in thread
From: pogma at gcc dot gnu dot org @ 2008-04-04  5:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

pogma at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pogma at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
      Known to work|                            |4.4.0
   Last reconfirmed|2007-12-21 00:29:21         |2008-04-04 05:31:57
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2008-03-03 21:12 ` bugzilla-gcc at thewrittenword dot com
@ 2008-03-07  6:55 ` rwild at gcc dot gnu dot org
  2008-04-04  5:32 ` pogma at gcc dot gnu dot org
  17 siblings, 0 replies; 21+ messages in thread
From: rwild at gcc dot gnu dot org @ 2008-03-07  6:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from rwild at gcc dot gnu dot org  2008-03-07 06:54 -------
Subject: Bug 20366

Author: rwild
Date: Fri Mar  7 06:53:59 2008
New Revision: 133001

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133001
Log:
fixincludes/
2008-03-07  Peter O'Gorman  <pogma@thewrittenword.com>

        PR c++/20366
        * inclhack.def (AAB_aix_stdio): Hack stdio.h for -D_LARGE_FILES.
        * fixincl.x: Regenerate.
        * tests/base/stdio.h: Add test.

gcc/testsuite/
2008-03-07  Peter O'Gorman  <pogma@thewrittenword.com>

        PR c++/20366
        * g++.dg/other/pr20366.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/pr20366.C
Modified:
    trunk/fixincludes/ChangeLog
    trunk/fixincludes/fixincl.x
    trunk/fixincludes/inclhack.def
    trunk/fixincludes/tests/base/stdio.h
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2007-12-31 19:41 ` bugzilla-gcc at thewrittenword dot com
@ 2008-03-03 21:12 ` bugzilla-gcc at thewrittenword dot com
  2008-03-07  6:55 ` rwild at gcc dot gnu dot org
  2008-04-04  5:32 ` pogma at gcc dot gnu dot org
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2008-03-03 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from bugzilla-gcc at thewrittenword dot com  2008-03-03 21:12 -------
Proposed patch:
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00162.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2007-12-31 19:29 ` peter at pogma dot com
@ 2007-12-31 19:41 ` bugzilla-gcc at thewrittenword dot com
  2008-03-03 21:12 ` bugzilla-gcc at thewrittenword dot com
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2007-12-31 19:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from bugzilla-gcc at thewrittenword dot com  2007-12-31 19:39 -------
(In reply to comment #16)
> Because it is not currently possible to build an autoconf based project on aix
> with gcc without doing --disable-largefile, we would like to see this fixed.

More accurately, it is possible to use `gcc' and large files, just not `g++'
and large files.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2007-12-22 20:52 ` dje at watson dot ibm dot com
@ 2007-12-31 19:29 ` peter at pogma dot com
  2007-12-31 19:41 ` bugzilla-gcc at thewrittenword dot com
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: peter at pogma dot com @ 2007-12-31 19:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from peter at pogma dot com  2007-12-31 19:28 -------
(In reply to comment #16)

> This was also a problem on solaris:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4850

I mean

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4886


-- 

peter at pogma dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter at pogma dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2007-12-22 20:18 ` tcoleman at autowares dot com
@ 2007-12-22 20:52 ` dje at watson dot ibm dot com
  2007-12-31 19:29 ` peter at pogma dot com
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: dje at watson dot ibm dot com @ 2007-12-22 20:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from dje at watson dot ibm dot com  2007-12-22 20:52 -------
Subject: Re:  AIX g++ -D_LARGE_FILES fails to compile #include <iostream> 

>>>>> tcoleman at autowares dot com writes:

Tom> Does G++ really have to be either one way or the other?  Can't it also
include
Tom> conditional code to check for _LARGE_FILES?  Maybe I'm missing something
here.

        GNU libc does not use _LARGE_FILE to distinguish large offsets in
32-bit file I/O.  Why would the GCC libstdc++ community be interested in
complicating its header files with AIX-specific checks?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2007-12-21 23:25 ` bugzilla-gcc at thewrittenword dot com
@ 2007-12-22 20:18 ` tcoleman at autowares dot com
  2007-12-22 20:52 ` dje at watson dot ibm dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: tcoleman at autowares dot com @ 2007-12-22 20:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from tcoleman at autowares dot com  2007-12-22 20:18 -------
(In reply to comment #12)

I don't see it as so much a matter of "focus".  

A lot of applications test for _LARGE_FILES in the C library and will set it as
a configuration option if supported.  As far as straight C goes, there's no
problem with gcc on AIX.

But if _LARGE_FILES is set, the fact that g++ can't compile C++ applications
using cstdio on AIX is a source of both frustration and annoyance.

Does G++ really have to be either one way or the other?  Can't it also include
conditional code to check for _LARGE_FILES?  Maybe I'm missing something here.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2007-12-21 23:23 ` dje at gcc dot gnu dot org
@ 2007-12-21 23:25 ` bugzilla-gcc at thewrittenword dot com
  2007-12-22 20:18 ` tcoleman at autowares dot com
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2007-12-21 23:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from bugzilla-gcc at thewrittenword dot com  2007-12-21 23:25 -------
(In reply to comment #12)
> If AIX G++ users are focussing on 64-bit apps and large files, I'm willing to
> switch the default to _LARGE_FILES.  The changes would be in
> gcc/config/rs6000/aix*.h CPP_SPEC and libstdc++/config/os/aix/os_defines.h,
> plus any fallout from the change.

We only care about -D_LARGE_FILES to support files >2G while running a 32-bit
app. We're not building any 64-bit apps.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2007-12-21 19:14 ` bugzilla-gcc at thewrittenword dot com
@ 2007-12-21 23:23 ` dje at gcc dot gnu dot org
  2007-12-21 23:25 ` bugzilla-gcc at thewrittenword dot com
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-12-21 23:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dje at gcc dot gnu dot org  2007-12-21 23:23 -------
If AIX G++ users are focussing on 64-bit apps and large files, I'm willing to
switch the default to _LARGE_FILES.  The changes would be in
gcc/config/rs6000/aix*.h CPP_SPEC and libstdc++/config/os/aix/os_defines.h,
plus any fallout from the change.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2007-12-21 14:59 ` dje at watson dot ibm dot com
@ 2007-12-21 19:14 ` bugzilla-gcc at thewrittenword dot com
  2007-12-21 23:23 ` dje at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2007-12-21 19:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bugzilla-gcc at thewrittenword dot com  2007-12-21 19:14 -------
(In reply to comment #10)
> Subject: Re:  AIX g++ -D_LARGE_FILES fails to compile #include <iostream> 
> 
>         xlC has its own system header files.  G++ needs to use the AIX
> system header files with changes from fixincludes, combined with libstdc++
> header files that perform their own redefinitions.

Agreed. So, all that's left is for someone to do the work. I forgot about the
libstdc++ headers that would need to change. We're going to try and have
someone here work on this in the next 1-2 months as we're getting bitten by
this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2007-12-21  3:59 ` bugzilla-gcc at thewrittenword dot com
@ 2007-12-21 14:59 ` dje at watson dot ibm dot com
  2007-12-21 19:14 ` bugzilla-gcc at thewrittenword dot com
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: dje at watson dot ibm dot com @ 2007-12-21 14:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dje at watson dot ibm dot com  2007-12-21 14:58 -------
Subject: Re:  AIX g++ -D_LARGE_FILES fails to compile #include <iostream> 

> Why is this? -D_LARGE_FILES simply enables LFS. xlC works with and without
> -D_LARGE_FILES. Shouldn't G++ work as effectively as xlC?

        You are mixing multiple questions and issues.

        -D_LARGE_FILES redefines all I/O functions to use the 64-bit
versions. 

        xlC has its own system header files.  G++ needs to use the AIX
system header files with changes from fixincludes, combined with libstdc++
header files that perform their own redefinitions.

        "Shouldn't G++ work as effectively..." is a business question, not
a technical question.  Many major AIX customers use GCC, but none have
told IBM that they will not buy a system unless GCC works better.  That
sets investment priorities.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2007-12-21  0:29 ` dje at gcc dot gnu dot org
@ 2007-12-21  3:59 ` bugzilla-gcc at thewrittenword dot com
  2007-12-21 14:59 ` dje at watson dot ibm dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2007-12-21  3:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bugzilla-gcc at thewrittenword dot com  2007-12-21 03:59 -------
(In reply to comment #8)
> The issue is whether to default G++ to _LARGE_FILES, as is done for Fortran,
> and perform all libstdc++ I/O as 64-bit operations, which will affect
> performance.  Not everyone may want or need large I/O.  There is no way to give
> users control over this without imposing it so G++, G++ headers, and libstdc++
> all are self-consistent.  The other alternative is another multilib, but there
> alredy are too many variants.

Why is this? -D_LARGE_FILES simply enables LFS. xlC works with and without
-D_LARGE_FILES. Shouldn't G++ work as effectively as xlC?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2007-12-20  0:17 ` dsanderson at panasas dot com
@ 2007-12-21  0:29 ` dje at gcc dot gnu dot org
  2007-12-21  3:59 ` bugzilla-gcc at thewrittenword dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: dje at gcc dot gnu dot org @ 2007-12-21  0:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dje at gcc dot gnu dot org  2007-12-21 00:29 -------
The issue is whether to default G++ to _LARGE_FILES, as is done for Fortran,
and perform all libstdc++ I/O as 64-bit operations, which will affect
performance.  Not everyone may want or need large I/O.  There is no way to give
users control over this without imposing it so G++, G++ headers, and libstdc++
all are self-consistent.  The other alternative is another multilib, but there
alredy are too many variants.


-- 

dje at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dje at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-12-21 00:29:21
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2007-12-20  0:07 ` tcoleman at autowares dot com
@ 2007-12-20  0:17 ` dsanderson at panasas dot com
  2007-12-21  0:29 ` dje at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: dsanderson at panasas dot com @ 2007-12-20  0:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dsanderson at panasas dot com  2007-12-20 00:17 -------
Note that my originally stated workaround -- to compile with -maix64 -- doesn't
really work beyond helping the compile to succeed.  Using -maix64 gives you a
64-bit executable (e.g. with 64-bit pointers and a 64-bit off_t) that can't
access large files.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2007-12-19 15:58 ` haubi at gentoo dot org
@ 2007-12-20  0:07 ` tcoleman at autowares dot com
  2007-12-20  0:17 ` dsanderson at panasas dot com
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: tcoleman at autowares dot com @ 2007-12-20  0:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tcoleman at autowares dot com  2007-12-20 00:06 -------

The test program will compile if you comment out the #undefs in cstdio.

//#undef fgetpos
//#undef fopen
//#undef freopen
//#undef fsetpos

I've wrestled with this problem with G++ on AIX for years.  In desparation I
just had our admin load the IBM 4.0.0 RPMs - same problem!

This is the second time this error has prevented me from porting a relatively
simple application to AIX.

This particular problem has gone on long enough.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
  2006-02-22 23:43 ` bugzilla-gcc at thewrittenword dot com
  2007-12-01 22:04 ` haubi at gentoo dot org
@ 2007-12-19 15:58 ` haubi at gentoo dot org
  2007-12-20  0:07 ` tcoleman at autowares dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: haubi at gentoo dot org @ 2007-12-19 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from haubi at gentoo dot org  2007-12-19 15:57 -------
Created an attachment (id=14796)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14796&action=view)
the effect fixincludes could have on aix5.2/aix5.3

When applying this patch to (already fixed) stdio.h on aix5.2/aix5.3, compiling
"#include <iostream>" with -D_LARGE_FILES works. But I have no clue on how to
create entries with this effect in inclhack.def, or if this is the way to go.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
  2006-02-22 23:43 ` bugzilla-gcc at thewrittenword dot com
@ 2007-12-01 22:04 ` haubi at gentoo dot org
  2007-12-19 15:58 ` haubi at gentoo dot org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: haubi at gentoo dot org @ 2007-12-01 22:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from haubi at gentoo dot org  2007-12-01 22:04 -------
Same here with gcc-4.2.2 and powerpc-ibm-aix5.3.0.0.

Some diagnostics what happens when _LARGE_FILES (and _LARGE_FILE_API) is
defined:

<sys/types.h>

/* would both be 'long' without _LARGE_FILES: */
typedef long long fpos_t;
typedef long long off_t;

/* because of _LARGE_FILE_API: */
typedef long long   off64_t;

<stdio.h>

/* because of _LARGE_FILES (the 'problematic' ones): */
#define fseeko fseeko64
#define ftello ftello64
#define fgetpos fgetpos64
#define fsetpos fsetpos64
#define fopen fopen64
#define freopen freopen64

/* these actually are declared as f*64() because of defines above: */
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *, const char *, FILE *);
extern int   fgetpos(FILE *, fpos_t *);
extern int   fsetpos(FILE *, const fpos_t *);
extern int   fseeko(FILE *, off_t, int);
extern off_t ftello(FILE *);

/* because of _LARGE_FILE_API: */
extern int fgetpos64(FILE *, fpos64_t *);
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern int fseeko64(FILE *, off64_t, int);
extern int fsetpos64(FILE *, const fpos64_t *);
extern off64_t ftello64(FILE *);

<cstdio>

/* remember: these actually are declared as f*64(),
 * while the original ones are undeclared.
 */
#undef fgetpos
#undef fopen
#undef freopen
#undef fsetpos

namespace std {
  using ::fpos_t;
  using ::fgetpos;
  using ::fopen;
  using ::freopen;
  using ::fsetpos;
}


I'm unsure how to 'fix' that 'correctly' - one suggestion is to 'fixincludes':

Add this just _before_ those '#define fopen fopen64' lines in <stdio.h>

  static FILE *fopen(const char *a, const char *b) { return fopen64(a,b); }

Eventually there is a better way to redirect from 'fopen' to 'fopen64' on aix
also for the compiler - not just the preprocessor.


-- 

haubi at gentoo dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |haubi at gentoo dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
       [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
@ 2006-02-22 23:43 ` bugzilla-gcc at thewrittenword dot com
  2007-12-01 22:04 ` haubi at gentoo dot org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 21+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2006-02-22 23:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bugzilla-gcc at thewrittenword dot com  2006-02-22 23:43 -------
Any plans to add _LARGE_FILES support to g++/libstdc++ for AIX?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
  2005-03-07 19:12 [Bug c++/20366] New: " gcc-bugzilla at gcc dot gnu dot org
  2005-03-07 19:15 ` [Bug target/20366] " pinskia at gcc dot gnu dot org
@ 2005-03-07 19:30 ` dje at gcc dot gnu dot org
  1 sibling, 0 replies; 21+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-03-07 19:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-03-07 19:30 -------
G++ and libstdc++ on AIX currently is configured to enable _LARGE_FILE_API, 
but not _LARGE_FILES.  _LARGE_FILE_API exposes the 64-bit functions with 
separate names off64_t and fopen64(), but does not redefine the original 
functions with their counterparts supporting 64-bit types.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream>
  2005-03-07 19:12 [Bug c++/20366] New: " gcc-bugzilla at gcc dot gnu dot org
@ 2005-03-07 19:15 ` pinskia at gcc dot gnu dot org
  2005-03-07 19:30 ` dje at gcc dot gnu dot org
  1 sibling, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-07 19:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20366


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2010-12-27 19:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20366-4@http.gcc.gnu.org/bugzilla/>
2010-12-27 19:39 ` [Bug target/20366] AIX g++ -D_LARGE_FILES fails to compile #include <iostream> pogma at gcc dot gnu.org
     [not found] <bug-20366-10214@http.gcc.gnu.org/bugzilla/>
2006-02-22 23:43 ` bugzilla-gcc at thewrittenword dot com
2007-12-01 22:04 ` haubi at gentoo dot org
2007-12-19 15:58 ` haubi at gentoo dot org
2007-12-20  0:07 ` tcoleman at autowares dot com
2007-12-20  0:17 ` dsanderson at panasas dot com
2007-12-21  0:29 ` dje at gcc dot gnu dot org
2007-12-21  3:59 ` bugzilla-gcc at thewrittenword dot com
2007-12-21 14:59 ` dje at watson dot ibm dot com
2007-12-21 19:14 ` bugzilla-gcc at thewrittenword dot com
2007-12-21 23:23 ` dje at gcc dot gnu dot org
2007-12-21 23:25 ` bugzilla-gcc at thewrittenword dot com
2007-12-22 20:18 ` tcoleman at autowares dot com
2007-12-22 20:52 ` dje at watson dot ibm dot com
2007-12-31 19:29 ` peter at pogma dot com
2007-12-31 19:41 ` bugzilla-gcc at thewrittenword dot com
2008-03-03 21:12 ` bugzilla-gcc at thewrittenword dot com
2008-03-07  6:55 ` rwild at gcc dot gnu dot org
2008-04-04  5:32 ` pogma at gcc dot gnu dot org
2005-03-07 19:12 [Bug c++/20366] New: " gcc-bugzilla at gcc dot gnu dot org
2005-03-07 19:15 ` [Bug target/20366] " pinskia at gcc dot gnu dot org
2005-03-07 19:30 ` dje at gcc dot gnu dot org

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).