Subject: [Boost-bugs] [Boost C++ Libraries] #4815: dependency on obsolete versions of mmap and shmdt
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-04 22:31:01
#4815: dependency on obsolete versions of mmap and shmdt
----------------------------------------+-----------------------------------
Reporter: stephen.clamage@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
----------------------------------------+-----------------------------------
Compiler error messages when compiling on Solaris: [[br]]
"../../../boost/interprocess/mapped_region.hpp", line 549: Error: Formal
argument 1 of type char* in call to shmdt(char*) is being passed void*.
[[br]]
"../../../boost/interprocess/anonymous_shared_memory.hpp", line 87: Error:
Formal argument 1 of type char* in call to mmap(char*, unsigned, int, int,
int, long) is being passed void*.
The problem is that the calls to shmdt and mmap depend on passing a void*.
In the obsolete XPG4 version of Unix (roughly POSIX.2a-1992), these
functions indeed took a void* argument. In all later versions of standard
Unix, these functions take a char* argument. Portable code therefore
cannot depend on passing a void*, but can depend on passing a char* to
these functions.
The offending code should be changed either to pass a char* argument, or
the argument should be cast to char* at the point of the call.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4815> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC