[BusyBox] change in tftp.c
Erik Andersen
andersen at codepoet.org
Mon Feb 18 15:22:03 UTC 2002
On Mon Feb 18, 2002 at 11:51:14AM -0800, Matt Kraai wrote:
> On Mon, Feb 18, 2002 at 08:41:37PM +0100, Michael Renzmann wrote:
> > Robert Parusel wrote:
> >
> > > 363 #ifdef BB_FEATURE_TFTP_GET2STDOUT
> > > 364 if ( localfile == NULL && cmd == tftp_cmd_get ) {
> > > 365 fd = 1;
> > > 366 } else {
> >
> >
> > Just one suggestion: I remember that Ansi C does not recommend stdout
> > being file descriptor #1. There should be a function that allows getting
> > the correct file handle for stdout, but I don't know exactly its name
> > (my Kernighan/Ritchie is in the office, I'm at home :) ).
>
> You can use `fileno (stdout)' or `STDOUT_FILENO', but I don't know
> which the standards like more.
I prefer fileno(stdout), since that ensures that the C library
gets to worry about the implementation detains, rathar than the
preprocessor.
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20020218/16c997ef/attachment.pgp
More information about the busybox
mailing list