How can I portably turn on large file support?

前端 未结 1 1356
梦谈多话
梦谈多话 2021-01-15 11:13

I am currently writing a C program that reads and writes files that might be over 2 GiB in size. On linux feature_test_macros(7) specifies:

1条回答
  •  囚心锁ツ
    2021-01-15 12:12

    Use the confstr interface or the corresponding getconf program and try the various _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, etc. options until you find one that works. This will give you CFLAGS, LDFLAGS, and LIBS needed for an appropriate environment.

    0 讨论(0)
提交回复
热议问题