#ifdef for 32-bit platform

后端 未结 11 1438
眼角桃花
眼角桃花 2020-12-30 00:37

In an application I maintain, we\'ve encountered a problem with file descriptor limitations affecting the stdlib. This problem only affects the 32-bit version of the standar

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 00:56

    What I would probably end up doing, is within a Makefile, determine if you are on a 32 bit platform or 64 bit using uname. Then, add to your CFLAGS, -DX32, or -DX64. That you could just #ifdef X64.

    But this is just a unixy solution. I'm not sure what I would do on windows.

提交回复
热议问题