This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fails to build with --enable-c-mbchar=no


"Dr. David Gilbert" <dg@px.uk.com> writes:

| Hi,
|   Trying to work around the seg on shared library load which seems to
| happen in the wide character code, I thought I'd try building with
| --enable-c-mbchar=no.
| 
| Unfortunatly it fails to build in:
| 
| ../../../../gcc/libstdc++-v3/include/bits/basic_file.h: In instantiation
| of `std::__basic_file<char>':
| c++io.cc:41:   instantiated from here
| ../../../../gcc/libstdc++-v3/include/bits/basic_file.h:120: invalid use of 
|    undefined type `struct __c_wfile_type'
| ../../../../gcc/libstdc++-v3/libio/libio.h:262: forward declaration of
| `struct 
|    __c_wfile_type'

David, thanks for your report.  

My first reaction was that the use of `__c_wfile_type' should have
been guarded.  But since at the top of that class there is the
following comment:

  // Ulrich is going to make some detailed comment here, explaining
  // all this unpleasantness, providing detailed performance analysis
  // as to why we have to do all this lame vtable hacking instead of a
  // sane, function-based approach. This verbage will provide a clear
  // and detailed description of the whole object-layout,
  // vtable-swapping, sordid history of this hack.

I would appreciate very much if Ulrich could jump in and explain us
the purposes and inners of the __basic_file "hackery".

Anyway, I'll suggest you guard _M_wfile definition with
_GLIBCPP_USE_WCHAR_T and try to compile.  Let me know the outcome,
please.

-- Gaby

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]