Example #1
0
int fgetc( FILE * stream )
{
    _PDCLIB_flockfile( stream );
    int c = _PDCLIB_fgetc_unlocked( stream );
    _PDCLIB_funlockfile( stream );
    return c;
}
Example #2
0
long int ftell( FILE * stream )
{
    _PDCLIB_flockfile( stream );
    long int off = _PDCLIB_ftell_unlocked( stream );
    _PDCLIB_funlockfile( stream );
    return off;
}
Example #3
0
int fflush( FILE * stream )
{
    _PDCLIB_flockfile( stream );
    int res = _PDCLIB_fflush_unlocked(stream);
    _PDCLIB_funlockfile( stream );
    return res;
}
Example #4
0
int feof( FILE * stream )
{
    _PDCLIB_flockfile( stream );
    int eof = _PDCLIB_feof_unlocked( stream );
    _PDCLIB_funlockfile( stream );
    return eof;
}
Example #5
0
int fseek( FILE * stream, long loffset, int whence )
{
    _PDCLIB_flockfile( stream );
    int r = _PDCLIB_fseek_unlocked( stream, loffset, whence );
    _PDCLIB_funlockfile( stream );
    return r;
}
Example #6
0
int fputc( int c, FILE * stream )
{
    _PDCLIB_flockfile( stream );
    int r = _PDCLIB_fputc_unlocked( c, stream );
    _PDCLIB_funlockfile( stream );
    return r;
}
Example #7
0
uint_fast64_t _PDCLIB_ftell64( FILE * stream )
{
  _PDCLIB_flockfile( stream );
  uint_fast64_t pos = _PDCLIB_ftell64_unlocked( stream );
  _PDCLIB_funlockfile( stream );
  return pos;
}
Example #8
0
int fsetpos( FILE * stream, 
             const _PDCLIB_fpos_t * pos )
{
    _PDCLIB_flockfile( stream );
    int res = _PDCLIB_fsetpos_unlocked( stream, pos );
    _PDCLIB_funlockfile( stream );
    return res;
}
Example #9
0
int fflush(FILE * stream)
{
    int res;

    if (stream) {
        _PDCLIB_flockfile(stream);
        res = _PDCLIB_fflush_unlocked(stream);
        _PDCLIB_funlockfile(stream);
    } else {
        res = _PDCLIB_fflush_unlocked(NULL);
    }

    return res;
}