Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/wsetup.c')
-rw-r--r--newlib/libc/stdio/wsetup.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/newlib/libc/stdio/wsetup.c b/newlib/libc/stdio/wsetup.c
index cf56c2abc..23b032efe 100644
--- a/newlib/libc/stdio/wsetup.c
+++ b/newlib/libc/stdio/wsetup.c
@@ -17,7 +17,6 @@
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include <_ansi.h>
#include <stdio.h>
#include <stdlib.h>
#include "local.h"
@@ -29,12 +28,12 @@
*/
int
-_DEFUN(__swsetup, (fp),
- register FILE * fp)
+_DEFUN (__swsetup, (fp),
+ register FILE * fp)
{
/* Make sure stdio is set up. */
- CHECK_INIT (_REENT);
+ CHECK_INIT (fp);
/*
* If we are not writing, we had better be reading and writing.
@@ -58,11 +57,9 @@ _DEFUN(__swsetup, (fp),
/*
* Make a buffer if necessary, then set _w.
- * A string I/O file should not explicitly allocate a buffer
- * unless asprintf is being used.
*/
- if (fp->_bf._base == NULL
- && (!(fp->_flags & __SSTR) || (fp->_flags & __SMBF)))
+ /* NOT NEEDED FOR CYGNUS SPRINTF ONLY jpg */
+ if (fp->_bf._base == NULL)
__smakebuf (fp);
if (fp->_flags & __SLBF)