From: Alon Bar-L. <alo...@gm...> - 2008-01-22 11:37:02
|
On 1/22/08, Miklos Szeredi <mi...@sz...> wrote: > > > Well, -D_FILE_OFFSET_BITS=64 is not required on 64bit, but it doesn't > > > hurt either. And always checking it has the advantage, that a > > > developer using a 64 bit architecture will not forget about this, and > > > break 32bit compiliation. > > > > But this is GNU specific, can you please add user land independent > > constant too? > > What's the non-GNU way of doing this? > > We can add something like this if needed: > > #if defined(__GNUC__) && _FILE_OFFSET_BITS != 64 > #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! > #endif I believe something like: #if defined(SIZEOF_OFF_T) && SIZEOF_OFF_T != 64/8 #error Supported only 64 bit off_t #else #if defined(__GNUC__) && _FILE_OFFSET_BITS != 64 #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! #endif #endif What do you think? Alon. |