I have multiple functions that could use simplfying but for now I'll start with the file io related functions as I want to get rid of the need for synchronised offsets, MSW uses the OVERLAPPED structure for this, on linux however all I've found is write() and read(), both of which do not support arbitrary offsets, I theorise I could just duplicate the file descriptor but keeping in mind older systems that do not support unlimited file descriptors I decided going that route would be a bad idea, what other means would there be besides just recording the offset and putting it back after?