diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-09-09 18:29:12 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-09-11 08:56:21 +0000 |
commit | 1ccb7c8d11bf6f3b795893f8ec88106e161747d5 (patch) | |
tree | ff1a44b7dba118c37bda9e36a9d2e27a5a63a050 /perlio.c | |
parent | ddfa59c744ee4cca9b8e77d5034cfbacac89bcda (diff) | |
download | perl-1ccb7c8d11bf6f3b795893f8ec88106e161747d5.tar.gz |
C++: Solaris CC now compiles "perl"
Message-ID: <4502B398.6060505@iki.fi>
p4raw-id: //depot/perl@28814
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4593,7 +4593,14 @@ PerlIOMmap_unmap(pTHX_ PerlIO *f) if (m->len) { PerlIOBuf * const b = &m->base; if (b->buf) { - code = munmap(m->mptr, m->len); + /* The munmap address argument is tricky: depending on the + * standard it is either "void *" or "caddr_t" (which is + * usually "char *" (signed or unsigned). If we cast it + * to "void *", those that have it caddr_t and an uptight + * C++ compiler, will freak out. But casting it as char* + * should work. Maybe. (Using Mmap_t figured out by + * Configure doesn't always work, apparently.) */ + code = munmap((char*)m->mptr, m->len); b->buf = NULL; m->len = 0; m->mptr = NULL; |