This is the mail archive of the
mailing list for the GCC project.
Re: Question on -Werror usage in Makefiles...
> Yes. I used to have sol2.h including sys/mman.h to eliminate the
> warning, but Alex removed it a long time ago. See:
Ah! yes, thanks for the pointer.
> The current situation is entirely silly, non-solaris implementations
> include sol2.h. So e.g. they define "sun" even though they're not
> from Sun Microsystems. At the same time they prevent us from
> including legitimate solaris2 headers like sys/mman.h.
I agree this is a mess.
> Long term we should fix this by splitting the solaris stuff from the
> elf? svr4? stuff or whatever it is they have in common, however short
> term we can fix the warning by prototyping mprotect manually in the
> sol2.h TRANSFER_FROM_TRAMPOLINE macro.
Just to fix the warning? This seems like sweeping the problem under the rug
to me. Which version of the prototype would you choose?
> This requires a fixinclude patch. We already do similar fixinclude
> hacks in solaris_mutex_init_1 and solaris_mutex_init_2. I'm working
> on something, but my time is limited so it may take a little while.
> This is something we should fix regardless of whether the target file
> -Werror patch is reverted.