Mercurial > ecos
changeset 1944:91de0c0f9954
* src/common/stream.cxx (read): don't reference flags.buffering
when configured by CDL to be unbuffered.
| author | jlarmour |
|---|---|
| date | Thu, 14 Apr 2005 16:42:12 +0000 |
| parents | 83b190379205 |
| children | 5f1894a0379c |
| files | packages/language/c/libc/stdio/current/ChangeLog packages/language/c/libc/stdio/current/src/common/stream.cxx |
| diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/language/c/libc/stdio/current/ChangeLog +++ b/packages/language/c/libc/stdio/current/ChangeLog @@ -1,3 +1,8 @@ +2005-04-11 Jonathan Larmour <jifl@eCosCentric.com> + + * src/common/stream.cxx (read): don't reference flags.buffering + when configured by CDL to be unbuffered. + 2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch> * include/stdio.h: Added CYGBLD_ATTRIB_{PRINTF|SCANF}_FORMAT where @@ -473,6 +478,7 @@ 2000-05-02 Jonathan Larmour <jlarmour@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2004 eCosCentric Limited // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free
--- a/packages/language/c/libc/stdio/current/src/common/stream.cxx +++ b/packages/language/c/libc/stdio/current/src/common/stream.cxx @@ -394,7 +394,11 @@ Cyg_StdioStream::read( cyg_uint8 *user_b // // unless we do this, we could end up reading byte-by-byte from the filing system // due to the readbuf_char scheme. - if (!flags.buffering && (*bytes_read<buffer_length)) { + if ( +#ifdef CYGSEM_LIBC_STDIO_WANT_BUFFERED_IO + !flags.buffering && +#endif + (*bytes_read<buffer_length)) { cyg_uint32 len; len=buffer_length-*bytes_read; read_err = cyg_stdio_read(my_device, user_buffer + *bytes_read, &len);
