This is the mail archive of the mailing list for the GCC 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 and on ia64-hpux

Zack Weinberg wrote:
> The majority of the problem is bad test case code.

It's pretty hard to write tests that fail portably (both of these test
how basic_filebuf handles low-level errors).

> In, we want to open a FIFO with ios_base::ate so that it will
> try to seek and fail.  The bug logs clearly indicate that the topic of
> the test is a successful open but a failed seek.


> I've also added calls to alarm()
> and wait() to ensure that the tests never run for more than ten
> seconds nor do they leave child processes hanging around.

This seems like a good idea for any test case that uses mkfifo.

> Unfortunately, this
> constitutes an ABI change since _M_open_mode was exported.

There are lots of ABI changes between 3.3 and 3.4, including changes
to __basic_file.

> +static const char *fopen_mode(std::ios_base::openmode mode)

This should probably be uglified and formatted as:
static const char*
__fopen_mode(std::ios_base::openmode __mode)


This shouldn't be needed for anything in the implementor namespace.

> -  std::filebuf* r =, std::ios_base::out | std::ios_base::ate);
> +  std::filebuf* r =, std::ios_base::in | std::ios_base::out | std::ios_base::ate);

Note that the combination (std::ios_base::out | std::ios_base::ate)
doesn't really make sense: out (without in) implies trunc, so out will
always open at the end of the file (which is the same as the beginning)
which means that the ate is redundant unless in is used. 


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