__USE_FILE_OFFSET64 vs. _FILE_OFFSET_BITS=64

前端 未结 2 2007
故里飘歌
故里飘歌 2021-02-02 10:21

I am trying to maintain code that compiles on lots of different systems. I\'ve seen a dozen different ways of asking for lseek that takes 64-bits. Some systems use

2条回答
  •  长发绾君心
    2021-02-02 10:45

    In features.h, you see the relation between _FILE_OFFSET_BITS and __USE_FILE_OFFSET64.

    #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
    # define __USE_FILE_OFFSET64    1
    #endif
    

    So, only _FILE_OFFSET_BITS is meant for the users.

提交回复
热议问题