- /* Position of start-of-buffer, plus:
- - buffered, unwritten content (for output streams), or
- - already-parsed content from buffer (for input streams)
- */
- return (long int)( stream->pos.offset + stream->bufidx - stream->ungetidx );
+ return off64;
+}
+
+long int ftell( FILE * stream )
+{
+ _PDCLIB_flockfile( stream );
+ long int off = _PDCLIB_ftell_unlocked( stream );
+ _PDCLIB_funlockfile( stream );
+ return off;