stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Updated: (STDCXX-1045) [OpenSolaris] compilation errors on madvise
Date Mon, 18 Jan 2010 01:02:54 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Sebor updated STDCXX-1045:
---------------------------------

    Attachment: stdcxx-4.2.1-memattr.cpp.63.diff
                stdcxx-4.2.1-etc-config-src-POSIX_MADVISE.cpp

Attached Ben's patches for this issue.

> [OpenSolaris] compilation errors on madvise
> -------------------------------------------
>
>                 Key: STDCXX-1045
>                 URL: https://issues.apache.org/jira/browse/STDCXX-1045
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Build and Installation
>    Affects Versions: 4.2.1
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2.2
>
>         Attachments: stdcxx-4.2.1-etc-config-src-POSIX_MADVISE.cpp, stdcxx-4.2.1-memattr.cpp.63.diff
>
>
> From Ben's email below it sounds as though we need a test for {{posix_madvise}} and use
it in favor of alternatives such as {{madvise}} when it's available:
> -------- Original Message --------
> Subject: madvise on Solaris
> Date: Fri, 18 Dec 2009 18:00:30 +0000
> From: John Taylor <xxx@xxx.xxx>
> To: msebor AT gmail.com
> [...]
> Anyway, I build stdcxx-4.2.1 on Solaris 10 and SXCE.
> I notice that {{madvise}} doesn't get recognized, due to how the
> function is defined.  Not a problem.  Opensolaris, and late
> versions of SXCE, have introduced a function wrapper called
> {{posix_madvise}}, which basically wraps the {{madvise}} function
> so that it's more palletable to the C++ compiler.
> In line 134 of {{src/memattr.cpp}}, there's a comment that I don't really
> understand,
> nor can I find any reference to the "unreliable" comment via google or stdcxx
> lists.
> {code}
> #  ifdef _RWSTD_OS_SUNOS
>         char dummy = '\0';
>         // on Solaris use mincore() instead of madvise() since
>         // the latter is unreliable
> {code}
> I admit to not being a very experience c/c++ programmer, but from my
> read of the solaris man pages for {{mincore}} and {{madvise}}, I'm not
> entirely convinced that this is a better work around.  Does anyone really
> know what this "unreliable" means?
> Would it be appropriate to "duplicate" Sun's wrapper for S10 and
> SXCE/OSOL which don't have {{posix_madvise}} (given it's CDDL license
> status) and use {{posix_madvise}} where approrpriate?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message