This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]