Jean-Marc Lasgouttes wrote: >I am not sure about that, but I believe you :) However, until we are >sure we have no complaint from HP-UX, AIX SCO or whatever people, I'd >rather not put it in 1.1.6. > OK. Please apply this to 1.2cvs so we can find out if this fixes it for everyone.
>Is it possible to do a reintepret_cast which would work always? >Something like > if (reinterpret_cast<void*>(mm) == reinterpret_cast<void*>(MAP_FAILED)) >or is C++ stupid enough to reject this when one type is already void*? > We can't do this because we have to know what type to declare mm as... (I suppose we could move the cast to wrap around mmap instead, but...) By using the _POSIX_C_SOURCE macro, I expect that mmap should return void* always. In fact, I want people to try out this patch and tell me if it doesn't work on their platform as is. >We could also use good old C casts (since this is a C matter, after >all), if Lars agrees. It seems that now that the problem is somewhat >understood, a brutal cast (with a comment explaining why it is needed) >may be enough and better than convoluted configure things. > I only suggested all that because somebody rejected the simple solution... >We already define _ALL_C_SOURCE in config.h in some cases. Is it also >useful here? > Don't know anything about that one. Ben.