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

Zack Weinberg zack@codesourcery.com
Tue Feb 3 22:45:00 GMT 2004


Benjamin Kosnik <bkoz@redhat.com> writes:

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

Thanks.  I've augmented this into what I hope are complete patches for
3.4/mainline and 3.3; attached.  I've dropped out the alarm/wait bits,
including only the open_mode::flags fixes to the testsuite; see below.
Testing running on ia64-hpux now.

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

Eyah.

> Also, there are far more cases with try_mkfifo that need alarms than
> what you've patched:
...
>
> 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?

This is nontrivial.  alarm() doesn't inherit across fork() so doing it
in try_mkfifo isn't good enough.  I can try to come up with a good set
of wrappers for this but I don't think it should block this patch.

zw

-------------- next part --------------
A non-text attachment was scrubbed...
Name: d._M_open_mode.3.3
Type: text/x-patch
Size: 5810 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040203/a209074e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d._M_open_mode.3.4
Type: text/x-patch
Size: 15922 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040203/a209074e/attachment-0001.bin>


More information about the Gcc-patches mailing list