]> sourceware.org Git - newlib-cygwin.git/commitdiff
2006-09-26 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 26 Sep 2006 21:22:19 +0000 (21:22 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 26 Sep 2006 21:22:19 +0000 (21:22 +0000)
        * libc/include/stdio.h[_REENT_SMALL]: Do not allow macros
        for clearerr, feof, or fileno.
        * libc/include/sys/reent.h[_REENT_SMALL](struct _reent): Change
        the dummy std stream scheme to use pointers to const external
        fake files, one for each standard stream.
        * libc/stdio/local.h (CHECK_INIT): Change to take a file pointer
        argument.  For _REENT_SMALL, reset the file pointer if it
        matches one of the fake std stream pointers.
        * libc/stdio/clearerr.c: Fix CHECK_INIT macro to add file pointer
        argument.
        * libc/stdio/fclose.c: Ditto.
        * libc/stdio/feof.c: Ditto.
        * libc/stdio/ferror.c: Ditto.
        * libc/stdio/fflush.c: Ditto.
        * libc/stdio/fgetc.c: Ditto.
        * libc/stdio/fgets.c: Ditto.
        * libc/stdio/fileno.c: Ditto.
        * libc/stdio/findfp.c: Ditto.
        * libc/stdio/fputc.c: Ditto.
        * libc/stdio/fputs.c: Ditto.
        * libc/stdio/fread.c: Ditto.
        * libc/stdio/freopen.c: Ditto.
        * libc/stdio/fseek.c: Ditto.
        * libc/stdio/ftell.c: Ditto.
        * libc/stdio/fwrite.c: Ditto.
        * libc/stdio/getc.c: Ditto.
        * libc/stdio/getdelim.c: Ditto.
        * libc/stdio/putc.c: Ditto.
        * libc/stdio/refill.c: Ditto.
        * libc/stdio/setvbuf.c: Ditto.
        * libc/stdio/ungetc.c: Ditto.
        * libc/stdio/vfprintf.c: Ditto.
        * libc/stdio/vfscanf.c: Ditto.
        * libc/stdio/wbuf.c: Ditto.: Ditto.
        * libc/stdio/wsetup.c: Ditto.
        * libc/stdio64/freopen64.c: Ditto.
        * libc/stdio64/fseeko64.c: Ditto.
        * libc/stdio64/ftello64.c: Ditto.
        * libc/machine/powerpc/vfprintf.c: Ditto.
        * libc/machine/powerpc/vfscanf.c: Ditto.

35 files changed:
newlib/ChangeLog
newlib/libc/include/stdio.h
newlib/libc/include/sys/reent.h
newlib/libc/machine/powerpc/vfprintf.c
newlib/libc/machine/powerpc/vfscanf.c
newlib/libc/stdio/clearerr.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/getc.c
newlib/libc/stdio/getdelim.c
newlib/libc/stdio/local.h
newlib/libc/stdio/putc.c
newlib/libc/stdio/refill.c
newlib/libc/stdio/setvbuf.c
newlib/libc/stdio/ungetc.c
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/wbuf.c
newlib/libc/stdio/wsetup.c
newlib/libc/stdio64/freopen64.c
newlib/libc/stdio64/fseeko64.c
newlib/libc/stdio64/ftello64.c

index e5ab0fd04eaf993e241fe9808e1f1963e775fe63..bd63a90ccca00e4aca4f1a0bab660d5c21aea1a8 100644 (file)
@@ -1,3 +1,46 @@
+2006-09-26  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * libc/include/stdio.h[_REENT_SMALL]: Do not allow macros
+       for clearerr, feof, or fileno.
+       * libc/include/sys/reent.h[_REENT_SMALL](struct _reent): Change 
+       the dummy std stream scheme to use pointers to const external 
+       fake files, one for each standard stream.
+       * libc/stdio/local.h (CHECK_INIT): Change to take a file pointer
+       argument.  For _REENT_SMALL, reset the file pointer if it
+       matches one of the fake std stream pointers.
+       * libc/stdio/clearerr.c: Fix CHECK_INIT macro to add file pointer
+       argument.
+       * libc/stdio/fclose.c: Ditto.
+       * libc/stdio/feof.c: Ditto.
+       * libc/stdio/ferror.c: Ditto.
+       * libc/stdio/fflush.c: Ditto.
+       * libc/stdio/fgetc.c: Ditto.
+       * libc/stdio/fgets.c: Ditto.
+       * libc/stdio/fileno.c: Ditto.
+       * libc/stdio/findfp.c: Ditto.
+       * libc/stdio/fputc.c: Ditto.
+       * libc/stdio/fputs.c: Ditto.
+       * libc/stdio/fread.c: Ditto.
+       * libc/stdio/freopen.c: Ditto.
+       * libc/stdio/fseek.c: Ditto.
+       * libc/stdio/ftell.c: Ditto.
+       * libc/stdio/fwrite.c: Ditto.
+       * libc/stdio/getc.c: Ditto.
+       * libc/stdio/getdelim.c: Ditto.
+       * libc/stdio/putc.c: Ditto.
+       * libc/stdio/refill.c: Ditto.
+       * libc/stdio/setvbuf.c: Ditto.
+       * libc/stdio/ungetc.c: Ditto.
+       * libc/stdio/vfprintf.c: Ditto.
+       * libc/stdio/vfscanf.c: Ditto.
+       * libc/stdio/wbuf.c: Ditto.: Ditto.
+       * libc/stdio/wsetup.c: Ditto.
+       * libc/stdio64/freopen64.c: Ditto.
+       * libc/stdio64/fseeko64.c: Ditto.
+       * libc/stdio64/ftello64.c: Ditto.
+       * libc/machine/powerpc/vfprintf.c: Ditto.
+       * libc/machine/powerpc/vfscanf.c: Ditto.
+
 2006-09-22  Paul Brook  <paul@codesourcery.com>
 
        * libc/include/sys/reent.h: Define and use __reent_assert.
index 9f260214c74c5ecc0f0e23222f56601da6f95e94..f99480d44ef4c74a9edc8b1d32499daa53b68e3e 100644 (file)
@@ -455,9 +455,11 @@ static __inline int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
 #define        __sclearerr(p)  ((void)((p)->_flags &= ~(__SERR|__SEOF)))
 #define        __sfileno(p)    ((p)->_file)
 
+#ifndef _REENT_SMALL
 #define        feof(p)         __sfeof(p)
 #define        ferror(p)       __sferror(p)
 #define        clearerr(p)     __sclearerr(p)
+#endif
 
 #if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */
 #define        fileno(p)       __sfileno(p)
index 3ef6058289dd36447504a67fe8abc1dcd2aa077b..a7d4f968fcfc2e2c3e1174ec6058ef8766a4296a 100644 (file)
@@ -13,6 +13,8 @@ extern "C" {
 #include <_ansi.h>
 #include <sys/_types.h>
 
+#define _NULL 0
+
 #ifndef __Long
 #if __LONG_MAX__ == 2147483647L
 #define __Long long
@@ -157,8 +159,8 @@ struct __sFILE_fake {
 
   struct _reent *_data;
 };
-/* CHECK_INIT() comes from stdio/local.h; be sure to include that.  */
-# define _REENT_SMALL_CHECK_INIT(ptr) CHECK_INIT(ptr)
+/* CHECK_STD_INIT() comes from stdio/local.h; be sure to include that.  */
+# define _REENT_SMALL_CHECK_INIT(ptr) CHECK_STD_INIT(ptr)
 #else
 # define _REENT_SMALL_CHECK_INIT(ptr) /* nothing */
 #endif
@@ -382,15 +384,18 @@ struct _reent
 
   struct _glue __sglue;                        /* root of glue chain */
   __FILE *__sf;                                /* file descriptors */
-  struct __sFILE_fake __sf_fake;       /* fake initial stdin/out/err */
   struct _misc_reent *_misc;            /* strtok, multibyte states */
   char *_signal_buf;                    /* strsignal */
 };
 
+extern const struct __sFILE_fake __sf_fake_stdin;
+extern const struct __sFILE_fake __sf_fake_stdout;
+extern const struct __sFILE_fake __sf_fake_stderr;
+
 #define _REENT_INIT(var) \
-  { (__FILE *)&var.__sf_fake, \
-    (__FILE *)&var.__sf_fake, \
-    (__FILE *)&var.__sf_fake, \
+  { (__FILE *)&__sf_fake_stdin, \
+    (__FILE *)&__sf_fake_stdout, \
+    (__FILE *)&__sf_fake_stderr, \
     0, \
     0, \
     _NULL, \
@@ -410,15 +415,14 @@ struct _reent
     {_NULL, 0, {_NULL}, _NULL}, \
     {_NULL, 0, _NULL}, \
     _NULL, \
-    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL}, \
     _NULL, \
     _NULL \
   }
 
 #define _REENT_INIT_PTR(var) \
-  { var->_stdin = (__FILE *)&var->__sf_fake; \
-    var->_stdout = (__FILE *)&var->__sf_fake; \
-    var->_stderr = (__FILE *)&var->__sf_fake; \
+  { var->_stdin = (__FILE *)&__sf_fake_stdin; \
+    var->_stdout = (__FILE *)&__sf_fake_stdout; \
+    var->_stderr = (__FILE *)&__sf_fake_stderr; \
     var->_errno = 0; \
     var->_inc = 0; \
     var->_emergency = _NULL; \
@@ -443,15 +447,6 @@ struct _reent
     var->__sglue._niobs = 0; \
     var->__sglue._iobs = _NULL; \
     var->__sf = 0; \
-    var->__sf_fake._p = _NULL; \
-    var->__sf_fake._r = 0; \
-    var->__sf_fake._w = 0; \
-    var->__sf_fake._flags = 0; \
-    var->__sf_fake._file = 0; \
-    var->__sf_fake._bf._base = _NULL; \
-    var->__sf_fake._bf._size = 0; \
-    var->__sf_fake._lbfsize = 0; \
-    var->__sf_fake._data = _NULL; \
     var->_misc = _NULL; \
     var->_signal_buf = _NULL; \
   }
@@ -786,8 +781,6 @@ struct _reent
 
 #endif /* !_REENT_SMALL */
 
-#define _NULL 0
-
 /*
  * All references to struct _reent are via this pointer.
  * Internally, newlib routines that need to reference it should use _REENT.
index 8aadb4b153db77b8b8f470122c9b8c312f205fa1..e84be15aaeaeb81e8bccdd1d722857c98c8ab54f 100644 (file)
@@ -321,7 +321,7 @@ _DEFUN (VFPRINTF, (fp, fmt0, ap),
        _CONST char *fmt0 _AND
        va_list ap)
 {
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
   return _VFPRINTF_R (_REENT, fp, fmt0, ap);
 }
 
@@ -875,7 +875,9 @@ reswitch:   switch (ch) {
                                        if (prec || flags & ALT)
                                                size += prec + 1;
                                } else  /* "0.X" */
-                                       size = prec + 2;
+                                        size = (prec || flags & ALT)
+                                                  ? prec + 2
+                                                  : 1;
                        } else if (expt >= ndig) {      /* fixed g fmt */
                                size = expt;
                                if (flags & ALT)
index 47b0d1c61081f34d556e055261aaf4ed795cac1a..4f14d3a504a99317899a4162d067e1ca19a7815c 100644 (file)
@@ -224,7 +224,7 @@ _DEFUN (vfscanf, (fp, fmt, ap),
     _CONST char *fmt _AND 
     va_list ap)
 {
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   return __svfscanf_r (_REENT, fp, fmt, ap);
 }
 
index 0923ff84de22393a2cbd87634f0a758a7b98d3d1..d3b620bed872ecdd37b0d6e69d3fc70ca2731c64 100644 (file)
@@ -64,7 +64,7 @@ _VOID
 _DEFUN(clearerr, (fp),
        FILE * fp)
 {
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   _flockfile (fp);
   __sclearerr (fp);
   _funlockfile (fp);
index 66d71c2d4965e3402bf422b60bb38c54a3ae2051..bb3acb624fde241a3f8484844c8209137f80c4f1 100644 (file)
@@ -76,7 +76,7 @@ _DEFUN(_fclose_r, (rptr, fp),
 
   __sfp_lock_acquire ();
 
-  CHECK_INIT (rptr);
+  CHECK_INIT (rptr, fp);
 
   _flockfile (fp);
   
index aff4e84c8b31f9a9473b240650a9bd6c576b77fd..e8db65b86659ebe1438c6cf54fc7a2da43f9f0b6 100644 (file)
@@ -57,7 +57,7 @@ _DEFUN(feof, (fp),
        FILE * fp)
 {
   int result;
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   _flockfile (fp);
   result = __sfeof (fp);
   _funlockfile (fp);
index ea701bec7f69f39f57dc566be728c888774e3987..72b7ce2c5803f270c1538cdcf179b4b4778f78b8 100644 (file)
@@ -66,7 +66,7 @@ _DEFUN(ferror, (fp),
        FILE * fp)
 {
   int result;
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   _flockfile (fp);
   result = __sferror (fp);
   _funlockfile (fp);
index 05084dde08461beac8b82f3335bb9cc9eb6e640d..bac49804f69e0937c70f307108793bd9ccb29fa6 100644 (file)
@@ -67,7 +67,7 @@ _DEFUN(fflush, (fp),
   if (fp == NULL)
     return _fwalk (_GLOBAL_REENT, fflush);
 
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
 
   _flockfile (fp);
 
index 1802acf7ea3e5258e90edc75c97b58405ac0d40d..e275cfeebea43d962b220f091c7e35df11c89622 100644 (file)
@@ -77,7 +77,7 @@ _DEFUN(_fgetc_r, (ptr, fp),
        FILE * fp)
 {
   int result;
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, fp);
   _flockfile (fp);
   result = __sgetc_r (ptr, fp);
   _funlockfile (fp);
@@ -92,7 +92,7 @@ _DEFUN(fgetc, (fp),
 {
 #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
   int result;
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   _flockfile (fp);
   result = __sgetc_r (_REENT, fp);
   _funlockfile (fp);
index 7416187059c9f6d2288ba1e2ee28caff9a5bb127..7f02e3fcb220679c87553f5398211606e7fb584d 100644 (file)
@@ -96,7 +96,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
 
   s = buf;
 
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, fp);
 
   _flockfile (fp);
 #ifdef __SCLE
index b202cc5e3e331d12e384553d1e7e192b57496a0a..db399eb125bb188b2de5c09abd600fe3be9aa26a 100644 (file)
@@ -54,7 +54,7 @@ _DEFUN(fileno, (f),
        FILE * f)
 {
   int result;
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, f);
   _flockfile (f);
   result = __sfileno (f);
   _funlockfile (f);
index e3270af383d10a7986c72c35cadcd7d732d0a770..ac1354619e2dd9669ab5307def5118d66090fee5 100644 (file)
 #include <sys/lock.h>
 #include "local.h"
 
+#ifdef _REENT_SMALL
+const struct __sFILE_fake __sf_fake_stdin =
+    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
+const struct __sFILE_fake __sf_fake_stdout =
+    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
+const struct __sFILE_fake __sf_fake_stderr =
+    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
+#endif
+
 static _VOID
 _DEFUN(std, (ptr, flags, file, data),
             FILE *ptr _AND
index 520fc0250f76d8e49f0c6f6b050c12289c57d3fd..777a3424247e84dfd14cd808a96a8959ba3db440 100644 (file)
@@ -82,7 +82,7 @@ _DEFUN(_fputc_r, (ptr, ch, file),
        FILE * file)
 {
   int result;
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, file);
    _flockfile (file);
   result = _putc_r (ptr, ch, file);
   _funlockfile (file);
@@ -97,7 +97,7 @@ _DEFUN(fputc, (ch, file),
 {
 #if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED)
   int result;
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, file);
    _flockfile (file);
   result = _putc_r (_REENT, ch, file);
   _funlockfile (file);
index 93537b9e45ed9c983cea89e4b04ebc32c2c5193b..24a108b157dbf00f8ea59ae565022899b4714b92 100644 (file)
@@ -86,7 +86,7 @@ _DEFUN(_fputs_r, (ptr, s, fp),
   uio.uio_iov = &iov;
   uio.uio_iovcnt = 1;
 
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, fp);
 
   _flockfile (fp);
   result = __sfvwrite_r (ptr, fp, &uio);
index d87d9f966aa8feb5b68cef7c3eb3799bcf566142..c2c248979a4c6647c31ebbe67ff3d53bafabd5e7 100644 (file)
@@ -145,7 +145,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
   if ((resid = count * size) == 0)
     return 0;
 
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, fp);
 
   _flockfile (fp);
   if (fp->_r < 0)
index f1fc9dad8a1a3015dd8441cccbc71c4542ec5b2a..445baf1acfa9fc933f6f9468890299b715dbfbb1 100644 (file)
@@ -99,7 +99,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
 
   __sfp_lock_acquire ();
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile (fp);
 
index 09edc42d1167ce56b42a97be29e9724ab39d3289..9944fd809032530a8ccfc178c67c1ca4a3839ad8 100644 (file)
@@ -131,7 +131,7 @@ _DEFUN(_fseek_r, (ptr, fp, offset, whence),
 
   /* Make sure stdio is set up.  */
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile (fp);
 
index 74d6d906c2ceb4f69af26f08ca0047f8fb7d22e6..de5d55d4482a76ef8d755c26b2262b4e7cdd0e19 100644 (file)
@@ -107,7 +107,7 @@ _DEFUN(_ftell_r, (ptr, fp),
 
   /* Ensure stdio is set up.  */
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile (fp);
 
index dd739d6b70f0836a78978b822283c7154d86b50b..3443d95d1b2964b20d9f0a80224317e662fbeedd 100644 (file)
@@ -117,7 +117,7 @@ _DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
    * generally slow and since this occurs whenever size==0.
    */
 
-  CHECK_INIT(ptr);
+  CHECK_INIT(ptr, fp);
 
   _flockfile (fp);
   if (__sfvwrite_r (ptr, fp, &uio) == 0)
index c02fe6b3d1fb02e8f297947e180559f899008a21..5b1fa888a94527950df1521e477ab125ae2778f0 100644 (file)
@@ -91,7 +91,7 @@ _DEFUN(_getc_r, (ptr, fp),
        register FILE *fp)
 {
   int result;
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
   _flockfile (fp);
   result = __sgetc_r (ptr, fp);
   _funlockfile (fp);
@@ -105,7 +105,7 @@ _DEFUN(getc, (fp),
        register FILE *fp)
 {
   int result;
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
   _flockfile (fp);
   result = __sgetc_r (_REENT, fp);
   _funlockfile (fp);
index 0fdfb3add542edde522d33a390f98d206fe1e72e..23fc50218e58c78ae5b66090e91af8f14483e34a 100644 (file)
@@ -79,7 +79,7 @@ _DEFUN(__getdelim, (bufptr, n, delim, fp),
       *n = DEFAULT_LINE_SIZE;
     }
 
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
 
   _flockfile (fp);
 
index 301abce33fe048ecbeebf10e98007302f0f33699..9ae9b40464b4cb783792d34d0181e2de9d9e1bec 100644 (file)
@@ -48,7 +48,31 @@ struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
 
 /* Called by the main entry point fns to ensure stdio has been initialized.  */
 
-#define CHECK_INIT(ptr) \
+#ifdef _REENT_SMALL
+#define CHECK_INIT(ptr, fp) \
+  do                                           \
+    {                                          \
+      if ((ptr) && !(ptr)->__sdidinit)         \
+       __sinit (ptr);                          \
+      if ((fp) == (FILE *)&__sf_fake_stdin)    \
+       (fp) = stdin;                           \
+      else if ((fp) == (FILE *)&__sf_fake_stdout) \
+       (fp) = stdout;                          \
+      else if ((fp) == (FILE *)&__sf_fake_stderr) \
+       (fp) = stderr;                          \
+    }                                          \
+  while (0)
+#else /* !_REENT_SMALL   */
+#define CHECK_INIT(ptr, fp) \
+  do                                           \
+    {                                          \
+      if ((ptr) && !(ptr)->__sdidinit)         \
+       __sinit (ptr);                          \
+    }                                          \
+  while (0)
+#endif /* !_REENT_SMALL  */
+
+#define CHECK_STD_INIT(ptr) \
   do                                           \
     {                                          \
       if ((ptr) && !(ptr)->__sdidinit)         \
index b3008e2879d831117d1f8f5160011af0a90416c7..667324d9daf5102d944202819f48613474ebc26d 100644 (file)
@@ -96,7 +96,7 @@ _DEFUN(_putc_r, (ptr, c, fp),
        register FILE *fp)
 {
   int result;
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
   _flockfile (fp);
   result = __sputc_r (ptr, c, fp);
   _funlockfile (fp);
@@ -111,7 +111,7 @@ _DEFUN(putc, (c, fp),
 {
 #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
   int result;
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
   _flockfile (fp);
   result = __sputc_r (_REENT, c, fp);
   _funlockfile (fp);
index 047387e7915bfd42aca50f5fe293f8f4266c1601..75ba0565f638bf66a679c281075e61d41dd5aa76 100644 (file)
@@ -43,7 +43,7 @@ _DEFUN(__srefill_r, (ptr, fp),
 {
   /* make sure stdio is set up */
 
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
 
   fp->_r = 0;                  /* largely a convenience for callers */
 
index f6871c59d96b22275ba4e50da63caa5b4a24f683..561f68b54638ccc6d3ebf952d78132c6a4ab44ac 100644 (file)
@@ -104,7 +104,7 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
 {
   int ret = 0;
 
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
 
   _flockfile (fp);
 
index fc6fa3160c661f8e679d62349b8d91c199cf0b87..333baa278c2e60c3a9de6a41b49ab4713c760e42 100644 (file)
@@ -81,7 +81,7 @@ _DEFUN(_ungetc_r, (rptr, c, fp),
      ??? Might be able to remove this as some other stdio routine should
      have already been called to get the char we are un-getting.  */
 
-  CHECK_INIT (rptr);
+  CHECK_INIT (rptr, fp);
 
   _flockfile (fp);
   
index 9e5477aa6fc68c456187607f4e3e254a847f4682..91b2c234d2602993b2f530be1807f895eabd3fb4 100644 (file)
@@ -540,7 +540,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
            (u_long)GET_ARG (N, ap, u_int))
 #endif
 
-       CHECK_INIT (data);
+       CHECK_INIT (data, fp);
        _flockfile (fp);
 
        /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */
index 7bf0aaf9aa867f3c7a240a56f42900d34e83deb9..c9808bb48cb8f2e4af204790a78a8a130f5d443f 100644 (file)
@@ -231,7 +231,7 @@ _DEFUN(VFSCANF, (fp, fmt, ap),
        _CONST char *fmt _AND 
        va_list ap)
 {
-  CHECK_INIT(_REENT);
+  CHECK_INIT(_REENT, fp);
   return __SVFSCANF_R (_REENT, fp, fmt, ap);
 }
 
@@ -253,7 +253,7 @@ _DEFUN(_VFSCANF_R, (data, fp, fmt, ap),
        _CONST char *fmt    _AND 
        va_list ap)
 {
-  CHECK_INIT(data);
+  CHECK_INIT(data, fp);
   return __SVFSCANF_R (data, fp, fmt, ap);
 }
 
index 0d2b72ea1c63c79e5c9fb6c2d3ceeecd924495c7..5f1e85a27df9e9ac8bd31c832be3f22aa45bcd71 100644 (file)
@@ -42,7 +42,7 @@ _DEFUN(__swbuf_r, (ptr, c, fp),
 
   /* Ensure stdio has been initialized.  */
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   /*
    * In case we cannot write, or longjmp takes us out early,
index cf56c2abcada3f879f1ff2eda053329dd1797a8f..ba98813b363bb0ce42fe1eefcc34bb8f88062d7f 100644 (file)
@@ -34,7 +34,7 @@ _DEFUN(__swsetup, (fp),
 {
   /* Make sure stdio is set up.  */
 
-  CHECK_INIT (_REENT);
+  CHECK_INIT (_REENT, fp);
 
   /*
    * If we are not writing, we had better be reading and writing.
index cb766051cfe3e139478905e96808c5fc7f4abdbe..c795cba4467f903a5039a8ca5a6509567a8f9175 100644 (file)
@@ -99,7 +99,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
 
   __sfp_lock_acquire ();
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile(fp);
 
index 971bd4d0898ceee88bd798ff789df0476b41dd09..fe7e9be06c2933d0858b593f072203cc451fde3c 100644 (file)
@@ -113,7 +113,7 @@ _DEFUN (_fseeko64_r, (ptr, fp, offset, whence),
 
   /* Make sure stdio is set up.  */
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile(fp);
 
index ef3317561c5294c878ba44dbf9e296eaf6373dc1..2a8d309251aabb1336c1f5cf29a3ba5c780d969c 100644 (file)
@@ -93,7 +93,7 @@ _DEFUN (_ftello64_r, (ptr, fp),
 
   /* Ensure stdio is set up.  */
 
-  CHECK_INIT (ptr);
+  CHECK_INIT (ptr, fp);
 
   _flockfile(fp);
 
This page took 0.081007 seconds and 5 git commands to generate.