Can I seek a position beyond 2GB in C using the standard library?

前端 未结 3 643
天涯浪人
天涯浪人 2021-01-13 00:37

I am making a program that reads disk images in C. I am trying to make something portable, so I do not want to use too many OS-specific libraries. I am aware there are many

3条回答
  •  情深已故
    2021-01-13 00:59

    There is no portable way.

    On Linux there are fseeko() and ftello(), pair (need some defines, check ftello()).

    On Windows, I believe you have to use _fseeki64() and _ftelli64()

    #ifdef is your friend

提交回复
热议问题