This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ on solaris
On Feb 16, 2001, Patrick Mauritz <oxygene@gmx.net> wrote:
> mman.h provides several definitions of mmap - without -D_XPG4_2 it chooses
> the wrong definition:
> cname_t* mmap( cname_t, int, int, int, int, size_t)
> instead of
> void* mmap( cname_t, int, int, int, int, size_t)
> which is macro-guarded by "#if (_POSIX_C_SOURCE > 2) || defined (_XPG4_2)"
> gcc fulfills that, it seems like g++ does not
It does, as long as your code complies with the declaration in
effect. C++ is pickier about C about type compatibilities, that's
all. It's just harder to make this kind of code compile with a C++
compiler. It's a fact of life.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me