This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCHv2 4/6] Refactor tst-strtod-round.c


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


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