This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2 4/6] Refactor tst-strtod-round.c
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 20 May 2016 20:08:24 +0000
- Subject: Re: [PATCHv2 4/6] Refactor tst-strtod-round.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463524479 dot git dot murphyp at linux dot vnet dot ibm dot com> <f4d0bef6f245c8f2830589852cb047fa566f6f79 dot 1463524480 dot git dot murphyp at linux dot vnet dot ibm dot com>
On Tue, 17 May 2016, Paul E. Murphy wrote:
> + (use of current MPFR version recommended) and run it as:
> +
> + gen-tst-strtod-round tst-strtod-round-data
> +
> + The output file will be generated as tst-strtod-round-data.h
If you took both input and output file names, you wouldn't need to use
malloc and construct an output file name....
> + if (freopen (fout_name, "w", stdout) == NULL)
> + {
> + perror ("Could not open output for writing");
> + return EXIT_FAILURE;
> + }
I don't see a real advantage in using freopen like this over just
adjusting the output function calls to output to something other than
stdout.
--
Joseph S. Myers
joseph@codesourcery.com