This is the mail archive of the libstdc++@gcc.gnu.org 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]
Other format: [Raw text]

Re: RFC Fix for 9964.cc and 9507.cc on ia64-hpux


>I've
>handled this by giving the rewritten function a new name, making it
>static in basic_file_stdio.cc, and providing a wrapper under the old
>name and interface (it doesn't actually *implement* the old interface
>- the __rw_mode and __p_mode args are ignored - but no one should be
>calling this function anyway).  I would like to dispense with the
>wrapper, but I don't know if it's safe.

See the appended patch. 

For 3.4, and mainline, this will work. For 3.3, you'll need to keep in
the legacy interface function (_M_open_mode) and definition, since this
is part of the libstdc++ ABI, although the definition can just call
__gnu_internal::fopen_mode as in your patch. (FYI, figuring out if this
is ABI-ok is something that make check-abi will help you with.)

As far as the alarm bits with try_mkfifo, that's nice, to be
considerate. Portable though? Hmm. We've had some problems with mkfifo
portability in the past.... but I figure you're already aware of this.... ;)

Also, there are far more cases with try_mkfifo that need alarms than
what you've patched:

./testsuite/27_io/basic_filebuf/close/char/4879.cc:  if (0 != try_mkfifo(name, S_IRWXU))
./testsuite/27_io/basic_filebuf/close/char/9964.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/basic_filebuf/open/char/9507.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:  if (0 != try_mkfifo(name, S_IRWXU))
./testsuite/27_io/basic_filebuf/underflow/char/10097.cc:  if (0 != try_mkfifo(name, S_IRWXU))
./testsuite/27_io/objects/char/7.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/objects/char/9661-1.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/objects/wchar_t/7.cc:  try_mkfifo(name, S_IRWXU);
./testsuite/27_io/objects/wchar_t/9661-1.cc:  try_mkfifo(name, S_IRWXU);

If you're going to do this (and it's a good idea), let's make it a
complete transition so that new try_mkfifo cases are not added without
this.

Is there anyway to integrate the alarm into the try_mkfifo call, so that
all this stuff that may not be portable is in one place?

-benjamin

Attachment: p.20040203-zack.patch
Description: Text document


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