Subversion Repositories Kolibri OS

Rev

Rev 4921 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4921 Rev 6099
Line 33... Line 33...
33
    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
33
    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
34
const struct __sFILE_fake __sf_fake_stderr =
34
const struct __sFILE_fake __sf_fake_stderr =
35
    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
35
    {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
36
#endif
36
#endif
Line -... Line 37...
-
 
37
 
-
 
38
#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
-
 
39
_NOINLINE_STATIC _VOID
37
 
40
#else
-
 
41
static _VOID
38
static _VOID
42
#endif
39
_DEFUN(std, (ptr, flags, file, data),
43
_DEFUN(std, (ptr, flags, file, data),
40
            FILE *ptr _AND
44
            FILE *ptr _AND
41
            int flags _AND
45
            int flags _AND
42
            int file  _AND
46
            int file  _AND
Line 168... Line 172...
168
 
172
 
169
_VOID
173
_VOID
170
_DEFUN(_cleanup_r, (ptr),
174
_DEFUN(_cleanup_r, (ptr),
171
       struct _reent *ptr)
175
       struct _reent *ptr)
-
 
176
{
-
 
177
  int (*cleanup_func) (struct _reent *, FILE *);
-
 
178
#ifdef _STDIO_BSD_SEMANTICS
-
 
179
  /* BSD and Glibc systems only flush streams which have been written to
-
 
180
     at exit time.  Calling flush rather than close for speed, as on
-
 
181
     the aforementioned systems. */
-
 
182
  cleanup_func = __sflushw_r;
-
 
183
#else
-
 
184
  /* Otherwise close files and flush read streams, too.
-
 
185
     Note we call flush directly if "--enable-lite-exit" is in effect.  */
-
 
186
#ifdef _LITE_EXIT
-
 
187
  cleanup_func = _fflush_r;
172
{
188
#else
-
 
189
  cleanup_func = _fclose_r;
-
 
190
#endif
173
  _CAST_VOID _fwalk(ptr, fclose);
191
#endif
174
  /* _CAST_VOID _fwalk (ptr, fflush); */	/* `cheating' */
192
  _CAST_VOID _fwalk_reent (ptr, cleanup_func);
Line 175... Line 193...
175
}
193
}
176
 
194
 
177
#ifndef _REENT_ONLY
195
#ifndef _REENT_ONLY
Line 273... Line 291...
273
/* Walkable file locking routine.  */
291
/* Walkable file locking routine.  */
274
static int
292
static int
275
_DEFUN(__fp_lock, (ptr),
293
_DEFUN(__fp_lock, (ptr),
276
       FILE * ptr)
294
       FILE * ptr)
277
{
295
{
-
 
296
  if (!(ptr->_flags2 & __SNLK))
278
  _flockfile (ptr);
297
    _flockfile (ptr);
Line 279... Line 298...
279
 
298
 
280
  return 0;
299
  return 0;
Line 281... Line 300...
281
}
300
}
282
 
301
 
283
/* Walkable file unlocking routine.  */
302
/* Walkable file unlocking routine.  */
284
static int
303
static int
285
_DEFUN(__fp_unlock, (ptr),
304
_DEFUN(__fp_unlock, (ptr),
-
 
305
       FILE * ptr)
286
       FILE * ptr)
306
{
Line 287... Line 307...
287
{
307
  if (!(ptr->_flags2 & __SNLK))
288
  _funlockfile (ptr);
308
    _funlockfile (ptr);