* Johannes Groedem johs+n@ifi.uio.no:
The position is set correctly (confirmed by reading a character at that position), and the value returned when the position is set is [...]
I'm quite sure this has nothing to do with it, but as I went digging, I found that you're using ints (and ___stream_index, which is an int) to store return values from lseek, and as the offset value to lseek. These should both be off_t, which on my platform is 8 bytes, and which is usually 4 bytes on 32-bit platforms.